Thursday, December 30, 2021

Give a dog a voice and she will use it

 kw: book reviews, nonfiction, language, dogs, speech therapy

Meet Stella, subject of the book by Christina Hunger, How Stella Learned to Talk: The Groundbreaking Story of the World's First Talking Dog.

Ms Hunger, a speech therapist who works with pre-verbal toddlers and autistic children, got Stella as a puppy several years ago. She noticed that Stella's gestures and sounds were similar to the things a young child or other non-verbal person will do to communicate.

She frequently uses AAC (Alternative and Augmentative Communication) devices with her clients to enable them to begin speaking when it seems that the usual abilities aren't (yet) working. She bought four recordable "speak-back" buttons and placed them where Stella would go to request to go outside, or play, or eat. It took the dog a few weeks to first try pushing one of the buttons. During those weeks, whenever Christina would take her outside, for example, Christina would say, "Outside" and push the button that also said aloud, "Outside". Similarly for the others. Once Stella figured out what the buttons were for, she began using them.

Over time, Christina and her husband added more buttons, until they decided to attach them to a single board in one place, so Stella could use them in combination if needed (such as "outside" "play") without walking from place to place. It took Stella some time to get used to the new arrangement, but then she took off. The board shown here has 25 word buttons and one with the phrase "love you". That was a year or two ago. I think the number of words Stella can now use has grown beyond 40.

Throughout the book the author makes it clear how much repetition and patience are needed. She also discusses speech therapy issues that are common to Stella and the toddlers she works with, such as the frustration a child (or dog) experiences when she wants to communicate something more clearly. Sometimes Stella has used word combinations to express a thought not on the board, such as "water bad" when the bowl was empty; "empty" hadn't been supplied (this is my illustration, I couldn't find the place in the book where this first occurred, and the book has no index). Little children do the same thing, particularly those with an AAC that they are outgrowing. We learn that children pick up words faster than we expect, so she is always ready to add many words to a child's AAC. AAC devices for children can often use thousands of words. Time will tell how many Stella learns!

Christina's blog is here, and there are dozens of videos on YouTube about Stella's accomplishments.




Wednesday, December 22, 2021

The Man Who Shaved the Universe

 kw: book reviews, nonfiction, science, astronomy, philosophy of science

I was a developer of scientific software for forty years. One bit of my "Coder's Credo" is, "A complex system that works began as a simple system that works." In practical terms, this meant that I had to first "get the science working", which was usually simple, at least conceptually. The complications that had to be added all derived from the user interface (making the software usable for humans) and the data interface (coupling it to the database or knowledge base). I built my career on a minimalist approach: Add new stuff only when there is a clear advantage.

Millennia ago, the Universe seemed simple compared to the Earth. In the night sky, stars were thought of as distant lamps stuck to a "firmament". The Sun, Moon, and five rather bright "wanderers" (in Greek, πλανόδιοι, which became "planets") were a complication that most folks ignored. But certain curious ones began to theorize; they wanted to figure out how the sky worked.

Fast-forward to a mere 21-22 centuries ago. The prevailing theory of the sky, at least in Europe and north Africa, was a nest of concentric, "crystalline" spheres. The outer sphere held the "fixed stars", and the seven wanderers were each ensconced in its own sphere. Over time, observations of the motions of these "planets" showed something odd: they didn't all march across the face of the "fixed stars" at a steady rate, and some looped back on themselves. Also, the Moon's apparent size changed a little. By about 150 AD, a system of epicycles attached to the spheres had been developed to better model the movements of the planets, including the Moon and Sun.

This illustration from an Arabic document of the 1300's shows the epicycles needed to model the motion of Mercury, shown at four times during a particular year. This image is from Alamy (a commercial site), where its epigraph says,

"Ibn al-Shatir's model for the appearances of Mercury, showing the multiplication of epicycles using the Tusi couple, thus eliminating the Ptolemaic eccentrics and equant."

This shows that Arabian astronomers went beyond Ptolemy. At its height in the first half millennium of the Christian era, about 80 epicycles were needed for a "good" model, and the notion of "crystalline" spheres was politely ignored. Here, I count six epicycles needed to produce motions for Mercury that matched astronomical observations.

