text:
# Off the blog. [“Matter” cannot act “where” it is not.]

I am going to go off the blogging activity in general, and this blog in most particular, for some time. [And, this time round, I will keep my promise.]

The reason is, I’ve just received the shipment of a book which I had ordered about a month ago. Though only about 300 pages in length, it’s going to take me weeks to complete. And, the book is gripping enough, and the issue important enough, that I am not going to let a mere blog or two—or the entire Internet—come in the way.

I had read it once, almost cover-to-cover, some 25 years ago, while I was a student in UAB.

Reading a book cover-to-cover—I mean: in-sequence, and by that I mean: starting from the front-cover and going through the pages in the same sequence as the one in which the book has been written, all the way to the back-cover—was quite odd a thing to have happened with me, at that time. It was quite unlike my usual habits whereby I am more or less always randomly jumping around in a book, even while reading one for the very first time.

But this book was different; it was extraordinarily engaging.

In fact, as I vividly remember, I had just idly picked up this book off a shelf from the Hill library of UAB, for a casual examination, had browsed it a bit, and then had began sampling some passage from nowhere in the middle of the book while standing in an library aisle. Then, some little time later, I was engrossed in reading it—with a folded elbow resting on the shelf, head turned down and resting against a shelf rack (due to a general weakness due to a physical hunger which I was ignoring [and I would have have to go home and cook something for myself; there was none to do that for me; and so, it was easy enough to ignore the hunger]). I don’t honestly remember how the pages turned. But I do remember that I must have already finished some 15-20 pages (all “in-the-order”!) before I even realized that I had been reading this book while still awkwardly resting against that shelf-rack. …

… I checked out the book, and once home [student dormitory], began reading it starting from the very first page. … I took time, days, perhaps weeks. But whatever the length of time that I did take, with this book, I didn’t have to jump around the pages.

The issue that the book dealt with was:

[Instantaneous] Action at a Distance.

The book in question was:

Hesse, Mary B. (1961) “Forces and Fields: The concept of Action at a Distance in the history of physics,” Philosophical Library, Edinburgh and New York.

It was the very first book I had found, I even today distinctly remember, in which someone—someone, anyone, other than me—had cared to think about the issues like the IAD, the concepts like fields and point particles—and had tried to trace their physical roots, to understand the physical origins behind these (and such) mathematical concepts. (And, had chosen to say “concepts” while meaning ones, rather than trying to hide behind poor substitute words like “ideas”, “experiences”, “issues”, “models”, etc.)

But now coming to Hesse’s writing style, let me quote a passage from one of her research papers. I ran into this paper only recently, last month (in July 2017), and it was while going through it that I happened [once again] to remember her book. Since I did have some money in hand, I did immediately decide to order my copy of this book.

Anyway, the paper I have in mind is this:

Hesse, Mary B. (1955) “Action at a Distance in Classical Physics,” Isis, Vol. 46, No. 4 (Dec., 1955), pp. 337–353, University of Chicago Press/The History of Science Society.

The paper (it has no abstract) begins thus:

The scholastic axiom that “matter cannot act where it is not” is one of the very general metaphysical principles found in science before the seventeenth century which retain their relevance for scientific theory even when the metaphysics itself has been discarded. Other such principles have been fruitful in the development of physics: for example, the “conservation of motion” stated by Descartes and Leibniz, which was generalized and given precision in the nineteenth century as the doctrine of the conservation of energy; …

Here is another passage, once again, from the same paper:

Now Faraday uses a terminology in speaking about the lines of force which is derived from the idea of a bundle of elastic strings stretched under tension from point to point of the field. Thus he speaks of “tension” and “the number of lines” cut by a body moving in the field. Remembering his discussion about contiguous particles of a dielectric medium, one must think of the strings as stretching from one particle of the medium to the next in a straight line, the distance between particles being so small that the line appears as a smooth curve. How seriously does he take this model? Certainly the bundle of elastic strings is nothing like those one can buy at the store. The “number of lines” does not refer to a definite number of discrete material entities, but to the amount of force exerted over a given area in the field. It would not make sense to assign points through which a line passes and points which are free from a line. The field of force is continuous.

See the flow of the writing? the authentic respect for the intellectual history, and yet, the overriding concern for having to reach a conclusion, a meaning? the appreciation for the subtle drama? the clarity of thought, of expression?

Well, these passages were from the paper, but the book itself, too, is similarly written.

Obviously, while I remain engaged in [re-]reading the book [after a gap of 25 years], don’t expect me to blog.

After all, even I cannot act “where” I am not.

A Song I Like:

[I thought a bit between this song and another song, one by R.D. Burman, Gulzar and Lata. In the end, it was this song which won out. As usual, in making my decision, the reference was exclusively made to the respective audio tracks. In fact, in the making of this decision, I happened to have also ignored even the excellent guitar pieces in this song, and the orchestration in general in both. The words and the tune were too well “fused” together in this song; that’s why. I do promise you to run the RD song once I return. In the meanwhile, I don’t at all mind keeping you guessing. Happy guessing!]

(Hindi) “bheegi bheegi…” [“bheege bheege lamhon kee bheegee bheegee yaadein…”]
Music and Lyrics: Kaushal S. Inamdar
Singer: Hamsika Iyer

/

# QM: The physical view it takes—1

So, what exactly is quantum physics like? What is the QM theory all about?

You can approach this question at many levels and from many angles. However, if an engineer were to ask me this question (i.e., an engineer with sufficiently good grasp of mathematics such as differential equations and linear algebra), today, I would answer it in the following way. (I mean only the non-relativistic QM here; relativistic QM is totally beyond me, at least as of today):

Each physics theory takes a certain physical view of the universe, and unless that view can be spelt out in a brief and illuminating manner, anything else that you talk about it (e.g. the maths of the theory) tends to become floating, even meaningless.

So, when we speak of QM, we have to look for a physical view that is at once both sufficiently accurate and highly meaningful intuitively.

But what do I mean by a physical view? Let me spell it out first in the context of classical mechanics so that you get a sense of that term.

Personally, I like to think of separate stages even within classical mechanics.

Consider first the Newtonian mechanics. We can say that the Newtonian mechanics is all about matter and motion. (Maxwell it was, I think, who characterized it in this beautifully illuminating a way.) Newton’s original mechanics was all about the classical bodies. These were primarily discrete—not quite point particles, but finite ones, with each body confined to a finite and isolated region of space. They had no electrical attributes or features (such as charge, current, or magnetic field strength). But they did possess certain dynamical properties, e.g., location, size, density, mass, speed, and most importantly, momentum—which was, using modern terminology, a vector quantity. The continuum (e.g. a fluid) was seen as an extension of the idea of the discrete bodies, and could be studied by regarding an infinitesimal part of the continuum as if it were a discrete body. The freshly invented tools of calculus allowed Newton to take the transition from the discrete bodies (billiard balls) to both: the point-particles (via the shells-argument) as well as to the continuum (e.g. the drag force on a submerged body.)

The next stage was the Euler-Lagrange mechanics. This stage represents no new physics—only a new physical view. The E-L mechanics essentially was about the same kind of physical bodies, but now a number (often somewhat wrongly called a scalar) called energy being taken as the truly fundamental dynamical attribute. The maths involved the so-called variations in a global integral expression involving an energy-function (or other expressions similar to energy), but the crucial dynamic variable in the end would be a mere number; the number would be the outcome of evaluating a definite integral. (Historically, the formalism was developed and applied decades before the term energy could be rigorously isolated, and so, the original writings don’t use the expression “energy-function.” In fact, even today, the general practice is to put the theory using only the mathematical and abstract terms of the “Lagrangian” or the “Hamiltonian.”) While Newton’s own mechanics was necessarily about two (or more) discrete bodies locally interacting with each other (think collisions, friction), the Euler-Lagrange mechanics now was about one discrete body interacting with a global field. This global field could be taken to be mass-less. The idea of a global something (it only later on came to be called a field) was already a sharp departure from the original Newtonian mechanics. The motion of the massive body could be predicted using this kind of a formalism—a formalism that probed certain hypothetical variations in the global field (or, more accurately, in the interactions that the global field had with the given body). The body itself was, however, exactly as in the original Newtonian mechanics: discrete (or spread over definite and delimited region of space), massive, and without any electrical attributes or features.

The next stage, that of the classical electrodynamics, was about the Newtonian massive bodies but now these were also seen as endowed with the electrical attributes in addition to the older dynamical attributes of momentum or energy. The global field now became more complicated than the older gravitational field. The magnetic features, initially regarded as attributes primarily different from the electrical ones, later on came to be understood as a mere consequence of the electrical ones. The field concept was now firmly entrenched in physics, even though not always very well understood for what it actually was: as a mathematical abstraction. Hence the proliferation in the number of physical aethers. People rightly sought the physical referents for the mathematical abstraction of the field, but they wrongly made hasty concretizations, and that’s how there was a number of aethers: an aether of light, an aether of heat, an aether of EM, and so on. Eventually, when the contradictions inherent in the hasty concretizations became apparent, people threw the baby with the water, and it was not long before Einstein (and perhaps Poincare before him) would wrongly declare the universe to be devoid of any form of aether.

I need to check the original writings by Newton, but from whatever I gather (or compile, perhaps erroneously), I think that Newton had no idea of the field. He did originate the idea of the universal gravitation, but not that of the field of gravity. I think he would have always taken gravity to be a force that was directly operating between two discrete massive bodies, in isolation to anything else—i.e., without anything intervening between them (including any kind of a field). Gravity, a force (instantaneously) operating at a distance, would be regarded as a mere extension of the idea of the force by the direct physical contact. Gravity thus would be an effect of some sort of a stretched spring to Newton, a linear element that existed and operated between only two bodies at its two ends. (The idea of a linear element would become explicit in the lines of force in Faraday’s theorization.) It was just that with gravity, the line-like spring was to be taken as invisible. I don’t know, but that seems like a reasonable implicit view that Newton must have adopted. Thus, the idea of the field, even in its most rudimentary form, probably began only with the advent of the Euler-Lagrange mechanics. It anyway reached its full development in Maxwell’s synthesis of electricity and magnetism into electromagnetism. Remove the notion of the field from Maxwell’s theory, and it is impossible for the theory to even get going. Maxwellian EM cannot at all operate without having a field as an intermediate agency transmitting forces between the interacting massive bodies. On the other hand, Newtonian gravity (at least in its original form and at least for simpler problems) can. In Maxwellian EM, if two bodies suddenly change their relative positions, the rest of the universe comes to feel the change because the field which connects them all has changed. In Newtonian gravity, if two bodies suddenly change their relative positions, each of the other bodies in the universe comes to feel it only because its distances from the two bodies have changed—not because there is a field to mediate that change. Thus, there occurs a very definite change in the underlying physical view in this progression from Newton’s mechanics to Euler-Lagrange-Hamilton’s to Maxwell’s.

