Wednesday, January 28, 2015

Are we dumbing ourselves down?

kw: book reviews, nonfiction, technology, automation, surveys, critiques

Six years ago Historian George Dyson wrote on, "What if the cost of machines that think is people who don't?", summarizing an article by Nicholas Carr. Writing about 60 years earlier, in "The Feeling of Power" Isaac Asimov presented a future in which small calculating devices had so usurped arithmetical abilities, that a man who rediscovers paper-and-pencil methods of addition and subtraction is a phenomenon (Strangely, I haven't been able to find a date for this story).

Nicholas Carr has continued to think and write about automation and its effects on us. His recent book The Glass Cage: Automation and Us explores mainly the uglier side of current trends in technology. The best quote in the book is, "How far from the world do we want to retreat?" (p. 137)

Every person will have a unique answer to this question. For people like me, the answer would be, "Very far indeed, for long stretches of time, but with the option to return to full engagement at times and for durations of my choosing." For most of my life I have been more comfortable with machines than with people. Yet I need human contact…just not on the constant basis required by extroverts.

Technology is ancient and continuing: Stone tools as old as 3-4 million years; the successive technologies after Stone of Bronze, Iron, Steam and now Electronics; pocket computers we call "phones" for which making calls is now a minor function. The first time I saw a cell phone in use, some 15 years ago, there were two girls about 7 years old, running together through a park, each talking on a phone to someone else. (Note to self. Try making most calls while walking or jogging. Might be a good way to shed that next 5 pounds or so.) I recall predicting that during my lifetime, our "phone" would be installed in the mastoid bone at puberty and be entirely voice operated. Little wire to a microphone embedded in our jaw somewhere, and software filtering to subtract out the effects of flesh-to-bone conduction of our voice.

I am no slouch when it comes to computer use. I've been what was once called a Power User since the 1960s, when computers were too big to fit in most bedrooms. The motto of the Elephant Club: Don't Trust a Computer You Can See Over. Except today, a new club—the Power Tower Club?—might need a new motto: Don't Trust a Computer Smaller Than a Toaster Oven. Sure, my wife and I have a laptop, but my favorite workstation is a tower 18" tall (46 cm) with a pair of screens that gives me about a meter-wide view into cyberspace. For some of the work I do, that much screen real estate is essential. But do you know what one of my favorite activities is? A few times monthly I am a Historical Interpreter at Hagley Museum, in the Machine Shop, demonstrating machine tools (lathes, drill presses, mills, etc.) from the 1860s and 1870s, powered by a water mill in Brandywine Creek.

I wonder, though, if some machine workers of the early 1800s thought it was somehow "cheating" to use a power tool, when they were perfectly capable of making parts using hand tools. Probably not! Particularly for machine work, one needs a peculiar combination of intelligence and patience. I often point out to museum visitors that cutting the teeth on a medium-sized gear (5" thick and a foot in diameter; about 120 mm and 300+ mm) took a week in the 1870s. You set up a machine with eye and hand. You monitor the machine by ear; by the end of apprenticeship a machinist knows the changes in cutting sound that herald trouble on the way. So you need the brains to set the right index for a 17- or 19-tooth gear on a 40:1 indexing attachment, and the patience to listen for trouble for the next 60 working hours of your life…with resetting of the cut and rotation of the piece about 4 times per hour. Fast-forward to the modern era: Such a gear, if needed today, could be produced in a few minutes using electromachining, or in about an hour on a more conventional NC mill. Those old-time machinists would drool!

In many areas we are going through a transition, and Mr. Carr points out several of importance. The airline industry was among the first to automate wayfinding and autopilot aircraft control. If needed, any modern jetliner, and many smaller planes, are capable of taking off, flying themselves, and landing, without the pilot doing a thing. The trouble is, machines break, thunderstorms and solar flares disrupt communications and sometimes damage equipment, and because no program is totally bug-free, a rare combination of factors puts the autopilot's program into a confused state. In all these cases, the "fail safe" provisions immediately turn control over to the pilot. A few times, this has caused crashes, typically with the loss of everyone on board.

This brings to mind another principle that seems to be lost on modern engineers and programmers, "fail soft". Is it really appropriate for all the software to totally cut out so instantly? If the plane is at all still capable of level flight, the autopilot needs to alert the pilot(s) while keeping the plane on some standard course, giving the humans time to get their brain in gear. There may still be cases such as the "standard course" being straight into a mountainside (and I am reminded of the crash of a small plane in Malaysia in 1991, that effectively decapitated the Conoco corporation), but further development of "standard course" back-up routines ought to take care of that.

Such issues multiply when we come to the driverless car. It sounds seductive. Plot your course on a GPS navigator, press "GO" and take a nap, or play cards, or read or whatever. But the "lanes" in which an airplane "drives" are a few miles wide. Highways lanes are 12 feet (3.66 m) or less. For most of a plane flight, course corrections are few and may be hours apart. On the road, course corrections can occur minute-by-minute and even second-by-second. I have read a time or two about auto-driving "road trains", made up of dozens of autos on a superhighway at superspeed, inches apart to take advantage of drafting. Now suppose a solar magnetic storm disables half a dozen GPS satellites, the road-side "driving aid" equipment being relied upon by the cars, and perhaps some of the electronics in the cars. What is the "fail soft" scenario? Is one even possible??

We are in transition, all right. Casualties of all kinds are one price of progress. YouTube abounds with videos of people so engrossed in texting as they walk that they walk into fountains, manholes, lampposts and each other. We can expect the phones to become even smarter, so they would be on the lookout for such events. Maybe blare, "Look up, dope!", and make a red, flashing screen as such incidents approach. Smart phone technology is not yet complete, nor even appropriate for human use. It's why I use a flip phone that can call and make texts. Period.

In a late chapter Mr. Carr writes of the young Robert Frost and his poems about scythe work. The scythe is an extraordinary instrument. Using one creates muscle tone around your rib cage that no other exercise can match. Learn to use a scythe properly, and use it frequently, and you'll never have back problems. It exemplifies the kind of work that keeps a fellow close to the earth. Even as we try to re-educate America for a supposed post-manufacturing economy, there are huge numbers of jobs that remain very, very hands-on. A company may outsource its call center, computer programming, and database management to drones in India or China. You can't outsource construction, electrical work, plumbing and paving, nor landscaping or even repairing (and washing!) your car. Yeah, I know most New Yorkers just look puzzled when asked by a tourist where to buy gas…like they'd know! But deep in the bowels of the city are track workers and subway car maintenance folks that they'd suddenly feel a great need for if there were a month-long strike.

I have major mixed feelings about automated medicine, though. In certain cases, the Caduceus program has been able to make quick diagnoses where medical experts were baffled. But in others it has been embarrassingly off the mark. In medicine as in many other areas, the term "robotic" is being misused, most notably with the Da Vinci Robot for precision surgery. Let us reserve the term "robot" for autonomous devices such as the Roomba vacuum cleaner. The Da Vinci device is actually a tele-operated "Waldo" with vision magnification and down-scaled, feedback-enhanced motions so a surgeon can operate on something half an inch across while feeling like the object is the size of a basketball. I was once trained on a soldering Waldo used for attaching leads to integrated circuits. It worked at 25x, so a millimeter looked and felt like an inch. It greatly simplified the job. By the way, "Waldo" comes from an old story (1942!) by Robert Heinlein, where the concept was first made public.

Do I want a doctor to cede control in an operation to a robot? Probably not. Diagnosis? Not without human review. Only humans have a sense of what is sensible! How about prescribing? Ditto. I prefer the physician to not only make the decision, albeit aided by the computer system, but also to discuss it with me, because in teaching me how and why he chose a certain medication or treatment, he's rethinking it in a way that is useful to him and may cause him to realize something extra he might at first have missed (Feminists out there, I'd have used "she" and "her" if I had a female physician). "Thinking out loud" is often the most useful kind.

Artificial intelligence, once it gets on a par with us as a conversationalist, will still be quite different from us, so it could provide a very useful function: serving as a "straight man" to our musings, asking questions no human would think to ask, and adding a powerful level of synergy. A very neglected area of ergonomics has been to determine what tasks humans will always do better than machinery, and which tasks should be at the top of the list for turning over to machines. The various Zooniverse projects, citizen science at its best, primarily take advantage of our superior visual abilities. We can recognize the difference between spiral and elliptical galaxies at a glance; or different kinds of beetles; or see that a certain black-and-white blob is a rock and its shadow rather than a penguin.

Some might see The Glass Cage as a Luddite polemic. Not at all. Mr. Carr points out that we are a technological species. We can't live without it. Even the prototypical "cave man" was no naked savage killing prey with teeth and fingernails. The tool kit of Paleozoic people included dozens of tools that require skill to produce but reduce either the effort or the danger of doing the work. I, for one, am glad of today's technologies. I am equally glad that I can pick and choose which to use and which to ignore. Looking around the room I am writing in, I see several thousand objects, nearly all artifacts. Only the insect collection and a few shelves of mineral and fossil specimens are not technologically produced (though I used technology to mount and display them!).

Physically we are more "gracile" (that is, thinner and weaker) than the Cro-Magnons of just 20,000 years ago. They are called "modern" in an anthropological sense, but the technologies they inherited from their ancestors, and added to in following millennia, resulted in a modern civilization in which we don't need the great strength they required for day-to-day living. Our teeth are a little smaller, and as our jaws shorten, most of us need our wisdom teeth removed. All this results from technology. Will this age of intelligent machines cause our brains to atrophy? It's not likely. Our descendants will probably think differently than we do, just as we think differently than our grandparents who mostly grew up without radio, television, airplanes or automobiles.

I'm thinking of my own grandparents, here, all of whom were born in the late 1800s. I know most millennials are of an age to be my own grandchildren. We got our first television when I was 8 years old. Black and white, in a console the size of a divan. Our phone was on a party line. The most local of calls were made by clicking the button 1, 2, 3, or 4 times. "In-exchange" calls needed only 4 or 5 digits. All long distance calls went through an operator. So the change in the "thought world" of today's young adults is as different from mine as mine is from my own grandparents. It is another side of progress. So the book is more of a call to enter the future thoughtfully. We are creating it, after all.

Sunday, January 25, 2015

Chemistry for those who don't know any

kw: education, chemistry, basics

Think of a scientist and what do you see in your mind's eye? Probably someone in a white coat mixing chemicals. Chemistry is the bane of humanities majors everywhere, because you have to take Chem 1 with a (barely) passing grade to get on with your major. (Those with a sharp eye will note that the cylinder being poured from is about to dump all its contents at once!)

So let's knock out a few basic concepts to jump-start your education. First the ultra-quick version:
Chemistry studies how atoms share or exchange electrons. Of roughly 100 kinds of atoms, a few—twelve, to be exact—have one or two "loose" electrons that are easy to strip off, while another twelve have room for one or two more, and will easily plunder those loose electrons. Some others can either gain or lose three, four, or even five electrons. The rest typically share electrons. Chemistry is learning all the ways this can happen, and which elements behave in which fashion.
For more, read on. We begin with Electrons.


Electrons are particles that make up the outer "skin" and "flesh" of atoms. What we usually mean when we say "chemistry" is properly "electron chemistry". There is also nucleon chemistry, plus other subdisciplines such as crystal chemistry and organic chemistry. The odd thing is, you first have to know a little about nucleon chemistry to get a framework to learn electron chemistry.

Nucleons and Elements

Perhaps you have heard that there are 92 "natural" elements, or maybe, as I wrote above, that there are "about 100 elements". There are actually 90 elements called "naturally occurring". That is because, although the heaviest natural element is Uranium, #92, the elements numbered 43 and 61 are not found in nature, for reasons we'll soon get into.

Nucleons are the particles that make up the nucleus: Protons and Neutrons. The number of protons in a nucleus determine what element it belongs to. For a nucleus to be stable (and the "what for" about this is a major subject of nucleon chemistry) there need to be neutrons present also. Only one element has no neutrons in its nucleus, Hydrogen. An atom of hydrogen, the simplest and lightest element, has one proton and one electron, and nothing more. Every other kind of nucleus has at least one neutron, and with only one exception, the number of neutrons is at least as large as the number of protons.

The main item of nucleon chemistry that you must know is that the Atomic Number is the number of Protons. The term Atomic Number is used everywhere. It is also extremely useful to understand that radioactivity expresses the tendency for certain combinations of protons and neutrons to break apart in one way or another. A very few kinds of "unstable" nuclei are nearly stable and last for millions or billions of years. Uranium is one of these.

Nuclei of elements #43 (Technetium) and #61 (Promethium) are always unstable, in every variety, no matter how many or how few neutrons are in there with the protons. In this case, "unstable" means having a half-life short enough that every single atom of these elements that may have existed billions of years ago when Earth was formed, has decayed. Half-life is another very useful term, though mainly in nucleon chemistry. For a bunch of any specific, unstable kind of nucleus, the half-life is the time it takes for half of them to decay. Lots of uranium (originally produced when big stars blew up billions of years ago) is still here because its half-life is about 4.7 billion years.

The fundamental tool for understanding electron chemistry is a table in order of Atomic Number, that is arranged according to how electrons pack together in each kind of element: the Periodic Table.

Periodic Table

Get ready for it! I am about to explain this monstrosity:

The columns are arranged the way they are because elements in a column have similar chemical behavior. Down the left side, for example, the six elements Li, Na, K, Rb, Cs, and Fr all have similar chemical behavior because the outermost electron is "loose" and easily lost to more acquisitive elements. Hydrogen is special; though it can both lose and gain an electron, it also participates in a third kind of sharing bond we'll describe later.

Each row represents an electron shell, which fills from left to right. The rightmost column, topped by Helium (element #2) contains all the elements with a completely filled shell. This is the group of elements with the easiest chemistry: They don't participate in chemical reactions! But right next to them we find F, Cl, Br, I, At, and the "artificial" element currently called Uus (Un-Un-Septium, a fake Latin term for 117). They all have an outermost shell that is nearly filled, but is ready to grab an electron from another element that has a "loose" one available.

The rows are different lengths because the shells have different capacities. It takes some learning in quantum physics to comprehend what electrons are doing (as much as that may be possible!). Here is the simple explanation:
  • Electrons come in pairs.
  • The first shell is filled by a single pair, thus Helium has a filled shell. This filled shell is the core of all heavier elements.
  • The shells of all elements other than Hydrogen and Helium have sub-shells.
  • The sub-shells were discovered by spectroscopy, and are called, for historical reasons, s, p, d, and f.
  • Sub-shells increase by odd numbers of electron pairs:
    • p has 3, so s+p = 4 pairs or 8 electrons.
    • d has 5, so s+p+d = 9 pairs or 18 electrons.
    • f has 7, so s+p+d+f = 16 pairs or 32 electrons.
  • Shells 2 and 3 have s+p only; 4 and 5 also have d (thus the lower-middle block); and 6 and 7 also have f (shown as the extra stuff below the main table).
  • The placement of the rows shows that the d sub-shell fills before the p sub-shell, and the f sub-shell fills before d.
Note that the number of electron pairs in a completed shell is a square number: 1, 4, 9, 16. The next square would be 25, though no elements currently existing make any attack on that shell.

All the elements from 93 to 118 have been produced in nuclear reactors and particle accelerators. With element #118, the seventh shell is filled, so once elements #119 and greater are produced, an eighth shell will begin to fill. This is expected to have a new sub-shell, usually called g. It can contain 9 electron pairs. It is likely that the g sub-shell will begin to be filled with element #121, but we will only know this for sure if element #121, or a heavier one, has a long enough half-life so the electron arrangement can be studied before the whole sample decays away.


When one atom takes control of the loose electron given up by a different atom, or when atoms share electrons, we talk of a chemical bond. To discuss this, a version of the Periodic Table with different highlighting will be helpful:

You know that term "alkali"? It refers to substances that neutralize acids. The two columns of elements at the left, in lavender and blue coloring, are called the Alkali Metals (lavender) and the Alkaline Earth Metals (blue). The ones with an odd atomic number have one loose electron, and the even ones have two loose electrons. They participate in compounds that tend to be alkaline; in some cases, the compounds are so caustic they will remove your skin.

Now, at the far right, as I mentioned above, the elements in the last column do not combine chemically with others. A few very extreme experiments have been done to force them into unstable chemical compounds. We call them the Noble Gases. They, and four other elements in which the lettering is dark green colored, are gases at "room temperature", defined for chemists as 25°C or 77°F.

The elements in the next column, with beige coloring, are called Halogens. "Halogen" is from the Latin word for "salt". They like to glom onto loose electrons. Any of these reacted with hydrogen will form a strong acid, but when paired with one of the Alkali Metals or an Alkali Earth Metal, they form stable salts. Two of them are usually gases, one is a liquid (Br, with dark blue letters), and the rest are solids. They are a major part of a group also called Non-Metals.

Hydrogen plus the other elements in orange coloring are the rest of the Non-Metals. In element form, solidified at low temperature in the case of Nitrogen and Oxygen, they are insulating solids that look like soft ceramics. While Oxygen and those below it tend to snatch two loose electrons whenever possible, they also participate in the sharing bond I mentioned earlier.

The elements with brown coloring are called Semi-Metals. In element form, they are semiconductors, and one in particular, Si or Silicon, forms the basis for most electronic circuits. The lime green colored elements are Metals that are either semiconductors by themselves, or form semiconductors when alloyed with Semi-Metals.

All the rest of the elements in the main part of the table are colored light yellow, and are Metals. The top row of them, from Scandium to Zinc, are the Transition Metals. "Transition" refers to their similar chemistry. They all have a filled s sub-shell and an empty p sub-shell, and from 1 to 10 electrons in the d sub-shell, which is "hidden" beneath the filled s sub-shell. However, those two outermost electrons can act as loose electrons to combine with Non-Metals or Oxygen, and frequently one of the d electrons will also do so. Thus, they have more complicated chemistry than those to the extreme right or left. The three pale yellow rows below behave a lot like the Transition Metals, but it is harder and harder to get them to react. In particular, Platinum and Gold (Pt and Au) are very resistant to participating in chemical activity, as are the elements directly beneath them, though those are radioactively unstable and are very short-lived.

The Transition Metals are useful to living things in various amounts, usually quite small amounts. Even Iron (Fe), the most abundant metal in our bodies, is present as 4-6 grams in an adult human, or less than 1/100 of a percent. The heavier metals are called "heavy metals", particularly in medicine, because they are all toxic. Lead (Pb) is the most familiar toxic metal.

Ionic Bonds

The shift of one or more electrons between strong "electron donors" such as Li or Ca, and "electron acceptors" such as Se or Cl, produces an Ionic Bond. This kind of bond is strong in the pure solid, but is pulled apart in water to dissolve salts such as LiCl, CaBr2, or MgSe. However, salts with S or Se are poorly soluble compared to salts with Halogen elements "on the right". In water solution, the elements that have lost electrons are + ions, and those that have accepted electrons are - ions.

Covalent Bonds

Electron sharing in which two atoms form a strong bond to fill their outermost shell produces mainly insoluble compounds held together by Covalent Bonds. The Non-Metals, when in elemental form, usually exist as paired atoms sharing one or more electrons. The simplest example is ordinary Hydrogen:

Here the electrons are shown as dots. The shared electrons satisfy the s sub-shell of both atoms.

Most elements can participate in covalent bonds. The most versatile is Carbon, which has 4 outer electrons, and thus room for 4 more. It prefers to share a covalent bond in 4 directions. This makes it the most versatile in its chemistry, and a huge discipline, Organic Chemistry, is the study of carbon chemistry. Where a chemist who studies inorganic chemistry will become familiar with thousands or tens of thousands of chemical compounds, the number of organic compounds so far known exceeds 50 million.

The Take-Away

So, what do you really need to know to be ready for Chem 1? Or, just to be at least glancingly familiar with the subject? Chemistry is about the ways atoms transfer or share electrons. The outer electron shell of an atom can have between 1 and 8 electrons. The more promiscuous atoms, mainly Carbon, Nitrogen, Sulfur and Oxygen, induce the other elements to form complex molecules. In the absence of these four, most compounds are simple and easier to study.

Tuesday, January 20, 2015

Wisdom is not automatic

kw: book reviews, nonfiction, thinking, psychology

In his late 90's, Art Linkletter was asked the secret of his success interviewing children, most famously on his long-running TV program Art Linkletter's House Party. He said, "It's simple, but you probably can't do it: they must know that you are on the same intellectual level." With this gentle dig at himself he revealed that connecting with anyone is to reflect them. He knew he was just a big kid, and the kids could tell.

On a similar note, if someone could ask Joseph Bell, the inspiration for Sherlock Holmes, or even the author Arthur Conan Doyle, what was the secret of his deductive abilities, I imagine him replying, "It's simple, but you probably can't do it: you must exclude no possibility without a reason to do so."

We are, by habit, quick to close doors and slow to open them. Our everyday language is full of door-closing phrases:
"I can't do that."
"This must be so."
"Why would you think that?"
"That is impossible."
"It won't work."
In the film The Help I found it extremely touching when the nanny holds a small girl and repeats to her, "You is good, You is Kind…" and so forth, and the girl trustingly repeats with her, "I am good, I am kind…" How can this fail to establish a helpful basis for the girl's character?

At this moment, I am less concerned with the things we tell our children than with what we tell ourselves. "What you think is what you get" could be a mantra for Maria Konnikova, author of Mastermind: How to Think Like Sherlock Holmes. Having grown up hearing the Holmes stories read aloud by her father (and a great many other good books, she hints here and there), Ms Konnikova in eight chapters, jam-packed with examples and exhortations, shows us how to re-form our ways of thinking, and problem-solving in particular.

You and I may never need to solve a crime or find a kidnapped prince. We may never cross wits with a purblind and misguided police inspector. But our lives are full of conundrums big and small that a bit of Holmes-style thinking can help us resolve. It is more than just "thinking outside the box," though that is helpful; first we must know what the box is!

Throughout the book the author uses the analogy of an attic. In what state is our memory? Certainly, it contains thousands of things, but how are they stored? We're not talking psychobiology here but mental discipline. Continuing the analogy of an attic, or even better, a vast warehouse, how are its contents arranged? Is everything in piles like in the house of a hoarder, such that you can barely squeeze your way hither and yon to find things? Perhaps things are in boxes, but are things grouped with similar things or just jumbled together, box by box by myriads of boxes? Is anything labeled?

I think of interior views of the shelves in M5 on Mythbusters, such as this image. Jamie and Adam didn't rise to the top of the special-effects field by being sloppy curators of their "stuff". The boxes, bins and jars may exhibit a wondrous diversity of their own, but they are sorted alphabetically. I reckon that beats trying to sort them functionally; Jamie would need a taxonomy of function, and there would inevitably be an "Other" category that would soon grow out of control. Better this way. (But note in the bottom row that "Small Pumps" is misplaced. Would you sort that with S or P? Who knows how it got between T and U!)

Anyway, key #1 to Sherlock Holmes's method is having a mental attic with much of the "stuff" labeled and sorted. He is able to quickly retrieve what he needs.

This doesn't happen by accident. I suppose it will always be true that most of what we take in and retain (and we retain a very small percentage) is quickly strewn helter-skelter, and there is little we can do about that. It is probably one function of sleep to sort through recent new memories and nudge them this way and that into some sort of order. You and I may not consciously be good curators of our memories, but some amount of curation is carried out anyway. We must be thankful for that. But we are all different, and if that curation is too sloppy, we are called "scatterbrained" at best, and probably other, less flattering terms behind our backs.

But we read in Mastermind of observing with intention, of taking in what is most likely to be useful, then curating that properly. Like many others, I collect a number of things. My stamp collection is, for the most part, labeled and sorted. My minerals, not so much. I have a rather small number of minerals on display, a somewhat larger amount stored in boxes, but it is more of an accumulation than a collection. Then the books! There are a few thousand, and I have certain subsets well arranged in special places. The rest simply line the shelves of three rooms. One friend has at least this system: all his books are arranged by the color of the spine, so his main library is a rainbow. Another, now deceased, had a true library, with a Dewey Decimal notation in white ink on every book, and a card catalog in the corner. Now that is a collection!

A second key is the extent to which we allow our emotions free reign. In the Holmes stories, Dr. Watson is a kind of Everyman. He represents nearly all of us, jumping to a premature conclusion and then falling in love with it, which makes it quite impossible to proceed in any useful way. Let us remember the maxim that I foisted on Dr. Bell in my imagination: "Exclude no possibility without a reason to do so." Holmes is a master of the creative back-step. When formulating hypotheses he quite automatically pulls back to take in a wider view and be sure he is excluding nothing that might be useful. He (usually) did not allow his fondness for a neat explanation to deter him from discerning other explanations. Thus, when the first "neat" explanation is found wanting, he would have further avenues to explore. Watson-style thinking far too often confronts us with a blank wall and empty pockets.

Some people are openers, some are closers. Both are needed. More rare are those who can both open and close with equal ability. I am referring to opening up more and more possibilities in the early stages of a project or puzzle, followed by closing off one possibility after another as each is proved impossible or unfeasible, to drive to an appropriate conclusion. Holmes's most familiar dictum is, "When you have excluded everything that is impossible, whatever remains, however improbable, must be the truth." And suppose you have excluded everything you could think of? Time for more opening exercises. Conan Doyle has Holmes make a few mistakes, and they tend to be in this category: closing off possibilities too early or not thinking of them in the first place. If every avenue is blocked, back off and look for others. Oh, how loath we are to retrace our steps! Yet sometimes that is most necessary.

Later in the book Ms Konnikova dwells on the value of getting away. Holmes will sometimes simply go elsewhere for a day, or he might spend an hour playing violin (Einstein did so also, to world-changing effect!). Conscious mental effort is not always, or even usually, the most effective. I built a nearly 40-year career writing scientific software on the following practice: At the end of a period working, I'd focus on the most troubling puzzle (usually some algorithm that was hard to code) and deliberately arrange all the pertinent facts and parameters in my mind (closing my eyes lets me "write" on a mental "screen"), then sort of say, "Away with you, now" as I push it to "somewhere else" in my mind and go do something else. I might get something to eat, or talk to someone or, if it is late in the day, go home and sleep. I frequently awoke at 3 AM or so with a neat package on my mental doorstep, so I would write it all down, in earlier days, or log in and code it all out on the spot in later years.

Here and there in the book we find suggestions for exercising the mind, and it is easy to get overwhelmed and think, "Oh, it is all too much for me." Everything is too much for us if taken all at once. Remember how to eat an elephant: one forkful at a time…and it helps to have a large room full of chest freezers! We can do any number of things to improve the arrangement of our mental attic, to distance ourselves from over-fondness for first ideas, and to improve our skepticism for overly simple solutions. One thing at a time. Pick one, any one, and have a go at it. It is like learning to juggle, which nearly everyone can do with about 3 months of daily practice. It doesn't come in a single day. And once learned, it has to be continued by juggling at least once or twice a week, or the skill diminishes. No matter at what stage we are, we can improve. And that is what this author is telling us. In place of the door-closing statements above, let us tell ourselves,
"I can do that."
"There must be a solution somewhere."
"Why should this not be so?"
"It had to happen somehow."
"If a question is never asked, the answer is always NO. Ask!"

Sunday, January 18, 2015

Owls are cats with wings

kw: book reviews, nonfiction, pets, memoirs, owls

In the early 1980s, on one particular day on the road from London to Kent, a driver who was paying attention might have seen another driver with an owl perched on his shoulder. The owl's name was Mumble, and the driver's, Martin Windrow.

For 15 years, Windrow shared his flat, and later a home in Sussex, with the Tawny Owl he'd obtained with the help of his brother. He writes of those years together in The Owl Who Liked Sitting on Caesar: Living With a Tawny Owl. For this rather lonely young writer and editor, Mumble was a godsend. His brother had persuaded him to try caring for an owl, but a first attempt, with a less congenial species, was humiliating and blessedly brief. If a Tawny Owl is similar to an affectionate tabby, this first owl was more like a fiery Siamese, the kind who either ignores or hates everything you do. Fortunately, he was willing to try again.

When he was introduced to Mumble, egg-raised for the purpose, not wild-caught, it was love at first sight for both. It had to be; as he describes it, living with Mumble was like being a single parent with an infant who never grows beyond a year or two yet becomes an adult in certain ways.

I was particularly taken when he described pet owls as "like cats with wings". Cats I can relate to. However, where a typical house cat might weigh 5 to 12 lbs (2.2 - 5.4 kg), this species of owl weighs at most 1.8 lbs (0.8 kg). But its talons compare to the claws of an Ocelot, so if you encounter even a small owl and it goes for your face, you're in real trouble!

All Mumble ever did with Windrow's face was nuzzle, and a bit of nibbling of his beard, in a similar fashion to her own feather-preening. In fact, Mumble liked what the author calls "necking" on nearly a daily basis.

A few chapters in the book outline the natural history of Tawny Owls, Strix aluco, but most relate the experiences of owl and man carrying on a life together. Mumble was somewhat sociable with others his first year, just as a human child is. After that, she became a one-man owl, and it was not safe to allow others into her presence. Everyone other than Martin Windrow was an intruder in her territory, and even the comparatively gentle Tawny species defends territory quite fiercely! Fortunately, with proper introduction and assimilation, he was able to persuade Mumble to accept one friend's caretaking while he was away once for more than a week.

Her life ended prematurely when someone, probably a misguided and misinformed "environmentalist", entered her outdoor aviary. From evidence on the scene, she apparently took a fierce whack at the intruder before dying of a heart attack. Windrow found her unmarked body in the open enclosure upon returning home. He sincerely hopes she marked the fool for life, and I heartily agree.

The "Caesar" of the title was a bust of Germanicus Caesar, and her bust-sitting is mentioned once in the text. I suppose it makes for a spiffier title, but her favorite perch was the top of the kitchen door. Not great title material.

I guess I'd describe this as a very comfortable book. Just the right book to read on chilly winter evenings.

Tuesday, January 13, 2015

The seductive power of mathematics

kw: book reviews, nonfiction, mathematics, mathematical thinking

We are nearly two weeks into the new year, and this is my first post of the year. It is not because the book was extra-hard to read, but that the year itself has begun extra-busy! Actually, though the book was long (437 pp + 15 pp notes), I spent less time reading it than many shorter ones because math is of great interest to me.

More than 2/3 of those who read that first paragraph will respond, "But not to me", and be tempted to stop right there. I hope you will continue anyway, because the author's design is to show how we all use mathematical thinking and can benefit from a better acquaintance with it. Theoretical mathematician Jordan Ellenberg has written How Not to be Wrong: The Power of Mathematical Thinking.

Contrary to popular thought, Mathematics isn't mainly about numbers. If you break the word down it means "The Studies of Learning". Note the "s" on "mathematics" and on "studies". The field has hundreds of branches, thus where an American would, in our streamlined way, speak of "math", the English speak of "maths". Being American, I'll go the American way. Only two of the many disciplines under the "math" umbrella explicitly involve numbers.

For most of us, our introduction to math began with arithmetic and the "plus table" and "times table". Though even grade schoolers are now permitted to use calculators in class, it is useful to know how to do simple sums and multiplications in one's head. At the very least, when you punch in some numbers and get a result, you are more likely to detect a punching-in error if your mind is at least estimating the result in the background.

The second numerical branch of math is Number Theory, which deals with properties of whole numbers. A big sub-field is Prime numbers, which we will return to later on. But most people who might read this have been exposed to additional branches.

At least in Western and Westernized societies, facility in basic arithmetic was needed to advance through Plane Geometry, Algebra, Trigonometry, Analytical Geometry (sometimes just called Charting), and Calculus. Before the early 1960s Calculus was not introduced to high school students, but the teacher of my senior class in Analytical Geometry was one of the first to finish the school year with a few weeks of instruction in basic Calculus. Now at least half a year is taught to most high school seniors.

So if you had all those courses, think back: most of the work was learning to use certain symbols and sets of symbols in a consistent way. Working out problems using numbers was less important than the proper use of those symbols. That's why the teacher kept harping on "Show Your Work!". Also, particularly in Geometry, formal proof methods were introduced, primarily because visual proofs are easier to comprehend than the symbolic proofs that are the stock in trade of "higher math" (that is, stuff for college juniors and beyond, and only in technical disciplines).

Most of us shudder at that word, "proof". Few understand it. It takes a certain kind of mind to construct a useful proof. My brother, a working mathematician for some years, whose name I shall call Rick, had two friends at college; call them Tom and Harry. They all took some rather gnarly "higher math" courses together, and did lots of formal proofs. Another friend described them thus:
"Send Tom into a room with a mysterious machine in it having several large gears, a big flywheel and other bulky items of unknown import. He is requested to make its wheel turn. By putting a shoulder to the largest gear and pushing very hard, he is able to make it turn, slowly. He leaves and Rick enters. He noses around a bit and finds, behind the machine, a crank with a long handle. Fitting the handle into a convenient socket, he is able to turn the wheel more easily. He leaves and Harry enters. He looks around further, sees the crank, but keeps looking until he finds a button. He presses the button and a motor somewhere makes it all run."
"Pushing the right button" represents concocting a useful proof. I like visual proofs, and you can see one that proves the Pythagorean Theorem here. Remember the Pythagorean Theorem? It pertains to a right triangle, one for which one angle measures 90°. If the two sides that meet at that right angle have lengths represented by a and b, their relationship to the third side, of length c is c² = a² + b². In words, we say that the sum of the squares of the lengths of the two legs of a right triangle equal the square of the length of the hypotenuse (the third side). Pythagorean triples are sets of three whole numbers that can be used to produce a right triangle, such as 3, 4, 5 (3²=9, 4²=16, 5²=25, and 25=9+16). Try with 5, 12, 13 and 8, 15, 17.

So if math isn't primarily about numbers, it sure uses them a lot. But the power of most branches of math lies not in the use of numbers, but in the core concept of math: Operators. To illustrate, when we learn the Plus Table, we are actually learning to use an operator, the +, the addition operator. With a little more thought and practice, we also learn the operator, the subtraction operator. Similarly, the Times Table helps us learn the ×, the multiplication operator, and later the ÷, or division operator. Even later we learn the exponentiation operator, which has several symbols, but the ² is the special one for squaring (multiplying a number by itself). And, we soon learn the , the square root operator, and allied symbols for taking other roots. And on and on it goes. In the middle of learning Algebra, we learn of Polynomials, and how the + and and × seem to attain superpowers to add and subtract and multiply these groups of many symbols, as though they were unitary in themselves. Calculus adds further superpowers, while adding a further set of operators. Sure, these operators work on numbers, but that is baby steps compared to the symbols and sets of symbols (and so forth) that they also work on.

Very few have a mind like Harry's. Most of us don't need one, just as most of us don't need to be an automobile mechanic to be able to drive a car. However, a certain amount of mechanical smarts can make us a better driver. Dr. Ellenberg's notion is to make us a little better at thinking in operational terms, like a mathematician. Then we might be "less wrong" about many things. And the title provides a clue to the author's aim. The kind of mathematical thinking that underlies most of the examples is Statistical thinking.

The book has five sections. First is Linearity. The most amusing example is found in its third chapter, "Everyone is Obese". A soberly-written article came out a few years ago that can be summarized thus:

  • In about 1972 half of Americans had a BMI of 25 or greater. (Body Mass Index over 25 is "overweight" and beyond 30 is classified as "obese", at least in government literature)
  • Twenty years later, the number of overweight Americans was 60%.
  • By 2008 just under 75% had a BMI of 25 or more.
  • At this rate, all Americans will be overweight by 2048.

If you chart these three points and project a straight line through them, it will cross 100% at 2048. But do you see the fault in this reasoning? Firstly, the "line" one wants to project isn't very straight. The percent of overweight first goes up 10 points in 20 years, then another 15 points in 16 years. Do get from 2008 onward, do you project the next 25 points (100% - 75%) over 50 years, or closer to 25 years? The authors of the study projected an average of the two shorter-term rates and got there in 40 years. But why didn't they say, "Well, the rate of obesity increase has nearly doubled more recently. Maybe it will continue to speed up, and double again. Then the (now curved) line will hit 100% in just 12-13 more years, and we'll all by fat by 2020."

The real case is that, while many people are prone to gaining more weight as their prosperity increases, it isn't so for everyone. I seem to be like the majority, easily gaining weight; my wife is not, and has weighed between 98 and 108 pounds for the whole 40+ years I have known her. And she never diets. If my wife and I are still around in 2048 (we'll be over 100), I am pretty certain that she, at least, will not be obese. My BMI stays around 28-29, and is more likely to go down than up as I exceed the age of 85 or so. And our very fit son, who will almost certainly be alive in 2048, is very, very unlikely ever to have a BMI greater than 24.

The Earth is round, but we treat it as flat for most everyday uses. Straight lines serve us well. But look at a survey of Sections in the central plains. A Section is a square mile, very hearly. On a perfectly flat Earth, every Section would have exactly 640 acres. But on U.S. Geodetic Survey maps you'll see a correction every six miles further north you go. Only the southern row of Sections has something close to the full 640 acres. The northern row of a 6-by-6 Section Township has Sections with about 639 acres, because the curvature of the Earth has drawn together the meridians used to lay out the survey, by five feet near 40°N.

The takeaway point of the first section: Very few phenomena in nature proceed in a straight line forever. Keep that as a maxim in your mental bag of tricks.

The second section is titled "Inference". Here is the largest mass of material related to proofs. But it is presented in a much more entertaining way than you'd find in a college math course (or even your Middle School Geometry class). He begins with the legendary Baltimore stock broker, something I call the Binary Scam.

You get a piece of junk mail (these days, spam e-mail) with the bold statement, "Using my special stock evaluation system I predict Apple stock will rise tomorrow." The next day, Apple's stock price indeed rises, and soon another missive arrives: "See it at work. The stock will rise again the next day." It does so, and a third message now predicts a drop, which indeed happens. After a couple of weeks— and the messages now include a "Click here to invest" button—the fellow has been right ten times out of ten. You are ready to invest!!

What don't you know? You don't know that the first message went to more than 100,000,000 people. Half of them got a message saying the stock would go, not up, but down! Those 50 million or so never got the second message, but half of those who did, got one saying the opposite of the one you received. And so it goes. After 10 "predictions", the field has been cut by a factor of about 1,000. (Strictly speaking, by exactly 1,024, the tenth power of two). This leaves 100,000 or so people who tend to think this guy has a system that really, really works. If even 1% of them invest with him, that could be millions of dollars. And on day 11 he might just be in Switzerland or somewhere with those millions, and a "dead" address with no forwarding.

There is a variation of this, in which, even though half the people on day 5 got a "prediction" that "failed", they get a special message: "As you can see, nothing is perfect, but I think you will be pleased when the system continues to produce a high rate of correct calls." Guess what? Our psychology is such that a larger number of those folks will invest!

Inference is all about doing your best to gather more information, and when you have done so, remembering what Donald Rumsfeld said (I paraphrase), that we make decisions based on what we know, and try to take account of what we don't know, which is in two parts: the Known Unknowns and the Unknown Unknowns. The more "wonderful" an opportunity seems, the more likely it is that the unknown unknowns are so much bigger than what you know and what you know you don't know, that you are at best guessing while wearing a blindfold.

He closes the section with a cogent explanation of Bayesian Inference, which is quite a bit different from ordinary statistical thinking. Though it is more powerful than the kind of inference used in a typical scientific journal article, it takes a different kind of thinking, and I confess I can't use it numerically without having a text open to guide me. This is evidently true of scientists in general.

I promised a return to prime numbers. The first several prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. Prime numbers have no divisors, no factors (1 doesn't count). You can see that 4 of the first 7 natural numbers are primes. Then they start to thin out: 4 of the next 12, then 2 of the next 10. Something called the Prime Number Theorem states that the number of prime numbers, P, less than some large number N, is equal or less than N/ln(N), where ln refers to the Natural Logarithm. Look it up if it interests you. Here we can test it with the 10,000th prime number, 104,729. P=10,000 and N=104,729. N/ln(N)=9060.28 and some more digits. The millionth prime is 15,485,863, and the calculation on these numbers yields 935,394 (and some decimals), about 6.5% lower than a million. For really big numbers, the theoretical number gets quite close.

What the Prime Number Theorem tells us is that prime numbers thin out steadily, and somewhat predictably, the further out we go on the number line. But they never die away completely. There may not be a high density of primes between 100 quadrillion and 101 quadrillion, but there are still a lot of them, roughly 25 trillion. However, this is very thin indeed, with only one number out of 40 being a prime at this level, on average.

Why should this be useful? Prime numbers are at the core of modern encryption, which is used by your bank to send a secure message or payment to another bank whenever you make a credit card transaction or write a check. Your password is also encrypted. The encryption method uses a long number made up of two or more long prime numbers. The rarity of long primes means there are lots of long numbers to choose from, that are hard for a computer program to figure out whether they are prime or not, and what their factors are. 101 quadrillion is only an 18-digit number, and your bank is using numbers of 85 digits or longer. Just cracking an 18-digit "composite number" (in the industry this means a long number with only two prime factors of roughly equal size) requires doing several million divisions. Today's computers can do that in a few seconds. But an 85-digit composite? No machine yet built can determine its factors in less than a few billion years. And when machines get millions of times faster? We'll just go to 200- or 400-digit encryption.

Well, there are three sections of the book to go. "Expectation" is about using probability methods to figure out how likely something is. The weather forecaster uses an expectation method to say that the chance of rain tomorrow is 40%. But particularly for weather, expectation is not like it is when rolling dice or playing roulette. If a 6-sided die is make properly (most are pretty close), each number will come up 1/6 of the time if you roll it many times. Of course, if you make only 12 trials, you are very likely to find three instances of a particular number and only one or none of another. The 1-out-of-6 expectation starts to get accurate only for a few hundred rolls at least. And here is a key point. If you roll a 2. How likely is it that the next roll will be a 2? The same as the first time, 1 out of 6. But we don't think that way, which leads to all kinds of grief at the craps table! We think a 2 is less likely than it was the first time. Not so.

In weather, expectation works a bit differently. Weather systems are not usually solid lines of rain clouds, but storm cells with space between. If an advancing storm front is made up of storms 3 miles wide with 2 miles between them on average, then the 60% chance of rain really means there is a 100% chance of rain over 60% of the area. (Dr. Ellenberg doesn't state it this way. This is my example)

There is a very entertaining chapter on the lottery, and how certain lotteries can be beaten. But don't expect a how-to on getting rich at your state's expense. When a lottery is ill-conceived enough to be beaten, you still might have to fill out half a million lottery tickets to take advantage of the odd statistics, and thus risk half a million to a million dollars in the process. And there is always a chance that every one of those tickets will be a loser, even though if you play that lottery several times you are certain to come out ahead. There are easier ways to make a buck, for certain! Being the Baltimore stock broker, for example, if you don't mind exile at some point. But lotteries can be thought of primarily as entertainment for imaginative people, and as a tax on folks who can't do math. The state takes 30%-40%, so they only pay out 60-70 cents on each dollar taken in.

Fourth is "Regression", and this word has two meanings. One is a formal process of figuring out the best line to cast through a set of points that are correlated, but not perfectly so. One chapter talks about this kind of regression, but the main point in this section is that extraordinary results are usually not followed by more extraordinary results. The classic example is adult height in a family. Suppose a couple are both extra-tall; the man may be 6'-4" and the woman a 6-footer. Average heights in America are 5'-10" for men and 5'-4" for women. Knowing only this, if the couple has four children, when they are grown, do you expect all four to be extra-tall? While there is some chance that at least one boy might exceed the father's height, it is most likely that the four will be taller than average, but not extremely tall. Conversely, if a man and woman are very short, their children will also probably be shorter than average, but it is unlikely that they will be even shorter than their parents.

This is called Regression to the Mean. Human height is partly driven by genetics, but also partly by dietary factors, and partly by chance such as getting a disease that stunts growth, or conversely over-stimulates the pituitary leading to extreme height. There are numerous factors that influence height, and they are more likely to average against one another than cause additive extreme results. It is the same for sports performance. A basketball player who usually hits 55% of his free throws may hit his first 3. Does that mean he is likely to have a 100% season? Nope. There's that straight line again. We actually see that most ball players do better in the first half of a season than the second half, from a combination of tiredness and injuries coming in later on. Yet a few players will "rise through the months". Bookmakers make a lot of money from bettors who don't think through these things. In fact, a great principle is stated in a chapter on gambling: If you find gambling exciting, you're going about it wrong. Those who do best at gambling actually gamble the least. They find ways to make the largest number of sure bets and the fewest number of risky bets. You might want to read a book by Amarillo Slim on the subject before your next casino visit.

The final section is "Existence". Pundits predict a lot of things. It turns out, and clear numerical examples demonstrate, that such things as "public opinion" seldom exist. Voting seems a straightforward matter. It is, when there are only two candidates in a race, or only a yes/no question to be decided. Add a third choice, and it all goes out the window. Some lawmakers were wise enough to require a run-off election where no candidate gets a clear majority in a race with 3 or more. But even this doesn't guarantee you'll really get "the people's choice", and several entertaining examples, some historical and some theoretical, show what that means. Suffice it to say that, like the 3-body problem in astronomy—which is unsolvable!—3-way political races are impossible to craft into a perfect system. Just ask Al Gore…

The "power of mathematical thinking" is at its root a call to back off and think more broadly than a subject at first appears. For example, recall the tall family mentioned above. Suppose I told you an additional fact, that both the man and his wife were the tallest of several siblings, and the only one in each family who was taller than their parents? Would that change your estimate of their children's heights? If it would, you are thinking in a more Bayesian way, which isn't a bad thing at all!

And I find that I've written so much without looking at a single one of the pages I'd dog-eared. I like it when an article flows. Good way to start the year.