We all know that Copernicus tried to simplify the Solar system by recognizing the Sun as its center. However, he also needed epicycles to model planetary motions accurately, because he thought all orbits were perfect circles centered on the Sun…or, at least, the rotational center of a cluster of circular epicycles followed a circle about the Sun.

Leaving behind circles in favor of ellipses, Kepler, using Tycho Brahe's data for positions, produced a greatly simplified model of the Solar system, such as that seen here (this one leaves out Saturn, at twice the distance as Jupiter).

This particular image also shows the orbits of several major asteroids and three comets. Comet Halley's ellipse extends to 35 AU, seven times as far as Jupiter. The orbit that just brushes past Jupiter belongs to Comet Kopff, one we never hear of because it is visible only with a telescope at least 4" in diameter.

The older tradition of natural philosophers, exemplified by Ptolemy, resulted in models of natural phenomena with steadily increasing complexity. Something happened about the time that Ibn al-Shatir began writing his astronomical manuals, that began to turn the study of nature from natural philosophy to science as we know it.

Here I turn to a better authority on science history, Johnjoe McFadden. In his book Life is Simple: How Occam's Razor Set Science Free and Shapes the Universe, Professor McFadden traces the progressive simplification of science and scientific theories, based on a 14th Century meme we call Occam's Razor. This is expressed in several ways, as it was by William of Ockham in the early 1300's. I like, "Do not multiply entities beyond necessity." This statement does not disallow complexity, it discourages unneeded complexity. Einstein's version is, "Make things as simple as needed, but no simpler," which looks at the matter from the other end.

Either way one looks at it, the principle known as Occam's Razor slices away unnecessary encrustations from scientific models. Before reading Life is Simple, that's about all I knew of the matter. I didn't even know that William, born in Ockham, lived in the early 1300's, about 700 years ago. This was just before the era of Geoffrey Chaucer (Canterbury Tales), who was born just a few years before William of Ockham died. The "English" of the day was Middle English, when the use of "thee" and "thou" and "doest" for "does", still found in the King James Bible, were at their height. But William wrote in Latin, which requires just a tad more translation than Middle English.

Neither did I know how the Razor grew and spread among the literate people of Europe and the Middle East. By the time of Kepler, 300 years later, and Newton, a generation later, simplification of theories was accepted throughout the world of the Enlightenment. The thread of the Razor through history is followed in all its excursions, leading to its dominance today.

It has become the ambition of many scientists to determine a Theory of Everything, which can be expressed on a T-shirt as a single equation that unifies not just the Weak and Strong and Electromagnetic forces, but also Gravity and Quantum Mechanics. Such a theory would not be a theory that "explains" everything, for a corollary to the Razor is, "That which explains everything explains nothing." The prolific clusters of epicycles in cosmology are an example. The more cycles you add, to account for refinements in astronomical observations, the less you actually know about them. The laws of orbital areas derived by Kepler, and the three laws of motion of Newton, as modified by Einstein, allow us to calculate exactly where each planet, moon, asteroid, comet, and artificial satellite is going, for decades or centuries into the future, and where they were at any time in the past. The calculations are tedious, but not difficult, and modern computing machinery shoulders the load of the tedious part.

Sadly, many (most?) modern theorists have gotten bogged down in String Theory. Somehow, these mathematical models require calculations in at least 10 or 11 dimensions (some versions, as many as 26 dimensions). None of the string theories so far proffered can be tested experimentally, and the number of possible string theories is a gigantic number with about 500 digits. And we thought 80 epicycles are too many! At the moment, this is a lot more "hair" than the Razor can manage to tame.

I was quite enthralled by the stories, the history, of how modern science developed once it was freed from the cosmogony of Aristotle and Ptolemy, which somehow became the foundation of Roman Catholic cosmology (for the curious: cosmogony is about "what is there", and cosmology is about "how it goes"). In effect, the Razor removed God's hand from the tiller of the Universe, at least so far as science is concerned. William of Ockham was also far ahead of his time in political understanding, which is probably a consequence of his revolutionary understanding of nature: he insisted that rulers' legitimate power came through the consent of everyone. His understanding of natural rights is an embryo of the Bill of Rights in our Constitution.

