Group theory in the bedroom, and other mathematical diversions

Brian Hayes

Book - 2008

Saved in:

2nd Floor Show me where

510/Hayes
1 / 1 copies available
Location Call Number   Status
2nd Floor 510/Hayes Checked In
Subjects
Published
New York : Hill and Wang 2008.
Language
English
Main Author
Brian Hayes (-)
Edition
1st ed
Physical Description
xi, 269 p. : ill., map ; 24 cm
Bibliography
Includes bibliographical references (p. [239]-253) and index.
ISBN
9780809052196
  • Preface
  • 1. Clock of Ages
  • 2. Random Resources
  • 3. Follow the Money
  • 4. Inventing the Genetic Code
  • 5. Statistics of Deadly Quarrels
  • 6. Dividing the Continent
  • 7. On the Teeth of Wheels
  • 8. The Easiest Hard Problem
  • 9. Naming Names
  • 10. Third Base
  • 11. Identity Crisis
  • 12. Group Theory in the Bedroom
  • Further Reading
  • Index
Review by Choice Review

Hayes writes the Computing Science column for The American Scientist magazine, where he was formerly the editor in chief. Here he entertains, surprises, and informs the reader with the diverse collection of topics covered in these 12 brilliant essays. The level is appropriate for a general educated audience, but the expert will no doubt be equally engaged. Hayes's writing is crisp and entertaining. Be it the amazing Strasbourg clock, an analysis of war, generating random numbers, flipping a mattress, or any of the other topics, Hayes grabs one's attention and never lets go. The accuracy of the essays is excellent, and the "afterthoughts" following many essays correct any errors and offer self-criticism rare in a science writer. The high praise for this book by John Allen Paulos and Martin Gardner should speak volumes to its quality. After reading this collection, readers will no doubt hope that Hayes has another collection of such essays waiting in the wings. Summing Up: Highly recommended. All libraries. R. L. Pour Emory and Henry College

Copyright American Library Association, used with permission.
Review by Booklist Review

These essays, collected from Hayes' writings for American Scientist, are quite accessible to a general-interest audience drawn to mathematics as recreation. His frequent setup method is to ground a math subject in a common activity, such as rotating tires or naming a Web site, which instantly engages the reader in the mathematics underlying such deceptively routine tasks. Rotating a car's tires involves symmetry as well as labor, while the homesteading encountered in domain names reflects competition for a finite resource called namespace. Think it's easy to pick a random number, which is important to cryptography? Hayes shows how surprisingly difficult that is, as well as another speciously simple exercise: locating the Continental Divide. Developing a topic in interesting directions that evidently piqued Hayes' original audience--he appends afterthoughts of reactions from mathematicians and computer scientists--Hayes expresses a relaxed, bemused style in a dozen pieces. Combined with his topical variety, including base-3 arithmetic, DNA coding, and the distribution of wealth, Hayes may earn a wider audience with this appealing and entertaining volume.--Taylor, Gilbert Copyright 2008 Booklist

From Booklist, Copyright (c) American Library Association. Used with permission.
Review by Publisher's Weekly Review

In charming prose that more or less makes up for the relative lack of rigor in many of his explorations, about which Hayes is refreshingly honest ("I see no reason to doubt this assumption, at least as an approximation, but I also have no evidence to support it"), science and technology journalist Hayes (Infrastructure) explains the engineering and arithmetic of clocks and gears, wracks his brain over questions of how best to flip a mattress and visits "the prettiest wrong idea in all of twentieth-century science... the vision of piglets suckling on messenger RNA." As he examines huge calculating tables rendered obsolete by computers, Hayes "cannot help wondering which of my labors will appear equally quaint and pathetic to some future reader." This observation is echoed by the afterwords where Hayes addresses pointed questions and observations from readers, displaying a brave willingness to admit error and acknowledge advances made since these pieces were first published in the Sciences and American Scientist. Present-day readers would do best to approach this collection more for its literary merits than its revelation of obscure history or cutting-edge mathematical theory. 41 b&w illus. (Apr.) (c) Copyright PWxyz, LLC. All rights reserved

(c) Copyright PWxyz, LLC. All rights reserved
Review by Library Journal Review