So, that’s what I mean by the term: a physical view. It is a view of what kind of objects and interactions are first assumed to exist in the universe, before a physics theory can even begin to describe them—i.e., before any postulates can even begin to be formulated. Let me hasten to add that it is a physical view, and not a philosophical view, even though physicists, and worse, mathematicians, often do confuse the issue and call it a (mere) philosophical discussion (if not a digression). (What better can you expect from mathematicians anyway? Or even from physicists?)

Now, what about quantum mechanics? What kind of objects does it deal with, and what kind of a physical view is required in order to appreciate the theory best?

What kind of objects does QM deal with?

QM once again deals with bodies that do have electromagnetic attributes or features—not just the dynamical ones. However, it now seeks to understand and explain how these features come to operate so that certain experimentally observed phenomena such as the cavity radiation and the gas spectra (i.e., the atomic absorption- and emission-spectra) can be predicted with a quantitative accuracy. In the process, QM keeps the idea of the field more or less intact. (No, strictly speaking it doesn’t, but that’s what physicists think anyway). However, the development of the theory was such that it had to bring the idea of the spatially delimited massive body, occupying a definite place and traveling via definite paths, into question. (In fact, quantum physicists went overboard and threw it out quite gleefully, without a thought.) So, that is the kind of “objects” it must assume before its theorization can at all begin. Physicists didn’t exactly understand what they were dealing with, and that’s how arose all its mysteries.

Now, how about its physical view?

In my (by now revised) opinion, quantum mechanics basically is all about the electronic orbitals and their evolutions (i.e., changes in the orbitals, with time).

(I am deliberately using the term “electronic” orbital, and not “atomic” orbital. When you say “atom,” you must mean something that is localized—else, you couldn’t possibly distinguish this object from that at the gross scale. But not so when it is the electronic orbitals. The atomic nucleus, at least in the non-relativistic QM, can be taken to be a localized and discrete “particle,” but the orbitals cannot be. Since the orbitals are necessarily global, since they are necessarily spread everywhere, there is no point in associating something local with them, something like the atom. Hence the usage: electronic orbitals, not atomic orbitals.)

The electronic orbital is a field whose governing equation is the second-order linear PDE that is Schrodinger’s equation, and the problems in the theory involve the usual kind of IVBV problems. But a further complexity arises in QM, because the real-valued orbital density isn’t the primary unknown in Schrodinger’s equation; the primary unknown is the complex-valued wavefunction.

The Schrodinger equation itself is basically like the diffusion equation, but since the primary unknown is complex-valued, it ends up showing some of the features of the wave equation. (That’s one reason. The other reason is, the presence of the potential term. But then, the potential here is the electric potential, and so, once again, indirectly, it has got to do with the complex nature of the wavefunction.) Hence the name “wave equation,” and the term “wavefunction.” (The “wavefunction” could very well have been called the “diffusionfunction,” but Schrodinger chose to call it the wavefunction, anyway.) Check it out:

Here is the diffusion equation:

$\dfrac{\partial}{\partial t} \phi = D \nabla^2 \phi$
Here is the Schrodinger equation:
$\dfrac{\partial}{\partial t} \Psi = \dfrac{i\hbar}{2\mu} \nabla^2 \Psi + V \Psi$

You can always work with two coupled real-valued equations instead of the single, complex-valued, Schrodinger’s equation, but it is mathematically more convenient to deal with it in the complex-valued form. If you were instead to work with the two coupled real-valued  equations, they would still end up giving you exactly the same results as the Schrodinger equation. You will still get the Maxwellian EM after conducting suitable grossing out processes. Yes, Schrodinger’s equation must give rise to the Maxwell’s equations. The two coupled real-valued equations would give you that (and also everything else that the complex-valued Schrodinger’s equation does). Now, Maxwell’s equations do have an inherent  coupling between the electric and magnetic fields. This, incidentally, is the simplest way to understand why the wavefunction must be complex-valued. [From now on, don’t entertain the descriptions like: “Why do the amplitudes have to be complex? I don’t know. No one knows. No one can know.” etc.]

But yes, speaking in overall terms, QM is, basically, all about the electronic orbitals and the changes in them. That is the physical view QM takes.

Hold that line in your mind any time you hit QM, and it will save you a lot of trouble.

When it comes to the basics or the core (or the “heart”) of QM, physicists will never give you the above answer. They will give you a lot many other answers, but never this one. For instance, Richard Feynman thought that the wave-particle duality (as illustrated by the single-particle double-slit interference arrangement) was the real key to understanding the QM theory. Bohr and Heisenberg instead believed that the primacy of the observables and the principle of the uncertainty formed the necessary key. Einstein believed that entanglement was the key—and therefore spent his time using this feature of the QM to deny completeness to the QM theory. (He was right; QM is not complete. He was not on the target, however; entanglement is merely an outcome, not a primary feature of the QM theory.)

They were all (at least partly) correct, but none of their approaches is truly illuminating—not to an engineer anyway.

They were correct in the sense, these indeed are valid features of QM—and they do form some of the most mystifying aspects of the theory. But they are mystifying only to an intuition that is developed in the classical mechanical mould. In any case, don’t mistake these mystifying features for the basic nature of the core of the theory. Discussions couched in terms of the more mysterious-appearing features in fact have come to complicate the quantum story unnecessarily; not helped simplify it. The actual nature of the theory is much more simple than what physicists have told you.

Just the way the field in the EM theory is not exactly the same kind of a continuum as in the original Newtonian mechanics (e.g., in EM it is mass-less, unlike water), similarly, neither the field nor the massive object of the QM is exactly as in their classical EM descriptions. It can’t be expected to be.

QM is about some new kinds of the ultimate theoretical objects (or building blocks) that especially (but not exclusively) make their peculiarities felt at the microscopic (or atomic) scale. These theoretical objects carry certain properties such that the theoretical objects go on to constitute the observed classical bodies, and their interactions go on to produce the observed classical EM phenomena. However, the new theoretical objects are such that they themselves do not (and cannot be expected to) possess all the features of the classical objects. These new theoretical objects are to be taken as more fundamental than the objects theorized in the classical mechanics. (The physical entities in the classical mechanics are: the classical massive objects and the classical EM field).

Now, this description is quite handful; it’s not easy to keep in mind. One needs a simpler view so that it can be held and recalled easily. And that simpler view is what I’ve told you already:

To repeat: QM is all about the electronic orbital and the changes it undergoes over time.

Today, most any physics professor would find this view objectionable. He would feel that it is not even a physics-based view, it is a chemistry-based one, even if the unsteady or the transient aspect is present in the formulation. He would feel that the unsteady aspect in the formulation is artificial; it is more or less slapped externally on to the picture of the steady-state orbitals given in the chemistry textbooks, almost as an afterthought of sorts. In any case, it is not physics—that’s what he would be sure of. By that, he would also be sure to mean that this view is not sufficiently mathematical. He might even find it amusing that a physical view of QM can be this intuitively understandable. And then, if you ask him for a sufficiently physics-like view of QM, he would tell you that a certain set of postulates is what constitutes the real core of the QM theory.

Well, the QM postulates indeed are the starting points of QM theory. But they are too abstract to give you an overall feel for what the theory is about. I assert that keeping the orbitals always at the back of your mind helps give you that necessary physical feel.

OK, so, keeping orbitals at the back of the mind, how do we now explain the wave-particle duality in the single-photon double-slit interference experiment?

Let me stop here for this post; I will open my next post on this topic precisely with that question.

A Song I Like:

(Hindi) “ik ajeeb udaasi hai, meraa man_ banawaasi hai…”
Music: Salil Chowdhury
Singer: Sayontoni Mazumdar
Lyrics: (??)

[No, you (very probably) never heard this song before. It comes not from a regular film, but supposedly from a tele-film that goes by the name “Vijaya,” which was produced/directed by one Krishna Raaghav. (I haven’t seen it, but gather that it was based on a novel of the same name by Sharat Chandra Chattopadhyaya. (Bongs, I think, over-estimate this novelist. His other novel is Devadaas. Yes, Devadaas. … Now you know. About the Chattopadhyaya.)) Anyway, as to this song itself, well, Salil-daa’s stamp is absolutely unmistakable. (If the Marathi listener feels that the flute piece appearing at the very beginning somehow sounds familiar, and then recalls the flute in Hridayanath Mangeshkar’s “mogaraa phulalaa,” then I want to point out that it was Hridayanath who once assisted Salil-daa, not the other way around.) IMO, this song is just great. The tune may perhaps sound like the usual ghazal-like tune, but the orchestration—it’s just extraordinary, sensitive, and overall, absolutely superb. This song in fact is one of Salil-daa’s all-time bests, IMO. … I don’t know who penned the lyrics, but they too are great. … Hint: Listen to this song on high-quality head-phones, not on the loud-speakers, and only when you are all alone, all by yourself—and especially as you are nursing your favorite Sundowner—and especially during the times when you are going jobless. … Try it, some such a time…. Take care, and bye for now]

[E&OE]

/

Even while enjoying my writer’s block, I still won’t disappoint you. … My browsing has yielded some material, and I am going to share it with you.

It all began with googling for some notes on CFD. One thing led to another, and soon enough, I was at this page [^] maintained by Prof. Praveen Chandrashekhar of TIFR Bangalore.

Do go through the aforementioned link; highly recommended. It tells you about the nature of my trade [CFD]…