While I recommend this book for its historical perspective, I have a few quibbles about statements made by the author when he stepped outside his area of expertise, which is molecular genetics. Those who think my objections are TMI can stop here. What follows touches on three items that surprised me the most:

  • On p 271, discussing the Planck Law for the spectrum of a heated blackbody, he writes that such bodies "emit light in a narrow band that depends only on the black body's temperature." Not quite. The actual spectrum of a blackbody (note the absence of a space) covers all wavelengths, and the width-at-half-height of the spectrum is about 2.8:1. For example, for a blackbody at a temperature of 7,250K (~12,600°F), the half-height spectrum ranges from 240 nm to 680 nm. The peak of the spectrum for this temperature is at 400 nm. The location of peak radiation depends on temperature, and the relative shape of the spectrum follows. An analogy about whacking a piano and somehow getting only a single note is quite bogus. The range of "notes" so emitted is strongest over more than an octave (18 half-tones), and there is some resonance from every string on the "piano".
  • On p 293, about symmetry, "…time symmetry implies energy conservation, translational symmetry implies conservation of momentum, and Newton's third law, that every action has an equal and opposite reaction, is a consequence of rotational symmetry." About the last phrase: Where did that come from? Newton's third law is equivalent to time symmetry, and has nothing specific to do with rotation.
  • On p 327, regarding the Bayesian likelihood of a particular combination of numbers being thrown in ten tosses of a 60-sided die, he states correctly that this is the tenth power of 60, or 6010, but then he evaluates it as 600 million to one. Hardly! 6010 = 6.05 x 1017, or 600 million times about a billion, or 600 quadrillion. Really! Don't any of his editors and readers know enough math to punch this out on a calculator?

That's enough of that. I can't blame him too much. Although I strive to be a generalist, I admit I know woefully little about molecular genetics, at least compared to Prof. McFadden. So, if I ever write a book that happens to wander into that arena, I'll see if he's willing to give it a read, and after he stops laughing, make the odd correction here or there.

Tuesday, December 07, 2021

Mathematics – behind the scenes of everything

 kw: book reviews, nonfiction, mathematics, applications

After a forty-year career as a scientific programmer, AKA "coder", I can look back to see that I was primarily a working mathematician. The scientists whose methods I embodied in computer code were, of course, having the computer "do the math", but I frequently had to correct their math. They were all brilliant, but one cannot always expect someone whose life has been devoted to chemical engineering or mineralogy or seismic analysis to have kept up their math skills over the prior couple of decades. On the other hand, I greatly enjoyed calculus and other "mid level" math operations, so I was "up" on what they needed and could make sure they used the math properly. I don't claim to understand perhaps 90% of the higher level math in the current literature. But I understand enough that I could make a career of it. 

In all that time, I developed only a few new methods, and published only a single peer-reviewed article, to be found at Science Direct. The abstract is open. Sadly, the article is behind Elsevier's paywall. But the key takeaway is this: I had to develop new methods to numerically solve the very stiff differential equations used by physical chemists studying the conversion of organic grunge (they call it kerogen) into crude oil. Relevant to the current book, I used methods called "convergence acceleration", which were developed before crude oil was a thing. In particular, one method was first used to study stresses in earthen dams, and another was used by Leonard Euler in the mid-1700's, for a project I don't now recall. I borrowed a couple of related methods from a theoretical dissertation by a colleague at my graduate school.

What's the Use?: How Mathematics Shapes Everyday Life, by Ian Stewart, a retired Professor of Mathematics who has at least five times my expertise, is based on a notion first expressed by Eugene Wigner in a 1960 article titled The Unreasonable Effectiveness of Mathematics in the Natural Sciences.

Wigner was not remarking on math's broad effectiveness. That isn't hard to understand. Rather, mathematicians and others who use lots of math find that methods, perhaps derived for specific problems, or perhaps for their theoretical beauty, are found to be useful in realms so remote that it seems miraculous. As the author points out, some say, "The Universe must be made of mathematics!"

The book starts off with a brief historical survey, reaching back far beyond Leonard Euler. However, Euler is responsible for a breakthrough in complex analysis that led to a formula, called Euler's Identity, which displays the essential unity of all mathematics:

The five symbols, here related by two operators (the "+" and the "="), are combined into an astonishing expression. Let's unpack them, from right to left:

  • 0, zero: Before the year 1200AD, the zero as a placeholder had been in use for about 500 years, but was not yet accepted as a number, outside of India and China. Only in the 1700's (in Europe) were zero and the negative numbers accepted as numbers, making subtraction, for example, immensely more useful.
  • 1, one: The first of the "natural numbers" or "counting numbers" is the original number.
  • π, pi (pronounced "pee" in Greek, but most of us say "pie"): This is the ancient symbol for the ratio of the circumference of a circle to its diameter. Millennia of effort to "square the circle" were based on the belief that π is a rational number (one that can be expressed as the ratio of two natural numbers; 335/113 is a useful approximation, but is not exact). Only in the 1700's was it proven that π is an irrational number, which is expressed by a string of digits that never ends and never repeats. Being related to the circle means it is the basis of trigonometry, but that is only the beginning!
  • i, the "imaginary" number: This is the square root of minus one. It has no place in any of the hierarchy of "number line" numbers: natural numbers, integers, rational numbers, and irrational numbers, which together constitute the "real" numbers. The combination of a real number and some real-number multiple of i is a complex number. Complex numbers became useful when it was realized that they represent coordinates in the plane.
  • e, Euler's number: This was originally the base of natural logarithms, which show up in the solutions to many calculus problems. It is named for Euler, but was actually assigned by John Napier a century earlier, when he developed natural logarithms. Its value is approximately 2.7182818285… e and π are the first two irrational numbers to be proven to be transcendental, which has an esoteric meaning related to polynomial derivations. Many (infinitely many) irrational numbers are the solutions to polynomial equations, but most (more infinitely many!) are not. However, they are hard to find. Natural logarithms and their inverse, exponential expressions, are found everywhere in both calculus and complex analysis.

The hard part, which seems magical to many, is to evaluate eix, where x is some real number, and then to show that when x = π, the expression's value is -1. Endnote 50 in What's the Use? is a very short proof that exponentiation with i becomes a rotation, meaning a trigonometric combination: eix = Cos(x) - i*Sin(x). When x = π, the Sin part equals 0 and the Cos part = -1. This is the connection to π.

Why is this important? Much trigonometric algebra is much easier to carry out in this form. The operations automatically keep track of all the Sin and Cos functions that are embedded in the exponential expressions. Electrical engineering, frequency analysis, and a host of other disciplines would be either impossible or a great deal more difficult without complex analysis using exponential expressions.

What does this have to do with everyday life? Cell phone communications use digital decomposition and reconstruction of audio signals. Getting the digital signals transmitted efficiently requires some high-powered math. Turning a song into an MP3 file, so it takes up 1/10th or 1/20th the space on your hard drive (or phone memory) is a several-step mathematical exercise. Doing the same with a visual image to produce a JPG file is similar, and the five steps, drawn from five quite diverse realms of mathematics, are described—in brief!—in Chapter 10, "Smile, Please!".

Before getting to that point, however, the author discusses efforts to allot voting districts "fairly", describing several definitions of "fair", along with at least some hints of a proof that no matter what you may call "fair", it can't be done perfectly. He discusses the relationship between a problem involving seven bridges and two islands, that is actually insoluble, but is related to equitable ways to allocate kidneys for transplants, which is soluble. The way encryption works in your web browser (and email, I hope!) and your phone is based on "trap door functions" which are, of course, mathematical in nature. He also shows ways being developed to make much stronger trap doors to cope with the immense computing power that quantum computing just might deliver. Then, we have Einstein's theories of relativity (there are two, Special and General): both are needed to get GPS to function accurately, in addition to several other realms of mathematical operations.

There are 13 chapters showing that math is hidden behind a great deal of what goes on in the world. Civilization is impossible without it. In case this fills you with dread, remember that you don't have to be an automotive engineer to drive a car, but we do need some automotive engineers to have cars to drive. Thus, not all of us have to understand higher math to use our GPS, cell phone, or microwave cooker, but there need to be some pretty bright mathematicians out there to make these things work.

Don't shy away from this book because it is about mathematics. The author's writing is very readable, and he does his best to help us glimpse the way some of these things work. One book won't make much of a dent in your struggles with algebra, or calculus, or whatever. But it will yield an appreciation for the unreasonably diverse ways almost any mathematical development could be used for practical things later on.