If your idea of fun includes puzzling over the creation of an algorithm for the Continental Divide, then this essay collection by the former editor in chief of American Scientist (AS) will tickle your imagination. Hayes, now an award-winning columnist for AS, has put together some of his best pieces and has included with each a section called "Afterthoughts," in which he enthusiastically adds new information and humbly corrects old mistakes. Hayes explores topics as diverse as the centuries-old Strasbourg clock, economic theory, randomness, DNA, gear ratios, weather forecasting, and war and international relations. And with tongue firmly in cheek, he even writes about the ways that one can flip a mattress. Although one need not be a rocket scientist-or even an undergraduate math major-to understand Hayes's work, the wit and elegance of the essays are best appreciated by those with a solid math background and an interest in math play. Recommended for large public libraries and academic libraries supporting programs in mathematics and computer science.-Denise Dayton, Jaffrey Grade Sch., NH (c) Copyright 2010. Library Journals LLC, a wholly owned subsidiary of Media Source, Inc. No redistribution permitted.

(c) Copyright Library Journals LLC, a wholly owned subsidiary of Media Source, Inc. No redistribution permitted.
Review by Kirkus Book Review

A selection of "Computing Science" columns by American Scientist magazine's former editor-in-chief aimed at the numerate--or at least mathematically curious--reader. While you don't have to be a geek to appreciate Hayes's lively, self-effacing style (complete with afterthoughts), it helps to understand that computer science relies on a field of math called numerical analysis and uses algorithms--rules for generating solutions to problems through an iterative process (the way you learned to do square roots in high school). The first essay explains how clockmakers developed the gears and linkages that enabled fabled medieval clocks to reach remarkable accuracy, as well as predict the day Easter would fall on. Other essays celebrate the notion of random numbers and why they are so hard to achieve. Numerical analysis also plays a role in economic models based on the kinetic theory of gases or simplified markets involving iterations of buying and selling. Hayes goes on to explain how statistics have been applied to compute which quarrels--from interpersonal to world wars--are the deadliest (surprising results here). Also, he looks at how algorithms have been developed to determine ways to divide a random series of numbers into two parts with equal sums, or nearly equal sums if the series total is odd. Gears appear again in the form of algorithms, which yield practical tables of numbers to enable engineers to make gear trains to approximate complex ratios. A couple of essays probe areas only professionals might ponder, such as computing the location of the Continental Divide or why base 3 arithmetic is better than base 10 or binary systems. But the pi'ce de rsistance is the title essay, which explains why there is no algorithm whose repetitions would cycle through all four possible mattress positions that would assure equal wear and tear over time. Challenging but rewarding for anyone intrigued by numbers. Copyright ©Kirkus Reviews, used with permission.

Copyright (c) Kirkus Reviews, used with permission.