As that page notes, this article had first appeared in the AIAA Student Journal. Looking at the particulars of the anachronisms, I wanted to know the precise date of the writing. Googling on the title of the article led me to a PDF document which was hidden under a “webpage-old” sub-directory, for the web pages for the ME608 course offered by Prof. Jayathi Murthy at Purdue [^]. At the bottom of this PDF document is a note that the AIAA article had appeared in the Summer of 1985. … Hmm…. Sounds right.

If you enjoy your writer’s block [the way I do], one sure way to continue having it intact is to continue googling. You are guaranteed never to come out it. I mean to say, at least as far as I know, there is no equivalent of Godwin’s law [^] on the browsing side.

Anyway, so, what I next googled on was: “wind tunnels.” I was expecting to see the Wright brothers as the inventors of the idea. Well, I was proved wrong. The history section on the Wiki page [^] mentions Benjamin Robins and his “whirling arm” apparatus to determine drag. The reference for this fact goes to a book bearing the title “Mathematical Tracts of the late Benjamin Robins, Esq,” published, I gathered, in 1761. The description of the reference adds the sub-title (or the chapter title): “An account of the experiments, relating to the resistance of the air, exhibited at different times before the Royal Society, in the year 1746.” [The emphasis in the italics is mine, of course! [Couldn’t you have just guessed it?]]

Since I didn’t know anything about the “whirling arm,” and since the Wiki article didn’t explain it either, a continuation of googling was entirely in order. [The other reason was what I’ve told you already: I was enjoying my writer’s block, and didn’t want it to go away—not so soon, anyway.] The fallout of the search was one k-12 level page maintained by NASA [^]. Typical of the government-run NASA, there was no diagram to illustrate the text. … So I quickly closed the tab, came back to the next entries in the search results, and landed on this blog post [^] by “Gina.” The name of the blog was “Fluids in motion.”

… Interesting…. You know, I knew about, you know, “Fuck Yeah Fluid Dynamics” [^] (which is a major time- and bandwidth-sink) but not about “Fluids in motion.” So I had to browse the new blog, too. [As to the FYFD, I only today discovered the origin of the peculiar name; it is given in the Science mag story here [^].]

Anyway, coming back to Gina’s blog, I then clicked on the “fluids” category, and landed here [^]… Turns out that Gina’s is a less demanding on the bandwidth, as compared to FYFD. [… I happen to have nearly exhausted my monthly data limit of 10 GB, and the monthly renewal is on the 5th June. …. Sigh!…]

Anyway, so here I was, at Gina’s blog, and the first post in the “fluids” category was on “murmuration of starlings,” [^]. There was a link to a video… Video… Video? … Intermediate Conclusion: Writer’s blocks are costly. … Soon after, a quiet temptation thought: I must get to know what the phrase “murmuration of starlings” means. … A weighing in of the options, and the final conclusion: what the hell! [what else], I will buy an extra 1 or 2 GB add-on pack, but I gotta see that video. [Writer’s block, I told you, is enjoyable.] … Anyway, go, watch that video. It’s awesome. Also, Gina’s book “Modeling Ships and Space Craft.” It too seems to be awesome: [^] and [^].

The only way to avoid further spending on the bandwidth was to get out of my writer’s block. Somehow.

So, I browsed a bit on the term [^], and took the links on the first page of this search. To my dismay, I found that not even a single piece was helpful to me, because none was relevant to my situation: every piece of advice there was obviously written only after assuming that you are not enjoying your writer’s block. But what if you do? …

Anyway, I had to avoid any further expenditure on the bandwidth—my expenditure—and so, I had to get out of my writer’s block.

So, I wrote something—this post!

[Blogging will continue to remain sparse. … Humor apart, I am in the middle of writing some C++ code, and it is enjoyable but demanding on my time. I will remain busy with this code until at least the middle of June. So, expect the next post only around that time.]

[May be one more editing pass tomorrow… Done.]

[E&OE]

/

# The anti-, an anti-anti-, my negativism, and miscellaneous

Prologue:

A better title could very well have been “What I am up against.” However, that title, I thought, would be misleading. … I really am up against many things which I am going to touch on, in this post. But the point is, these are not the only things that I am up against, and so, that title would therefore be too general.

Part I: The Anti-

First, of course, comes the anti.

I stumbled across W. E. Lamb, Jr.’s excellent paper: “Anti-photon” (1995) Appl. Phys. B, vol. 60, p. 77–84. Here is the abstract:

“It should be apparent from the title of this article that the author does not like the use of the word “photon”, which dates from 1926. In his view, there is no such thing as a photon. Only a comedy of errors and historical accidents led to its popularity among physicists and optical scientists. I admit that the word is short and convenient. Its use is also habit forming. Similarly, one might find it convenient to speak of the “aether” or “vacuum” to stand for empty space, even if no such thing existed. There are very good substitute words for “photon”, (e.g., “radiation” or “light”), and for “photonics” (e.g., “optics” or “quantum optics”). Similar objections are possible to use of the word “phonon”, which dates from 1932. Objects like electrons, neutrinos of finite rest mass, or helium atoms can, under suitable conditions, be considered to be particles, since their theories then have viable non-relativistic and non-quantum limits. This paper outlines the main features of the quantum theory of radiation and indicates how they can be used to treat problems in quantum optics.”

BTW, in case you don’t know, W. E. Lamb, Jr., was an American, who received a Nobel in physics, for his work related to the fine structure of hydrogen [^].

So, that’s the first bit of what I am up against.

Also in case you didn’t notice, the initials are important; this isn’t (Sir) Horace Lamb (who, in case you don’t know, was that late 19th–early 20th century British guy who wrote books on hydrodynamics and acoustics that people like me still occasionally refer to [^]. (Lamb and Love continue to remain in circulation (even if a low circulation) among mechanicians even today. (Love, who? … That’s an exercise left for the reader…)))

Oh, BTW, talking of very good books that now have come in the public domain, and (the preparation required for) QM, and all the anti- and un- things, note that Professor Howard Georgi [^]’s excellent book on waves has by now come in the public domain [^].

(Even if only parenthetically, I have to note: I am anti-diversity, too. … This anti thing simply doesn’t leave me alone, though I will try to minimize its usage. Starting right now. … Georgi was born in California. He also maintains a page about women in physics [^].)

… Ummm, I’d better wrap up this part, and so…

… All in all, you can see that I don’t seem to be taking my opposition very seriously, though I admit I should start doing so some day. But the paper is great. (We were talking about the anti-photon paper, remember?) Here is an excerpt in case I haven’t already succeeded in persuading you to go through it, immediately:

“During my eight years in Berkeley, I had just one conversation with Lewis, in 1937, when he called me into his office to give some advice. It was: “When a theorist does not know what to do next, he is useless. An experimental scientist can always go into his laboratory and “polish up the brass”.”

This is the same Lewis who coined the word “photon.” … Now it convinces you to go through the paper, doesn’t it? (The paper is by Lamb; W. E. Lamb.)

[… On a more serious note, this paper has very good notings regarding the history of the idea of the photon.]

Part II: The Anti- Equals the Anti-Anti-

There is no typo here.

Even as I was recoiling off the glow (I won’t use “radiation” or “light”) of [the physics Nobel laureate] Lamb’s reputation, I began wondering precisely how I would counter his anti-photon argument. I even thought of doing a blog post about it. (After all, recently, Roger Schlafly has been hinting at that same idea, too. [May be TBD: insert links])

However, a better sense prevailed, and I did a Google search. I found a good blog post that gives a good rejoinder to the anti-photon arguments. The post is written in simple enough language that any one could understand. … But should I recommend it to you?… The thing is: It comes from a physicist who is reputed to have attempted teaching quantum physics to dogs. Or, at least, teaching people how to teach quantum physics, to dogs.

But of course, in physics, personalities don’t count, and neither do, you know, sort of like, “insults.” [I am also anti-animal rights, BTW [though all in favor of dogs].] And so, let me lead you to the relevant post.

The quantum physics-loving folks would have guessed the man by now (and every one, the fact that the author must be a man, not a woman). So the only remaining part would be which post by Chad Orzel. Here it is [^]. Once you finish reading it (including the comments on the post), then, also go through these couple of others posts by him touching on the same topic [^] [^] (and their blog comments). And, a great post (at wired.com!) by Rhett Allain [^] on the anti-photon side, to which Orzel makes a reference.

Orzel’s basic argument is that anti-bunching equals anti-anti-photon.

That explains the second part of the title.

But, before wrapping up this part, just a word on the PhD guides on the “polishing brass” side, and Indians. The anti-bunching experiments were done by Leonard Mandel [^], who among other things also guided Rupamanjari Ghosh’s PhD thesis. … Rupa…, who? I will save you the trouble of googling; see here: [^ (I am anti-government in education and science, too)] and here [^ (oh well, this post is getting just too long)].

Part III: My Negativism

Roger Schlafly has just recently written an interestingly long post on quantum entanglement. (Very long, by his standards.) In that post [^], he identifies himself as a logical positivist. This isn’t the first time that he has attributed logical positivism to his intellectual positions. Schlafly’s recent post is written, as usual, with good/great clarity

Now consider the premises, this time three, instead of the usual two: (i) Schlafly identifies himself as a logical positivist, (ii) I don’t agree with some part of his positions, and (iii) logic is logic—it cares for completeness.

Ergo, I must be a logical negativist.

That explains the third part of the title.

Some day I plan to write a post on the triplet and singlet states, and quantum entanglement.

Some still later day, I plan to explain how QM is incomplete, by pointing out how it can be made complete. … That is too big a goal to keep, you say?

Well, I do plan to at least explain in simpler terms the phenomenon of quantum entanglement, but only in reference to the text-book treatments. … That should be doable, what say?

… Don’t hold me responsible etc. on this promise; I am careless etc.; and so,  it might very well be in mid-2016 when I might actually deliver on it. … So, for the time being, make do with my logical negativism.

Part IV: Miscellaneous

M1: The preface to Georgi’s book notes the help he received while writing the book inter alia from (the same) Griffiths (as the one who has written very popular undergraduate text-books on electrodynamics and QM). (Griffiths studied at Harvard where Georgi has been a professor, though chances are they were contemporaries.) (No, this Griffiths isn’t the same as the Griffiths of fracture mechanics [^].) (Yes, this Georgi is the same as the one who has advocated the unparticle mechanics [^]. (But why didn’t he use the anti- prefix here?))

