Skip to main content
No. 2087:
Gauss's Algorithm

Today, Gauss's trick. The University of Houston's College of Engineering presents this series about the machines that make our civilization run, and the people whose ingenuity created them.

GaussYou may've heard the story about the great mathematician Carl Friedrich Gauss. He was a young schoolboy in the 1780s. To keep his class quiet, the teacher told them to sum all the numbers from one to a hundred. Gauss immediately turned his slate over on the teacher's desk. After an hour, the teacher had all the slates, and he found the right answer on that bottom one. The other boys made errors in the tedious arithmetic, while Gauss saw a shortcut. He saw that he could add one and a hundred, two and 99, on down to fifty 

Now Brian Hayes goes looking for the truth of the story, and finds that it's been retold in many dozens of versions. He traces them from 1856 to the present, and what he learns is quite amazing. In some, Gauss is the youngest student. In some he's the only one to get it right. Some versions have the teacher knowing the answer when he makes the assignment, others don't.

There's a variant on how Gauss might've worked the problem. Instead of doing it as I've just described, he might've added zero and a hundred, one and 99, until he reached 49 and 51. Then he'd have a hundred, fifty times, with the middle fifty to tack on. Same answer, slightly different tactics. 

So Hayes' detective work shifts. It becomes less about the truth of the legend, for we can never know that accurately, and more about the legend's structure and evolution. 

Hayes finds the earliest version in a Gauss obituary. It was written by a colleague at the University of Göttingen. In this version, which he claims to have often heard from Gauss himself, Gauss is seven. The teacher rules the class with a switch, and other answers, while correct, had been laboriously calculated. 

But: there's no mention of Gauss's method! That doesn't appear until 1938. After that it remains in almost all the accounts. In fact, we don't know how Gauss did it, only that it was very likely that he counted equal pairs in some way. 

Other details are interesting. The switch is heavily reported until 1970. After that, it's pretty much dropped. That has to reflect modern sensibilities. On the other hand, the idea of the calculation being busy-work is not mentioned before 1938. So the idea of punishing with busy-work gradually replaces the switch. 

And we're reminded that our myths are important. We need heroes and we must shape them carefully if they're to serve us well. I expect that Gauss really did pull off a dazzling trick two centuries ago; and that he did it by summing pairs.

But to serve us, the story needs detail. It needs a shape and form. We want to tell young children that they all possess the seeds of ability, and that they all should capitalize upon that ability -- as Gauss did. Something did happen, and we're the poorer if we do not shape it into a tellable tale. 

I'm John Lienhard, at the University of Houston, where we're interested in the way inventive minds work.

(Theme music)

B. Hayes, Gauss's Day of Reckoning, American Scientist, May-June 2006, pp. 200-205. 

Gauss's problem