CHAPTER 1 Clock of Ages December 1999. As the world spirals on toward 01-01-00, survivalists are hoarding cash, canned goods, and shotgun shells. It's not the Rapture or the Revolution they await, but a technological apocalypse. Y2K! The lights are going out, they warn. Banks will fail. Airplanes may crash. Your VCR will go on the blink. Who could have foreseen such turmoil? Decades back, one might have predicted anxiety and unrest at the end of the millennium, but no one could have guessed that the cause would be an obscure shortcut written into computer software by unknown programmers of the 1960s and '70s. To save a few bytes of computer memory, they left room for only the final two digits of the year. We now know that civilization did not collapse on January 1, 2000. Y2K was a nonevent. Nevertheless, in hindsight those programmers do seem to have been pretty short on foresight. How could they have failed to look beyond year 99? But I give them the benefit of the doubt. All the evidence suggests they were neither stupid nor malicious. What led to the Y2K bug was not arrogant indifference to the future. ("I'll be retired by then. Let the next shift fix it.") On the contrary, it was an excess of modesty. ("There's no way my code will still be running thirty years from now.") The programmers could not envision that their hurried hacks and kludges would become the next generation's "legacy systems." Against this background of throwaway products that somebody forgot to throw away, it may be instructive to reflect on a computational device built in a much different spirit. This is a machine carefully crafted for Y2K compliance, even though it was manufactured at a time when the millennium was still a couple of lifetimes away. As a matter of fact, the computer is equipped to run through the year 9999, and perhaps even beyond with a simple Y10K patch. This achievement might serve as an object lesson to the software engineers of the present era. But I am not quite sure just what the lesson is. A Glory of Gears The machine I speak of is the astronomical clock of Strasbourg Cathedral, built and rebuilt several times over the past six hundred years. The present version is a nineteenth-century construction, still ticking along smartly at age 160-something. The Strasbourg Cathedral clock is not a tower clock, like Big Ben in London, meant to broadcast the hours to the city. Although it does have a face on the exterior of the building--a rather undistinguished one that would look more at home on a train station--the main body of the clock is inside the cathedral. And yet it is certainly not a clock you would put on the mantel or hang on the wall. It has a case of carved stone and wood that stands fifty feet high and twenty-four feet wide, with three ornamented spires and a gigantic instrument panel of dials and globes, plus paintings, statuary, and a large cast of performing automata. Inside the clock is a glory of gears. "Clock" is hardly an adequate description. More than a timepiece, it is an astronomical and calendrical computer. A celestial globe in front of the main cabinet tracks the positions of five thousand stars, while a device much like an orrery models the motions of the six inner planets. The current phase of the moon is indicated by a rotating globe, half-gilt and half-black. If you want to know what time it is, the clock offers a choice of answers. A dial mounted on the celestial globe shows sidereal time, as measured by the earth's rotation with respect to the fixed stars. A larger dial on the front of the clock indicates local solar time, which is essentially what a sundial provides; the prick of noon by this measure always comes when the sun is highest overhead. The pointer for local lunar time is similarly synchronized to the height of the moon. (When the solar and lunar pointers coincide, an eclipse is predicted.) Still another dial, with familiar-looking hour and minute hands, shows mean solar time, which averages out the seasonal variations in the earth's orbit to make all days equal in length, exactly twenty-four hours. A second pair of hands on the same dial shows civil time, which in Strasbourg runs thirty minutes ahead of mean solar time. (The city is half a time zone west of the reference meridian for Central European time.) To count the years there is an inconspicuous four-digit register that anyone from our age of automobiles will instantly recognize as an odometer. Each December 31 at midnight (that's midnight mean solar time, and thus half an hour late by French official time), the counter rolls over to a new year. The transition from 1999 to 2000 went without a hitch. There's more. A golden wheel nine feet in diameter, marked off into 365 divisions, turns once a year, while Apollo stands at one side to point out today's date. What about leap years? Presto: an extra day magically appears on the wheel when needed. Each daily slot on the calendar wheel is marked with the name of a saint or with some church occasion to be observed that day. Of particular importance, the occasions include Easter and the other "movable feasts" of the ecclesiastical calendar. Calculating the dates of those holidays, and displaying them correctly on the wheel of days, require impressive feats of mechanical trickery. Wait! There's even more! The clock is inhabited by enough animated figures to open a small theme park. The day of the week is marked by a slow procession of seven Greco-Roman gods in chariots. At noon each day the twelve apostles appear, saluting a figure of Christ, who blesses each in turn and at the end offers benediction to all present. Every half hour a putto overturns a sandglass, and on the quarter hours another strikes a chime. Still more chimes are sounded by figures representing the four ages of mankind, followed by a skeletal Death, who rings the hours. And a mechanical cock crows on cue, flapping its metal wings. All of this apparatus is housed in a structure of unembarrassed eclecticism, both stylistic and intellectual. The central tower of the clock is topped with a froth of German-baroque frosting, whereas a smaller turret on the left (which houses the weights that drive the clockwork) has been given a more Frenchified treatment. A third tower, on the right, includes a stone spiral staircase that might have been salvaged from an Italian Renaissance belvedere. In the base of the cabinet, two glass panels allowing a view of brass gear trains are a distinctively nineteenth-century element; they look like the windows of an apothecary shop. The paintings and statues are mainly on religious themes--death and resurrection, fall and salvation--but they also include portraits of Urania (Muse of astronomy) and Copernicus. Another painting portrays Jean Baptiste-Sosimé Schwilgué, whose part in this story I shall return to presently. Programming with Brass It's all done with gears. Also pinions, worms, snails, arbors; pawls and ratchets; cams and cam followers; cables, levers, bell cranks, and pivots. The actual timekeeping mechanism--a pendulum and escapement much like those found in other clocks--drives the gear train for mean solar time. All the other astronomical and calendrical functions are derived from this basic, steady motion. For example, local solar time is calculated by applying two corrections to mean solar time. The first correction compensates for seasonal changes in day length, the second for variations in the earth's orbital velocity as it follows its slightly elliptical path around the sun. The corrections are computed by a pair of "profile wheels" whose rims are machined to trace out a graph of the appropriate mathematical function. A roller, following the profile as the wheel turns, adjusts the speed of the local-solar-time pointer accordingly. The computation of lunar motion requires five correction terms and five profile wheels. They all have names: anomaly, evection, variation, annual equation, reduction. The overall accuracy of the clock can be no better than the adjustment of the pendulum, which requires continual intervention, but for the subsidiary timekeeping functions there is another kind of error to be considered as well. Even if the mean time is exact, will all the solar and lunar and planetary indicators keep pace correctly? The answer depends on how well celestial motions can be approximated by the arithmetic of rational numbers, as embodied in gear ratios. The Strasbourg clock comes impressively close. For example, the true sidereal day is 23 hours, 56 minutes, 4.0905324 seconds, whereas the mean solar day is exactly 24 hours (by definition). The ratio of these intervals is 78,892,313 to 79,108,313, but grinding gears with nearly 80 million teeth is out of the question. The clock approximates the ratio as 1+(450/611 × 1/269), which works out to a sidereal day of 23 hours, 56 minutes, 4.0905533 seconds. The error is less than a second per century. The most intricate calculations are those for leap years and the movable feasts of the church. The rule for leap years states that a year N has an extra day if N is divisible by 4, unless N is also divisible by 100, in which case the year is a common year, with only the usual 365 days; but if N is also divisible by 400, the year becomes a leap year again. Thus 1700, 1800, and 1900 were all common years (at least in those parts of the world that had adopted the Gregorian calendar), but 2000 had a February 29. How can you encode such a nest of if-then-else rules in a gear train? The clock has a wheel with twenty-four teeth and space for an omitted twenty-fifth. This wheel is driven at a rate of one turn per century, so that every four years a tooth comes into position to actuate the leap-year mechanism. The gap where the twenty-fifth tooth would be takes care of the divisible-by-100 exception. For the divisible-by-400 exception to the divisible-by-100 exception, a further adjustment is needed. The key is a second wheel that turns once every 400 years. It carries the missing twenty-fifth tooth and slides it into place on every fourth revolution of the century wheel, just in time to trigger the quadricentennial leap year. The display of leap years calls for as much ingenuity as their calculation. On the large calendar ring, an open space between December 31 and January 1 bears the legend "Commencement de l'année commune" ("Start of common year"). Shortly before midnight on each December 31 when a leap year is about to begin, a sliding flange that carries the first sixty days of the year ratchets backward by the space of one day, covering up the word "commune" at one end of the flange and at the same time exposing February 29 at the other end. The flange remains in this position throughout the year, then shifts forward again to cover up the 29 and reveal "commune" just as the following year begins. The rules for finding the date of Easter are even more intricate than the leap-year rule. Donald Knuth, in his Art of Computer Programming, remarks: "There are many indications that the sole important application of arithmetic in Europe during the Middle Ages was the calculation of Easter date." Knuth's version of a sixteenth-century algorithm for this calculation has eight major steps, some of which are fairly complex. Here's step five: Set E <-- (11G + 20 + Z - X) mod 30. If E = 25 and the golden number G is greater than 11, or if E = 24, then increase E by 1. (E is the so-called "epact," which specifies when a full moon occurs.) Programming a modern computer to perform the Easter calculation requires some care; programming a box of brass gears to do the arithmetic is truly a tour de force. I have stared at diagrams of the gears and linkages and tried to trace out their action, but I still don't fully understand how it all fits together. In the abstract, it's not too hard to see how a mechanical linkage could carry out the basic steps of the epact calculation given above. A wheel with 30 teeth or cogs would ratchet 11G notches clockwise, then it would add 20 steps more in the same direction, then another Z steps; finally it would turn X steps counterclockwise. The "mod 30" part of the program--reducing the sum modulo 30 (so that 30 becomes 0, 31 becomes 1, and so forth)--would be taken care of automatically by doing the arithmetic on a circle with 30 divisions. So far so good. The 30-tooth wheel does exist in the Strasbourg clock, and it is even helpfully labeled "Epacte." Where I get lost is in trying to understand the various lever arms and rack-and-pinion assemblies that drive the epact wheel, and the cam followers that communicate its state to the rest of the system. There appear to be a number of optimizations in the gear works, which doubtless save a little brass but make the operation more obscure. Perhaps if I had a model I could take apart and put together again . . . But never mind my failures of spatiotemporal reasoning. The mechanism does work. Each New Year's Eve a metal tag that marks the date of Easter slides along the circumference of the calendar ring and takes up a position over the correct Sunday for the coming year. (The date of Easter can range from March 22 to April 25.) All the other movable feasts of the church are a fixed number of days before or after Easter, so the indicators of their dates are rigidly linked to the Easter tag and move along with it. Making It Go The present Strasbourg clock is the third in a series. The first was built in the middle of the fourteenth century, just as the cathedral itself was being completed with the addition of a spire that made it the tallest structure in Europe. That original clock had animated figures of the three Magi who bowed down before the Virgin and Child every hour on the hour. Little else is known of it, and all that survives is a mechanical rooster, ancestor of the current cock of the clock. By the middle of the sixteenth century, the Clock of the Three Kings was no longer running and no longer at the leading edge of horological technology. To supervise an upgrade, the Strasbourgeois hired Conrad Dasypodius, the professor of mathematics at Strasbourg, as well as the clockmaker Isaac Habrecht and the artist Tobias Stimmer. These three laid out the basic plan of the instrument still seen today, including the three-turreted case and most of the paintings and sculptures. A curiosity surviving from this era is the portrait of Copernicus--a curiosity because the planetary display on the Dasypodius clock portrayed not the sun-centered Copernican system but the earth-centered Ptolemaic one. The second clock lasted another two hundred years, give or take. The story of the third clock starts with an anecdote so charming that I can't bear to look too closely into its authenticity. Early in the nineteenth century, the story goes, a beadle was giving a tour of the cathedral, and mentioned that the clock had been stopped for twenty years and no one knew how to fix it. A small voice piped up: "I will make it go!" The boy who made this declaration was Jean Baptiste-Sosimé Schwilgué, who made good on his promise forty years later. There was mild conflict over the terms of Schwilgué's commission. He wanted to build a wholly new clock; the cathedral administration wanted to repair the old one. They compromised: he gutted the works, but kept the case, and built his new indicators and automata to fit the old design. The new mechanism was first started up on October 2, 1842. Schwilgué was clearly thinking long-term when he undertook the project. As I have already noted, the leap-year mechanism includes components that engage only once every four hundred years--parts that were tested for the first time in 2000 and will lie dormant again until 2400. Such very rare events might have been left for manual correction. It would have been only a small imposition on the clock's maintainers to ask that the hands be reset every four centuries. But Schwilgué evidently took pride and pleasure in getting the details right. He couldn't know if the clock would still be running in 2000 or 2400, but he could build it in such a way that if it did survive, it would not perpetrate error. The contrast with recent practice in computer hardware and software could hardly be more stark. Many computer systems--even those that survived the Y2K scare--are explicitly limited to dates between 1901 and 2099. The reason for choosing this particular span is that it makes the leap-year rule extremely simple: it's just a test of divisibility by four. Under the circumstances, this design choice seems pretty wimpy. If Schwilgué could take the trouble to fabricate wheels that make one revolution every one hundred and four hundred years, surely a programmer could write the extra line of code needed to check for the century exceptions. The line might never be needed, but there's the satisfaction of knowing it's there. Other parts of Schwilgué's clock look even further into the future. There is a gear deep in the works of the ecclesiastical computer that turns once every 2,500 years. And the celestial sphere out in front of the clock has a still-slower motion. In addition to the sphere's daily rotation, it pirouettes slowly on another axis to reflect the precession of the equinoxes of the earth's orbit through the constellations of the zodiac. In the real solar system, this stately motion is what has lately brought us to the dawning of the age of Aquarius. In the clock, the once-per-sidereal-day spinning of the globe is geared down at a ratio of 9,451,512 to 1, so that the equinoxes will complete one full precessional cycle after the passage of 25,806 years. (The actual period is now thought to be 25,784 years.) At that point we'll be back to the cusp of Aquarius again, and no doubt paisley bell-bottoms will be back in fashion. Excerpted from Group Theory in the Bedroom, and Other Mathematical Diversions by Brian Hayes. Copyright 2008 by Brian Hayes. Published in 2008 by Hill and Wang. All rights reserved. This work is protected under copyright laws and reproduction is strictly prohibited. Permission to reproduce the material in any manner or medium must be secured from the Publisher. Excerpted from Group Theory in the Bedroom, and Other Mathematical Diversions by Brian Hayes All rights reserved by the original copyright owners. Excerpts are provided for display purposes only and may not be reproduced, reprinted or distributed without the written permission of the publisher.