M2: The most succinct (and as far as I can make out, correct) treatment of the meaning of “hidden variables” has been not in the recent Internet writings on Bell’s inequalities but in Griffith’s undergraduate text-book on QM.

Why I mention this bit… That’s because, recently, the MIT professor Scott Aaronson had a field day about hidden variables (notably with Travis Norsen) [^], though since then he seems to have moved on to some other things related to theoretical computational complexity, e.g. this graph isomorphism-related thingie [^].

But, no, if you want to know about the so-called hidden variables well (and don’t have my “approach” or at least my “confidence”), then don’t look up the material on the ‘net or blog posts, esp. those by CS folks or complexity theorists. Instead, hit Griffith’s (text-)book.

M3: However, I am unhappy about Griffith’s treatment of the quantum postulates—he (like QChem and most all UG QM books) has only the usual $\Psi$ and doesn’t include the spinor function right while discussing the state definition. Indeed, he continues implicitly treating the two in a somewhat disjoint manner even afterwards (exactly like all UG text-books do). Separable doesn’t mean disjointed.

I am also unhappy about Griffith’s (and every other QM text-book’s) treatment of the basic ideas of identical particles and their states—the treatments are just not conceptually clarifying enough. … May I assist you rewriting this topic, Professor Griffiths? … Oh well… Before I actually make that offer to him, I will try my hand at the task, at this blog…. Sometime in/after mid-2016. (Hopefully earlier.)

But, yes, if you ask me, it’s only the spin and identical particles that still remain truly nebulous topics for the student, today. With single-particle interference experiments and the ubiquity of simulations, one wouldn’t think that people would have too much difficulty with wave-particle duality or interference etc.

Contrast staring at one or two manually drawn static graphs in a book/paper, and imagining how things would change with time, under different governing equations and different boundary conditions, vs. going through simulations on your smartphone, adjusting FPS, changing boundary conditions with the flick of a button… Students (like me) must be having it exponentially easier to learn QM these days, as compared to those hapless 20th century guys.

The points where today’s students are likely to falter would be a bit more advanced ones, like angular momentum. In fact, today’s students don’t know angular momentum well even in the classical mechanics settings. (Ask yourself: how clear and confident are you about, say, Coriolis forces, say, as covered in Shames, or in Timoshenko and Young?).

So, to wrap up, it has to be identical particles and spin that still remain the really difficult topics. Now, it so happens that it is these concepts that underlie popular expositions of entanglement. Little surprise that people never get the confidence that they would be able to deal with entanglement right.

(Focusing on “just” two states of the spin up- and down-, and therefore treating the phenomenon via an abstract two component vector, and then thinking that starting a discussion with this “simple” vector, is a very bad idea, epistemologically speaking. … Yes, I am anti-Susskind’s “theoretical minimum,” too. And yes, Griffiths is right in choosing the traditional way (of the sequence in which to present the QM spin). It’s just that he needs to explain it in (even) better manner, that’s all….)

M4: The day before yesterday was the first time this year that I happened to finally sense that wonderful winter-time air of Pune’s, while returning in the evening from our college. (Monday was a working day for us; no continuous 9-day patch of a vacation.)

It still doesn’t feel like the Diwali air this year in Pune, but it’s getting close: I spotted some nice fog/mist on the nearby nallah (i.e. a small stream) and a nearby canal, a couple of times. …

This has been a year of (heavy) drought. And anyway, these days, there is virtually no difference between the Diwali days and the rest of the year. … Shopping malls are fully Diwali-like at any time of the year for those who have the money, and most women—whether working or otherwise—these days outsource their (Marathi) “chakalee”-making anyway—even during Diwali. So, there isn’t much of a difference between the Diwali days and the other days. Except for the weather. Weather still continues to change in a distinctly perceptible way sometime around Diwali. … So, that’s about all what Diwali means to me, this year.

And, of course, some memories of the magical Diwalis that I have spent in my childhood… Many of these were spent (at least for the (Marathi) “bhau-beej” day and a couple of days more) at my maternal uncle’s place (a very small town, a sub taluka-level place). … As far as I am concerned, those Diwali’s are still real; they would easily remain that way throughout my life.

PS: Having written the post, I just stepped into the kitchen to make me a cup of tea, and that’s when father told me that home-made (Marathi) “chakalee”s had arrived from our family friends just last evening; I didn’t know about it.

Instantaneously, my song-selection collapsed into an anti-previously measured state. (It happens. Real life is more weird than QM.)

Epilogue:

Happy Diwali!

PS (also) to Epilogue:

Excuse me for a couple of weeks now. I will continue studying QM (from text-books), but I will also have to be taking out my notes for an undergraduate course on CFD (computational fluid dynamics, in case you didn’t know) that I should be teaching the next semester—which begins right in mid-December. (In India, we don’t always follow the Christmas–New Year’s–Next Term sequence.) I anyway will also be traveling a bit (just short distances like Mumbai and Nasik or so) over the next couple of weeks. So, I don’t think I will have the time to write a post. (That, in fact, was the reason why I threw in a lot of stuff right in this post.)

… So, there… Take care, and best wishes, once again, for a bright and happy Diwali (and to those of you who start a new year in Diwali, best wishes for a happy and prosperous new year too.)

A Song I Like

(Marathi) “tabakaamadhye ithe tevatee…”  (search on the transcriptionally incorrect “divya divyanchi jyot”)
Singer: Asha Bhosale
Lyrics: Ravindra Bhat


text:
#### NettoHikari

##### Trainer
Member
NettoHikari submitted a new resource:

Hello, I’ve made a plug-and-play script that enables a Nuzlocke-style permadeath mode to battles. Basically, when it’s activated, any fainted Pokemon disappear immediately from the player’s party, whether that’s during battle or out in the field (due to poison). This is different from other Nuzlocke scripts in that it completely removes dead Pokemon from the player’s party, rather than just marking them “dead” and making them impossible to heal. The script is fairly easy to use, and I’ve put...

#### NettoHikari

##### Trainer
Member
NettoHikari updated Nuzlocke Permadeath with a new update entry:

v1.1 Update

- Added "soft" nuzlocke mode (fainted Pokemon get transferred to Pokemon Storage)
- Fixed issue where player could continue after a double battle if all of the player's Pokemon died, but not their partner's
- Fixed error with catching Pokemon in double battles while having partner trainer
- Fixed error with Future Sight effects lingering after Pokemon dying

Read the rest of this update entry...

Member

#### BiggusWeeabus

##### "What's so funny about Biggus Dickus?"
Member
What happens to a Save after the player gets defeated on the Nuzlocke Mode?
Is there a way to completely delete it right after the defeat from the script?

#### NettoHikari

##### Trainer
Member
What happens to a Save after the player gets defeated on the Nuzlocke Mode?
Is there a way to completely delete it right after the defeat from the script?
When a player gets defeated in Nuzlocke mode, it will simply go back to the title screen without touching the save, i.e. if the player saves before a battle, then loses, the player's save from just before the battle will still be there. I didn't want my script to force-delete a player's save because I imagine there are users who wouldn't like that, but it does seem like a good idea to make it a setting that you can enable at the top of the script. I'll update the script soon and let you know how to enable that option.

#### NettoHikari

##### Trainer
Member
@BiggusWeeabus You can now set the constant "DELETE_SAVE_IN_NUZLOCKE" equal to "true" on line 132 of the updated script. Hope that works out!

#### BiggusWeeabus

##### "What's so funny about Biggus Dickus?"
Member
Great!

Oh, also. It would be great to show an image from /pictures as Game Over screen, actual text doesn't look quite as good

#### NettoHikari

##### Trainer
Member
Great!

Oh, also. It would be great to show an image from /pictures as Game Over screen, actual text doesn't look quite as good
Oh sorry, I didn't see this message until just now. I just put actual text as a sort of placeholder, but if you (or anyone else) wants to use a picture instead, you can just replace this line under "def pbStartOver(gameover=false)":
Ruby:
pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]GAME OVER!"))
with code to show and erase a picture. Something like this should work:
Ruby:
# Fill in the values below for your specific image
$game_screen.pictures[0].show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type) pbWait(20)$game_screen.pictures[0].erase

#### BiggusWeeabus

##### "What's so funny about Biggus Dickus?"
Member
Oh sorry, I didn't see this message until just now. I just put actual text as a sort of placeholder, but if you (or anyone else) wants to use a picture instead, you can just replace this line under "def pbStartOver(gameover=false)":
Ruby:
pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]GAME OVER!"))
with code to show and erase a picture. Something like this should work:
Ruby:
# Fill in the values below for your specific image
$game_screen.pictures[0].show(name, origin, x, y, zoom_x, zoom_y, opacity, blend_type) pbWait(20)$game_screen.pictures[0].erase
All righty then, thank you!

format: plain


text:
# RBEA: Scalable Real-Time Analytics at King

Posted on May 4th, 2016 by and

This is a guest blog post written by Gyula Fóra and Mattias Andersson from King.com. The original post can be found on the King Tech Blog.

This blogpost introduces RBEA (Rule-Based Event Aggregator), the scalable real-time analytics platform developed by King’s Streaming Platform team. This new platform opens the doors to the world of stream analytics for our data scientists across the company. Here, we will describe what motivated us to build RBEA, how the system works, and how it is implemented on Apache Flink™.

King is a leading interactive entertainment company for the mobile world, with people all around the world playing one or more of our games. We offer games in over 200 countries and regions with franchises including Candy Crush, Farm Heroes, Pet Rescue, and Bubble Witch.

With over 300 million monthly unique users and over 30 billion events received every day from the different games and systems, any stream analytics use-case becomes a real technical challenge. It is crucial for our business to develop tools for our data analysts that can handle these massive data streams while keeping maximal flexibility for their applications.

We have already been using different stream processing technologies for several years to handle processing tasks on the live event streams, but until now complex stream analytics has only been in the toolbox of the software engineers, and an uncharted territory for the data scientists.

## Background

At King we run what we think is a fairly straightforward backend architecture:

Game services are a set of Java servers that listen to requests or tracking calls from the clients. The player’s current progress and other associated states are stored in sharded MySQL servers (Game data). This data is only used by the actual game and the game teams own the data format. For analysis and other data needs outside of the core game we use the Event data. The Event data is a simple text log with a fixed schema (tab delimited text) that tells you what happened in the game.

An example event describing a game start would look like this:

 10005 SagaGameStart2(type) coreUserId(long) episode(int) level(int) gameRoundId(long)

In this case  SagaGameStart2 indicates that a saga subgame has started, now including a game round id. The rest of the the fields contain information about the event.

Example raw event:

20131017T113040.393+0200 17 10005 1006627249 7 12 1382002240393

Incoming events are stored in Kafka and are also written to files in HDFS. In our Hadoop cluster each event is mapped to a Hive table which makes it really easy to compute aggregates over the data and also do more complex batch analysis. A subset of the data is also loaded to an Exasol cluster for faster ad hoc querying and better support for complex SQL. We also compute real-time aggregates over the events using an in-house product called Nuevo, which aggregates data from all the Kafka streams into MySQL and provides a data source for release monitoring and real-time dashboards across King.

### Challenges with our event model

Data warehouse engineers and data scientists usually work with relational data and the tools associated with it. Event stream data has a fairly different nature when it comes to complex analysis. As long as you are satisfied with basic aggregates or willing to make some simplifications you can usually solve most problems with basic SQL. But events at their heart are usually related to other events by just time and the context in which they happened. So when you start asking questions around what the user did before a game-start or how they navigated through your game (funnels, sessions, etc.) basic SQL is not the right language (non equi joins are expensive).

So we usually have to fall back to a three-part solution whenever we wanted to relate different events:

1. Ask a game developer to add the context we want in game, such as placement, and relational key.
2. Select from the event tables in which we are interested, sort the events on player/time and run them through some code that associates the data, such as custom reducer.
3. Make a simplified model that we can run in SQL.

We want to avoid the first option because we want our game developers to build fun things in the game, not add tracking code. The second option always feels a bit inefficient in the daily processing, we store the events with one table per event and immediately follow up with many different queries that put them back in the order they happened with different constellations of events and you can only see that data when the daily batch has run. The third option is not always possible.

### Problem statement

With RBEA, data scientists should be able to make the analysis in real-time that previously was only possible with custom reducers (or other tedious ways of creating event associations) on the already stored events.

In practice this means that RBEA should support connecting events in time and storing contextual information for the events in a scalable way, while providing results directly from the live streams. The final product should be accessible to the game teams across King with easy-to-use web interfaces similarly to the systems we currently have in place for real-time aggregations.

## What is RBEA?

RBEA is a platform designed to make large-scale complex streaming analytics accessible for everyone at King. We designed RBEA in a way that users can, with a few clicks, deploy Groovy scripts through a simple web interface and get instant results without worrying about the details of the deployment. This architecture relieves data analysts from the burden of managing large streaming clusters and deployments so they can focus on their application logic for maximal productivity.

RBEA scripts run on King’s production Flink cluster delivering real-time results from the live event streams. Using RBEA, developers get easy access to wide range of stream analytics tools such as defining and updating user states, writing output to many different output formats or creating global aggregators across all the users.

The RBEA API was developed to make everyday stream analytics tasks easy to write without any knowledge of the underlying streaming engine while still achieving good performance at scale.

## A simple RBEA script

We will start by writing a simple script that counts all the finished games in 1-minute windows, while also writing the game end events to a text file:

def processEvent(event, context) {
def output = context.getOutput()
def agg = context.getAggregators()

// Create a counter with window size of 1 minute
def gameEndCounter = agg.getCounter("GameEnds", 60000)

if (isGameEnd(event)) {
// If this is a game end, increment counter
gameEndCounter.increment()

// Simply write the event to a file
output.writeToFile("GameEndEvents", event)
}
}

Cool, this looks super simple so let’s actually see what is going on in this script before going any further. Most of the things are self-explanatory: we defined a processEvent method that will receive the live events one-by-one. We get hold of the output object from the context and also create a counter called GameEnds with a window size of 1 minute (i.e., 60,000 milliseconds). For every incoming event we check whether this is a game end, and if so, we increment the counter and write the event to a text file named GameEndEvents.

Now we can save our script as FinishedGames and click the Deploy button. The output of our job is accessible using the buttons that will quickly appear under our deployment:

In this case RBEA created a convenient MySQL table for our aggregator output that we can easily access by clicking the Show button for some instant data exploration:

The game end events written to the text file can also be accessed as expected and downloaded on demand from the servers.

## State in RBEA programs

In most real-world applications, analysts would like to work with state that they compute for the users, such as the current session or current game. Computing state for the hundreds of millions of users has always been a challenge in analytics applications. While this has been possible to do in batch use-cases it was previously not possible in the real-time setting due to the high data rate and massive state size. This meant that real-time applications could only access stale user state (pre-computed by batch jobs) which often did not meet the application requirements.

In RBEA we leverage Flink’s advanced state handling capabilities, allowing developers to create and update user states in real-time. RBEA provides a simple abstraction called Field that lets users define arbitrary user-state in a way that is transparent to the system.

We can register new fields by passing them to the registerField(field) method of the Registry in the initialize method of our script.

Fields are defined by specifying the following attributes:

1. Field name: String reference for accessing the value from the StateData
2. Update function: Defines how the Field will be updated for each incoming event. The update function comes in two flavors: (State, Event) -> State and (Context, Event) -> State.
3. Initializer: By default states are initialized to null, but we can also define an initializer function (UserID -> State) or the initial state value

The availability of Fields lends itself to very clean pattern for stateful streaming programs:

1. Define any state used by the application as Fields in the initialize method
2. For each event, access the state for the current user from the StateData
3. Enrich the current input and do the processing

### Computing total transactions per level

Let’s look at a more exciting use-case where we want to compute total revenue per level in a game every half hour. Basically what we want here from the processEvent method’s perspective is that every time we get a transaction we would like to add the amount to an aggregator for the current level.

The problem here is that transaction events don’t contain information about the current level. Whenever a player starts a new game, there is a game start event which contains the level information and subsequent transactions should belong to that level.

To solve this use-case in our framework, we need to keep track of the current level for each player as a state. This is exactly the type of stateful application that Fields are designed for:

def processEvent(event, ctx) {
def agg = ctx.getAggregators()
def state = ctx.getStateData()

// Define sum aggregator with 30 minute window size
def amountPerLevel = agg.getSumAggregator("Amount", 30*60*1000)

// We will write the aggregated values to a text file instead of MySQL
amountPerLevel.writeTo(OutputType.FILE)

if(isTransaction(event)) {
// Retrieve current level from state
Integer currentLevel = state.get("CURRENT_LEVEL")

// Increment counter for current level
}
}

def initialize(registry) {
// Define current level state, initialized to -1
def currentLevel = Field.create("CURRENT_LEVEL", {
// Update the level for each new game start
Integer prevLevel, Event e -> isGameStart(e) ? getLevel(e) : prevLevel
}).initializedTo(-1)

// We register the state for this job so it is computed automatically
registry.registerField(currentLevel)
}

We have registered the CURRENT_LEVEL field which automatically keeps track of which level each user is currently playing. This information can be easily accessed for the current player (based on the event) from the StateData as we can see in the processEvent method.

Let’s deploy our application:

We can see that the TextFile containing the aggregated amounts per level can be accessed through the GUI. Clicking Show gives us what we expect:

## Implementing RBEA on Apache Flink™

We have seen that the RBEA interfaces abstract away all the stream-processing internals from the users, including:

• Reading event streams
• Parallelizing script execution
• Creating global windowed aggregators
• Creating and updating user states
• Writing output to many target formats
• Fault-tolerance and consistency

Executing these abstractions in a way that it will scale to many parallel RBEA jobs, on the billions of events and millions of users every day is a challenging task for any streaming technology. Apache Flink™ might be the only open-source technology that supports this use case to the full extent.

We have chosen Flink as it has several key features that are required for this use case:

• Highly scalable state abstractions
• Support for custom windowing logic
• Support for cyclic dataflows
• Exactly-once processing guarantees

Only one deployed and continuously running Flink job serves as a backend for all running RBEA scripts. The scripts are running in regular Flink operators (as described later) sharing the cluster resources in a very efficient way. Scripts deployed on the web frontend are sent to the already running Flink job, and the lifecycle management (adding/removing scripts, handling failures etc.) of the RBEA scripts is handled by the Flink operators themselves.

Different RBEA operations (incrementing aggregators, writing output) are translated into different outputs for the Flink operators.

Let’s look at a high-level overview of how RBEA scripts are deployed/executed on the Flink engine:

There are four main stages of computation:

1. Read event streams and receive newly deployed scripts
2. Update user states and run the processEvent methods of the deployed scripts
3. Compute windowed aggregates as produced by the scripts
4. Write the outputs to the selected format

Let’s look at these stages one-by-one.

### Reading the events and scripts

The live event streams are read from Kafka with a modified Flink Kafka Consumer that tags events with the topic from where they are coming. This is important for us so users can freely decide what Kafka topics they want to listen to when running their scripts. We create a KeyedStream from our event stream keyed by the user id.

Groovy scripts are received in text format from the web frontend through Kafka as simple events, and are parsed into to the appropriate Java EventProcessor interface. New scripts are hot-deployed inside the already running Flink job as described in the next section.

### Computing states and running the scripts

User states are computed in the same operator where the scripts are executed to exploit data locality with Flink’s key-value state abstractions. For this we use a RichCoFlatMap operator which receives both the partitioned event streams and the broadcasted user scripts as events.

For new events, we call the processEvent method of the already deployed RBEA scripts. For new scripts we hot-deploy them inside the operator so it will be executed for subsequent events.

The following class shows the simplified implementation of the execution logic:

class RBEAProcessor extends RichCoFlatMapFunction<Event, DeploymentInfo, BEA> {

// Computed fields for the current user
ValueState<Map<String, Object>> = userStates;

// Omitted details...

public void flatMap1(Event event, Collector<BEA> out) {
// Update states for the current user
Map<String, Tuple2<?, ?>> updatedFields = updateFields(event, out);

// If any fields have changed we trigger the update callbacks on those
tiggerUpdateCallbacks(updatedFields, out);

// Call the processEvent methods of the user scripts
executeScripts(event, out);
}

public void flatMap2(DeploymentInfo info, Collector<BEA> out) {
// Instantiate the event processor
EventProcessor proc = info.createProcessor();

// We add the processor to the list

// Call the initialize method of the processor
initializeProcessor(proc);
}
}

When the operator receives a new event it retrieves the current user state from the state backend, updates the states, then executes all the scripts that listen to the current topic. We are using the RocksDB state backend to persist our states, making sure it scales to our needs.

During script execution most calls to the API methods are translated directly into output elements which are collected on the output collector. For example, when the user calls output.writeToFile(fileName, myData) in their script, the Flink operator emits an output that encodes the necessary information that our sinks will need to write the user data into the appropriate output format.

Different types of API calls (Aggregators, MySQL output, Kafka output, and so on) will, of course, result in different output information but they always contain the information that is enough for downstream operators to know how to deal with them.

The operator also produces some information on the currently deployed processors, such as notification on failures. This is used for removing faulty scripts from all the subtasks and also to report the error back to the frontend so that users can easily fix their scripts.

The CoFlatMap operator at the end produces three main types of output: data output, aggregation, and job information.

### Computing window aggregates

We use Flink’s windowing capabilities to do the actual aggregation on the aggregator output coming out from our main processing operator. The information we receive is in the form of:

(job_id, aggregator_name, output_format, window_size, value)

RBEA at this point only supports sum aggregators and counters, but we are planning to extend the support to custom aggregators as well.

Computing the window aggregates in this case is not a trivial task. First of all, we need to make sure we process the windows based on event time extracted from the events. Secondly we can’t really use the built-in time windowing implementations that assume fixed windows as every aggregate can have different window sizes. Practically, this means that we want different window sizes per key in our dataflow. Fortunately, Flink has solutions for both of our problems.

We define timestamp extractors for the incoming event streams which operate directly on the consumed Kafka partitions for correct behaviour. To create different window sizes on the fly we use Flink’s flexible window mechanisms to define our window assigner that puts each element in the correct bucket based on the user-defined aggregator window. To do this properly, we extend the tumbling event time window assigner:

class AggregtionWindowAssigner extends TumblingEventTimeWindows {

public AggregtionWindowAssigner() {
super(0);
}

@Override
public Collection<TimeWindow> assignWindows(Object in, long timestamp) {
BEA aggregateInput = (BEA) in;
long size = aggregateInput.getWindowSize();

long start = timestamp - (timestamp % size);
long end = start + size;

return Collections.singletonList(new TimeWindow(start, end));
}
}

Now that we have this, we simply do a window reduce operation to sum the aggregator values in each window and send it to the correct output.

### Writing the outputs

As we have seen earlier, the user can output to many different output formats in their processing scripts. Each output record generated by calling the one of the output API methods will hold some metadata for the selected output format:

• File output: file name
• MySQL output: table name
• Kafka: topic name

There is one operator for each output format that will write the received events using the metadata attached to them.

These operators are not actually sinks in the Flink topology as they will have to produce some information for the web frontend so that it can show the generated output to the user. For instance when the File sink (flatmap) receives the first record to a new output file it outputs some meta-information for the web frontend so that it can display this file for the user for the running script.

### Putting it all together

Now that we have seen how the main parts of the system work under the hood, it’s time to put the pieces together into our complete pipeline.

There are a lot of subtle details that make the pipeline more complex than the initial description suggests that mostly have to do with communicating with the web frontend and handling script failures in a robust way.

The full Flink logical pipeline looks like this:

Some notable details:

• The main processing operator (Execute EventProcessor) outputs two types of events:
• Actual processing events generated by the scripts
• Job information about deployment/failures and so on
• Information about the errors in the scripts are shown on the web front-end for easier debugging
• Output handling happens in FlatMap operators which forward newly created File/Table/…information to the web frontend
• We use IterativeStreams to propagate job failures from one subtask to another
• We monitor the number of events each script sends to the outputs and fail the scripts that generate too much to avoid crashing the whole system
• We use Kafka queues as our communication protocol between the web interface and the Flink job to decouple the two systems

## Summary

We have reached the end of our short story on RBEA. We hope you enjoyed learning about this cool piece of technology as much as we enjoy developing and using it.

Our goal with RBEA was to build a tool for our data scientists that can be used to do complex event processing on the live streams, easily, without having to worry about any operational details. We believe that we achieved this goal in an elegant and maintainable way by using open-source technologies for all parts of the system.

We developed a DSL that is easy to use without any previous knowledge in distributed stream processing making RBEA accessible to developers across King. RBEA scripts are managed and executed in a novel runtime approach where events and script deployments are handled by single stream processing job that takes care of both processing (script execution) and the life-cycle management of the deployed scripts.

We are impressed that Apache Flink™ has reached to a point of maturity where it can serve the needs of such a complex application almost out-of-the box.

If you feel that something was unclear or you simply want to learn more about the system and the specific design choices we made, feel free to reach out to us!

Gyula Fóra
Gyula is a Data Warehouse Engineer in the Streaming Platform team at King, working hard on shaping the future of real-time data processing. This includes researching, developing and sharing awesome streaming technologies. Gyula grew up in Budapest where he first started working on distributed stream processing and later became a core contributor to the Apache Flink™ project. Among his everyday funs and challenges, you find endless video game battles, super spicy foods and thinking about stupid bugs at night.

Mattias is a Data Scientist in the Streaming Platform team at King, works with almost all kind of data related projects be it data modeling, ab-tests, segmentation, notebooks, building ETL, setting up databases, scripting and lately java programming. Loves video games and Kings puzzle games and have designed a few levels in Candy Crush and Candy Crush Soda saga.

1. Igor
May 4th, 2016, 10:00 pm

Hi,
very nice article and work! I’ve enjoyed reading it and happy to know that Flink is ready for production and users share their experience.
One quesiton – could you elaborate on “the broadcasted user scripts as events” – how it’s done? Maybe some pointers to reading material how to model this?

• Gyula Fora
May 5th, 2016, 9:43 am

Hi Igor,

So the basic idea is that we have a DataStream of newly deployed user scripts from the RBEA web frontend.

This is simply a stream of Strings as that is convenient to pass around between the frontend and the Flink job.

Inside the operator where the scripts should be executed, we parse them into Groovy Scripts (groovy.lang.Script). This can be done fairly easily in runtime:

GroovyShell shell = new GroovyShell(…);
Script script = shell.parse(groovyScript);

Then we will call the processEvent method by:

script.invokeMethod(“processEvent”, params);

To last missing thing for your question is what we mean by broadcast. It just means that on the DataStream of incoming scripts we call .broadcast() so all the downstream parallel instances will get the new scripts.

I hope this clarifies 🙂

Cheers


text:
+1.617.933.5480

# Q: How do i see the connect answers

Supreme Fitness Club uses straight-line depreciation for a machine costing $26,400, with an estimated four-year life and a$2,650 salvage value. At the beginning of the third year, Supreme determines that the machine has three more years of remaining useful life, after which it will have an estimated $2,200 salvage value.  (1) Compute the machine%u2019s book value at the end of its second year. (Omit the "$" sign in your response.)

 Book value $ (2) Compute the amount of depreciation for each of the final three years given the revised estimates. (Do not round your intermediate calculations. Round your answers to the nearest dollar amount. Omit the "$" sign in your response.)

 Amount of depreciation Year 3 $Year 4$ Year 5 $How do i see the Connect questions for Fundamental Accounting Principles. Want an Answer? Related Questions in Others • Q: week 5quiz questions (Solved) February 19, 2014 I need all the right answers for this questions Solution Preview : A lump-sum purchase or basket purchase involves paying a single price for several assets as a group. True The double-declining-balance method is an accelerated method of depreciation • Q: Job Order Costing December 02, 2013 intermediate calculations to 2 decimal places and final answer to the nearest dollar amount . Input the amount as a positive value. ... • Q: I would love if someone could help me understand this accounting problem November 17, 2013 calculations and your final answer to the nearest dollar amount . Omit the "$" sign in your response.) ...

• Q:
Accounting 1B November 21, 2013

,500 Compute the net present value of this investment. ( Round "PV Factor" to 4 decimal...

• Q:
acct 212 November 22, 2013

installment payment. ( Round "PV Factor" to 4 decimal places and final answer to the nearest dollar amount . Omit the "$"... ## Ask a New Question Copy and paste your question here... Have Files to Attach? Similar question? edit & resubmit » ## Transtutors Study Membership • Unlimited Access to 600,000+ textbook solutions and Classroom Assignments • 24/7 Study Help from experts • Plans start from$20/mo
“9” Auditing experts Online


text:
# Teaching Shiny with Knitr and Webshot

While writing Developing Data Products I concocted a little scheme for showing examples of Shiny applications in a bookdown book that I think is interesting enough to share. This method should work with any Rmd file, not just bookdown books. Shiny applications are usually composed of two R files which must be named ui.R and server.R. In order to teach students about the structure of both of these files I want to show the students the code for each file, I want them to be able to see a screenshot of the app, and I want students to be able to run the app using shiny::runGitHub(). The first workflow I had for showing these apps was:

1. Make the ui.R and server.R files and save them in a folder.
2. Copy and paste the ui.R and server.R files into an R code chunk in the Rmd file.
3. Start the Shiny app and take a screenshot of the app.
4. Insert the screenshot in to the Rmd file wih a markdown img tag (![](app.png)).

This workflow was time consuming and if I wanted to make any tweaks to the app I had to copy and paste the new code into the Rmd file and take a new screenshot. Ideally I wanted modifying the code in one place to trigger the code to be updated in the Rmd file and a new screenshot to be automatically generated.

The first goal of getting code from an R file into a code chunk in an Rmd file can be achieved with the read_chunk() function from knitr. With read_chunk() you can specify a path to an R file to “inserted” into an Rmd file. Inside of the R file you’re targeting the code that you want to include in the code chunk should have a comment above it with the syntax: # ---- [chunk name] ----. For example here’s the code from my simple server.R file which is in a directory called app:

You can then set up the Rmd file to include the code above like so:

{r, cache=FALSE, echo=FALSE}

{r server, eval=FALSE}

Notice that the chunk name in the comment at the top of server.R matches the name of the chunk where code will be inserted.

Now that getting the code in the Rmd file is figured out let’s move on to inserting a screenshot. The appshot() function from the webshot package programmatically takes a screenshot of a Shiny app providied the path to the app. If we use this function with the include_graphics() function from knitr then we can capture and insert the screenshot in one step like so:

{r, echo=FALSE}
library(webshot)
appshot(app = "app/", file = "app.png", vheight = 300)
knitr::include_graphics("app.png")

And voila, mission accomplished! By modifying just the source files, the code in the Rmd file and the screenshot of the app will now be updated whenever you knit() the Rmd file. If you want to play around with an example of this process in action I set up a GitHub repo with a simple example. Thank you to Yihui Xie for knitr and Winston Chang for the webshot package and may all your programmatic document dreams come true!

# Update (2016-11-25)

Thanks Yihui for this tip:


text:
+0

# How does this turn into... Harmonic Numbers?!

+1
143
3
+72

Define the following statistic as follows:

$$D(a_1,a_2,\ldots, a_n)$$:

Start at $$a_n$$. Go back from $$a_n$$ until you get to the nearest element of the list smaller than it. Suppose that the first element smaller than it is $$a_k$$. We break the list there (right after $$a_k$$).

Then, repeat from $$a_k$$... go back until you get nearest element in the list smaller than $$a_k$$.

By the end, you will have split the list a certain number of times, x, creating x+1 sub-lists.

Now, consider the expression:

G(n) = $$\frac{D(1,2,3, \ldots , (n-1) ,n) + D(1,2,3, \ldots , n ,( n-1) , \ldots + D(n , (n-1) , \ldots , 2 , 1)}{n!}$$ where the numerator is $$D$$ evaluated at all $$n!$$  permutations of $$1,2,3,4,\ldots,n$$.

For example, for n=3, we have:

$$G(3) = \frac{D(1,2,3)+D(1,3,2)+D(2,1,3)+D(2,3,1)+D(3,1,2)+D(3,2,1)}{3!}$$, which can be shown to equal $$\frac{11}{6}.$$

Prove that $$G(n)$$ is the $$n$$th harmonic number!!!!!!!!!!!!!!!!!

Thank you so much in advance.

Mar 14, 2022

#1
+117830
0

I did that at length.

I am still waiting on a response from you.

Mar 14, 2022
#2
+72
+1

Have responded. As I said, I will work on characterizing all numbers that serve as counter-examples.

I'm curious to know an approach to this post too.

#3
+117830
0

Thanks, :)

Unfortunately I do not think this question will get my attention.

It looks very time consuming and it doesn't look like my kind of question.


text:
MathSciNet bibliographic data MR2161824 51M05 (46B04) Zaks, Joseph On mappings of $\Bbb Q^d$$\Bbb Q^d$ to $\Bbb Q^d$$\Bbb Q^d$ that preserve distances 1 and $\sqrt 2$$\sqrt 2$ and the Beckman-Quarles theorem. J. Geom. 82 (2005), no. 1-2, 195–203. Article

For users without a MathSciNet license , Relay Station allows linking from MR numbers in online mathematical literature directly to electronic journals and original articles. Subscribers receive the added value of full MathSciNet reviews.


text:
## Wednesday, June 4, 2014

### BQ #7: Explain in detail where the formula for the different quotient comes from now that you know! Include all appropriate terminology (secant line, tangent line, h/delta x, etc).

We have known about the difference quotient for a long time now; in fact, it is often included in our tests. However, we really didn't know where it came from until we reached the last unit- Unit V! So let's take a closer look at how the difference quotient is derived.
Based on the first few concepts, we know that the difference quotient is only a part of the process when trying to find the derivative (the slope of tangent lines).

 http://t3.gstatic.com/images?q=tbn:ANd9GcQx-jY-1cjcu_PSC9gGtoDW4qMYafVwaqWw8Qt5qV_gQpIKlz5w:cis.stvincent.edu/carlsond/ma109/DifferenceQuotient_images/IMG0470.JPG
Notice that the image on the left shows us two  main points. The first point is [x, f(x)]because the first value on our scale was "x". Since the first value under the x-axis is "x" that means that the value for y in that point is f(x).  There is another point, but does not have exact digits either. Therefore, we simply add the "h" (the distance between the two points) to the already known "x", so we can get "x+h". Then as we did before, the y-axis will be f of the x-axis, which turns out to be f(x+h).
 http://t2.gstatic.com/images?q=tbn:ANd9GcSmctLWns4VWjJOvK672RQnfSPeu-73rvYghAvuGT_HhHTEhVRY3w:education-portal.com/cimages/multimages/16/Slope_formula_2.png

We continue to find the difference quotient by using the slope formula as shown above. After plugging in the values based on the slope formula we get [ f(x+h)-f(x)/ x+h-x]. Since the "x" in the denominator cancel out, we only have to simplify it to get [f(x+h) -f(x)/ h]....the difference quotient!!
Like I mentioned before, the difference quotient can be used to find the slope of a tangent line, which only touches the function once. We do not have to rely on the secant line because it touches the function twice. As a matter of fact, the reason why we try to find the limit as h approaches 0 is because we want "h" to be as close as possible to 0 so that both points can meet at one point instead of two like the secant line).

## Monday, May 19, 2014

### BQ #6- Unit U

What is continuity? What is discontinuity?

A continuity is basically a predictable graph  or a continuous graph.  A continuity is also described as a graph that "has no breaks, no holes, and no jumps". Another way you can identify a continuity is by drawing it without lifting  your pencil from the paper and makes a goof bridge. We are more familiar with continuities as we dealt with them in parabolas, linear graphs, etc. Meanwhile, discontinuities are the opposite of continuities since they do have holes, jumps, and breaks. Discontinuity graphs are categorized into two different "families". The two families are removable discontinuities and non- removable discontinuities. In removable discontinuities, the one example would be point discontinuities, or a hole. Non-removable discontinuities have three different examples: jump discontinuities, oscillating behavior, and infinite discontinuity. Jump discontinuities are graphs that have an open and closed circle, but do not connect. An oscillating behavior is a graph that looks sine curve, but is very wiggly. An infinite discontinuity is also known as unbounded behavior because it occurs where there is a vertical asymptote.

Removable Discontinuity:

Point Discontinuities

 http://dj1hlxw0wr920.cloudfront.net/userfiles/wyzfiles/4a69dec7-03e0-492f-ac16-4dcd555579c9.gif
Non-Removable Discontinuities

Jump Discontinuity

Oscillating Behavior
 https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRGKnu-whU8KA1HjLrbu6pgV9JW_727lNXa-Eu-3sTzcp_zGqukDg

Infinite Behavior
 https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRp9ghtAEQLeV_IInaJpdPzTWbn-xansC05qQdrQ_6jz_yURt2TQQ

What is a limit? When does a limit exist? When does a limit not exist? What is the difference between a limit and a value?

A limit is "the intended height of a function". As for the values, it is the actual height of a graph. Keep in mind that a graph is continuous when the limit and the value are the same and we have no discontinuity. So now let's go back, where does a limit exist/ not exists?
A limit exists in any point within a continuous function and also exists in a hole because the graph still intended to reach a certain height. As for the value, the random point above would be the actual value since it is the actual height of the function (dark circle).
Analogy of why the limit still exists in a hole:
Two people are driving to a restaurant from two different routes. Once they get there, they noticed that the restaurant burned down. Despite the fact that they did not go inside the restaurant, the two different people still reached the intended destination- the restaurant.
 http://dj1hlxw0wr920.cloudfront.net/userfiles/wyzfi
However, a limit will fail to exists in non-removable discontinuities, such as jump, oscillating, and infinite behaviors. The reason why a limit would not exist in a jump discontinuity is because there are different left and right limits. Also, the value and the jump discontinuity in jump discontinuities are different. When looking for the values, the value of a jump discontinuity would be the dark or closed circle. A limit will not exist in an oscillating graph because there are too many values within the "wiggly" graph that it is difficult to pinpoint one single value or limit. The last discontinuity in which a limit does not exist would be in infinite behavior graphs. This usually happens when we have a vertical asymptote, which would lead into unbounded behavior graphs. We will forever more approach infinity, which means we cannot find a specific numerical value.

How do we evaluate limits numerically, graphically, and algebraically?
One of the ways to evaluate limits would be by using a table. We take the limit and add or subtract (1/10) to it.(three for the left and three for the right). Those two values would be the end points of the table and those f(x) values would approach the limit.
The other way we can evaluate limits would be graphically. When we find values to our table, we can simply plug the function into the "y=" sceen and trace them. There are times when the limits are graphed and in those cases, it would be easier to trace the graph with our own fingers. If out fingers meet then the limit does exist, but it is doesn't then the limit does not exist.
Lastly, we can also find the limits algebraically. We can evaluate algebraically with direct substitution, factoring out, and finding the conjugate. We always want to start solving with direct substitution, which is basically substituting the x value that we are approaching into the function. You can will be done with the problem if you get a # (or fraction), 0/#, #/0, or 0/0 (indeterminate). If you do get indeterminate, then use the next methods. When we factor out the function we should be able to cancel something out (removable) that would result in a simply number which we can directly substitute back into the function. The other method would be rationalizing/ conjugate and it is usually used when we have a radical and cannot factor out anything. We follow by multiplying by the conjugate of the portion that has a radical. We foil the conjugate and leave the non-conjugates alone. Again, we should be able to substitute once we canceled something else.

References
http://dj1hlxw0wr920.cloudfront.net/userfiles/wyzfi
https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRp9ghtAEQLeV_IInaJpdPzTWbn-xansC05qQdrQ_6jz_yURt2TQQ
https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRGKnu-whU8KA1HjLrbu6pgV9JW_727lNXa-Eu-3sTzcp_zGqukDg
SSS Packet

## Monday, April 21, 2014

### BQ #4: Why is a "normal" tangent graph uphill, but a "normal" cotangent graph downhill?

Again, we are going to go back to the Unit Circle and as the unit circle tells us, the trig ratio for tan=y/x and cot= x/y since it's the reciprocal of tangent. Another way we can see these ratios is tan=sin/cos and cot= cos/sin.  Look that the paragraphs and the images for more details. With this in mind,  cos would need to equal 0 for tangent and sin would need to equal 0 for cotagent in order to find our asymptotes since they are undefined ratios.

For tangent, Cos would be 0 at 90* (pi/2) and 270* (3pi/2). Before we graph, also remember that the pattern for tangent will be  + - + -. Now, let's label our graph based on the quadrants and their pattern, but highlight where the asymptotes will lie on.
You can see that based on the asymptotes, you need to draw your graph within those two quadrant. It lies on the second quadrant , which is negative and then in quadrant three, which is positive. When you connect those two, your graph will go uphill.

Now as for cotangent, you also need to remember that in order to get an asymptote, sin will need to equal 0. Based on the unit circle, sin=0 at 0* (0pi) and 180* (pi). The pattern for cotangent is the same as it is for tangent ( +-+-). Once we label our graph and highlight the asymptotes, we need to look at the quadrants that lie within those asymptotes. We land on the first quadrant, which is positive and then in the second quadrant, which will be negative. Once we connect these pieces together, we get a downhill graph.

## Friday, April 18, 2014

### BQ#3 – Unit T Concepts 1-3

How do the graphs of sine and cosine relate to each of the others?  Emphasize asymptotes in your response.

As for the asympotoes, tangent also derives it's distance between the asymptotes from sine and cosine. If tangent= sine/cos, the only way to get an asymptote (undefined ratio) is to let cos(x)=0 (denominator 0= undefined). According to the unit circle, the two values that give is cosine (x) as 0 would be at $\pi \!\,$/2 and at 3$\pi \!\,$/2.  Of course, the aysmptotes do not end there because they will continue to go on forever, never touching the asymptoes; yet, sine and cosine will be there to help us find tangent.

Cotangent:

Similar to tangent, the denominator for cotangent also need to be 0 in order to get an asymptote. In other words, we need a value that has sin of theta equal to 0 since that would result in an undefined ratio. The values that have the y value as 0 would be 0 and 2$\pi \!\,$. Given the location of the asymptotes, we can start up for the 1st quadrant and then go down for the second quadrant, meaning that this time the graph will be downhill.

Secant:

Secant is much easier because it is the reciprocal of cosine, so that means that the ratio for secant is 1/cosine. Since cosine is the denominator, that means that the only want to get an aymptote would be to make cosine equal 0. So where does cosine equal 0? It equals  0 in $\pi \!\,$/2 and 3$\pi \!\,$/2 or at the 90* and 270*. This is also due to the fact that secant shares the same positive and negative values as cosine since they are reciprocal as I previously mentioned. Just so you can see it in action, let me show you an example. In the 2nd quadrant, cosine is negative so if we divide 1 (+) by cosine (-), then we get a negative answer similar to secant in the 2nd quadrant. The same method would be applied to secant as it can be applied to cosine.

Cosecant:

Just as cotangent was similar to tangent, cosencant will be similar to secant. We must first understand that cosecant is the reciprocal of sine, so the ratio would be 1/sin. This means that in order to get the asymptotes, sine (denominator) would have to be 0 to give us an undefined ratio. In order to get sine to equal 0, the values for the asymptote would have to be 0 and 2$\pi \!\,$. Also, let us not forget that cosecant will also share the similar sign values as sine because they are both positive in the 1st and 2nd quadrant, but negative in the 3rd and the 4th quadrant. Also, both will continue to have many, many asymptotes even though we tend to only show one period.

References:
SSS Packet- Unit T
Demos Packet

## Thursday, April 17, 2014

### BQ #5: Unit T: Concepts 1-3: Why do sine and cosine NOT have asymptotes, but the other four trig graphs do?

So in order to figure out why sine and cosine do not have asymptotoes, we need to understand what an asymptote is. It is basically an undefined ratio, or a ratio that is divided by 0. Keeping that in mind, let's look at the trig ratios once again:

 https://precalculusnwr7.wikispaces.com/file/view/Data_table_for_math_wikispaces.JPG/317767144/384x311/Data_table_for_math_wikispaces.JPG

 http://staff.argyll.epsb.ca/jreed/math30p/trigonometry/unitCircle.htm

Notice how the only trig ratios to not have "r" are sine and cosine and "r" represent 1 on the unit circle. So whatever you divide sine and cosine by, the denominator will be 1 and therefore, it will not be undefined (asymptote). An asymptote can only exist when the denominator is 0 in order to reach the undefined value. Meanwhile, the other four trig graphs do not have a 1 as a denominator, meaning that they could have a 0 as a denominator to make it undefined and thus an asymptote. In order words, cosecant and cotangent can have asymptotes if the "y" (denominator) is equal to 0. This would apply to secant and tangent is the x is  also equal to 0.

Reference:
https://precalculusnwr7.wikispaces.com/file/view/Data_table_for_math_wikispaces.JPG/317767144/384x311/Data_table_for_math_wikispaces.JPG

http://staff.argyll.epsb.ca/jreed/math30p/trigonometry/unitCircle.htm

SSS Packet Unit T

## Wednesday, April 16, 2014

### BQ #2: Unit T: Concept Intro: How do trig graphs relate to the Unit Circle?

How do the trig graphs relate to the unit circle?
The Unit circle relates to the trig functions because it helps describe where the positive and negative sections of the graph come from, so that we can derive the periods of each trig function in order to graph it. When you look at the graph below, notice how the sine (Blue) is positive, which is basically covering the 1st and 2nd quadrant because sine is positive there. Then, it continues to go down to reflect that sine is negative in the 3rd and the 4th quadrant. As for cosine (Green), the positive uphill tells us that cosine is positive in the 1st quadrant and then goes down because cosine is negative in the 2nd quadrant. The downhill also shows that cosine is negative in the 3rd quadrant since it is still negative. It finally goes back up because cosine is positive in the 4th quadrant. The tangent graph (Orange) also goes through the similar situation, but according to the ASTC pattern as well. So first the graph starts in the 1st quadrant because all trig functions are positive there and it becomes negative since tangent is negative in the 2nd quadrant. It finally goes back up to a positive position because tangent is positive in the 3rd quadrant and then goes back to negative in the 4th quadrant.

Period? - Why is the period for sine and cosine 2pi, whereas the period for tangent and cotangent is pi?

Let's start by defining what a period is in order to understand how it relates to the graphs.
Period: The period for sine/cosecant and cosine/secant is 2$\pi \!\,$ because it will take 4 quadrants (based on ASTC) to repeat the pattern (or one time to go through the cycle)

Sine is + + - -
 http://geogebratube.com/student/m25914

Cosine is + - - +
 http://geogebratube.com/student/m25914

Sine and Cosine may have an amplitude of 2$\pi \!\,$, the period for Tangent and Cotangent is simply $\pi \!\,$ because tangent has a pattern on +-+- (based on ASTC).  In other words, it has a positive and then a negative within the first two quadrants.

Tangent + - + -
 http://geogebratube.com/student/m25914
Remember, a period is only how much it take to go through the cycle even though it is never-ending; in fact, periods can continue on forever, but we only want to look at one period in order to understand how it relates to the trig functions.

Amplitude? – How does the fact that sine and cosine have amplitudes of one (and the other trig functions don’t have amplitudes) relate to what we know about the Unit Circle?

Amplitudes are half the distance between the highest and lowest points on the graph. All we need to look at is the value of "a" to find it (Kirch). So why is it that sine and cosine have an amplitude, but not tangent? Well, going back to the unit circle, sine and cosine both have "r", which equal 1 in their trig ratios. Sine and cosine have a restriction because they cannot have a value greater than 1 or less than -1. In fact, this would result in a "no solution". However, tangent/cotangent do not have 1 and are not restricted to 1 and can have other values that do not have to be in between -1 and 1.

 https://share.ehs.uen.org/taxonomy/term/300

References:
https://share.ehs.uen.org/taxonomy/term/300
http://geogebratube.com/student/m25914
Unit T SSS Packet

## Friday, April 4, 2014

### Reflection 1: Unit Q Verifying Trig Functions

1. Verifying trig functions are not easy at first,  I won't lie. However,  I know one can easily verify functions by following a series of steps. To verify a trig function basically means to prove how one can derive the trig based on another trig function.  Our goal is to simply,  find the conjugate,  etc. in order to find the answer. It usually takes a while, but you can start looking at thw hints that you are given.
2. I usually start by looking at the similarities I  my problem.  For example, if I know that one of the trig function is an identity that can the canceled with another, I will find a way to cancel it out with ratio identities. I also try to turn everything into sin and cos.  One of the most common process I use is finding the conjugate for concept 5. For other simpler concepts, I tend to separate them and then proceed to cancel.
3. My first step tends to be to look at the problem for anything that I can cancel off. In reality,  most times I just try anything because I willw eventually find the answer.  Then, I go into factoring anything needed and sometimes by doing so,  I can replace it by a Pythagorean identity. Once I can use my identies, I can continue finding other things that can be canceled. Mainly,  do not over think something because the answer might just be in front of you. Good luck!


text:
The Van der Waals law

The law

The →   ideal gas law considers the molecules or atoms of a gas as point particles that exert a pressure by striking the wall of the container that contains them. In fact, Van der Waals found it necessary to introduce corrections due to the fact - that the particles of a gas do not only hit the walls, but also suffer collisions between them. - that these particles are not punctual but have a specific volume These two corrections are translated by both →         Van der Waals parameters (constants) $a$ and $b$ which differ from one gas to another:

$(P\; +\;\frac{n^2\cdot a}{V^2})(V- n\cdot b)$$=$$n\;R\;T$

with: $a$ Parameter (takes into account interactions) $b$ Parameter (takes into account the reduction of the total volume because of the particulate volumes of the particles) $P$ Pressure $V$ Volume $n$ Number of moles $T$ Kelvin temperature $R$ Ideal gas constant = $0,08205 \frac{L\;atm}{mole\;K}$