This thesis is dedicated to the Yellow Pig and to yellow pig followers everywhere, with thanks to all who have encouraged my mathematical pursuits. I would like to thank my upstairs neighbors in Redwood City for waking me up early every morning so I could write for hours before work, those few individuals who have made useful L^{A}T_{E}X documentation available on the Internet, and all who pointed me in the direction of relevant and interesting sources. Finally, I would like to thank my parents for their diligent proofreading and editing, my thesis committee for their suggestions and support, my other thesis readers who caught egregious mistakes that had somehow been overlooked, and those who provided feedback after finding my thesis on the web at http://www.simonsrock.edu/~sara/thesis/.
``Both a proof and a novel must tell an interesting story.''
Ian Stewart, from Nature's Numbers
Mathematical Literature
In September I proposed to write a thesis which combined mathematics
and creative writing, a thesis which would make math accessible to the
general reader and present math as fun. I began by considering both
what math I wanted to include and how I wanted to present that
material. As part of this process, I looked at examples of popular
mathematical literature, a somewhat unknown genre.
Popular mathematical literature, in contrast to math textbooks, is designed to appeal to a general audience. I have subdivided this genre into mathematical fiction and recreational mathematics, two categories of literature whose boundaries are sometimes blurred. Mathematical fiction is based on a fictional story model, whereas recreational mathematics is similar to an instructive essay. In other words, mathematical fiction concentrates on the story, using a mathematical premise, while recreational mathematics presents mathematics in an entertaining and accessible way. Normally, the narrator of mathematical fiction is omniscient or a character within the story, whereas in recreational mathematics the narrator is likely the author.
I consider Edwin Abbott's Flatland and the stories in Clifton Fadiman's anthologies to be examples of mathematical fiction, and Douglas Hofstadter's Gödel, Escher, Bach to be an example of recreational mathematics. Hans Magnus Enzensberger's The Number Devil seems to be a bit of both, though I would place it on the side of recreational mathematics because it is instructive (in tone). I feel that my thesis, like The Number Devil, predominantly falls into the category of recreational mathematics. Both are fictional stories, but they use the story primarily as a vehicle for mathematical instruction.
As part of my thesis, I have read many examples of popular mathematical literature. I will now briefly summarize some of these books and stories. Edwin Abbott's Flatland is the classic example of mathematical fiction, written 120 years ago. It is a somewhat satirical story of a flat land inhabited by twodimensional shapes. In 1960, Dionys Burger wrote Sphereland, a sequel in which Flatland is visited by a threedimensional being. By way of analogy, he leads the reader to consider the meaning of the fourth dimension. Enzensberger's The Number Devil is a children's story about a boy who dislikes mathematics until a magical number devil visits him in his dreams. It is written on a pretty basic level, and there are a lot of gaps and imprecise terminology, but it is an enjoyable and informative story. Just as I was finishing my thesis I stumbled upon another batch of books. These included Erik Rosenthal's The Calculus of Murder, an entertaining detective story in which a parttime private investigator, who also happens to be a mathematician, investigates the murder of a wellknown San Francisco businessman, and Marta Sved's Journey into Geometries, a story intended for readers with little mathematical background that explores hyperbolic geometry as it is taught to a girl named Alice.
I also found dozens of mathematical short stories. Clifton Fadiman edited Fantasia Mathematica and The Mathematical Magpie, two anthologies of math fiction. The stories in these anthologies are examples of science fiction that are largely based on the mathematical. Aldous Huxley's ``Young Archimedes'' is a tragic story of a young Italian mathematical and musical prodigy. ``The Devil and Simon Flagg'' by Arthur Porges is an amusing tale of the devil and a mathematician working together to solve Fermat's Last Theorem. Robert A. Heinlein's ``And He Built a Crooked House'' explores the possibilities of fourdimensional geometry in real estate. In Martin Gardner's ``NoSided Professor,'' some members of the Moebius Society become nonlateral surfaces. In ``The Island of Five Colors,'' also by Gardner, a mathematician attempts to paint an island off the coast of Liberia with four colors, only to discover that five colors are needed. Edward Page Mitchell's ``The Tachypomp'' is about a struggling math student who loves the professor's daughter and must discover infinite speed to win her hand in marriage. ``The Feeling of Power'' by Isaac Asimov is about a futuristic society in which computers are relied on for computation to such an extent that no one knows how to perform arithmetic. Mark Clifton's ``Star, Bright'' is the story of an exceptionally gifted young girl who uses the fourth dimension to travel.
Rudy Rucker also edited an anthology of math fiction, entitled Mathenauts. Like Fadiman's anthologies, Mathenauts is a collection of science fiction short stories. Greg Bear's ``Tangents'' is about a small boy who has a gift for understanding the fourth dimension. Rucker's own ``A New Golden Age'' is about the consequences of popularizing pure mathematics. His ``Message Found in a Copy of Flatland'' locates Abbott's Flatland in the basement of a Pakistani restaurant. ``The Maxwell Equations'' by Anatoly Dnieprov is the story of a mathematician and a Nazi war criminal who is forcing mathematicians to be computers by manipulating their brain frequencies. George Zebrowski's ``Gödel's Dream'' is about a computer program that must run forever. ``Cubeworld'' by Henry H. Gross discusses the implications of turning the Earth into a cube. As my thesis is a longer work, these short stories did not have any significant direct influence on Alice in Mathland, but I found many of them delightful to read and was encouraged by the number of authors who have written mathematical pieces. The site http://math.cofc.edu/faculty/kasman/MATHFICT/default.html led me to a number of books; many more examples of mathematical literature are listed there.
Using some of these as examples, I experimented a lot with the style of my thesis. I began envisioning something with clear divisions between the creative stories and the mathematical instruction. I anticipated having something like the dialectic vignettes (Platonic dialogues) of Gödel, Escher, Bach that would be both entertaining and serve as jumping off points for delving into further mathematical exploration. But over time these more creative sections grew in proportion to the solely instructive sections, and they encompassed the math that I had anticipated having in those metasections. In order to demonstrate that mathematical creative writing can be done, I wanted to merge the two distinct styles. Fortunately, my writing was doing this on its own, and in a way that improved the story. As a result of having the math and the story intertwined, I think my thesis flows better and is able to emphasize more strongly my idea that mathematics and creative writing are not mutually exclusive. I believe I have succeeded in creating something which is both mathematically instructive and entertaining.
In addition to drawing heavily on examples of mathematical literature, my thesis is derived from nonmathematical literary models, including the dialogue and the journey. Much as in The Divine Comedy, I have a Virgil and a Dante. My Virgil is the Yellow Pig, a fantastical and entertaining math teacher. My Dante is Lewis Carroll's Alice, a curious and inquisitive young girl with whom I hope the reader can identify. My story is a physical journey through a mathematical wonderland as well as a mental journey in which Alice is exposed to mathematics and learns to enjoy it. I have chosen Alice as my character because I see Lewis Carroll, an author and a mathematician (logician), as one of my inspirations.
My story consists of five chapters, each etching the surface of a branch of mathematics with topics that I hope are interesting. The first chapter introduces geometry, including the Pythagorean theorem; the second explores numbers  p, e, the golden ratio, and primes; the third discusses combinatorics, the Pigeonhole principle, graphs, and groups; the fourth considers more geometry and topology, the study of surfaces; the fifth describes probability, game theory, and symbolic logic. Each chapter contains several sections of dialog between Alice and the Yellow Pig. At the end of my thesis are a handful of appendices in which I consider these mathematical topics in more depth. This is my way of experimenting with different forms and providing more historical and mathematical information. I encourage readers not to neglect these appendices.
Although it contains a lot of mathematics, Alice in Mathland is not a textbook. It is meant to be both informative and entertaining. My story is meant not for mathematicians, but to educate the general public. As such, even though the topics considered are advanced, very little mathematical background is assumed. My goal is to make mathematics accessible. In his introduction to Flatland, Isaac Asimov comforts the reader: ``Fear not, however. It contains no difficult mathematics and it won't sprain your understanding. [It is] a pleasant fantasy. You will have no sensation of `learning' whatsoever, but you will learn just the same.''
I hope you, like Alice, find your journey into my mathematical world a pleasant and rewarding one.
It was an unusually warm day, and Alice had taken the opportunity to walk to a field not far from her house. She had just prepared a tea party for a select few of her stuffed animals. They were finishing their tea, though she never actually saw them drinking. Alice was sitting on a comfortable patch of grass, chaperoning to make sure their napkins didn't blow away. She detected some motion out of the corner of her eye and got up to investigate. Alice hoped it wasn't her neighbors' dog. The last time she had had a tea party, he had nearly made off with her stuffed llama. Fortunately there was no dog this time. Instead she saw a group of small animals scampering by in a pink and yellow speckled flurry. Snatching up her stuffed animals, she chased after them. They led her around in circles a few times and finally stopped just near the picnic blanket where they disappeared down a surprisingly large hole.
Cautiously, Alice approached the hole. She knelt down beside it, leaned over, and peered in. It appeared to be a long tunnel, but she couldn't see how long it was or where it went because of the darkness. She stood up and inspected her dress to make sure it hadn't gotten dirty. Mother would throw a fit if it had. Another little yellow creature leaped from behind her and jumped down the hole. Startled, Alice jumped too, losing her grip on her favorite teddy bear. ``Oh no,'' she cried out, as she watched it fall down the hole. She thought for a moment. Then, she carefully wrapped up her other animals in the blanket and put them in the basket she had used to carry them to the field. ``I'll be back soon,'' she said, kissing them each once. ``Do not worry.'' And in another moment, down went Alice after her bear and the pink and yellow creatures, never once considering where the hole would lead her and how in the world she was to get out again.
The hole went straight on for some way. It was like being on a roller coaster or a slide. Alice held her skirt to keep it from blowing. She supposed she was going downward, though she really couldn't tell. ``I'm falling, so it must be downward,'' she rationalized. Down, down, down, with nothing but the whoosh of the wind. As she slid, she wondered if she would ever stop falling. She wondered how far she had traveled and where she was. She tried to calculate how far she must have fallen and how fast she was falling, but she found it difficult to remember her sister's physics lessons while falling. She found that fact to be rather inconvenient. ``What's the point of such learning,'' she thought ``if I can't use it when I might need it?''
She wondered if she would end up in the center of the earth. Or perhaps she would come out the other side. Or, even stranger still, she could return to where she started, only to find everything changed. Or maybe she would find everything the same but that she had changed. She thought she wouldn't like that very much at all, but then she wouldn't be herself anymore so maybe she would. And here Alice began to get rather sleepy, until suddenly she landed  thump  on a pile of yellow books, and the fall was over. There was nothing except for the books. Alice had fallen into a dark cave with cold stone walls. Elaborate torches lined the walls.
She was not a bit hurt, but she was slightly disoriented, and she thought she saw a yellow pig. Or, it is more accurate to say, she thought what she saw couldn't have possibly been a yellow pig even though she was certain that was what she was seeing. Things became still curiouser as she suddenly found herself singing under her breath a song she had never heard before.
Alice looked around for her teddy. On the ground beside her lay a thick blue velvet ribbon. This she recognized as the ribbon she had tied around the bear's neck. The bear was nowhere in sight. ``But what was that piglike animal?'' she asked herself. ``Perhaps it can help me find my bear.''
Alice ran off in the direction of the peculiar animal, but it seemed to get smaller and then it vanished before her eyes. She stopped running just before a wall which did not appear to be a wall at all. It was a mirror that reflected Alice and what was behind her, causing her to see an infinite tunnel of Alices. She thought it very strange that a pig had been there and was no longer, but as it wasn't much odder than seeing a yellow pig in the first place, she tried to dismiss it. It was, after all, a Thursday.
She looked to her left and right. On either side of her was a stone wall. There was no source of light, but somehow Alice was able to see. The corridor looked as though it were frequently traveled, as it didn't seem either dusty or lonely. She briefly considered asking it if it were lonely, but didn't for fear that the girl in front of her who looked just like her would think she was a ridiculous child, talking to hallways as though they could answer. ``That's silly,'' she said aloud. ``It's just my reflection, and it won't think anything of me talking to the hall.'' Sure enough, as she spoke, so did the other girl. She would have said more, but it occurred to her that someone might arrive, and then wouldn't she look even more ridiculous, talking to her own image!
Alice turned around and walked back down the corridor. All the way at the other end was a red door. Above it was a sign that read ``Enter'' and below it another sign that said ``Exit''. Poor Alice, knowing not whether to enter or exit, sat in front of the door considering her predicament for quite some time. At last she decided to open the door without either entering or exiting. ``After all, I'm only entering if I think I am going somewhere. And I'm only exiting if I think I'm leaving somewhere. But I don't know where I would go, and I don't know where I am, and I'm certainly not thinking very clearly at all today.'' And so she opened the door slowly and cautiously.
Alice had expected to find herself in another room, but instead she found herself outside. She must have been outside because there was sunlight. Unless she had been outside and in this strange land the sun was only inside. But that didn't seem right. Alice stepped out, or rather, through the door into one of the most magnificent meadows she had ever seen. Flowers dotted the grass as far as she could see. A bubbling creek wound its way through the flower beds. To one side was a grove of trees; above Alice was an expansive bright blue sky, a backdrop on which wispy white clouds had been painted. The aroma of the flowers was stronger than anything Alice thought she had smelled before, and though it was entirely pleasant, it made her dizzy.
Always drawn to water, Alice walked to the small pond which the creek had formed. The water was clear and it sparkled like liquid diamonds. She cupped her hands and dipped them in the pond and then drew the water to her mouth. The water was colder than she expected, but it felt good as the sun was quite warm. The water tasted clean, and immediately Alice felt refreshed. She lay down on a patch of flowers and dipped her long hair into the pond. Staring upward, she watched the clouds change shape. ``That one looks like a bunny,'' she thought, ``and that one a dragon.'' The odd shapes and their boundaries entertained her until she detected a slight motion out of the corner of her eye.
It was a yellow pig; she was now quite certain that it was a yellow pig, as it appeared to be both yellow and a pig. She called out to it, ``Hello, Pig.'' Startled, the Pig turned around and ran toward the trees. For the second time that day, Alice took off after him. She ran and ran through the green blur of trees. The trees were very thin, but they seemed to be laid out in a square grid as if to trap her, and as she ran through the spaces between the trunks, she had to be careful so as not to run into them. ``Running into trees would not be good,'' she thought to herself.
She was gaining on him. Suddenly he stopped and turned around. ``Do you know why I will be able to outrun you?'' he asked. Without waiting for an answer, he chortled, ``Because I am running irrationally!'' And with that, he resumed running.
``Wait,'' Alice called out after it. ``What do you mean?'' Again, he stopped and turned around. He stared at Alice for a very long moment. In this moment Alice was finally able to observe the mysterious pig. He looked like a normal pig, though perhaps he was a bit larger than most pigs. He had a yellow pencil tucked behind his right ear and a calculator tucked behind his left ear. He was a deep yellow in color, somewhere between a golden orange and the color of lemons, with some darker spots on his belly.
``Would you really like to know?'' he asked.
``Oh, yes, very muchly,'' replied Alice, who was intrigued by the talking pig and didn't want it to run off again. Surely this pig could help her find her bear and tell her how to return home. She had fallen such a long way.
And so the Pig bounded over to Alice and motioned for her to sit down. He proceeded to stand upright on his two hind legs, remove the pencil from behind his ear, and speak, in a manner that wasn't much different from preaching.
The Pig began: ``The trees in this forest are laid out in a most regular pattern, as I'm sure you have already noticed. Consider not the trees, but the center of each tree trunk. If you look at all of these points, they make up a rectangular lattice.''
``A rectangular lettuce?'' interrupted Alice.
``Not a lettuce, a lattice,'' responded the Yellow Pig. ``A rectangular lettuce would be unproductive, not to mention silly. A lattice is just a grid, like the corners of squares. Or, like the intersections of streets.'' And so saying, he picked up a stick and drew a series of evenly spaced parallel lines in the dirt. Then he drew more evenly spaced lines that intersected those at right angles. ``All of these points of intersection are lattice points.'' Indeed, an aerial view of the forest would have looked very much like a square grid of evenly spaced points.
``In a unit square lattice, points are separated by one unit from their horizontal and vertical neighbors. It doesn't matter what this one unit is, but it's the same distance.''
Again Alice interrupted, ``But those two points,'' she said pointing, ``are further apart than those two.''
``Let's call them Lorina and Edith,'' Alice suggested.
``Well, I was thinking of simpler names than that,'' the Pig explained. ``Let's call this point at the bottom (0,0). And that one just to the right of it (1,0), then (2,0), and so on. And the ones going up in the left column (0,0), (0,1), (0,2), ... . The first number in the pair refers to how far to the right the point is, and the second number refers to how far up it is. The two points you mentioned are (0,0) and (3,4). They are in both different rows and columns. You see how the naming works? The name of a point identifies its location.''
``But those are boring names. Lorina and Edith would be much better.''
``Perhaps, but my naming is more logical, because with numerical names, we can calculate the distance between any two points. The distance between (0,0) and (0,1) is 1. I have described the points using what are known as ordered pairs. The first number in both pairs is the same: 0. It is only the second number that has changed. To determine the distance between them, we need only to subtract 0 from 1. Similarly, the distance between (1,0) and (3,0) is 2. This time the second number in the pairs is the same so we subtract 1 from 3. Now do you understand? It would make no sense at all to subtract Lorina from Edith.''
``Yes, but you haven't attempted to subtract Lorina from Edith either,'' pointed out an indignant Alice, who didn't see why the Pig wouldn't take her naming suggestions. ``You picked two points that are in the same row or two points that are in the same column. Lorina and Edith aren't in the same row or column, so they wouldn't have either the first or second number in their pairs in common. How could you subtract them?''
``Well, it would be quite a bit more complicated to do,'' admitted the Pig, ``but I assure you I can. I want to explain a little bit about how I was running before I answer your question. There are all kinds of diagonals in this lattice. You pointed out one of them to me already. The diagonal through (0,0) and (1,1) goes through (2,2) and (3,3) and (n,n), for any n. There's another diagonal parallel to it that goes through (0,1), (1,2), (2,3), and so on. And there are diagonals perpendicular  that is, at a ninety degree angle  to these, such as the one that goes through (0,5), (1,4), and (2,3). Or the one through (3,4) and (4,3). I only need to specify two points to determine the line. That's a very important fact. I can refer to each line by an equation or just in terms of how steeply it slopes.''
``Oh, you are making my head hurt,'' said Alice. ``I feel as though I am in a math class with all of this talk about equations.'' Alice found math class to be confusing.
``Equations are just a way of expressing something, just as my pointpairs are a way of identifying points with two values, an x and a y. Pictures are another way of expressing concepts,'' he said, pausing to sketch some diagrams in his notebook. Alice watched as he drew a grid of points and labeled several lines. She was impressed at how well he could draw, being a pig and thus not having the advantage of a thumb.
``The y decreases by 1! So if I chose an entirely different two points, like your (0,0) and (1,3), then as the x increases by 1, the y increases by 3.'' Alice's head still hurt, but not as much anymore.
``Absolutely correct,'' praised the Pig, and Alice beamed. ``The slope in that case would be 3. Now maybe you'll see what slope has to do with running. I was running in a straight line with a certain slope. Only I couldn't run in a straight line with slope 1. Look at our graph. The line from my origin  that's the point (0,0) on the graph  with a slope of 1 intersects a point. That point represents a tree, and I certainly didn't want to run into a tree. I couldn't run in a straight line with a slope of 2 or 3 or 5 because I would eventually hit a tree then, too. Nor could I run in a line with a slope of ^{1}/_{2}. That is, whenever the x changes by 2, the y changes by 1. Slope is just the change in y divided by the change in x. Running at a slope of ^{1}/_{2} is not very different from running at a slope of 2, and so I would hit a tree in the same amount of time. Running at a slope of ^{3}/_{2} or ^{4}/_{3} isn't any better. Because if you look at lines starting from that bottom left corner with those slopes, they all intersect points.''
``I think so,'' said Alice, hoping that maybe the Pig would make more sense if he continued.
``Good, because here is the tricky part. I wanted to run in such a way that I would never hit a tree, but running at any slope ^{x}/_{y} would cause me to hit a tree. I didn't want to just run so I wouldn't hit a tree for a long long time, but so that I would never ever hit a tree. So I just picked a number that isn't ^{x}/_{y}. That way, I will never intersect one of those (x,y) treepoints,'' the Pig said, waving his pencil gloriously.
``A number that isn't ^{x}/_{y}?'' repeated Alice.
``There are a lot of numbers, surely you can't expect to be able to represent them all so easily.'' He paused and scratched his forehead. ``Oh dear, I have to explain to you about numbers. Well, think about a number line. And pay close attention because I have a lot of terms to define here. On a number line are integers, numbers like 17, 16, 15, 0, 1, 2, 3, and 1729, to name a few. The positive integers are all the ones greater than 0; that's 1, 2, 3, and so on. They are called the natural numbers or counting numbers. And between these natural numbers are fractions like ^{1}/_{2}, [1/ 17], [17/ 42]. These are called rational numbers because they express ratios between two integer numbers. Even if we draw all of these rational numbers on a line, we would still be missing most of the points on the line. Because in between the rational numbers, there are so many more nonrational numbers. The number line contains the rational and irrational numbers; that's all of the real numbers.''
``Please do explain. But first, tell me a few things,'' requested Alice, who was always full of questions. ``What are irrational numbers? What did you mean by there being more irrational numbers than rational ones? Have you seen a teddy bear? Are you a yellow pig? Oh,'' she said, remembering her manners, ``My name is Alice.''
``I am a yellow pig, and I'm pleased to meet you. Welcome to Mathland,'' said the Pig.
``Mathland?'' repeated Alice. ``Is that where I am?''
``It is,'' said the Pig, ``so we should do math. You asked about irrational numbers. Irrational numbers are simply those that aren't rational. It's hard to understand this without any examples, so if you wait a little while I'll tell you about the first irrational number to be discovered. It's also difficult to explain why there are more irrational numbers than rationals. It has to do with being able to list numbers. How many natural numbers are there? Remember, that's the numbers 1, 2, 3, ... .''
``A lot,'' said Alice. ``More than I could count even if I count for my entire life.''
``Right,'' the Yellow Pig said. ``But for mathematicians, that's not always precise enough. There are an infinite number of natural numbers. But this doesn't bother them, because they can still describe the natural numbers. That's because they are ordered. If you give me a natural number, any natural number, I can give you the next natural number by adding one to it. We can list all of the natural numbers: 1, 2, 3, ... , n, n+1, n+2, ... .''
``I see,'' said Alice.
``Now, here's where it starts to get tricky,'' warned the Pig. ``How many integers are there? Integers are all of the natural numbers, all of the natural numbers with negative signs in front of them, and zero.''
``Infinitely many,'' said Alice.
``Right,'' agreed the Pig. ``But compare that `infinitely many' with the number of natural numbers. Are there more integers than natural numbers? Less?''
``There must be more,'' concluded Alice, ``because all of the natural numbers are integers. There are twice as many integers as natural numbers because there are the negative numbers as well. And there's a zero, so that's even more than twice as many.''
``It seems so, doesn't it?'' the Pig replied. ``But think about that number zero. How much difference does one number make? You already have an infinite number of numbers. Why consider it at all? Isn't it enough to say you have twice as many integers as natural numbers?
``It seems so. One number is meaningless when compared with so many,'' Alice agreed.
``Then by the same logic,'' taunted the Pig, ``what difference does twice as many numbers make? Twice something infinite is just something infinite.''
``I guess so,'' said Alice. ``I hadn't thought of that. All infinity is infinity. There's nothing bigger.''
``Not quite,'' said the Pig. ``There are different kinds of infinities, but we don't need to get into that. The number of elements in the set of natural numbers is the same as the number of elements in the set of the integers. Or rather, their order or cardinality is the same. That's just a fancy way of saying that there is a one to one correspondence between the natural numbers and the integers. So, we can list all of the integers. Any idea how?''
``We can list all of the positive integers first, then zero, and then the negative integers,'' Alice suggested.
``We could,'' said the Pig, ``but I'm afraid we would never get past the positive numbers to list the negative ones. We are much better off writing them like this: 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, ... . You see, it is just like our listing of natural numbers, only we have stuck a zero at the beginning and inserted negative numbers after each positive one. This makes it clear how the integers are related to the natural numbers.''
``You mean to tell me that both of these lists have the same number of elements, even though one list is contained in the other?'' asked Alice incredulously.
``More or less. They have the same cardinality. I know that sounds fishy,'' said the Pig.
Alice wasn't sure she believed him, but it did seem that one infinity shouldn't be bigger than another. Certainly not significantly bigger, so she let it go. She didn't quite understand what the Pig meant by cardinality, but it sounded interesting. She wondered if he would ever get back to the distance between Lorina and Edith.
``Now we have another set of numbers,'' the Pig said, ``known as the rational numbers. Those are the numbers in the form ^{x}/_{y}, where x and y are both integers. Thinking of how to list all the rational numbers is much trickier, but there is a way. We make a table with the positive rational numbers. It could begin like this.'' He wrote:





























``In the top row we have a bunch of fractions with 1 as their numerator. That means ^{1}/_{1}, ^{1}/_{2}, ^{1}/_{3}, ^{1}/_{4}, ^{1}/_{5}, et cetera. In the second row we have fractions where the numerator is 2. Like ^{2}/_{1}, ^{2}/_{2}, ^{2}/_{3}, ^{2}/_{4}, ^{2}/_{5}. What do the columns look like?'' he asked.
``Each column has the same whatdoyoucallit? The bottom number in the fraction.''
``Denominator,'' supplied the Pig.
``Thank you,'' said Alice politely. ``The first column has ^{1}/_{1}, ^{2}/_{1}, ^{3}/_{1}, ^{4}/_{1}, ^{5}/_{1}. The second column has ^{1}/_{2}, ^{2}/_{2}, ^{3}/_{2}, ^{4}/_{2}, ^{5}/_{2}.''
``Right,'' said the Pig. ``And these numbers go on and on in two directions. The rows and the columns. There are infinitely many rational numbers in the table.''
``Wait,'' interrupted Alice. ``Some of the numbers on your table occur twice, like ^{1}/_{2} and ^{2}/_{4}. How can you be sure that there are infinitely many rationals when you have the same numbers so many times?''
``Excellent question,'' said the Pig. ``If we consider only fractions reduced to their lowest terms, like ^{1}/_{2} instead of ^{2}/_{4}, we avoid that problem. At any rate, every single positive rational number is contained in our table. We may have duplicates, but we aren't missing any numbers. And because our rationals are derived from the natural numbers, there are the same number of rational numbers as natural numbers. We can order them, too, though that is a bit more complicated.''
``But aren't they already in order?'' asked Alice, confused.
``I suppose they are,'' said the Pig, ``but I meant something more specific. If I were to write a list in this order, it would start ^{1}/_{1},^{2}/_{1}, ^{3}/_{1}, ^{4}/_{1}, ^{5}/_{1}, º, ^{1}/_{2},º. But that's no good, because it would have lots of huge gaps. When I say I want to list the rational numbers, I mean that there shouldn't be leaps in the list. To accomplish this we need to look at some diagonals in our table.'' Alice watched him draw arrows:
``Wow,'' Alice exclaimed, looking over the Pig's shoulder, ``that's neat. We've ordered an awful lot of numbers.''
``We have,'' the Pig agreed. ``But you've gotten me off on a tangent. I meant to be telling you about distance, not cardinality.''
``Well, then do that, too,'' instructed Alice. ``But,'' she asked again, ``have you seen a stuffed teddy bear?''
``I'm afraid I haven't,'' he replied. ``Why?''
``Because I have lost my bear,'' said Alice sadly. ``I dropped it down a hole, and I climbed in after it to try to find it. But I found only its ribbon.''
The Pig looked at her consolingly. ``Don't worry. You'll find your bear. I'll help you. But first, I'll explain about triangles so we can subtract Lorina from Edith.''
``I'll explain to you how to find the distance between the two points you chose in the lattice. Think about your two points as being opposite corners of a square,'' he said drawing a square.
``The question is to find the length of the diagonal of the square with side length one. Let's look first at the area of the square. It is 1 square unit because the area of a square is just the length of the side squared. Now I'm going to add another square to our diagram, this one with the diagonal as a side. This new square has a center at (1,1). And each of its corners is one unit away from the center. Do you know what its corners are?'' asked the Pig.
``I think so,'' said Alice. ``The point above (1,1) is (1,2). The point below (1,1) is (1,0). The point to the left of (1,1) is (0,1), and the point to the right of it is (2,1). So those are the four corners.''
``The Greeks were just concerned with geometry; what we think of as algebra was, for them, just another way of representing geometry. We can rewrite many problems of algebra in terms of geometry. We can also rewrite problems in geometry as problems in algebra. From our picture, we get the equation side^{2} = 2. Do you know what a square root is?'' he asked.
Alice nodded. ``A square root is a funny sign that looks like a cross between the long division sign and a check mark. It means the opposite of squaring a number. So since 3^{2} is 9, the square root of 9 is 3.''
``Right,'' said the Pig. ``Actually, the square root of 9 is also 3, but we don't want to worry about negative numbers. They don't make any sense geometrically. To solve for the length of the side, we need to take the square root of 2. That is, the length of each side of the larger square is ÷2.''
``That's not equal to 1, or 2, or 3, or any such number,'' remarked Alice, puzzled.
``It isn't,'' said the Pig. ``It isn't even equal to a fraction. It's an irrational number.''
``I don't think it's nice to call a number irrational,'' said Alice.
``Perhaps not, but that's how the Greeks thought of them, as illogical numbers, as numbers that didn't fit into their way of thinking of ratios. And the square root of two was the first number to puzzle them in this way.
``Now I'm ready to tell you about the distance between any two points. This is where we use the Pythagorean theorem. The Pythagorean theorem says that a^{2}+b^{2} = c^{2}, where a and b are the lengths of the sides of a right triangle and c is the length of the hypotenuse.''
``Hippopotamus?'' asked Alice.
``No, hypotenuse.''
``A hippo in a noose? What would you do with a hippo in a noose?''
``No, not a `hippo in a noose' either. A highpotenoose. The hypotenuse of a right triangle is the longest side, the one across from the right angle.''
``Oh. That's a really silly name for it. Is that always the longest side?'' asked Alice.
``Always,'' replied the Yellow Pig. ``And not only is it the longest, but we have an explicit formula for finding its length, given the lengths of the other two sides. That's our Pythagorean theorem,'' he said, writing:

``So this hypotenuse thing is always the same length?''
``In relation to the other sides, yes. I'll show you. Let's see ... today is a Thursday, so I'll give you the Thursday proof.''
``There's more than one proof?'' Alice asked.
``Why, pigheavens, I bet there are over thirtyseven proofs, and they all explain the same thing in a different way. I'll show you a few of the proofs. This first one is a proof by picture. Our algebraic expression a^{2}+b^{2} = c^{2} is represented geometrically by this picture.'' Alice studied the picture carefully.
``The area of the outer square with sides of length (a+b),'' supplied Alice.
``Right. So when we say that in a right triangle a^{2}+b^{2} = c^{2}, what we mean is that the sum of the area of two squares with side lengths a and b is equal to the area of a larger square with side length c. I can draw a square on side a and a square on side b and their combined area will equal the area of the square on side c. Does that make sense?''
``Yes, I think so,'' said Alice.
``Good. Now, for some algebra,'' continued the Pig. ``The area of the larger square is (a+b)^{2}. And that has to equal the area of the small inner square, which is c^{2}, plus the area of the four triangles surrounding it. Each of these right triangles has sides of lengths a and b. So the area of each triangle is ^{1}/_{2}ab, and since there are four of them, the combined area of the triangles is 2ab. Now we need to find the value of (a+b)^{2}.''
``Isn't that a^{2}+b^{2}?'' Alice inquired.
``No,'' said the Pig, ``try an example.''
Alice thought aloud, ``(1+2)^{2} = 3^{2} = 9, and 1^{2}+2^{2} = 1+4 = 5. I guess it isn't,'' she concluded. ``So what is (a+b)^{2}?''
``You have to be careful when multiplying polynomials  expressions like a+b. It's like when you learned to multiply numbers. Think about squaring 17, which is really the same as squaring (10+7). First, we multiply 7 by 7. Then, we multiply 7 by 1, which is really 10. This gives us 17 times 7. Next, we multiply 1, or 10, by 7, and then by 1. This gives us 17 times 10. We add these two results together to get 17 times 17.''
He continued, ``The same principle applies to squaring (a+b), that is, calculating (a+b)(a+b). We use a method known as FOIL. That stands for first, outer, inner, last. We multiply the first two terms, the outer two terms, the inner two terms, and the last two terms. Then we add all of those together. We can represent this with a diagram.'' He wrote:
``I guess it does,'' agreed the Pig. ``And it shows us how to obtain the product (a+b)(a+b) using the FOIL method. The first two terms are a and a, so we get a^{2}. The outer terms are a and b; we multiply those to get ab. The inner terms are b and a, yielding ba, and the last terms are b and b, or b^{2}. We add all of the terms together to get a^{2}+ab+ba+b^{2} or a^{2}+2ab+b^{2}.
``So, the area of the whole square is a^{2}+b^{2}+2ab,'' said the Pig. ``And it is also c^{2}+2ab. This gives us the equation a^{2}+b^{2}+2ab = c^{2}+2ab. Both sides have a 2ab so we can cancel them out. We are left with precisely what we wanted to prove: a^{2}+b^{2} = c^{2}.''
``That's the first logical thing I've seen all day,'' Alice remarked.
``Yes, it's very logical. Most of what you will see here is logical, although it might not appear to be so at first. This is a world ruled by mystery and logic. Let me show you a second picture.''
``Yup. In this diagram it's the outer square that has side length c. And the inner square has side length (ba). Again, there are four triangles with legs of lengths a and b.''
``So, the area of those four triangles is still 2ab,'' Alice thought out loud.
``Right. And the area of the larger square is c^{2}, and the area of the smaller square is (ba)^{2}.'' The Pig looked at Alice. She remained silent. He continued, ``ba is really just b+(a), so we can use the FOIL method again.'' He drew:
``Correct,'' said the Pig, ``and that's just a^{2}2ab+b^{2}.''
``Right,'' agreed Alice. ``I think I can finish the proof now. The area of the small square and the four triangles has to equal the area of the large square. So a^{2}+b^{2}2ab+2ab = c^{2}. And the 2ab+2ab part goes away, leaving us with a^{2}+b^{2} = c^{2}.''
``Absopositivelutely correct,'' praised the Pig. ``Those are my two favorite proofs of the Pythagorean theorem, but there are many others that are quite different. One, credited to a mathematician named Legendre, is based on the idea of similar triangles. Similar triangles are triangles with different side lengths but the same angle measures. I'll show you another geometric proof that you should be able to understand if you analyze this picture carefully,'' he said, sketching a right triangle and forming squares on all three sides. He then split the largest square into a small square, which was the same size as the small square on one of the sides of the triangle, and four equally shaped quadrilaterals. He also split the medium sized square into the same four equally shaped quadrilaterals. ``Now you can see that the combined area of the small square and the medium sized square on the sides of the triangle is equal to the area of the larger square.''
``Back to Lorina and Edith. Lorina was the point (0,0) and Edith was the point (3,4) in my naming scheme. We can make a right triangle from Lorina and Edith, like so,'' he said, drawing:
``I see,'' said Alice. ``The square of the distance is the square of the hypotenuse which is equal to 3^{2}+4^{2}. That's 9+16 or 25. Then the distance between Lorina and Edith is ÷[25] which is 5,'' she concluded. ``Is that right? Is the distance 5 units?''
``It is,'' said the Pig. ``I'm very pleased that you were able to calculate the distance between Lorina and Edith. Now you know how to calculate the distance between any two points.'' Alice was pretty pleased herself. She thought that the Pythagorean formula was quite useful.
``Let's use our formula to calculate some more distances,'' the Pig continued. ``If we know the horizontal and vertical distances a and b, we can calculate the diagonal distance c. Most of the time c is an irrational number, like ÷2.''
``But for 3 and 4, we got 5,'' remarked Alice.
``We did,'' said the Pig. ``There are an infinite number of such integer solutions to a^{2}+b^{2} = c^{2}. Even though there are infinitely many integer solutions, it's not very clear how to find them. The Greeks knew of a few triples with integer values for side lengths. The smallest of these is our (3,4,5). Two more triples are (6,8,10) and (9,12,15). They work because they are larger versions of (3,4,5). We say they are multiples of (3,4,5).''
The Pig continued, ``It turns out that all such triples can be written in the form (p^{2}q^{2},2pq,p^{2}+q^{2}).''
``What do you mean?'' asked Alice.
``Just pick two whole numbers, p and q, with p greater than q.''
``Like 2 and 1?'' asked Alice.
``Good example,'' said the Pig. ``Then p^{2}q^{2} is 2^{2}1^{2} = 3. And 2pq is 2 ·2 ·1.''
``That's 4,'' said Alice.
``Right,'' said the Pig. ``And do you know what p^{2}+q^{2} is?''
``Let's see,'' started Alice, ``it must be 2^{2}+1^{2} which is 4+1 or 5.''
``Exactly,'' said the Pig. ``See? That's our triple: 3, 4, and 5.''
``Neat,'' said Alice. ``Can I make another triple?''
``You sure can,'' said the Pig.
``I'll try 2 and 3,'' Alice said. ``That makes the first number in the triple is 3^{2}2^{2} or 5. The second number in the triple is 2 ·3 ·2 which is 12. And the third number is 3^{2}+2^{2} = 9+4 or 13. Is that a Pythagorean triple?''
``We can check: 5^{2} is 25, 12^{2} is 144, and 13^{2} is 169. What's 25+144?''
``That's 169,'' answered Alice. ``And 5^{2}+12^{2} = 13^{2}, so it works. But,'' she paused, ``why does it work?''
``I'm glad you asked. In mathematics it's important not to accept everything, but to try to understand why things are true. It's fairly difficult to find that magical formula,'' said the Pig, ``but fortunately, we already know it, so it's fairly easy to see that it will produce Pythagorean triples. We can verify that it works in the same way we checked that (5,12,13) was a triple. We just use substitution. The Pythagorean theorem says that a^{2}+b^{2} = c^{2}. We let a = p^{2}q^{2}, b = 2pq, and c = p^{2}+q^{2}. That's a lot of numbers and variables, so hold on to your hat,'' he warned.
``I'm not wearing a hat,'' said Alice, slightly confused.
``It's just a figure of speech,'' the Pig said with a smile. ``It means that you should pay close attention. Here's what we want to show: (p^{2}q^{2})^{2}+(2pq)^{2} = (p^{2}+q^{2})^{2}.''
``Well, (p^{2}q^{2})^{2} is p^{4}  2p^{2}q^{2} + q^{4}. And (2pq)^{2} = 4p^{2}q^{2}. So when you add those two together you get p^{4} + 2p^{2}q^{2} + q^{4}. That's a^{2}+b^{2}. Our c^{2} is (p^{2}+q^{2})^{2} or p^{4} + 2p^{2}q^{2} + q^{4}, which is the same thing we got for a^{2}+b^{2}. Sure enough, a^{2}+b^{2} = c^{2}. Did you follow that?''
Alice had to admit that while it seemed logical, she would have to look over the details before she could really be convinced. She borrowed the Pig's notebook and slowly worked out the algebra for herself. ``It sure is neat,'' she said.
``It is,'' agreed the Pig. ``And there's even a Pythagorean triple with the number 17. That's my favorite number.''
``What's so special about seventeen?'' Alice asked.
``A lot,'' said the Yellow Pig. The Pig continued talking, but Alice was having trouble following him, for he had suddenly become almost frighteningly excited. Instead, she dozed off and took a short nap, filled with dreams of hippos and a's and b's.
When she woke up, Alice found herself back in the woods, lying on a bed of leaves and covered by a blanket of fivepointed stars. The Pig was sitting nearby mumbling to himself and scribbling notes on a pad. Noticing she was awake, he stopped scriblling and said, ``I'm sorry I got so carried away before. I was a bit irrational, I'm afraid. I could be more irrational, though. You know how I told you there were all of those irrational numbers? Well, what I didn't tell you is that some irrational numbers are more irrational than others? It's kind of like all pigs being equal.'' He chuckled.
Alice wondered if he would be terribly upset if she interrupted him. His lectures so far had been interesting, but she hadn't had anything to eat since early that morning and was now very hungry. And he was terribly confusing. What did he mean about pigs being equal? About being more irrational? She thought he was already very irrational, though she dared not say so.
The Pig looked back toward his notepad and continued, ``The first troubling irrational number that the Greeks discovered was ÷2, but there are many other irrational numbers that are even more interesting. Two of my favorite irrational numbers are known as p and e. They are both very important numbers, especially in geometry and calculus.''
Alice sighed lightly and shifted her position, trying to ignore her growing hunger. Startled by the noise of her movement, the Pig looked up. ``I'm sorry, I'll stop now. You've had an awful lot of math for one day. And you must be hungry,'' he said.
Surprised and slightly embarrassed by the Pig's perceptiveness, Alice felt she had to apologize. ``I really am enjoying the math. It's just that I haven't had anything to eat and that makes it hard to concentrate.''
``Well, then,'' replied the Pig, ``let's get some food. I'll take you back to my cabin. It's not far from here, just back by that grove of trees.'' Alice saw a small clearing in the direction that he pointed.
The Pig stood up and collected his belongings. Standing next to him, Alice guessed that he was about three feet tall. He had a funny way of walking, a fast somewhat bouncy skip. He had to take several little steps to keep ahead of Alice. The two walked in near silence, giving Alice time to examine the Pig more closely. His ears were now pointy and standing on the top of his head. Before they had been sort of floppy and drooped on either side of his head. His eyes, she noticed, were different colors. His left eye was bright blue while his right eye was a dark green. He had a curly little tail which Alice was very tempted to tug. She didn't though, because she thought that would be rather rude.
The trees were getting more congested. The Pig led Alice on a small cobblestone path. The terrain became much hillier. ``It's just over this hill,'' he said. The path was slightly overgrown with bushes, and a canopy of taller trees shaded it from the sun. Alice saw the clearing ahead. There was a semicircle of rocks in front of two very large trees. As they walked around the trees, Alice saw a large rock with a chimney sticking out of it. On the side of the rock was a small cabin.
The cabin had a very small door, in front of which was a welcome mat and above which read the inscription ``Y. Pig''. Alice followed the Pig inside, ducking so she could fit through the door. ``This is my home,'' the Pig said almost timidly. ``I don't have many visitors.''
The cabin was not the least bit spacious. It was the sort of place Alice imagined a real estate agent describing as ``cozy'' because ``cramped and cluttered'' didn't sound nice enough. To be fair, Alice thought, it probably wouldn't seem nearly as small if she were as short as the Yellow Pig. The kitchen was big enough and had a barstool as there was no dining room. It looked like the Pig slept in the living room on a pile of hay. Surrounding the hay were piles of papers, jigsaw puzzles, and a Rubik's cube. The most impressive aspect of the cabin was the full wall of books.
``What would you like to eat?'' asked the Pig, interrupting Alice's thoughts.
``What do you have?'' Alice asked, afraid that the Pig might only have foods that would interest a pig, though she didn't know what exactly a pig, especially a yellow pig, would eat.
``I don't have very much food. I have some fruit pies: strawberry, blueberry, and key lime. I also have numbers, my favorite snack.''
``Numbers? You eat numbers?'' asked Alice.
``Of course I eat numbers,'' the Pig replied. ``How do you think I learned so much math?'' Alice thought that he was serious for a moment, but his blue eye twinkled merrily and the corners of his mouth were twitching.
``So what are these edible numbers?''
``They're crackers in the shape of numbers. They're especially yummy when dipped in numeral soup, but I don't think I have any of that.'' He took out a plate of the number cookies for Alice. They were small, and there were dozens of them. An awful lot of them were 17's, but Alice saw other whole numbers and even some decimals and fractions.
``Oh, they're like animal crackers!'' exclaimed Alice. ``I like animal crackers. My sisters and I often get them on the way home from school.'' Here Alice grew pensive for a moment, wondering when she would have animal crackers again. She could do without school and maybe even her sisters, she supposed, but she would like to go home. How would she ever get out of this strange land? She had fallen quite a long distance. ``Animal crackers come in all different shapes: elephants and cows and pigs. I like to eat them slowly, saving their heads for last.''
``Pig heads?'' the Pig gasped. ``You eat pig heads?''
``Oh no,'' Alice clarified. ``They aren't real pig heads. I would never eat pig heads. Well, I suppose I like bacon, but that's not from the head, is it?'' She could tell that she was only making things worse. The Pig had turned a very pale shade of white. ``I'm sorry,'' Alice apologized again. ``I would never eat yellow pigs.''
``One of my brothers is a blue pig,'' said the Yellow Pig rather irritably.
``I would never eat blue pigs either,'' said Alice. ``Or orange pigs or purple pigs. Or even silver pigs. I won't eat pigs anymore. Please don't be angry with me,'' Alice pleaded, now almost close to tears.
``I'm not angry with you,'' said the Pig after a pause. ``Try one of the numbers.'' Alice gingerly picked up a number 3, afraid that eating a number 17 might be sacrilegious. She didn't want to offend the Pig again.
The number was sugary and somehow crunchy and chewy at the same time. Alice helped herself to another. The Pig had one as well. He chose a number 17. Alice supposed she was allowed to eat them. After Alice and the Pig had eaten a sizeable portion of the number cookies, the Pig brought out a small blueberry pie. ``My pies are perfectly circular, or rather cylindrical,'' he said, ``and each pie has a diameter of 2 punits.''
``Punits?'' Alice asked. ``What's a punit?''
``Why, it's one pig unit, of course,'' said the Pig in a way that made it sound as if he found the entire matter perfectly obvious and was surprised that Alice would ask such a simple question. ``A punit, in this case, is between two and three inches long. So my pies are about 5 inches in diameter.''
``What do you mean by `in this case'?'' Alice further inquired.
``Exactly that,'' said the Pig. ``What makes the punit such a wonderful unit of measurement is that it changes. Punits for pies may be different from punits for the height of ice cream cones or the shortest distance across a mud puddle. It's the most natural thing in the world to want to refer to completely different lengths as being one punit.''
``If you say so,'' conceded Alice. It sounded horribly confusing to her, but she didn't want to argue with the Pig when he was being so illogical.
``Oh, you'll be glad we're dealing with punits soon,'' the Pig said. ``It's much easier to do arithmetic on punits than messier arbitrary units. My pies have a diameter of 2 punits, and the radius is half the diameter. So each of my pies has a radius of 1 punit. Try that with your inches.''
``I guess you're right,'' Alice said, thinking it best to agree.
``Of course I am,'' said the Pig. ``Now, what's the circumference of this pie?'' he asked. ``That is, what is the distance around the outer crust? I mean, how does the distance around the crust compare to the distance of the diameter?''
Alice stared at the pie. ``It's certainly more than twice the diameter. Though I wouldn't think it's more than four times the diameter.''
``It isn't,'' the Pig confirmed. He took out a piece of string. ``I can make a square with this string around the pie, so that the pie is just touching the square on the center of each side. The length of each of these sides is 2 punits, the same as the diameter. And there are four of them for a perimeter  that's what we call the circumference of things which aren't round  of 8 punits. And that's larger than the perimeter of the circle.
``I know!'' interrupted Alice excitedly. ``We can wrap the string tightly around the pie and mark the length of the circumference. Then we can straighten out the string and measure it against your ruler.''
``Wonderful!'' the Yellow Pig exclaimed.
And that's just what Alice proceeded to do. She held up the string to the ruler. ``It's a little over 6 punits,'' she announced triumphantly.
``That's not precise enough,'' said the Pig. ``Fortunately, I have a very special magnifying ruler and calculator. It will show quartermarkings and thirdmarkings and so on. Why, it will divide your punit into hundreds and thousands and even quintillions of equal parts if you want. It does lots of other things too.'' He typed the number 3 on the small keypad on one end of the ruler, and thirdmarkings appeared on the punit.
``The string doesn't reach the first mark, so it's less than 6 ^{1}/_{3} punits,'' the Pig explained. He set the magical ruler to 4.
``It goes beyond the first marking. So it's more than 6 ^{1}/_{4} punits,'' said Alice. ``More than 6 ^{1}/_{4} and less than 6 ^{1}/_{3}. How about tenths?'' The Pig showed her how to reset the ruler, and they saw that it was less than 6 [3/ 10].
``[3/ 10] is less than ^{1}/_{3},'' said the Pig. ``Which means we have lowered our upper bound for the length of the string. This ruler has a special button to compare two numbers. It turns the fractions into decimals and then displays them in order from smallest to largest.''
``Neat,'' said Alice. ``You said I could break up a punit into as many pieces as I wish?'' The Pig nodded. ``What about 100 pieces?'' she asked, and he punched in 100.
``Oh my, that's hard to count,'' Alice exclaimed.
``You don't need to count it,'' the Pig said. ``I told you it was a very special ruler.'' He showed her a button on the ruler to display the number of the marking just to the left of the string and the number just to the right of it.'' Alice looked on amazedly. ``Oh, that doesn't work with every piece of string,'' explained the Pig. ``This is a magnetized string for use with this ruler.'' The ruler's LCD screen displayed 28 and 29.
``That means the length of the string, and therefore the circumference of the pie is between 6 [28/ 100] and 6 [29/ 100]. Or between 6.28 and 6.29,'' said Alice, pleased to show off her knowledge of fractions and decimals.
``Righto,'' said the Pig. ``You can set the ruler to thousandths to find the next decimal place.'' He did so and announced, ``The circumference of the pie is just over 6.283 punits.''
He and Alice worked out a few more decimal places. But each time Alice told the Pig a new number, he shook his head, which looked sort of funny because it made his ears, which were floppy again, swing back and forth, and said ``That's not precise enough.''
Alice was starting to get frustrated. ``If your ruler is so advanced,'' she asked, ``why does it take so long to measure the string?''
``That's an excellent question,'' said the Pig. ``It actually can determine the length itself, but not as precisely as I would like.''
``Well, I'm not going to measure it anymore,'' said Alice defiantly. ``It's one of those tricky irrational numbers and I'll never be able to tell you the exact length.''
The Pig smiled. ``You're right of course. The roundness of the pie makes the length of the string an irrational number. You can stop measuring it now. But you are also wrong. I can tell you the exact length of the string.''
``How?'' Alice asked.
``The same way we dealt with the diagonal of a square. We can't write out that length as a decimal, but we know it is ÷2.''
``You mean, this 6.283 ... number is the square root of some whole number?'' Alice asked.
``Unfortunately not,'' the Pig explained. ``If you square it, or cube it, or raise it to any power, it's still not going to equal any normal fraction. This number is different from ÷2 in that it is not the solution to a regular polynomial equation. We say it is a transcendental number.''
``Transcendental?'' repeated Alice. ``That makes it sound all mythical or something.''
``Well, it is in some ways. It's certainly mysterious. Actually, if you take our number and divide it by 2, you find a very special number: 3.14159 ... . This number is mysterious because it shows up all over the place in mathematics, especially with circles. It shows up so often that it has its own name. And that's how I can tell you the exact length of the circumference. Just as the punit is a sort of made up unit for convenience, so is this one. Mathematicians call this number pi after pies like my own of course. They write p, which is a Greek letter. So the circumference of the pie is 2p,'' the Pig concluded simply.
``That's it?'' Alice asked. ``You expect me to be satisfied that we know the distance of the circumference of the pie just because we've given it some funny Greek name? That's a bunch of hogwash. No offense.''
``None taken. It would be more accurate to call it a bunch of mathwash. You see, mathematicians are often much more concerned with concepts than with numbers. It's enough that they are able to communicate a complicated idea with a little symbol. Just like our punit. We used punits to simplify a problem and communicate.''
``I guess that is sort of convenient,'' Alice agreed.
``Now that we've solved that problem, let us eat pie!'' squealed the Pig in delight. And he set out to cut the pie into two equal pieces.
The pie was rich and moist, and it was so very small that they soon had finished off every last crumb. Alice was about to ask the Pig to get out another of his yummy pies, when he asked, ``What is the pie's area?''
By this point Alice was not at all surprised that the Yellow Pig had another riddle for her. He was full of questions. She thought for a moment. ``The pie fit inside that string square we made earlier. And the square has an area of 2^{2} or 4 punits, so the area of the pie is less than 4 punits.''
``That it is,'' agreed the Pig. ``And I can tell you how much less than 4 punits. The area of the pie is precisely p square punits!''
``p punits?'' Alice asked. ``How can that be?''
``That's p square punits. The square part is because we are talking about area. And I'll show you,'' the Pig said, taking out another pie. ``I'm going to cut this pie into very small pie wedges.'' And he cut and he cut until the pie was in dozens of ittybitty pieces. ``Now, I'm going to put all of the pieces back together into what is almost a rectangle. Because we know how to calculate the area of a rectangle.''
``The area of a rectangle is length times width,'' Alice interjected.
``Yuperdoodle. Now here's how I make a rectangle out of our circle.'' Alice watched. The pieces were very nearly triangles, with two of their sides the same length. He took two slices and put them touching so that the sharp point of one was next to the crust of the other. He did this again for each pair of slices, and then he put all of the pieces together in that same way. ``Tada!'' he exclaimed. Sure enough he had made a rather long strip of the curved triangles that looked a little like a rectangle.
The Pig didn't seem to understand her comment. ``It's not a perfect rectangle,'' he explained, ``but that's only because I didn't cut small enough pieces. If I had cut each of these pieces in half, the curves would be less noticeable. And if I had cut each of those pieces in half, you would hardly see the curving at all. And so on and so on. In fact, if I had cut an infinite number of pieces, more than you could ever count, they would be infinitely thin, so small that you couldn't even make out the crust. And then I would have a perfect rectangle.''
``I think I understand,'' said Alice, though she was not entirely sure that she did. There was a limit to the amount of the Pig's logic that she could take at one time.
``But anyway,'' said the Pig, ``let's just pretend or suppose, as mathematicians like to say, that we have a rectangle. What's the length of a rectangle?'' He paused. ``Well, what was the length or circumference of a circle?''
``2p times the radius punits,'' supplied Alice.
``Correct. Mathematicians call the radius r and say 2pr punits. The circumference, or crust of the pie, borders the two long sides of our rectangle, half on each side. So the length of the rectangle is half the circumference of the pie, or pr punits. Since the radius of our pie is 1 punit, that's exactly p punits. Now what's the width of the rectangle?''
Alice studied the rectangle closely. Finally she saw the answer. ``It's the radius of our pie. Because the distance from the crust to the center of the pie is the radius. And all those sharp points on the slices are what was the center of the pie.''
The Pig beamed. ``Exactly right, Alice! So the area of the rectangle, which is the same as the area of the pie when it was in the shape of a circle, is the length p·r times the width r punits. That's p·r ·r punits or p·r^{2} punits. So the area of a pie is always pr^{2}. That means the area of our pie with radius 1 punit is p punits. That's how much pie we've eaten. Well, not really, but let's eat another pie before I explain.''
Alice was confused, but hungry, so she didn't question the Pig and his tricks. The two ate the second pie quietly. When they finished, the Pig continued, ``We calculated the area of the pie, which is like knowing what size plate we would need to put the pie on or how much frosting we would need to put a thin layer across the top. We could even calculate how much frosting we would need for the sides because we know the circumference. But the area we have is not quite what we want to know, because area is only twodimensional. We want something threedimensional. We want to know the volume of our cylindrical pie. A cylinder is a circle with height. Mathematicians use the letter h to represent height.''
``They aren't very original,'' interjected Alice.
``I suppose not,'' agreed the Pig. ``If we multiply area by the height, we get the general formula for the volume of a cylinder: pr^{2}h. The height of my pie is ^{1}/_{2} punit, so the volume of the pie is p·1^{2} ·^{1}/_{2} = [(p)/ 2] cubic punits. That's the volume of one of my pies. Do you want more pie?'' he asked. Alice said she did, and the Pig took out the third pie. After they had finished that pie, they decided to go outside and lie in the sun while they digested their sugary meals.
Outside, the Pig helped Alice climb up onto the big rock, where they then lay resting for a few moments. The Pig took out his notebook and began to write again.
Alice, afraid of interrupting him, finally peered over at his notebook. He had written:

``Egads!'' she thought. ``What a horribly long fraction. It looks as though it will never end,'' she said to the Pig. ``It's like those irrational numbers, going on and on forever.''
``Yes, it is in some ways,'' said the Pig. ``But not all fractions that go on and on are irrational. It's the same with decimals. For instance, 0.33333 ... is a repeating decimal that is rational. It is equal to ^{1}/_{3}. Even though it is endless, it is regular. Decimals with more complicated patterns are rational too, like 0.248248248248 .... My fraction does go on forever, but I won't write it forever because there's a pattern. Do you see the pattern?'' he asked Alice.
She thought about it for a moment and the Pig offered her his notebook and pencil. ``Well, between every fraction bar is something plus one over something. And there are an awful lot of 1's. The first number is a 2 and then there are larger even numbers and the 1's. It goes 1, 2, 1, 1, 4, 1, 1, 6, ... . Two 1's and then the next even number. So I would guess that the next three terms are 1, 1, and 8.''
``Absolutely correct,'' the Pig said. ``I can stop writing out the fraction now that you understand it. Do you want to know what this fraction looks like as a decimal?''
``Yes,'' said Alice. ``It must be awfully strange. How can we calculate it when the fraction never ends?''
``We can approximate it, just as we did with p.'' explained the Pig. ``We'll compute the values of parts of the fraction and see what they look like.''
``But how can we calculate even the part of the fraction that you wrote?'' asked Alice, more than slightly daunted by the large fraction looming before her and the Pig.
``There's no reason to be intimidated by that fraction,'' said the Pig, ``but we can start out by calculating a smaller fraction, such as 2+[1/( 1+1)]. That's the beginning of our continuous fraction. We start from the bottom of that, and work our way up and to the left. So, 2+[1/( 1+1)] = 2+^{1}/_{2}. We can simplify that to the single fraction ^{5}/_{2}, which is equal to 2.5. Do you understand?''
``I do,'' said Alice, ``but that was a pretty short fraction.''
``Are you ready for something longer?'' asked the Pig. Alice nodded. ``How about this one?'' He wrote:

``Now that looks a lot harder,'' said Alice.
``It isn't really harder,'' said the Pig, ``but I guess it does look more complicated. Just remember that we need to work our way up from the bottom of the fraction, simplifying it in several steps. What's at the very bottom?''
``The fraction ends with 2+1,'' answered Alice.
``Right. So our fraction is the same as 2+[1/( 1+1/3)]. Next we consider the 1+^{1}/_{3} part. That's ^{4}/_{3}.''
``I see,'' said Alice. ``The fraction is 2+[1/( 4/3)]. Now what?''
``Do you know what [1/( 4/3)] is?'' Alice looked puzzled. The Pig continued, ``That's 1 ½^{4}/_{3}. Dividing by a fraction is the same as multiplying by its inverse. The means we flip the ^{4}/_{3} to get 1 ·^{3}/_{4}. And that's just ^{3}/_{4}, so our fraction is 2 + ^{3}/_{4}, or [11/ 4]. Written as a decimal that is 2.75. That wasn't so bad, was it?''
Alice agreed that it wasn't. ``Good,'' said the Pig, ``because I have a longer fraction for you to simplify.'' He wrote:

``Oh my,'' said Alice.
``Just start at the bottom,'' advised the Pig, handing Alice his pencil.
Slowly, Alice added together fractions:

She paused. ``Try flipping the fraction,'' the Pig suggested.

``Whew,'' said Alice, letting out her breath. ``What is that as a decimal?''
The Pig reached for his calculator. ``It's about 2.714. You did an excellent job with that fraction, by the way. Since it would take an awfully long time to simplify the whole fraction I wrote before and even longer to simplify that fraction with the new terms you suggested, I'll work those out on my calculator.'' He rapidly punched buttons for a minute or two and then announced his results: ``[1257/ 463] or about 2.7149 and [23225/ 8544] or 2.718281835.''
``Those numbers are awfully similar,'' observed Alice. ``They look like they are approximating another special endless number. Is there a name for this number?'' she inquired.
``As a matter of fact, there is,'' the Pig replied. ``The number 2.718281828 ... is called e. It was named after Leonhard Euler, a famous mathematician.''
``Oiler?'' repeated Alice.
``Yup,'' said the Pig. ``We'll come across more of his math later. But back to e. It's extremely important in calculus for limits and for computing continuously compounded interest.'' The Pig could see that he was losing Alice again. ``We can derive e as a limit in another way,'' he said, writing:

``That looks like some horrible mathematical expression,'' said Alice. ``How am I ever going to understand that?''
``It's not as bad as it looks. Just ignore the `lim' part and think of it as the value of (1+^{1}/_{n})^{n} for a really large integer n. Let's try some computations with different values of n,'' said the Pig. And so they did:

``Why, it is that very same number,'' Alice exclaimed. ``How does that number keep showing up? Just like p did!''
``Both numbers are very important in different branches of mathematics: p is in some sense a basis of geometry and e is a basis of calculus, which is the study of limits. Limits are pretty neat.
``Here's an old riddle known as Zeno's paradox. Let's say I'm running from here to that tree,'' said the Pig, pointing at a tree in the distance. ``I can run very quickly and accurately. So in the first second, I run half the distance to that tree. Then, in the second instant, I run half the remaining distance, or onefourth of the original distance. At the third moment, I run half of the now remaining distance which is only oneeighth the original distance. I continue doing this advancing [1/ 16], [1/ 32], and [1/ 64] of the total distance in the next three steps. Each time I go half the distance that I had gone the time before. Mathematicians say that on the nth turn, I will have (^{1}/_{2})^{n} of the total distance left. The paradox is that I will never reach the tree. I can keep taking steps forever, but they are so small that I will never get to the tree.''
Alice thought about the paradox. In order to get to the tree, first the Pig would need to get halfway to the tree. After he got halfway to the tree, he would have to cover half of the distance remaining between him and the tree. And after that, the Pig would have to traverse half the still remaining distance. It seemed that he would never reach the tree, but Alice knew that in reality the Pig could get to any tree that he wanted to. ``How odd,'' she exclaimed.
The Pig continued, ``The total distance that I have covered is the sum of all the individual distances. Mathematicians like talking about sums. They like talking about sums so much that they have a special notation for dealing with endless sums. Instead of writing ^{1}/_{2} + ^{1}/_{4} + ^{1}/_{8} + [1/ 16] + º+(^{1}/_{n})^{2} + º, mathematicians use the Greek letter Sigma, written S.''
``Sigma?'' Alice repeated. ``Like that guy Sigma Freud?''
``No,'' said the Pig patiently. ``That's different. This S is just a letter to the Greeks, as is p. And mathematicians love to use Greek letters. They like writing confusing things like this:

``The limit that I wrote before reads `the limit as n approaches infinity ...'. Similarly, we read this as `the sum where n goes from 1 to infinity... .'
``Now, if we add up all of those numbers, we'll find that we get really close but don't quite reach 1. That's the paradox. Mathematicians go even further and talk about an infinite number of steps and limits and the sequence created by partial sums as converging to 1. They say things like series and least upper bound and Cauchy. Sometimes they even say sequentially compact, totally bounded, and clopen. Something is clopen if it is closed and open at the same time. Isn't that silly?'' asked the Pig.
Alice agreed that it was very silly. It didn't make much sense for something to be both open and closed. She was still trying to digest what the Pig had told her, that ^{1}/_{2}+^{1}/_{4}+^{1}/_{8}+[1/ 16]+º was 1. She thought maybe the sum would be less than 1 because the terms were so small, but then she thought it would be greater than 1 because there were infinitely many terms. Neither was true; the Pig said that the infinite sum was exactly 1. It sort of made sense. She could see by adding the first few terms together that the sum was close to 1. Adding more terms didn't make too much difference because each term was smaller than the one before it.
The Pig continued, ``Here's another sequence 1, ^{1}/_{2}, ^{1}/_{3}, ^{1}/_{4}, ^{1}/_{5}, ^{1}/_{6}, º. It's formed by the numbers ^{1}/_{n} as n goes from 1 to infinity. Now, let's look at the sum of all those terms. How would you write that sum using sigma?''
Alice looked at what the Pig had written before and wrote:

``Correctomundo. Now, what do you think this sum is equal to?'' he asked.
``Something not too large, I would guess. The terms are all getting smaller and smaller.'' The Pig didn't say anything. Alice thought about it more. ``Wait, it would have to be larger than 1 because our old sum is contained in this sum.'' Now the Pig nodded.
``Watch this,'' he said, and he proceeded to write out the sum, grouping some of the terms with parentheses.

``I've put only ^{1}/_{2} in the first set of parentheses,'' the Pig explained. ``The next set of parentheses contains the numbers up to ^{1}/_{4}, our next power of 2. What I'm going to do is add up the groups of numbers within the parentheses. Then I will have infinitely many partial sums to add together. Look at the (^{1}/_{3}+^{1}/_{4}) part. Instead of adding those two fractions together, I am going to approximate them with something that I know is less than their sum. Listen carefully: ^{1}/_{3} is greater than ^{1}/_{4} and ^{1}/_{4}+^{1}/_{4} = ^{1}/_{2}, so we know that ^{1}/_{3}+^{1}/_{4} > ^{1}/_{2}. The next partial sum we have is ^{1}/_{5}+^{1}/_{6}+^{1}/_{7}+^{1}/_{8}. There are four numbers and they are all at least as big as ^{1}/_{8}. That means there sum is greater than 4 ·^{1}/_{8} or ^{1}/_{2}. We can do the same thing again for ^{1}/_{9}+ º+[1/ 16]. There are eight numbers, each at least [1/ 16] in value for a total that is bigger than 8 ·[1/ 16] or ^{1}/_{2} again. Each minisum grouped by parentheses represents a number that is greater than or equal to ^{1}/_{2}. So the sum of the part that I have written out is larger than 2.''
He continued, ``What is really neat is that there are infinitely many such partial sums. I can always group together subsequences that add up to values of at least ^{1}/_{2}. And since there are infinitely many such subsequences, the total sum will not stop at one number like our last series did. Since these partial sums are not getting smaller, the total sum will always get larger. Mathematicians say that this sequence, known as the harmonic series, diverges. Unlike the sum from Zeno's paradox which converged at 1, this one doesn't converge to any value. When you add more terms to the sum, it will always get larger. So you see, these two sums are fundamentally different.''
Alice was quite impressed with the Pig's little proof. ``So the first sum never actually equals 1, does it?'' she asked.
``That's right,'' confirmed the Pig, ``but it converges to 1. It's like Euler's limit (1+^{1}/_{n})^{n} thing. It keeps getting closer and closer to e. That's one way we can deal with irrational numbers. They are just limits. We can't write out an exact decimal representation, but we know what the number is approaching. All this talk about limits is making me thirsty,'' he said abruptly. And he picked up his notebook and pencil, and the two went back inside.
Inside, the Pig offered drinks. Alice had grape juice, and the Pig had orange. The Pig picked up his glasses and a deep blue cape which he wrapped over his shoulders. ``Shall we go into the heart of the garden?'' he asked. ``It's a most beautiful place.''
Alice, delighted by the scenery so far, was eager to see the garden. So the two of them set off back down the path toward the garden. On the way, the Pig told Alice of another irrational number. It was, the Pig told her, not a transcendental number, but an algebraic one because it was the solution to a polynomial, not polymer, equation.
The Pig began, ``My most favorite irrational number is often represented by another Greek letter, the letter f (phi). It is also known by a bunch of different names including the golden mean and the golden ratio. It's another of those infinitely many numbers that cannot be expressed as the ratio of two whole numbers, but like ÷2, p, and e, it's another very useful number. The value of f is [(÷5+1)/ 2]. That's the solution to the polynomial equation x^{2}x1 = 0. It is approximately equal to 1.61803398875 ... .
``The number f has lots of exciting algebraic properties. For example, I'll bet you would be surprised if you calculated the value of f^{2} or [1/( f)].'' Alice made a note to try those two calculations sometime. ``The number f also shows up in geometry. Take a look at this star,'' the Pig said, stopping for a moment to draw a five pointed star in his notebook. ``This pentagram was the sign of Pythagorean brotherhood.''
He continued, ``For some reason, this ratio is just a wonderfully pleasing proportion to see, especially in art and architecture. The Greeks used the value of f in designing the Parthenon. The divine ratio shows up in the art of the Renaissance. What I find impressive about f, is how frequently it occurs in art and nature. But,'' said the Pig, ``I won't tell you about that yet. Instead, I will let my garden show you.'' The trees were becoming less dense again, so Alice figured they were near the garden.
``Your garden knows about this number?'' Alice asked. ``How can that be?''
``That's the mystery,'' the Pig said. ``Nature, artists, and mathematics. All are founded on beauty. And f is the most beautiful number there is. Except for maybe 17, of course.''
``Of course,'' agreed Alice, since 17 seemed so important to the Pig.
``We're almost at the golden garden,'' said the Pig. ``But first, I want to tell you about another sequence of numbers, known as the Fibonacci sequence. The numbers in this sequence start with 1 and 1. Successive numbers can be found by adding the previous two numbers. So the next number is 1+1=2. The number after that is 1+2=3.'' He continued generating a list in his notebook:

He motioned for Alice to sit down on the grass. She did so and he stood next to her. ``So the Fibonacci sequence begins 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89,'' explained the Pig. ``What's the next number?''
``The next number would be the sum of 55 and 89,'' said Alice, ``which is 144.''
``Right. The Fibonacci sequence is a neat sequence. Like our special irrational numbers, it shows up all over the place. As an example, let me explain to you the White Rabbit problem.''
``The White Rabbit problem?'' asked Alice. ``I had a dream about a white rabbit with a problem once. He was always late.''
``Well, this problem doesn't have to do with being late, but it does have to do with time and an awful lot of rabbits. Suppose at the beginning of the year there is 1 white rabbit couple, one boy and one girl. At the end of the January, they give birth to a boy bunny and a girl bunny. There are now 2 rabbit couples. At the end of February, the younger couple isn't old enough to have bunnies yet, but the original pair has another set of twins, another couple. Now there are 3 sets of rabbits. At the end of March, the first couple has two more babies. Additionally, the next couple is now two months old which is old enough for bunny reproduction. So that couple has two bunny babies as well, for a total of 5 couples of March hares. Each rabbit couple gives birth to a boy bunny and a girl bunny every month. At the end of April, there are three sets of rabbits to have bunnies, and they bring three new bunny pairs into the world. Now there are 8 pairs of rabbits. By the end of May, all except the three new pairs of rabbits can have babies and they give birth to one pair each of course. That's five new rabbits so there are 13 rabbit pairs altogether. Things get very hairy very quickly. At the end of June there are 21 pairs of rabbits. How many pairs of rabbits are there at the end of the year if the rabbits keep reproducing in the same way?''
``The Fibonacci sequence grows fairly quickly. What is neat about it is the rate at which it grows. Let's look at fractions formed by successive Fibonacci numbers,'' the Pig said, writing:

He gave Alice his calculator. ``Here, compute the decimal values for these fractions.'' She did and wrote them into his notebook so that it read:

``I get it,'' said Alice. ``Those fractions are getting closer and closer to each other. They look like they are ... what's that word? ... converging to a number. And they look as though they are converging to your special number f.''
``That they are,'' the Pig said. ``The golden ratio and the Fibonacci numbers are closely tied together. And now that you know that, I think you are ready to fully appreciate my garden. I worked in this garden for many summers as a younger pig,'' he told Alice.
About thirty feet in front of them was a large, wellsculptured hedge which seemed to surround the garden. The Pig led Alice around the side toward a wroughtiron arched gate. The gate had a complicated combination lock on it. ``This is to keep uninvited people out of the garden,'' he explained. ``The combination is 112358. You are welcome any time.''
The gate to the garden opened, and the Pig ushered Alice inside. None of the incredible things Alice had seen and experienced that day compared to the golden garden. ``You should feel very honored that you have been allowed into this garden,'' the Pig told her, and she did feel very special to know that the Pig was sharing something this wonderful with her. The garden was like another world. Alice didn't see anyone else in the garden, though it would not have surprised her if there were several other pigs romping about or perhaps an extended family of bunnies frolicking in some shrubbery. The garden was positively teeming with life. It was sunny, but there was no bright sun overhead. Instead, the light seemed to be coming from within the garden in almost the same sort of way that light reflects off freshly fallen snow. The garden was its own world, and Alice found it hard to remember that there was anything outside the garden. She could feel the energy in the air.
Alice looked up and was astonished by the glorious sight of the sky, which was almost dripping in light. Instead of being the usual blue or gray, it was swirled with tints of colors that were just slightly brighter than pastels. Pinks and purples spun around one another. Blues and greens filled in their gaps, and bits of yellows and oranges shone through, all somehow twinkling as if, instead of having clouds, someone had sprinkled iridescent glitter all over the sky. Parts of the sky seemed to be winking at her, somehow inducting her into this awesome world with a private display of beauty.
``It's  it's wonderful,'' Alice whispered breathlessly. The Pig reached over and held her hand in his hoof.
``Watch as the colors change,'' he said. ``They change slowly enough so that you cannot tell where one color ends and another begins. Yet they fade into one another in swirling spirals that are almost dizzying.'' Sure enough, the colors began to move inward so that what was once blue had become purple and the greens had been replaced by the blue. When Alice thought they could wind themselves no tighter, the colors began to move back, expanding until Alice was certain that the outer pinks had escaped the garden entirely. The sky was like a blazing fire, only much more soothing. The air was cool.
Alice somehow managed to turn her attention away from the mesmerizing sky. In the center of the garden was a circular fountain. Spiraling out around it were dozens of different types of flowers, all growing in perfect health. ``Everything in this garden is beautiful,'' said the Pig. ``This garden has no place for ugly mathematics.
``I'll take you around the outer path, on what I like to call the Fibonacci tour,'' he said. ``We'll start with threes and fives. Lilies, irises, and trilliums are all flowers with three petals,'' he said, pointing them out as they walked around the garden's perimeter. ``Columbines, buttercups, hibiscuses, and larkspurs have five petals on their flowers.'' They stopped in front of a large red and white rosebush. ``Wild roses also have petals in multiples of five. Three and five makes eight, another Fibonacci number. Delphiniums and bloodroot have eightpetaled flowers. Over here we have corn marigolds which have thirteen petals.''
``The Fibonacci numbers run this garden, don't they?'' Alice said questioningly.
``You could say that,'' responded the Pig. ``Or maybe the garden runs the Fibonacci numbers. Personally, I think it more likely that they share a common sense of aesthetics.'' The Pig continued his tour. ``Asters have 21 petal parts. They aren't really petals, you see. And daisies behave as if they know of even larger Fibonacci numbers. Their parts frequently occur in 34's and 55's.''
Alice was completely in awe of the garden. She was impressed by the mathematics that the Pig was sharing with her, but even more so she was overwhelmed by the beautiful flowers. It was an ideal garden for a tea party. Her teddy bear! Why, she had almost forgotten. She wondered where he had gone off to.
``Fibonacci numbers don't stop at the flowers, though,'' continued her guide. ``They apply to all parts of the plant, including stems and leaves.'' He picked off a branch from a small pear tree. ``Look at the bottommost leaf. The next highest one is not directly above it, but a slight twist away. Then there is another about the same distance up and the same distance around the stem. Let's keep going until we get to a leaf that is in the same position as the first leaf.'' He counted the leaves aloud to Alice. ``One ... two ... three ... four ... five ... six ... seven ... eight.''
``I can't explain it entirely,'' said the Pig. ``It's just one of those mysterious things about nature. The term for the leaf arrangement that we have been studying is the phyllotactic ratio. My guess is that the plant has evolved to make use of the most effective way for its leaves to get sunlight without blocking each other. The plant doesn't actually know about Fibonacci numbers; it is just that having a Fibonacci number of leaves is optimal. We can learn a lot from nature if we study it. We can learn a lot from numbers if we study them too.''
The Yellow Pig led Alice down a path that shone gold from fallen pine needles. The air smelled strongly of pine sap, and Alice caught the occasional whiff of perfume from the surrounding flowers. The Pig picked up a pine cone. ``Pine cones also have Fibonacci numbers nested in their spirals. ``There are two sets of spirals in the pine cones. There are the ones that go out clockwise and the ones that go out counterclockwise. Both of these have spirals with different, successive Fibonacci numbers. Different pine cones may have different Fibonacci numbers depending on the tightness of the spiral.'' The Pig carefully labeled the pine cone so Alice could see for herself. ``Again, they do that because at the top of the pine cone, their kernels are so tightly packed together. When it unwraps around itself, that's just how it ends up.'' Alice looked at the pine cone.
``Golden mean, golden ratio, golden angle. I see why you call this the golden garden,'' said Alice. ``Everything is golden. It's amazing.''
``Sometimes I sit in this garden for hours working on mathematics or just staring at the flowers,'' the Pig confided. ``I like to sit over there under the golden tree. It gives me inspiration. When I was younger, my friends and I would camp out under the tree, staying awake talking until dawn. I'm just an amateur mathematician, but some of my friends are quite accomplished now.'' He paused. ``Would you like to meet a few of them?'' he asked Alice. ``Two of them live nearby.'' Alice, curious to meet other residents of this magical world, said she would, and hesitantly the Pig and Alice exited from the garden to which Alice knew she would one day return.
Alice and the Pig walked across a small meadow. ``Thank you for showing me the garden,'' Alice said to the Yellow Pig. ``It's one of the most beautiful things I have ever seen.''
``You're welcome,'' said the Pig. ``I'm glad you liked it. My mathematician friends live right over here. They are named Isabel and Gus the Rascal.'' They approached a door to a cabin that looked much like the Pig's from the outside, only it was considerably larger. The Pig knocked twice.
A lamb answered the door. She was wearing two pieces of jewelry around her neck: a cross and a triangle. ``How nice to see you,'' she addressed the Yellow Pig.
``It has been a long time since I have seen you and Gus. And I was just over in the garden, and I thought I would stop by. I have a friend that I would like to introduce to you. Isabel, meet Alice. Alice, this is Isabel.''
``Hello,'' said Alice shyly. Isabel shook her hand warmly. Alice found shaking hands with a lamb funny, but didn't want to laugh. She looked at her jewelry instead.
``I'm afraid Gus is out,'' Isabel told the Pig, ``but he will be back shortly.'' She turned to Alice. ``Would you like to know why I am wearing a triangle?'' Alice nodded. ``Let's go into the living room where we can sit down. Would either of you care for drinks?'' The Pig asked for two glasses of water. Isabel disappeared momentarily into the kitchen and returned with them.
``Isabel, can I look through your books?'' asked the Pig.
``Certainly,'' said Isabel. ``You know where my study is.'' The Pig left the room.
``Now,'' said Isabel, ``I will tell you about this triangle. It's a very special triangle.'' She produced some pencils and a stack of paper. ``It all starts with 1,'' she said, writing the number 1 centered at the top of the paper. ``That's the top row of the triangle. The next row contains just two 1's.'' These she wrote as well. ``Now you can continue filling in the triangle, if I tell you the rule.''
``What's the rule?'' asked Alice.
``Each row starts and ends with a 1,'' said Isabel. ``Each number in the triangle is the sum of the two staggered numbers in the row just above it. So the next row starts with a 1, ends with a 1, and has a 2 in the middle because 1+1 = 2. The row after that starts and ends with a 1, and has two 3's in between. That's because 1+2 = 2+1 = 3.'' She wrote:
Alice thought about her question. It started and ended with a 1. That left three other numbers of fill in. The first one was between the 1 and the 3, so that was 4. The second was sandwiched between two 3's, so it was 6. And the third one was between a 3 and a 1, so it was 4 again. Alice recited, ``1, 4, 6, 4, 1. Are they always the same forwards and backwards?''
``Why yes,'' said Isabel, almost surprised. ``That's a good observation. The numbers in my triangle are symmetric. Because it starts with symmetry, it must always preserve that symmetry. The next row, for instance, is 1, 5, 10, 10, 5, 1.''
``And the one after that,'' said Alice, giving the matter some thought, ``must be 1, 6, 15, 20, 15, 6, 1.''
``Exactly,'' said Isabel. I'll write out a bunch of the triangle.
``They do,'' said Isabel.
``It would take a long time to find a certain number, like the seventh number in the seventeenth row.''
``Yes,'' Isabel said, ``if you had to write out the whole triangle. Fortunately, you don't have to. There's a complicated formula to find a number in the triangle. It's used in probability.''
``Neat,'' said Alice. ``That formula must save a lot of time.''
``It does,'' said Isabel. ``But I like drawing out the whole triangle because it has such neat patterns. Look at the diagonal columns, if you can call them that. The first and last column are all 1's. The second and next to last column are just the counting numbers in order. The next row is one that you should ask Gus about when he returns. It contains the triangular numbers.''
``Triangular numbers?'' repeated Alice. ``But isn't this whole thing a triangle?''
``It is,'' said Isabel. ``But look at that sequence of numbers: 1, 3, 6, 10, 15, 21, 28, 36, 45. It starts with 1 of course. Then 1+2 = 3. And 1+2+3 = 6, 1+2+3+4 = 10, 1+2+3+4+5 = 15, 1+2+3+4+5+6 = 21, and 1+2+3+4+5+6+7 = 28. Think about arranging coins with those numbers. One coin in the first row, two in the second, three in the third, and so on. The arrangement of coins looks like a triangle, just as the arrangement of coins in a square would give you the square numbers.''
``Most definitely,'' Isabel said. ``Take the sum of each row.''
Alice began taking sums. The first row was just one. That didn't really count. The second row was 1+1 = 2. The third row was 1+2+1 = 4. The fourth row was 1+3+3+1 = 8. The next row was 1+4+6+4+1 = 16. The numbers were getting harder to calculate, so Isabel wrote them out for Alice.
``Each sum is twice the sum before it,'' said Alice. ``Those are the powers of 2.''
``Yup,'' said Isabel. ``That's why the triangle works out so well for probability. There's another set of incredible numbers in the triangle. Do you know the Fibonacci numbers?'' she asked.
``I do,'' said Alice. ``The Pig just taught them to me. They are 1, 1, 2, 3, 5, 8, 13 ... . Each number is created by the sum of the previous two. Don't tell me they are in your triangle too?''
``They are,'' said the lamb. You just have to add up the numbers along some specific diagonals. It's hard to visualize the diagonals, so I'll draw you a picture.''

Alice computed the sums out loud. ``The fourth sum is 2+1. That's 3. The fifth sum is 1+3+1 which is 5. Then 3+4+1 = 8. The next one is 1+6+5+1 which is 13. Then comes 4+10+6+1 or 21. After that should be 34. 1+10+15+7+1 is 34. And 5+20+21+8+1 is 55, and the Fibonacci number after 21 and 34 is 21+34 or 55. The last one should be 55+34 = 89. Let's see, 1+15+35 is 51 and 51+28+9+1 is 89. So they are the Fibonacci numbers: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89.'' Alice was now even more impressed by Fibonacci numbers and Isabel's triangle.
``Amazing, isn't it?'' said Isabel. ``It's such a simple triangle of sums, and yet it has so many special number sequences.''
``Hello,'' called out a voice.
``Oh, good,'' said Isabel. ``Gus is home.'' She called out, ``We're in the living room, Gus. The Yellow Pig brought over a friend.''
A green turtle, standing upright, walked into the room. The Yellow Pig came back. ``Gus, how good to see you.'' They greeted each other enthusiastically. He did the introductions. ``Alice, this is Gus. Gus, this is Alice.''
``How do you do?'' asked Gus.
``Fine,'' said Alice. ``Isabel said I should ask you about the triangular numbers.''
``Ah,'' said Gus. ``Yes, I was quite a rascal in my youth. Why, I was about your age I would imagine.''
``When what?'' asked Alice.
``When I was in a very boring class at school. The teacher loved to give us busy work so we wouldn't bother him. It infuriated me.''
``I'll bet,'' said Alice, who was no fan of busy work herself.
``I didn't like the teacher, and he didn't like me. He would give us long lists of numbers to sum. One day he told us to sum the numbers from one to one hundred.''
``Egads,'' said Alice. ``That's a lot of numbers.''
``It is,'' said Gus. ``And I certainly didn't feel like adding them up. My classmates began diligently summing, but I stared off into space. Suddenly, it came to me. A simple way to add up the numbers.''
``How?'' asked Alice, intrigued.
``I wrote down the numbers 1, 2, 3, 4, 5, 6, ... in a row, but only up to 50. And below them I wrote down the numbers 100, 99, 98, 97, 96, 95, ... . Then I looked at the columns I had created. Each column sums to 101.''
``You're right,'' said Alice. ``How many such sums are there?''
``There are 50 of them. Half of 100 because there are 100 numbers to add up. So the sum is the same as 50 ·101. That's 5050. And that was the answer. If you are adding up the numbers from 1 to n, the sum is just [(n(n+1))/ 2].''
``So what happened?'' Alice asked. ``Did you tell the teacher you had the answer?''
``I did,'' said Gus. ``At first he didn't believe me. How could I have possibly finished the sums so quickly? Everyone else was still adding up the first ten numbers. But finally he looked at my answer, and after I explained how I had gotten it, he conceded that I was right. He also gave me a bunch of math books to read. He turned out to be an okay teacher after all.''
``You made his job fairly difficult,'' interjected the Yellow Pig.
``Well, yes,'' admitted Gus. ``That's how I got the nickname `rascal'.''
``You've done so much math,'' said the Pig. ``Algebra, Diophantine equations, differential geometry, and my favorite, the construction of the regular 17sided polygon. You've done a lot of math, too, Isabel: numbers, cycloids, and all sorts of interesting things.''
Isabel, Gus, and the Pig talked for awhile, catching up on old times. Alice halflistened, and halfstudied the numbers on the triangle that she and Isabel had drawn. Finally, the Pig rose, and they all shook hands.
``It was wonderful meeting you Alice,'' said Isabel.
``You, too,'' Alice said. ``And thank you for your story, Gus.''
They walked Alice and the Pig to the door, welcoming her back any time.
Outside, the Pig said, ``I realized that there's a lot about numbers that I have to tell you.''
``Like what?'' asked Alice.
``Let's find a place where we can talk,'' the Pig said. They walked away from the garden.
``It's hot,'' Alice said.
The Pig led Alice to a gazebo where they could sit in the shade. ``One very important set of numbers is the set of prime numbers,'' he said. ``Prime numbers are natural numbers  remember, they're the counting numbers  with exactly two divisors. The only even prime is 2, being divisible by 1 and itself. The next several primes are 3, 5, 7, 11, 13, and 17.''
``17 again!'' Alice exclaimed. ``It does seem to show up all over the place.''
``That it does. But there are a lot of primes. I'll show you how you can find lots more primes,'' he said, writing the numbers in order from 1 to 100 on 10 lines. ``We are going to strike out all of the numbers which are not primes and circle the numbers which are.''
``1 is a special case; it isn't a prime because it is only divisible by 1, so we'll strike that out. We circle 2 because it is a prime. And we can strike out all multiples of 2. Now we do the same for the next number. We circle 3 and strike out all of its multiples. The next number is 5 which is prime. Again, we circle it and striking out multiples.'' He continued circling and striking out numbers.
``All numbers can be written as the product of primes. If a number is prime, it is already factored into primes. And if it isn't, just start factoring it. If you don't consider the order of the factors, every number has exactly one such factorization,'' the Pig told Alice. ``That's an extremely critical fact in number theory. It is known as the Fundamental Theorem of Arithmetic. It may seem fairly basic, but it's essential for an awful lot of proofs about prime numbers. What do you notice about our primes?'' he asked.
``None of them end in even numbers or 5's. We crossed out a whole bunch of columns in our table. And it seems like there are getting to be fewer and fewer primes as we go along,'' remarked Alice. ``There are a lot more primes less than 50 than there are between 50 and 100.''
``That's very true,'' said the Pig. ``Mathematicians even know approximately how rapidly they are growing apart.''
``Do you know if the prime numbers end? Or are there always more?'' Alice asked.
``There are always more,'' the Pig said in a tone of authority. ``There are infinitely many primes. In fact, Euler came up with one of my favorite proofs of this. Would you like me to demonstrate it for you?''
Alice wasn't sure she would be able to understand it, but the Pig seemed eager to show her, so she agreed.
``First let me state what it is I want to show. I want to show that there are infinitely many primes. Instead of proving this directly, I'll try to prove that there are finitely many primes. When I reach a contradiction, there's my proof. Contradiction is one of the many tricks mathematicians have up their sleeves when they try to prove something. Mathematicians are like magicians that way.''
The Pig waved his hooves extravagantly, as if clearing the air for his proof. ``The proof goes something like this: Suppose there are only finitely many primes. This `suppose' part is important. It means that we just assume the statement is true. Then we'll see what conclusions follow from it and whether or not they make sense. If there are finitely many primes, no matter how many there are, I can write an ordered list that contains them all. Now we name the primes, from smallest to largest, using boring names: p_{1}, p_{2}, p_{3}, ... , all the way up to p_{n}. Then p_{n} is the largest prime on our list; that is, it is the largest prime.
``But,'' he continued. ``The `but' part is the key to contradiction, you see. But,'' he repeated ``I will now construct another prime, which isn't on this list. Let me outline the procedure for generating a new prime. First, I multiply all of the primes on the list together. The resulting number is definitely not prime. It's divisible by every prime. But, what happens when we add 1 to that number? I claim this new number (p_{1} ·º·p_{n})+1 is a prime.''
``How can you be so sure?'' asked Alice. ``You don't even know what those p numbers are.''
``Well, I'll show you. If a number isn't prime, that means it has prime divisors. So, to show that this large number isn't prime, we just have to find one number in our list which divides it. If none of the numbers on our list divide the new number, then it must be prime. It's not too hard to see what happens when I divide this big old (p_{1} ·º·p_{n})+1 by p_{1} and p_{2} and p_{3} and so on. When I divide (p_{1} ·º·p_{n}) by p_{1} I'm going to find that it divides evenly. That's how I constructed my number. But when I divide p_{1} into (p_{1} ·º·p_{n})+1, I'm left with a remainder of 1. That means my conjectured prime is not divisible by p_{1}.''
``That's just one divisor,'' pointed out Alice.
``You're right,'' said the Pig. ``But there's absolutely nothing that makes p_{1} any different from p_{2} or any of those other enumerated primes. By the same reasoning, p_{2} evenly divides (p_{1} ·º·p_{n}), so it can't evenly divide (p_{1} ·º·p_{n})+1. The same is true when I divide by the other primes. The remainder will always be 1. None of the primes in my list are divisors of my new number because that's precisely the way I generated my number. And since we can't factor (p_{1} ·º·p_{n})+1, it follows that it must be prime,'' he concluded.
``At the beginning I said  or supposed  that we had a finite list of all the primes. And now we know that is false. I couldn't have had a finite list of all the prime numbers because I have shown you a prime number that isn't on such a list. And what's even neater is that I can never have a complete finite list of primes. Even if I add my new prime number to the list, I can repeat my algorithm again to create a new prime. No matter how many primes you list, I can always find a prime that isn't on the list. Therefore, there must be infinitely many primes!''
He paused to catch his breath, and Alice had a chance to think about what he had said. ``I'm not sure about all that contradiction stuff, but I see how you got a new prime. It's almost simple, really,'' she said.
``It's one of my favorite proofs because it is so simple. Euler was very clever to come up with it. He designed the bridges here, too. They are near the art gallery, which is one of my favorite places to be. I like it almost as much as the garden. Have you had enough of primes, or shall I tell you more about them?''
``Oh more. They sound interesting,'' said Alice, who was really starting to get interested in all of this math the Pig kept spouting. It was much more fun than math was in her school. She thought that when she returned home, she would have to sit her stuffed animals down and teach them everything she had learned.
The Pig pondered his next topic. ``Another question is how many twin primes there are. Twin primes are two prime numbers whose difference is 2. Like 3 and 5, or 5 and 7, or 11 and 13. Just like the primes, the larger the number, the fewer twin primes you will find. Unlike the question of how many primes there are, the answer is still unknown. A man by the name of Goldbach conjectured that there were an infinite number of twin prime pairs, but no one knows for sure. If you can figure it out, why you'll be famous. There are lots of open problems in mathematics like that. It's very exciting. There was one problem, sort of like the Pythagorean theorem only much more complicated, that was unsolved for hundreds of years before its proof was discovered. There are lots of exciting things like that happening in number theory.
``Prime numbers are the basis of numbers and number theory. Another important concept is that of modular arithmetic.''
``Modular arithmetic?'' repeated Alice. ``What's that?''
``It's a way of adding that only deals with remainders. Maybe the easiest way to explain is to give an example.'' He pointed at his watch. ``When we tell time we often use modular arithmetic. It's 1:00, then 2:00, then 3:00, 4:00, 5:00, 6:00, 7:00, 8:00, 9:00, 10:00, 11:00, and 12:00. And then after that it's 1:00 again and 2:00 again and so on. And 1:00 is really the same as 13:00 and 2:00 is the same as 14:00. We can go around again. Then, 24 hours after 12:00, it will be 12:00 again. And 25 hours after 12:00, it will be 1:00. We don't really care that it's 97 hours later at 1:00 PM on Friday than it was at noon that Monday. We just care that it's 1:00. That means one hour after the most recent noon. And that's a quick example of arithmetic modulo 12, or mod 12 for short,'' the Pig explained. ``If I ask you what time it will be 30 hours from now, I expect an answer between 1 and 12. In other words, I expect you to do the addition and then subtract off the closest lower multiple of 12 to find the remainder when the number is divided by 12.
``Here's a problem for you,'' said the Pig. ``Find the remainder when 30 is divided by 12. We'll call that number Rudolph since you like creative names. Solve for Rudolph the remainder.''
Alice wasn't sure if she understood. She wondered how long it had been since she met the Yellow Pig. She wondered how long it would be until she found her teddy bear. She wondered if it would like some honey. She could try to find some honey for it.
She began uncertainly, ``I subtract 12 from 30. That leaves me 18.''
There was a long pause before the Pig suggested, ``18 is still bigger than 12. Try subtracting 12 again.''
Alice did. ``So 18 minus 12 is 6. Is that the answer? Is Rudolph 6?''
``Rudolph is 6,'' the Pig said. He plunged onward, ``Now instead of 12, let's study a different modulus. Number theorists like to consider prime moduli. Prime numbers are good building blocks in modular arithmetic. With the watch, we considered addition. Now let's look at multiplication in, say, mod 7. Because it's mod 7 and we are interested only in remainders, we just look at the whole numbers from 0 to 6 inclusive. For example, 9 is the same as 2 because 97 = 2. And 6 ·2 isn't 12 as it usually is. Instead, it's 127 or 5. Get it?'' the Pig asked.
Alice began to nod, and then asked, ``What does 17 become in this new system? When we subtract off 7, we are left with 10 which is still too large. So we subtract off 7 again. We just keep subtracting off 7 until the remainder is less than 7. So 17 becomes 1777 = 3.''
``Exactly,'' said the Pig, beaming at Alice. ``Let's look at some powers in mod 7, like squares and cubes and numbers raised to the fourth and fifth. We don't need to think about 1 very much because 1 raised to any power is 1. But what about 2? We see that 2^{1} = 2, and 2^{2} is 2 ·2 which is 4. Next, 2^{3} is 4 ·2 or 8, but our numbering system only goes up to 7. Since 8 is larger than 7, we have to subtract 7 from it to find the remainder. So 2^{3} is 87 or 1 in our system. Actually, we say that 8 is congruent to 1 mod 7. Mathematicians write congruence using an equal sign with an extra line. Like this,'' he said, writing:

``So 2^{4} = 2, because 1 ·2 is 2. And we're in a loop. Again, 2 ·2 = 4, 4 ·2 is 1 again. I'll write out the first six powers of 2 in mod 7: 2, 4, 1, 2, 4, 1. Now you try the powers of 3,'' the Pig instructed.
``The powers of 3 are 3, then 3 ·3 or 9,'' she paused. ``And 9 is larger than 7 so I have to reduce it.'' She frowned.
``Subtract 7 from 9,'' prompted the Yellow Pig.
``So 97 is 2,'' finished Alice. ``The powers of 3 are 3, 2, and then 2 ·3 which is 6. Then 6 ·3 which is 18. That's a lot larger than 7. If I subtract 7, it's 11 which is still larger than 7. So we subtract again: 117 is 4. Then 4 ·3. It's not repeating this time.''
``It will eventually,'' assured the Pig.
``Okay, 4 ·3 is 12 and 127 is 5; 5 ·3 is 15. And 157 is 8 and 87 is 1, and 1 ·3 is 3. Now it's repeating.''
``Now write down the first six powers,'' said the Pig, and Alice wrote: 3, 2, 6, 4, 5, 1. ``I'll do the powers of 4 and 5.''
Quickly, he recited: ``We start with 4, then 4 ·4 = 16 † 2, 2 ·4 = 8 † 1, 1 ·4 = 4, 2, 1.''
``Now for 5: 5 ·5 = 25 † 4, 4 ·5 = 20 † 6, 6 ·5 = 30 † 2, 2 ·5 = 10 † 3, 3 ·5 = 15 † 1. You can do powers of 6.''
``First is 6, then 6 ·6 = 36. That's 1 more than 35 which is a multiple of 7,'' observed Alice, pleased that she didn't need to keep subtracting 7's and could just subtract 35 instead. ``So 36 is congruent to 1. And 1 ·6 is 6. And 6 ·6 is 1 again. Also, 1 ·6 is 6 again. And 6 ·6 is congruent to 1 again. That one looped quickly.''
While she was talking, the Pig had turned to his notebook again and had written:
















































``They all end in 1,'' remarked Alice, looking over at the Pig's notebook.
``And that's no coincidence,'' assured the Pig. ``If we had chosen mod 17 and written out the first 16 powers, we would have noticed the same thing. It works because 17 and 7 are both prime numbers, and primes are very special numbers. If you look at n^{3} you will see that we always got 1 or 6. In mod 17 we would have always gotten 1 or 16. That's another important result in number theory.''
Alice decided to take the Pig's word on this. He seemed to know so much. She told him so. ``In fact,'' she continued, twirling her hair anxiously, ``you know so much that maybe you have an idea where I might find my bear.''
The Yellow Pig paused. Alice couldn't tell if he was gazing off in space ignoring or if he was focusing on her question. At last he said, ``If I were a lost bear, I'd probably look around for awhile, explore the area. I might end up near the water to catch some fish. Bears like fish don't they?''
``Yes,'' said Alice. ``And berries. Though my bear isn't much of an eater.''
``Hmmm ... . If I weren't hungry, I might go somewhere indoors after my exploration. Like to the art gallery. We can go there.''
``I'd like that very much,'' said Alice.
``Okay,'' agreed the Pig. ``I have one last riddle about modular arithmetic. It's a Chinese riddle about elephants, but you can pretend it's about bears. A commander wanted to organize his elephants in rows so that there were the same number of elephants in each row. He tried organizing them in rows of 4, but there was 1 left over. He tried organizing them in rows of 3, but there was one left over again. He tried rows of 2, but there was still one elephant left out. Finally he tried rows of 5 and that worked. Later, he was telling a fellow commander about his herd of elephants and couldn't remember how many of the beasts he had taken to battle. He knew it was between 50 and 100 elephants. It bothered him that he didn't know how many elephants there were, but the other commander told him not to worry about it. He could figure it out from the information he had been given. Can you?'' challenged the Pig.
Alice was fairly certain she could given enough time, but she didn't have the faintest idea how to approach the problem mathematically. ``It must have something to do with modular arithmetic. Mods 2, 3, 4, and 5; all of those except 4 are prime numbers,'' she added.
``That's exactly right, and the fact that they are prime is an excellent observation. Here's how the commander solved the problem. He didn't know how many elephants there were, so he decided to say that there were x. Now, x is just some number which happens to be our solution.''
``I think Rudolph was a much more creative name than x,'' interrupted Alice.
``Maybe,'' said the Pig, ``but x is the answer to our mystery, like an X that marks the spot of buried treasure. We know that when x is divided by 4, the remainder is 1. That's the same as saying x † 1 mod 4. We know that when x is divided by 3 and 2, the remainder is also 1, so x † 1 mod 3 and x † 1 mod 2. And finally, we know that x is evenly divisible by 5, so x † 0 mod 5.''
He licked his hooves and continued, ``Now we just need to find a number x that satisfies these properties. If a number leaves a remainder of 1 when divided by 2, 3, and 4, it will leave a remainder of 1 when divided by 12. It's like that thing we did to make a large prime from our list. Because 2, 3, and 4 all divide 12, any number that is 1 more than a multiple of 12 has to be 1 more than a multiple of 2, 1 more than a multiple of 3, and 1 more than a multiple of 4. Like 13, which is 2 ·6 + 1 and 2 ·3 ·4 + 1, or 25. It has a remainder of 1 when divided by 2. And it also has a remainder of 1 when divided by 3 or 4. This 12 is extremely useful in simplifying our problem. It enables us to combine three equations into just one. All because 12 is a common multiple of 2, 3, and 4. It's also the least common multiple; that is, 12 is the smallest number that all three of those numbers divide evenly. Now we only have to look at numbers that are congruent to 1 modulo 12. And, in fact, we only have to look at numbers from 50 to 100.'' The Pig thought quickly, ``Those happen to be 61, 73, 85, and 97. We have one more piece of information. The commander also remembered that the number of elephants was divisible by 5.''
``Only one of those numbers is divisible by 5,'' interrupted Alice. `85. There must have been 85 ephelants.''
The Pig smiled. ``There were 85 elephants. Neat, isn't it?'' Alice agreed that it was. ``The first commander thought it was so neat that he tried to generalize his solution for other similar problems. Mathematicians do that an awful lot. They say `this works in these cases, now I can generalize it for any n'. Often they use the word `induction'. Induction is another one of those tricks mathematicians use when tackling proofs. This problem has been generalized, but there's some pretty messy mathematics involved. Why, just the statement of the result is complicated. It goes something like this: If x † a_{1} mod m_{1} and x † a_{2} mod m_{2}, then x † (a_{2}a_{1})pm_{1}+a_{1} † (a_{2}a_{1})qm_{2}+a_{2} mod m_{1}m_{2}, where pm_{1}qm_{2} = 1.''
``Egads!'' exclaimed Alice. ``That sounds horribly complicated.''
``It is. I think we're ready to move onto something else. Number theory is the queen of mathematics, but there is so much more to math.''
``Like what?'' Alice asked.
``Well, combinatorics for one,'' answered the Pig, and Alice settled down for another of the Pig's lectures.
``Remember the lattice forest that you chased me through earlier?''
Alice nodded.
``Well, I'll bet you weren't paying any attention to the leaves.''
``The leaves?'' asked Alice. ``No, I wasn't. Why, do they follow Fibonacci or something?''
``Actually what I'm about to tell you has very little to do with those trees and those leaves. I could easily make the same point with whiskers on kittens. Why trees? Trees are arbitrary. But why not?''
Alice was not about to ask, and the Pig continued. ``All of the trees in that forest have less than 170,000 leaves on them. And there are more than 170,000 trees in the forest. So, there must be at least one pair of trees with the same number of leaves.''
``What?'' asked Alice. ``You expect me to believe you when you say there are two trees with the same number of leaves? Surely you couldn't have counted them all.'' Alice was beginning to question the Pig's sanity. What did leaves and trees have to do with anything? And were there really that many trees and leaves?
``I didn't need to count them. But I'll give you an example that you can count so you can see that it works. As a yellow pig, I, of course, have seventeen eyelashes. All yellow pigs do. And all yellow pigs have one eye with nine or more eyelashes. It's an argument in counting. Count my eyelashes.''
The Pig sat down beside Alice, and Alice proceeded to count his eyelashes. She lost count once and had to start over again. But sure enough, she counted eight eyelashes over the left eye and nine eyelashes over the right eye. Or maybe it was the other way around. But certainly there were eight eyelashes over one eye and nine above the other.
``Now,'' continued the Pig. ``You should be convinced that because I have seventeen eyelashes, one eye must have nine or more eyelashes. Here, I'll try to draw a picture of a seventeeneyelashed pig with no eye having more than eight eyelashes.''
He quickly sketched a pig's face and drew in eyes. He drew one eyelash over the left eye, then one over the right, then another over the left, and another over the right. All the while he counted out loud. He stopped at sixteen, having a pig with eight eyelashes over both the left and right eyes.
``Where do I put the last eyelash?'' he asked. ``If I put it on the left eye, then that one has nine eyelashes. But if I put it on the right eye, that one has more than eight eyelashes. I could have made a pig with ten eyelashes and seven eyelashes or one with sixteen and one, but no matter what, one of the eyes will have to have more than eight eyelashes.''
``Well, that's all obvious,'' said Alice. She almost laughed when she heard herself say that. Since when had math seemed so easy to understand? It was just about thinking, really.
``It may seem obvious to you,'' said the Pig, ``but from obvious ideas come powerful results. I don't have to count the leaves on the trees. I can picture 170,000 different trees. One has one leaf, the next two, and so on. But as soon as I conceive of the 170,001st tree, it must have the same number of leaves as another tree.'' Alice still had trouble thinking about that many trees.
The Yellow Pig explained, ``This reasoning is based on the pigeonhole principle, so named because we are putting a fixed number of things  pigeons  into a fixed number of categories  pigeonholes. If you try to get 18 pigeons into 17 pigeonholes, two pigeons are going to have to share a pigeonhole. I like to refer to it as the pigsinholes principle. If you try to get 18 pigs in 17 holes, two pigs have to share a hole. And, if you try to put 35 pigs in 17 holes, one hole will have at least three pigs in it.''
``That's because 35 is more than 34, isn't it?'' asked Alice. She reasoned aloud. ``It's more than 2 times 17. If you have 34 pigs, you can arrange them so that there are two in each hole. But as soon as you add the 35th pig, you'll have one hole with 3 pigs. That's the best case scenario. You can try arranging the pigs any other way that you want, but one hole will have three or four or five or even more pigs in it.''
``Exactly,'' the Pig agreed. ``I'm so glad you understand. The pigsinholes principle is yet another of the mathematician's tricks. I have a special book of my favorite proofs, and a lot of the proofs in it make use of this pigsinholes principle. Some of the proofs are pretty sophisticated, but I'll try to explain a few.
``Here's one of them. It may take you a moment to understand the problem because there's some new terminology. I claim that if you pick any 50 natural numbers from 1 to 99, at least two of the numbers you pick will be relatively prime to each other. Relatively prime means that the two numbers have no common divisors or common factors, except for 1. In other words, they are not necessarily primes, but they are prime with respect to each other. The numbers 4 and 15 are relatively prime to each other. Neither 4 nor 15 is prime, but they don't share any divisors so they are relatively prime to each other. Do you understand?'' asked the Pig. ``If you are ever unsure of what I am saying, tell me to stop and explain it again.''
``I'm not sure I get it,'' said Alice. ``You mathematicians sure have a lot of concepts and terms to define before you ever prove anything, though. Why, it's like having to learn another whole language.''
``That's a very astute analogy,'' the Pig said. ``Mathematics is sort of another language. Not only is it a language, it's even a somewhat universal one. Mathematicians who speak different languages can often communicate with each other through numbers and mathematical notation. It is confusing, though, to understand math if you aren't already familiar with the terminology. When I studied mathematics in school, I used to keep a list of terms that I needed to know. I'd look at it every night before I went to sleep and I would dream about homomorphisms and endomorphisms and words you wouldn't believe. Mathematics is a very complicated language because there are so many words with such precise meanings. But, I'm getting off the subject again, am I not? Back to relatively prime numbers. The numbers 17 and 6 are relatively prime, but 17 and 34 aren't. Neither are 6 and 8. Do you see why?''
``Let's see,'' thought Alice. ``Well, 17 is prime and 34 isn't ... .''
``But that's not really what matters,'' interrupted the Pig. ``Though it's a handy thing to know.''
``And 17 divides 34 evenly, so they aren't relatively prime. The other one is trickier. Certainly 6 can't divide 8. But you said relatively prime has to do with common divisors. And 6 is divisible by 2 and 3, and 8 is also divisible by 2. They share a common factor of 2 so they can't be relatively prime. Hey, neither 6 nor 8 is a prime number.'' Alice remarked.
``True,'' said the Pig. ``Now my claim should make sense. If you pick 50 numbers from 1 to 99, some pair will be relatively prime.'' Alice thought about this for a moment before the Pig spoke again, ``You should notice that I said 99 and 50. It is crucial that 50 is more than half of 99. Let's try it with a smaller example. I claim that you can't pick 5 numbers from 1 to 9 without having a common divisor. Try it.'' The Pig wrote the numbers from 1 to 9 on another page in his notebook.
Alice chose the first five numbers. ``Nope, that won't work at all, because 1 and any number have no common divisor except for 1, and that's the definition of relatively prime.''
``Right,'' the Pig confirmed.
``So I can't pick 1. I can pick 2, though. What about 3? I can't pick 3 then because 2 and 3 are relatively prime. In fact, they are both prime numbers.''
``Any two prime numbers have to be relatively prime to each other,'' interjected the Pig.
``I can pick 4 though, because 2 divides 4. And I can pick 6 and 8 as well. They are all multiples of 2 so none of them is relatively prime to 2.''
``Impressive,'' said the Pig. ``You've got four numbers. I asked for only five. You're almost there.''
``I can't pick 5, because 5 and any of those numbers are relatively prime. I can't pick 7 either. Or 9. I'm stuck. I guess you win in that case.'' Alice frowned. ``Maybe I should have started with a different number. It seems that as soon as I picked 2, I had no choice in what I picked.''
``Very true,'' the Pig said.
``I'll try starting with 3. But then, wait. When I started with 2, I was able to add all of the multiples of 2 but nothing else. So when I start with 3, I'll be able to pick all the multiples of 3, but nothing else. Now I can only have 3, 6, and 9. That's even worse than before.''
``You had the best case to start with,'' said the Pig. ``And that's what pigsinholes is all about. It's about the best case not being good enough. Your intuition is exactly right. The best you can do is to have 2 and its multiples. Because there are more multiples of 2 in a given interval than there are multiples of any other number. And that's not good enough. A real mathematician would flesh out those ideas a bit more and write out a formal proof. We can outline a proof. First, we need to decide what our pigs and holes are.''
``Well,'' said Alice, ``the pigs are the things we are picking, right?'' The Pig nodded. ``So those are the numbers. We want to pick 5 out of 9 pigs, or 50 out of 99 in your bigger example. I don't know what the holes are, though.''
``That's the real key to pigsinholes proofs,'' the Pig said. ``I'll help you out because this one is fairly tricky. The mathematicians who discovered this one were pretty quickthinking fellows. Let's look at the numbers from 1 to 9. You were able to pick 4 numbers, but not 5. So there are going to be 4 holes. That's where the final part of the proof comes from. The last line is something like `since there are 4 holes, and we want 5 pigs, two of the pigs must come from the same hole. And that's no good.' Actually, the last line is `Q.E.D.' Some mathematicians write that at the end of proofs to show they are done. It comes from a Latin phrase meaning `which was to be demonstrated'.''
He continued, ``We want to set up our pigs and holes in a way that we can't pick more than one pig from each hole. That means the holes must contain sets of numbers which are relatively prime to each other. This is, in a sense, the opposite of what we are really looking for. In order to find numbers that aren't relatively prime, we first find numbers that are. Remember our proof that there were an infinite number of primes?'' Alice remembered it well. That was the proof in which the Pig had found a larger prime by multiplying all of the primes together and adding 1. ``That proof used the fact that if you add 1 to a number, it shares no common factors with the number. No matter which of its divisors you divide the new number by, you will always get a remainder of 1. And that's the same as saying that any two consecutive numbers are relatively prime. Now I'm ready to show you how the numbers are arranged in holes,'' and he wrote in his notebook:
1  2  4  6  8 
3  5  7  9 
``What I said before was kind of misleading. I actually wrote five holes in my notebook. The first hole contains only the number 1. It's a special hole, because once you pick 1, you can't pick any other numbers. So even though there are five holes, that one doesn't really count. In the remaining four holes I have just placed pairs of numbers. Because they are consecutive numbers, each pair is relatively prime. If I wanted to write out the example with the numbers from 1 to 99 I would just have those 5 holes and a lot more. The next hole would contain 10 and 11, the one after that 12 and 13, and so on all the way up to the last hole which would have 98 and 99. Then I would have 50 holes, the first one of which contains just 1. And I would have to pick 50 numbers, excluding the 1 and with no two from the same hole. There's no way I could do it. We thought that was true before, but by drawing the pigs and holes, we are able to clearly show it. Proving something is about having a convincing argument. It's about knowing why something must or must not work.''
Alice was a little bit confused. The result made sense, she supposed, but she didn't think that she would have been able to see it herself.
``I'll work out another similar proof, and then maybe it will make more sense to you,'' said the Pig. ``In mathematics sometimes it is better to plunge ahead even if you aren't sure you understand what you've seen so far. Sometimes everything just clicks into place after you are more familiar with it.''
He continued, ``Suppose at least 1 pig is born every day and 34 pigs are born in 18 days. Then it must be the case that in some consecutive interval of days, exactly 17 pigs are born.'' Alice thought about this. ``The key here is to look at how many total pigs have been born by the end of any given day. If the difference between any of these final counts is 17, then that means exactly 17 pigs are born on the inbetween days.''
``That is clever,'' said Alice.
``Very,'' said the Pig. ``Because now we can assume our statement is false  that is, suppose that there is no interval of days in which exactly 17 pigs are born  and apply our pigs and holes. A total of 34 pigs are born. That means that the total number of pigs at the end of the 18th day is 34. Since the problem deals with 18 days and 17 pigs, it seems likely that we will end up trying to pull 18 pigs out of 17 holes, and of course we won't be able to do so without picking 2 pigs from the same hole.
``Here's how we group the pigs. Say there is 1 pig born the first day. That means the total number of pigs at the end of any day can never be 18 because then exactly 17 pigs would have been born on the days in between. So we put 1 and 18 in the same hole to signify that we can't choose both of them. Same with 2 and 19. If 2 pigs have been born by the end of some day, then 19 pigs can't be born by the end of another day. We want our holes to contain possible numbers of pigs born by the end of each day. And we want to pair up numbers which have a difference of 17, so our holes end up looking like this:''



































``That's 34 numbers, representing numbers of pigs, in 17 holes. Our challenge was to pick 18 numbers, but we've arranged our numbers so we can't pick any two numbers from the same hole. If we pick 18 numbers, two of those numbers must be from the same hole. Hence, there will be a pair of numbers with a difference of 17. That means we've shown that it is impossible to have the pigs born in such a way that there is not a set of consecutive days in which exactly 17 pigs were born. And that's where we say Q.E.Doodilidoo,'' finished the Pig. ``Want to hear another problem?'' he asked. Alice nodded.
``This is a variation on the pigsinholes principle that involves handshakes. Let me tell you a bit about handshakes first,'' the Pig said. ``If six people all shake hands, each one shakes five other hands. That's 30 handshakes. But shake my hand,'' he said, extending his front right hoof. ``That's one handshake for me and one for you. But it's the same handshake. So we divide by 2. There are actually only 15 handshakes because each handshake involves two people.''
``I see,'' said Alice.
``Another way to think of handshakes is to remember the triangular numbers. Think about the first of the six people shaking hands. He goes around and shakes the other five hands exactly once. Then he leaves. The next person shakes the hands of the remaining four people. That's four more handshakes. The third person shakes the three hands that he hasn't yet shaken. Then there are two more handshakes and one last handshake. The last person doesn't initiate any handshakes because he has already shaken hands with everyone. So that's 5+4+3+2+1 handshakes,'' concluded the Pig.''
Alice added up the numbers. ``That's 15 handshakes, which is the same as the number you got before.''
``Yup,'' said the Pig. ``There's more than one way to get the same result. It's just like Gus said: 1+2+3+4+5 is the same as [(5)(6)/ 2].''
``I get it,'' said Alice. ``Now, what's your handshake problem?"
``In this problem there are 11 people. There are 10 dinner guests and a host. I claim it is impossible for them each to have shaken a different number of hands. The pigs in this problem are the numbers from 0 to 10.''
``And we want to choose 11 such numbers,'' said Alice. ``But wait, I don't see why we can't do that. There are 11 numbers from 0 to 10.''
``There's a catch,'' said the Pig. ``There are actually 10 holes even though there are 11 pigs. Remember that handshakes come in pairs. So,'' the Pig continued, ``if there are 11 people and one of them shakes 10 hands, that means everyone has shaken hands with that person. It is impossible for one person out of 11 to shake 10 hands and another person out of 11 to shake 0 hands. We put 11 and 0 in the same hole, and then we have our proof.''
``Here's a riddle for you. A lot of handshaking goes on between the 10 guests and the host. It turns out that all of the guests shake a different number of hands. Every guest shakes at least one hand. The question is: How many hands does the host shake?''
``I can't solve that,'' Alice cried out. ``You haven't given me enough information.''
``But I have,'' said the Pig. ``Let's try to write out which people every guest has shaken hands with. Handshakes work in pairs, right?''
``Right,'' agreed Alice.
``So we can determine precisely which handshakes took place. Each guest shakes a different number of hands. That means one guest shakes 1 hand, one guest shakes 2, and so on up to 10. We can call our guests 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 to designate how many hands they shook. And we'll call our host h because we don't know how many hands he shakes. Now I'll draw a table for all the possible handshakes and we can fill it in.''
``I'll place a 1 in the table if a handshake occurred and a 0 if a handshake didn't occur. No one shakes their own hand, so I can fill the diagonal with 0's. Because handshakes come in pairs, my drawing, or matrix as mathematicians would call it, will be symmetric. So I only have to fill in the spaces to the left of the diagonal.''
``Okay,'' said Alice. She looked over at the Pig's notebook. He had drawn a table that looked like this:
10  9  8  7  6  5  4  3  2  1  h  
10  0  
9  0  
8  0  
7  0  
6  0  
5  0  
4  0  
3  0  
2  0  
1  0  
h  0 
``Number 10 shook 10 hands which means he shook every hand. So we can fill in the 10 column 1's. And because 10 shook 1's hand, 1 can't shake any more hands. His quota is up. So we can fill in the rest of the 1 row with 0's. We do the same thing for number 9. Number 9 shook hands with 10, 8, 7, 6, 5, 4, 3, 2, and h. That's everyone who is left as a potential person to shake hands with. So we fill down the 9 column with 1's. Again, look at row 2. It already has 2 1's, so the rest of the row gets filled with 0's.''
``We can do the same thing for 8,'' said Alice.
``Right,'' said the Pig. ``And again for 7 and 6.''
``And now since 5 and 4 and 3 and 2 and 1 have already completed their handshaking, we're done. We just need to finish filling out the other half of the chart to verify that everyone is performing the right number of handshakes. And then we count up the handshakes in the h row or column to know how many hands the host shakes.'' The Pig's chart now looked like this:
10  9  8  7  6  5  4  3  2  1  h  
10  0  1  1  1  1  1  1  1  1  1  1 
9  1  0  1  1  1  1  1  1  1  0  1 
8  1  1  0  1  1  1  1  1  0  0  1 
7  1  1  1  0  1  1  1  0  0  0  1 
6  1  1  1  1  0  1  0  0  0  0  1 
5  1  1  1  1  1  0  0  0  0  0  0 
4  1  1  1  1  0  0  0  0  0  0  0 
3  1  1  1  0  0  0  0  0  0  0  0 
2  1  1  0  0  0  0  0  0  0  0  0 
1  1  0  0  0  0  0  0  0  0  0  0 
h  1  1  1  1  1  0  0  0  0  0  0 
``I get it,'' exclaimed Alice. ``We solved your problem. The host shook hands with guests number 10, 9, 8, 7, and 6. That's five handshakes.''
``Correct,'' said the Pig. ``That's the sort of problem that is more about the thinking than actual computation. A lot of math is like that. Proofs are just logic puzzles, exercises in creativity. Speaking of exercise, let's go for a walk.''
Alice and the Pig stood up, and they continued on their way.
They completed a circle around the mathematical garden, passing the stream that Alice has noticed when she first followed the pig down his hole. After a moment, they continued walking further downstream until they reached a rather large lake. ``If I were a teddy bear looking for fish or a nice swim,'' the Pig said, ``this is where I would go.'' Alice agreed that it was a very nice location for both fishing and swimming. She would go swimming herself except that the water was a wee bit too cold. Besides, she was on a mission to find her bear and couldn't let herself be distracted.
Alice and the Pig circled the lake, with Alice frequently calling out, ``Honeybear? Can you hear me?'' and ``Teddy, where are you?'' She kept calling even though she knew her bear wouldn't answer. ``He's very shy and talks not at all,'' she explained to the Pig. About halfway around the lake, as Alice was beginning to become discouraged, the Pig noticed an empty jar of honey. Excitedly, he pointed it out to Alice as a sure sign that her bear had been there. Alice hugged the Pig and exclaimed, ``Oh Teddy, we will find you!'' and resumed her calls with renewed enthusiasm as the two made their way around the shore. She was certain she would find her teddy, but the stuffed animal was nowhere in sight.
``I'm sorry, Alice. We're back where we started,'' said the Yellow Pig finally. ``And I need to rest for a moment.'' The two of them sat and watched the ripples in the water.
``Is that an island?'' inquired Alice, peering into the distance.
``Yes,'' replied the Pig. ``Actually there are several. We are going to try to visit them all, which is why I need to rest first. You see those bridges? We are going to try to cross all of the bridges exactly once. It's like a maze. Actually, it's called a graph. A graph is a diagram with edges and vertices. Edges are paths, like those bridges. Vertices are points or nodes, like the islands. The problem of crossing bridges is one that mathematicians of graph theory know well.''
``Maybe my bear went to one of those islands,'' Alice ventured.
``He might have. There are nine bridges connecting the five land masses,'' said the Pig. ``I'll tell you a little about each of the islands. The northernmost island is Sunny Harbor, known for its early morning sun. To its west, off in the distance, is Seashell Isle, named for the beautifully spiraled shells that decorate its beaches. Just south of Seashell Isle are Francis Island and Matthew Island. Matthew Island is the one farther south. Finally, we are in the southeastern corner at Treeline Shore.''
``There are a lot of bridges here,'' remarked Alice.
``There are. From Treeline Shore are six of the nine bridges. Two of them go north to Sunny Harbor and two of them west to Matthew Island. One goes to Francis Island and the last to Seashell Isle. There are three more bridges connecting the islands to each other. One goes from Sunny Harbor to Seashell Isle. Another goes from Seashell Isle to Francis Island, and the third bridge connects Francis and Matthew Islands. But I don't need to tell you,'' said the Pig, ``you can look at my map.''
Alice thought for a moment. ``How about one of the ones going north to Sunny Harbor?''
``Okiedokie,'' said the Pig agreeably, and they took off in the direction of the first bridge. The Pig marked the letter M in his notebook. They strolled quickly across the bridge, pausing at the center so Alice could look down at the water. Soon they reached the end of the bridge and an old wooden sign that read ``Welcome to Sunny Harbor''. Alice was disappointed that her teddy was not there to greet them, but otherwise she thought it was a wonderful and enchanted island. She saw a bird, a caterpillar, and a badger having a picnic. This did not strike her as odd in the least.
``Now what?'' asked the Pig, awaiting Alice's instruction. ``We can take the other bridge back to Treeline or we can continue to Seashell Isle.''
``Oh, let's go to Seashell Isle,'' Alice begged.
``Very well,'' said the Pig, jotting down a P in his notebook.
They went over another and longer bridge. Alice and the Pig skipped merrily, whistling as they went. They stopped at Seashell Isle briefly, and Alice wandered along the beach picking up seashells to bring back with her. ``I'll give some to my sisters,'' Alice thought to herself, ``if I ever return. Why, I don't even know if I can get back to the shore, and then I don't know how I will leave this mathematical land. Surely I can't stay forever! But I must find my bear before I leave.''
Before Alice could get too wrapped up in her worries, the Pig asked, ``Where to now, my lady?''
``Let's go back to the shore,'' said Alice.
``Good idea,'' remarked the Pig. ``Once we get there we will have ample bridges to choose from.'' And he wrote down an R, and they were off.
Back at the shore, they sat under the shade of a tree for a moment. All the walking across bridges was starting to tire them out. But they hadn't lost their sense of adventure, so they continued to Matthew Island. The Pig added a D to his notebook.
This bridge was closer to the water than the others had been. ``Oh look,'' exclaimed Alice just after they got on the bridge. ``There are ducks.'' Alice leaned over the railing to watch a mother duck swim by with her ducklings following closely. The Pig stood behind Alice, watching carefully so she wouldn't fall over. After the ducks had passed, they crossed the bridge to Matthew Island.
``Let's go to Francis Island,'' said the Pig. ``It's the only one we haven't seen yet.'' The Pig wrote an A in his notebook and they crossed the short bridge. Francis Island was cooler and more hilly than the other islands.
From there they took the widest bridge, which went back to Treeline Shore. A letter O joined the other letters in the Pig's notebook. From the Shore, they had two paths left: one to Sunny Harbor and one to Matthew Island. ``We haven't been to Sunny Harbor in a while,'' pointed out Alice.
``And it's closer,'' said the Pig, looking a bit winded. He wrote down C and they marched off over the bridge.
But just before they reached Sunny Harbor, a horrible thought occurred to Alice. ``Oh no!'' she cried out loud. ``We're going to be stuck on Sunny Harbor. Look at the map. Sunny Harbor has three bridges. There's the one labeled M which we first crossed, the one labeled P which we took second, and finally C, the one we are on now. We've crossed them all. We can't go back without crossing one of the bridges a second time.''
``You're right,'' said the Pig. ``Fortunately, I anticipated that. No matter what order we cross the bridges in, we won't be able to go over them all exactly once. The reason is very simple.''
He motioned for Alice to sit down and he began his explanation. ``Every time we go out to an island over a bridge, we have to make sure there is a bridge for us to come back on. Just as in the handshake problem, the key is pairs. There have to be pairs of bridges: one to go out on and another one for coming back. So every island has to have an even number of bridges.''
The Pig flipped back to the map in his notebook. ``Now look at how many bridges there are from each of the islands. From Sunny Harbor, Seashell Isle, Francis Island, and Matthew Island there are three bridges each. So we would have gotten trapped on any island if we tried to go back a second time.''
``You mean you knew we were doomed from the start?'' asked Alice, almost incredulously.
``We're not doomed at all,'' said the Pig with a laugh. ``We just can't go over any more bridges. That's why all of these islands have boats.'' And sure enough, he produced a rowboat. With Alice's help, he dragged it down to the water, and the two of them rowed back to Treeline Shore.
When they returned to the mainland, the Pig said, ``Now you've seen one of the classic problems of graph theory. It was a problem about paths, or edges between points. Graphs are also about the points or vertices themselves. Some problems in graph theory are about coloring. A wellknown theorem states that any planar graph  like any geographic map with different regions  can be colored with only four colors so that no adjacent regions are colored in the same color.''
``Only four colors?'' asked Alice. ``How can that be? A map can be very complicated.''
``It's true,'' said the Pig, ``though it's really hard to prove. It was a conjecture for over a century before it was finally proven. You should draw a map sometime and try coloring it with four colors.'' Alice was eager to try this for herself. It would make a good exercise for her teddy bear, if she ever found him.
``I'll also briefly tell you a problem about coloring edges. Suppose I go to a small party of random guests. Some of these guests know each other and some of them don't. If there are six people at the party, then I claim that either it is the case that some three of them all know each other or else it is the case that there are three people who have never met. We can represent this mathematically by thinking of the guests as six points with edges between them. There are 5+4+3+2+1 edges connecting the six points. The edges go both ways like handshakes in our handshake problem. Since any pair of guests either knows each other or doesn't, we can model the situation by coloring the edges using two colors. According to my statement, if all of the edges in the graph are colored, there will be a singlecolored triangle, representing three people who either all know or all don't know each other. I want to prove that my statement is true.''
``We could just draw out all of the possible colorings,'' suggested Alice.
``We could in this case,'' said the Pig, ``though I prefer to use a strategy for coloring. I'll start out by drawing six evenly spaced points on a circle, like the corners of a hexagon. Then I choose one color and use it to draw lines connecting all points of one unit away. That's six edges. Then, for lines connecting every other point, I can't use the same color without forming triangles. So, I need to use the other color. I can use my first color to color the three edges connecting the points that are three units away. Now I have to switch to the other color. The six remaining edges must be in the other color. But, if they are all in the same color, we get two triangles. I can't use either color, so a third color is required to complete the graph.''
``There are an awful lot of combinations,'' said the Pig. ``We can draw all of them, or we can try to show that no coloring is better than this one. Because there are only six guests, it's not too hard to try all of the possibilities. You can see how it would get very difficult to solve such problems with more guests. That's why there are so many open problems in this field of study.''
``I guess it would take a long time to draw all of the colorings,'' conceded Alice.
``There are a lot of deceptively easy problems like that in mathematics. Fortunately, a lot of excellent mathematicians have been working on these and other problems in graph theory. They are on a quest for beautiful proofs. Beautiful, or elegant, proofs are ones that are so simple that they make their theorems seem almost trivial. They are proofs that other mathematicians read and feel silly because they did not arrive at the conclusions themselves. One Hungarian mathematician, named Erdos, conceived of a God who possessed a book of all such proofs. A friend of his said that the devil had an analogous book, full of theorems for which God had no proofs.
``That's what drives mathematicians, the desire to find proofs for the unproven theorems, the desire to solve problems that were previously unsolved. Mathematicians want not only to find solutions, but they want to find good solutions. For a proof to be satisfying to a mathematician, it has to be beautiful. A mathematician is an artist, and proving theorems is his art.''
``Speaking of art, let me show you the collection we have here in our gallery,'' the Pig said, leading Alice to an elaborate and domed building. He paused before a gold door. ``This is where we store our great artwork. We have a most impressive collection, funded by a number of families, including my own. The gallery contains some of our favorite artwork. All of the art in this gallery is mathematically pleasing. There are a lot of paintings from the Renaissance and even a whole exhibit by M.C. Escher. Escher is an amazing artist who used to visit here.''
The Pig led Alice to a room that was unlike any Alice had ever seen before. ``This is the entrance hall,'' he said. The walls were covered with patterns of different colors and geometric shapes. There were no actual pictures. ``It's a tribute to the Alhambra. Do you like it?''
``The Alhambra? What's that?'' Alice asked.
``The Alhambra is a Moorish castle. It contains all of the patterns you see here. They are known as tessellations or wallpaper patterns or symmetry groups. And there are seventeen of them. Isn't that incredible? There are exactly seventeen distinct patterns. Seventeen is such a wonderful number,'' said the Pig proudly.
``When I say seventeen different patterns, I mean there are seventeen different ways for the lines of symmetry to be arranged. For example, I can start with a square tile and translate it in all directions to form a square grid like a checkerboard. Or I can start with a hexagon or a triangle. I can also rotate tiles before translating them. Think of a tile as the single unit that is reproduced in the tiling,'' explained the Pig.
``Tiles come in different shapes and have different symmetries. For example, a tile can be a square. The square can be cut in half to form two rectangles. The pattern filling in one rectangle is then a mirror image of the pattern filling the other rectangle. Or the second rectangle could be identical to the first only rotated 180^{ƒ}. The square could also be cut along its diagonal to produce two triangular pieces.''
``There must be other shapes besides squares,'' interrupted Alice. ``like slanted rectangles and beehives.''
``Yes,'' agreed the Pig. ``We call the slanted rectangles parallelograms and the beehives hexagons. Both shapes have the appropriate angles to cover the plane. Before I teach you any more geometry, I think you should learn some algebra.''
``Algebra?'' said Alice. ``Like that awful quadratic formula Lorina used to recite?''
``Not exactly,'' said the Pig smiling. ``This is even more advanced algebra. It's sometimes known as modern algebra because as a branch of mathematics it has been around for a short time when compared with regular algebra. Modern algebra is the study of groups. And a group is just another mathematical term. It means a set of elements, which are often numbers, and an operation, such as addition or multiplication, that follow certain rules or conditions.''
Alice was starting to feel tired. All of this mathematical terminology really did make her dizzy. She followed the Pig to a corner where he sat on a dark rug that was covered with geometrical patterns.
``You already know some examples of groups,'' said the Pig. ``The real numbers with the operation of multiplication. That's a group with a whole lot of elements. If you multiply any two real numbers together, you get another real number. If you multiply a real number by 1, the result is the same real number. You can divide any real number into 1 to get another real number. If you are multiplying a whole string of numbers, it doesn't matter what order you multiply them in; you will always get the same result. So mathematicians say that the real numbers  excluding 0 because you can't divide by 0  form a group under multiplication. Let me show you the properties of groups under multiplication.'' He wrote:
Alice looked skeptical. ``What is it?'' asked the Pig.
``I don't understand what makes groups so special. What isn't a group?'' she asked.
``Excellent question,'' said the Pig. ``The integers under multiplication, for one. Here's why: a group must have inverses that are contained within the group. An inverse is something that you multiply a number by to get 1, the identity. Take 3 for example. What do you multiply 3 by to get 1?''
``You multiply it by ^{1}/_{3},'' said Alice. ``The 3's cancel, so you are left with 1.''
``Right,'' the Pig said. ``And ^{1}/_{3} isn't an integer. So the integers under multiplication can't be a group.''
``I see,'' said Alice. ``But I'm still not impressed with the real numbers being a group. After all, that's everything. Surely with an infinite number of numbers it is easy to find inverses and things.''
``Oh, there are finite groups, too,'' said the Pig. ``Remember our numbers mod 12 and mod 7?''
``Yes,'' said Alice. ``We had the numbers from 0 to 11 and then from 0 to 6 and then they repeated again and again after that.''
``Well, they are both groups under addition. The nonzero integers mod 7 are also a group under multiplication because 7 is a prime number. For mod 12 the additive identity is 0 and the inverses are numbers that add to 12, or 0. So the inverse of 1 is 11, of 2 is 10, of 3 is 9, and so on. For mod 7 the multiplicative identity is 1 and the inverses are numbers that multiply together to make 1. Like 2 and 4; 2 times 4 is 8 which is one more than 7. And 3 and 5, because 3 ·5 = 15  14 = 1. The order of the addition or multiplication doesn't matter. And whenever you add or multiply two numbers together, you are going to get another number less than the mod you are in. That's how modular arithmetic works. And we have two examples of finite groups.''
``I think I see,'' said Alice.
``Then let's try a more abstract example, one without numbers,'' said the Pig. He drew a square in his notebook and cut it out, leaving the paper around it to frame the empty space where the square had been. He labeled the vertices a_{1}, b_{1}, c_{1}, and d_{1}. Then he flipped over the square. On the other side of those vertices he labeled a_{2}, b_{2}, c_{2}, and d_{2}. He also labeled the corners of the paper cutout with a_{1}, b_{1}, c_{1}, and d_{1}. ``There are eight ways that I can get this square to fit back in my notebook. Any of those eight corners I labeled can be in the top left corner. That's because of the symmetry of the square. From its original position, I can rotate the square 0^{ƒ}, 90^{ƒ}, 180^{ƒ}, or 270^{ƒ}. I can also pick up the square and flip it like this,'' he said, demonstrating.
``For example, if you give me the square with vertex b_{1} at the top left and with c_{1}, d_{1}, and a_{1} going around clockwise, I just have to rotate the square one 90^{ƒ} turn clockwise. That would be r. If you gave me the square with c_{1} at the top left, then d_{1}, a_{1}, and b_{1} going around clockwise, I would have to do two rotations, or r^{2},'' continued the Pig.
``I claim that these manipulations form a group. The group has the elements 1, r, r^{2}, r^{3}, f, rf, r^{2}f, and r^{3}f. We say that 1 is the identity. The next three elements are rotations by 90^{ƒ}, 180^{ƒ}, and 270^{ƒ} respectively. The fifth element is a flip. From the original position, a flip would yield a clockwise sequence of a_{2}, d_{2}, c_{2}, b_{2} starting from the top left. The last three elements are compositions of rotations and flips. My operator is composition. I can compose two elements by applying the two manipulations in succession from right to left. That is, rf means a rotation applied to a flip, or a flip followed by a rotation.''
The Pig let Alice play with the square cutout for a few minutes so she could get an idea of the rotations and flips. ``To show that this is a group, I need to show that all of those properties I mentioned earlier are satisfied. 1 is the identity. If I apply 1, nothing changes. Every element has an inverse. In other words, when any one of those eight things is applied to the `home position' square, one of those same eight moves can be applied to get the square back to the `home position'. If 1 is applied, then 1 is just applied again. Same with f. One f will undo another f. An r^{2} will undo an r^{2} as well. And an r can be reversed by an r^{3}. The inverse of rf is rf. The inverse of r^{2}f is r^{2}f, and the inverse of r^{3}f is r^{3}f.
``Next it is important to show that our group is closed. That means when we compose two manipulations, the resulting state can be represented by one manipulation or element. For example, if I perform r to rotate the square once and then I perform r to rotate the square again, that's the same as performing r^{2}.''
``I see,'' said Alice. ``And if you perform r to rotate the square once and then f to flip the square once, that's the same as performing rf just once.''
``Exactly,'' said the Pig. ``We can write out a composition table for these manipulations, just like the multiplication table. The table will tell you what happens when the operation at the left is followed by the operation at the top. The first row is easy. Anything that follows 1 is itself. The manipulation r followed by anything else is pretty easy too. The composition r1 is just r; rr is r^{2}; rr^{2} is r^{3}; rr^{3} is 1; rf is rf, rrf is r^{2}f, rr^{2}f is r^{3}f, and rr^{3}f is f. That gives us each of the elements again in a different order.'' He and Alice went through the rest of the combinations, until they had filled out a table in his notebook.
1  r  r^{2}  r^{3}  f  rf  r^{2}f  r^{3}f  
1  1  r  r^{2}  r^{3}  f  rf  r^{2}f  r^{3}f 
r  r  r^{2}  r^{3}  1  rf  r^{2}f  r^{3}f  f 
r^{2}  r^{2}  r^{3}  1  r  r^{2}f  r^{3}f  f  rf 
r^{3}  r^{3}  1  r  r^{2}  r^{3}f  f  rf  r^{2}f 
f  f  r^{3}f  r^{2}f  rf  1  r^{3}  r^{2}  r 
rf  rf  f  r^{3}f  r^{2}f  r  1  r^{3}  r^{2} 
r^{2}f  r^{2}f  rf  f  r^{3}f  r^{2}  r  1  r^{3} 
r^{3}f  r^{3}f  r^{2}f  rf  f  r^{3}  r^{2}  r  1 
``Tada!'' exclaimed the Pig when he had finished. ``There are a lot of interesting things to notice about this table. What patterns do you see?''
Alice took a long time studying the table. ``Each row and column contains each entry exactly once,'' she said. ``Also, all of the entries with f's are in two of the corners, and most of the 1's are on the main diagonal.''
``Wonderful observations,'' said the Pig. ``All of those things hold because groups like this one have such elaborate properties. Another thing to look at is subgroups.''
``What's a subgroup?'' asked Alice.
The Pig explained, ``A subgroup is a smaller set of the elements in the table that satisfy all of the properties of being a group. It's just a group contained within a group. The set of 1, r, r^{2}, r^{3} is a subgroup. If we just study the portion of our table with these four elements, we see that all of the composite operations are one of those four operations. Subgroups and groups are related to each other in complex and interesting ways. I don't think you're quite ready to hear about that, though. We've had enough algebra for now. Shall we enter the first exhibit hall instead?'' the Pig asked.
``Oh, yes,'' said Alice. ``I'd love to see what works of art are on display.'' And the Pig closed his almostfull notebook, helped Alice to her feet, and the two walked toward the small red door labeled ``Escher.''
The Pig stood on the tip of his toes to reach the doorknob. The heavy door opened slowly into the room. Inside Alice saw dozens of paintings. There might have been hundreds, she supposed, because the walls spiraled inward toward the center. The room seemed to be a maze of art.
The Yellow Pig continued walking, but a painting caught Alice's attention. She stopped to look at it. It was a painting of what looked like a path that had been looped to form a figureeight. Alice saw what looked like a small marching band of piglets posed in positions almost evenly spaced on the path. As Alice studied them longer, they began to move. Or at least that's how it appeared; she knew that her eyes must be playing tricks on her.
The piglets were marching in single file around the loop. Suddenly the pig in front went around a bend and was walking upside down. He didn't seem at all disturbed by his bizarre change of position. Alice was afraid that he was going to fall off, but he was able to hold on to the path. ``He must be wearing special shoes,'' thought Alice. She wished she had such shoes that would enable her to walk upside down. The upside down piglet kept walking. The piglet behind him went around the bend and also turned upside down. So did the one after him. Soon more than half of the pigs were on the inside part of their path. Then, just when Alice thought they would all end up facing the wrong way, the piglet in the lead somehow became rightside up. The other piglets followed him.
One of the piglets jumped off the path for a moment and dipped his left paws into a tray of bright blue paint. He dipped his right hooves into a tray of sunny yellow paint. Then he hopped back on. Now Alice could follow him more closely because as he walked he left colored foot prints behind him. Blue on the left and yellow on the right. But when he got about halfway around the loop, Alice noticed something interesting. The foot prints had switched places. The yellow foot prints were now on the left and the blue ones on the right. The piglet kept walking. He soon got back to the place where he had started leaving foot prints, and sure enough, the colors of the foot prints really were reversed!
This confused Alice for a moment until she realized that it made perfect sense. The piglet was walking upside down. It was on the other side of the path from where it had been before. She had no idea how it had gotten there because she was sure she hadn't taken her eyes off the piglet. But since the piglet was upside down, its hoof prints had reversed. Another piglet walked on top of that piglet, and Alice saw that its left paw lined up with the upside down piglet's right paw. They were on opposite sides of the same path. ``How will the poor reversed piglet ever get back to the normal side of the path?'' Alice worried.
But she didn't have to worry for long because just as the piglet had turned upside down without Alice seeing it, it turned itself right side up again. It traced over its original foot prints. Alice resolved to watch it more closely this time around to see if the piglet would somehow slip off again. This time Alice saw it walk around a twist in the path, and then it was upside down. She began to trace the wet paint marks. She walked around the painting, staring intensely at the hoof prints and trying to get a better angle from which to observe the piglet's path. At that moment, it occurred to her exactly how odd it was that the piglets in the painting were moving.
She reached out to touch the painting so she could trace the piglet's path with her fingertip. Only instead of stopping at the canvas, her hand went right through the painting. Alice was beginning to feel rather queasy again. ``If my hand can go through the painting,'' she thought, ``maybe my whole body can, too.'' And though the idea disturbed her, she was so curious to learn how the piglet was able to turn upside down, that she took a step closer to the painting, closed her eyes, and leapt into the picture.
Alice found herself standing on the middle of the path. She looked around, trying to familiarize herself with her surroundings. ``Hurry up,'' an impatient voice behind her said, ``you're holding up traffic.''
``Oh, sorry,'' Alice apologized. The pig gave her a push and she began moving in a daze. She didn't even feel like she was lifting her feet, but something was propelling her forward nonetheless. ``Whoa,'' she cried out as the path turned over. She felt herself falling.
``Just tell yourself it's impossible to fall,'' the piglet helpfully recommended from behind. ``If you believe you can't fall, you won't. It's that simple.''
Alice didn't think that was very simple at all. In fact, she found it most confusing. But she didn't have any better ideas, and she had to do something to keep from falling, so she muttered to herself, ``I cannot fall I cannot fall,'' over and over again. It worked until she realized that she wasn't falling, at which point her surprise made her stop concentrating. She fell to the floor with a loud thud.
She lay there feeling miserable, although not at all physically hurt. The piglet who had given her the advice passed her. ``Try it again,'' he said. ``You almost had it. Just don't start questioning how you are able to stay on the strip and you'll do fine.'' He helped Alice to her feet and led her back on the path.
Alice walked bravely around the loop, hesitating only slightly when she got to the top part that she recognized as the bend where she had turned upside down before. ``I cannot fall I cannot fall ... .'' This time she didn't fall. She continued walking.
``Now you are at the point where you started,'' said the piglet.
Alice felt faint again. ``But I can't be,'' she said indignantly. ``I was up there before and now I'm somehow the other way. It's not the same place at all.''
``Ah, but it is,'' replied the piglet. ``The location is exactly the same. It is only you, or rather your perspective, that has changed.''
Alice was even more confused now than she had been watching the painting from outside. ``I'm upside down now.''
``Yes, you could say that,'' remarked the piglet cryptically. ``But that's only because that's how you think of it. I prefer to think of myself as always being right side up. It's much less confusing that way.''
``I can't be right side up, though,'' Alice said. ``I'm on the other side of the path.''
``What other side?'' inquired the piglet. ``Do you remember changing sides? Did you jump off the path and then get back on again? No, of course not. You are a most confused girl. You see, there is only one side of this path.''
Alice was concentrating on what the piglet was saying so hard that she had managed to walk around upside down without falling off the path. She came to another twist and was rightside up again. She let out a sigh of relief. Everything made slightly more sense this way.
``Perhaps now,'' said the piglet, ``you feel more like you are back where you started. It has taken you not one, but two, revolutions around the strip, but you are now exactly as you started your journey. It took you two revolutions because the strip is one sided,'' repeated the pig.
``One sided?'' asked Alice. ``What do you mean by that? I agree that I have only walked on one side of the path, but surely there must be another side. Why, there's the side of the tracks that I haven't walked on. That's the other side.''
``It would be,'' the piglet said, ``but there is no part of this path, as you call it, that you have not walked on. You have walked over each part of the path twice. That's because the path is not your usual surface. It is a very special surface known as the Moebius strip.''
``Moebius strip,'' Alice repeated to herself, making a note to ask the Yellow Pig about them. Surely he would know what nonsense the little pig was babbling.
``A Moebius strip is a band with a twist in it. Think of a long thin strip of paper. Now connect the two ends together. Only before you do so, give it a halftwist. Now you are lining up the front side of the paper with the back side of the paper. The front merges into the back, and there is no distinction. The surface you have created is single sided.''
Alice was walking upside down again. The piglet's words seemed further and further away. Alice fell off the Moebius strip and back through the canvas.
She landed in the art gallery. The painting was right in front of her, but the piglets had stopped moving. The Yellow Pig was behind her.
``There you are,'' he exclaimed. ``I was so worried that you had gotten lost. Where were you?''
``I was ... .'' Alice pointed, ``I was in there. I don't know if I can explain it.''
``Try,'' said the Pig, and so Alice explained as best as she could that she had fallen into the painting and had followed the piglets in a right side up and upside down promenade. The Pig nodded.
When she was finished talking, the Pig pulled out his notebook again. This time, he ripped out a sheet of paper. ``I'm going to make a Moebius strip for you,'' he said. He tore off a thin strip of paper. He connected the two ends together to make a normal band. ``Instead of doing this,'' said the Pig, ``I'm going to put a twist in it first. Hand me a piece of tape, please.''
Alice fumbled about awkwardly. ``I don't have any tape,'' she informed the Pig.
``Of course you do,'' he replied. ``You should always carry tape when you travel.'' Much to her amazement, he produced a piece of tape from behind Alice's ear.
``How did that get there?'' she asked.
``It was there,'' said the Pig. ``Don't you know what you keep behind your ears?'' Alice was speechless, which wasn't a bad thing because the Yellow Pig wasn't waiting for her to say anything. He taped the two opposite ends of the paper together. ``There. That's a Moebius strip.'' He handed his creation to Alice for inspection.
He cautiously removed the tape with his hooves. He laid the strip of paper down flat. A thin line ran down its center. ``That's one side of our original surface. If I turn it over, we'll see the other side.'' He turned over the paper to reveal the other side which had an identical line in the middle. ``How did that get there?'' he asked. ``I only traced a line on one side of our Moebius strip. Well, it's simple. The Moebius strip only has one side. That's what the twist does to it.''
Alice had trouble believing all of this, but she could see no flaw in the Pig's logic. ``Can I try it myself?'' she asked.
``Of course,'' replied the Pig, handing her the rest of the paper, scissors, a roll of tape, and a pen. ``I'm going to look at that painting for a moment,'' he said pointing. ``It's one of Escher's `Circle Limits'. Escher created so much wonderful art.'' He headed in the direction of the painting, leaving Alice contentedly cutting another strip of paper.
Alice lightly drew a line along one side of the paper before twisting it. She taped the two ends together, just as she had seen the Pig do. The side with the line was now connected to the side without a line. ``Aha,'' she murmured.
Then, instead of drawing a line, she wrote an R on the right side of the strip and an L on the left. She continued labeling all the way around the strip. ``Those are the foot prints,'' she explained to herself. Then she held the Moebius strip up and turned it around slowly. On the reverse of every L was an R and on the reverse of every R was an L. The foot prints hadn't been reversing themselves in the painting after all. Alice had just been seeing the piglet cross over each part of the strip twice because of the twist. It was still confusing, but it certainly wasn't the most confusing thing she had seen that day. ``I think I get it now,'' she called out to the Yellow Pig.
``You'll get two strips,'' said Alice.
``Nope,'' said the Pig gently. ``If you cut a normal band, you would get two thinner bands. But this one has a twist, so my cut can't separate it. Try it.''
Alice cut the Moebius strip along the center. The paper fell not into two strips but into one longer band. It was half the thickness and twice the length as the original strip.
``Is that a onesided band or a twosided band?'' asked the Pig.
Alice drew a line down the center. It looped around the band twice before the ends connected. The pen crossed over two pieces of tape twice. ``It's twosided,'' she said. ``It has two twists in it, but otherwise it is just like a normal ring.''
``Now, what do you think will happen if you cut it in half again?'' asked the Pig.
``The same thing as last time,'' conjectured Alice. ``I'll get an even longer and more twisted strip.'' This time the Pig didn't have to prompt her to try. She was already eagerly cutting the strip in half. The strip split into two linked rings. Neither of them, she verified, were Moebius strips.
``What happens if we start with a strip with three twists in it?'' asked the Pig. Alice wasn't sure what to think. ``Well,'' continued the Pig, ``it will be one piece because it has that odd number of twists. The opposite ends line up so we can't separate them with a cut.'' Since Alice still didn't quite know what would happen, she cut another strip of paper and taped it together. When she cut it, a tangled mess resulted.
``I can't even tell if that's one piece or two,'' she said, discouraged.
``You could trace it,'' suggested the Pig.
Alice did. She drew a line down the center of the band. It looped around the whole paper, but only on one side. ``It's one band,'' said Alice, ``wrapped around itself with two sides. I wonder what will happen if I cut it again. Since it has two sides,'' she conjectured, ``it will still have two sides when I cut it again.'' It did. Cutting this strip in half resulted in two very twisted and linked double sided rings.
``What happens if we take our original Moebius strip with one twist and cut it in thirds?'' pushed the Yellow Pig, already making a model to cut. The result was one original length Moebius strip linked to one longer doubly twisted normal ring.
``Wow,'' said Alice. ``That's all incredible. We're able to make so many different kinds of loops out of one original loop. The Moebius strip is very special.''
``It is,'' agreed the Pig. ``That's something mathematicians have known for awhile. It's part of a branch of mathematics known as topology. Topologists study all sorts of surfaces. Like the shape of a donut or bagel, which they call a torus.''
``I like donuts and bagels. Once when I came home from school I wanted a poppy seed bagel, but my sister Lorina had eaten it,'' interjected Alice. ``Bagels have holes in them.''
``Yes, they do, and that's what mathematicians like about them. The hole makes a donut fundamentally different from a sphere. Topology is about different surfaces. Two surfaces are different if one can't be easily transformed into the other. In topology a lot of surfaces are considered the same, or equivalent, because they are just contortions of each other. Think about a balloon; balloons are almost perfect spheres. You can deform a balloon by poking at it, and it's still roughly a sphere. And no matter what you do to that balloon, you can't make it look like a donut without cutting it. Topologists don't allow cuts in transformations. A donut cannot be the same as a sphere because it has a hole. Similarly, a donut with two holes is different from a donut with one hole.''
The Pig continued, ``You may think of a sphere as being a threedimensional solid, but at least in this context, a sphere is just a surface like a plane. At any given point on a sphere, it's like being on a plane. Our world is spherical and yet it appears flat. A twodimensional map can represent the globe, with some distortion of size. Topologists don't care about the difference in size. They are just concerned that there is a way to relate every part of the globe to every part of the map. And this can be done because a sphere is just a twodimensional surface. Even though it is situated in three dimensions, it is only twodimensional, just like the surface of a piece of paper.''
``So spheres are just surfaces?'' asked Alice. ``What about donuts?''
``To a topologist, yes. The term torus just refers to the surface of the donut. Topologists get their coffee cups and donuts confused. A coffee cup has one hole for the handle. Donuts have one hole in the center. Even though coffee cups and donuts look like very different things to us, topologists think of them as being the same. They say their surfaces are topologically equivalent. They are both tori, which is the plural of torus.''
Alice's mind was racing. ``If you can make a flat map to represent a sphere, can you make a map of a torus?'' she asked.
``You can,'' said the Pig. ``In fact, there's a popular game here based on such a map. It's called Pacham. In Pacham, you are a character that collects dots and avoids enemies. It takes place on a twodimensional surface. But unlike a normal playing board where you can be trapped in corners, there is no definite top or bottom, nor left and right. Instead, the surface is a continuous loop. You can walk off the top and come back from the bottom. In the same way, the left and the right sides are connected. The surface is a loop. And that's what a torus is. Think of a piece of rubber. Now glue two opposite sides together to make a tube like a garden hose. Then attach the two circular openings together to make a closed ring. The outer surface is a torus.''
``Spheres and tori are known as orientable surfaces because they preserve orientation. There are also nonorientable surfaces which are surfaces with a twist. On a nonorientable surface, left becomes right and clockwise becomes counterclockwise. The Moebius strip like that. The piglets you saw in the painting appeared to reverse themselves. But a Moebius strip is just a path like a line. There are other surfaces like the Moebius strip. One is known as the Klein bottle. It's very hard to conceptualize a Klein bottle. Most people can't picture it at all.''
``But Escher is one of those people who can. He's not a mathematician, but he has an incredible mathematical intuition. You can see mathematics at the center of his work. A lot of his art makes use of tessellations and those wallpaper symmetries. He has used all seventeen patterns in his works. The painting I stopped to look at before is a different kind of tessellation that makes use of hyperbolic geometry. In hyperbolic geometry parallel lines intersect each other. The sum of the angles in a triangle is less than 180^{ƒ}.''
``Stop!'' cried Alice suddenly. ``You're confusing me horribly.''
``Oh,'' the Yellow Pig stopped. ``I'm sorry,'' he apologized. ``We're here to see art, not talk about math. Let me show you a painting by another artist.''
And so Alice and the Pig left the Escher sketches and headed to the next room.
The next room was considerably smaller than the last room had been. The room itself was an artistic endeavor. The walls of the oddly shaped room were covered with frescos. The ceiling was painted with a mural of pigs. The windows were stained glass.
``This room is such a funny shape,'' remarked Alice. The room was, in fact, shaped something like this:
``Oh,'' said Alice, listening to her ``oh'' echo over and over again, each time slightly fainter than the time before.
The Pig continued, ``Music halls often have curved walls and domes and walls with rough surfaces. All of those intricacies are to play with the way sound reflects.'' He began to sing:
Alice clapped at the end of his performance.
``Now,'' said the Pig. ``Here's something really neat about this shape. You stand over there,'' he said, pointing to a small spot that was clearly marked on the floor. ``And I'll stand over here.'' This second spot he indicated was identical to the first but all the way across the room. ``Then we are going to whisper to each other and because of the shape of the room, we will be able to hear each other perfectly.''
They took their places facing away from each other, and the Pig whispered ``Ellipse.''
``I can hear you,'' whispered back Alice loudly.
``No need to be so loud,'' whispered the Pig. ``I can hear you perfectly.''
``But how is that?'' Alice asked in disbelief. ``You are all the way across the room.'' Alice was beginning to think that anything was possible, but she also knew that the Pig must have a good mathematical explanation.
The Pig explained in a whisper, ``The sound is not traveling in quite the way you would expect it to. Sound travels in waves, and those waves travel in straight lines. But when you speak there is not just one wave of sound. You are emitting sound waves in all directions.''
``But aren't most of my sound waves in front of me? I'm not talking out of the back of my head, am I?'' Alice was concerned for a moment that maybe she was, but that didn't seem right at all. ``There's a wall in front of me. How can you hear me when I'm talking into a wall?''
``Ah,'' said the Pig, ``think about what I have said about reflection.''
``You said that sound waves bounce off walls and that they reflect at the same angle as they hit,'' she repeated.
``Exactly correct,'' said the Pig. ``If you talk at a straight wall, the sound will bounce right back to you. If there is a wall at a 45^{ƒ} angle, sound will travel at a 90^{ƒ} angle, exactly perpendicular to you.''
``I never could play pool,'' said the Pig wistfully, ``my hooves are too short. I can't play pingpong either.''
``I'm sorry,'' Alice sympathized.
``But yes,'' continued the Pig, ``the way sound travels is an awful lot like how a billiard ball travels. Only a billiard ball is confined to just the surface of the table, or at least it should be. Sound travels in three dimensions. Maybe more.''
Alice thought for a moment. ``So when I speak, my words travel in sound waves in all directions from me. Then most of them hit this wall and bounce off. They must reflect somewhere behind me, and that's how you hear them?''
``Almost,'' said the Pig. ``Think about a sound wave, or a line, directly in front of you. It hits the wall and comes straight back down the line marking a diameter of the room.'' The Yellow Pig walked over to Alice, stopping to pick up some billiard balls.
``What are those for?'' asked Alice.
``They are for you to find out where the other sound waves go,'' the Pig said.
``Oh,'' Alice said.
The Pig handed the balls to Alice. ``Roll the first one just a little bit to your right.''
Alice did as she was instructed. The ball hit the wall and bounced further away from her. She turned around and watched it roll across the floor. It passed very close to the point where the Pig had been standing before.
``Look,'' squealed the Pig. ``That's the other marked spot.''
``The Pig planned that one,'' Alice thought. ``I'll try throwing another ball in a different way.'' She grabbed another ball from the pile and aimed for a point well to her left. She watched the ball eagerly. It stopped near the same spot on the opposite side of the room. She tried again with a third ball. Like the previous two, it steered itself across the magical point. She tried a fourth ball and a fifth ball. And a sixth.
Then the Pig collected the balls. He brought them to the point where he had been whispering to Alice. He gently rolled the balls at different angles toward the wall closest to him. All six balls bounced off the wall and aimed toward Alice. Fortunately, they lost momentum and stopped rolling before they assaulted her from every direction. Alice was surrounded by a semicircle of balls.
``How did you do that?'' asked Alice.
``Easy,'' said the Pig. ``I picked those two points very carefully. If I try throwing the balls from anywhere else in the room, they won't meet at the same location. The shape of the room is a very specific one. It's called an ellipse.''
``Elips,'' Alice repeated.
``The two points that I chose are very special. They are known as the foci of the ellipse. Ellipses are everywhere. Planet orbits are elliptical in shape. Circles are one type of ellipse. But whereas circles have the same diameter everywhere, an ellipse varies in diameter. The largest diameter is called the major axis, and the shortest is the minor axis. From these two distances we can compute the area of the room. We have to use p. There are equations that describe ellipses as well,'' said the Pig. ``Ellipses are a type of quadratic, or second degree polynomial equation.''
``But what makes them so special? And how do I make an ellipse without having to graph some complicated equation?'' asked Alice, whose head hurt whenever she thought about the quadratic formula.
``Well,'' said the Pig, ``I could tell you. Or you could figure it out for yourself, with a little bit of help. I happen to have a stencil of an ellipse with me. I'll trace you an ellipse on paper.''
He produced a stencil, as if from thin air, and drew an ellipse on another page in his notebook. He also pulled out a ruler from behind his ear. He marked two points inside the ellipse and two more on its perimeter. ``The two points on the inside are the foci,'' he said.
``Right,'' the Yellow Pig said. ``I want you to measure the distance from each of the outer points to both foci.''
This sounded slightly dull to Alice, but she knew the Pig must have some surprise up his sleeve, so she took the notebook from the Pig and began to measure with his punit ruler. She started with a point at the top of the paper.
The distance to the further inner point was 12 punits. The distance to the closer inner point was 5 punits. She measured the distances to the next point. They were 10 and 7 punits respectively. Alice wrote down the results and stared at them for a moment. ``Hey,'' she exclaimed. ``Both pairs add up to 17! In the first one, 12 and 5 is 17, and in the second, 10 and 7 is 17. I'll bet if I pick another point on the ellipse and measure the distances, they will add up to 17 as well.''
The Pig nodded. Alice grabbed the pencil and added another point to the picture. Sure enough, when she measured the distances and added them up, the sum was 17.
``The 17 part isn't really important,'' said the Pig. ``I just happened to have an ellipse where that constant sum was 17. You can make ellipses for other numbers as well. By moving the foci further apart or closer together, you can create an ellipse that is longer and thinner or one that is more circular.''
``I want to make an ellipse,'' said Alice. ``One that adds up to 20 and is thinner.''
``No problem,'' the Pig said. ``All you need is a piece of paper, two push pins, a pencil, and some string.'' These he supplied. He instructed Alice to cut the string to 20 punits. She did. ``Now, pick two points to be your foci. You want them to be somewhat far apart to make a thin ellipse. Put your push pins at those points.''
Alice did as the Pig instructed. ``Tie the ends of the string to the thumbtacks.'' This took Alice a little while to do because the knots kept slipping. ``Here's where you trace out the ellipse. The string has a length of 20 punits. Your ellipse is the set of all points that are a certain distance from the two foci. So just hold the string taut with your pencil.'' Alice put the pencil on one side of the string and pulled so that the string was tight. ``There, that's one point on your ellipse. Move the pencil to another point so the string is still stretched as far as it can.'' Alice did this. ``That's another point on your ellipse,'' said the Pig.
``Exactamundo,'' said the Pig. Alice traced an ellipse in the Pig's notebook. ``An ellipse is a conic section. Think about two ice cream cones.''
``I like ice cream cones,'' said Alice. ``And I like ice cream and chocolate syrup.''
``Me, too,'' agreed the Pig. ``Ice cream is yummy, and we are going to make all sorts of neat shapes out of our imaginary ice cream cones. Take two cones. Put the first one on a table with the circular opening on the bottom so it can sit there easily.''
``Like a hat,'' interjected Alice.
``Yes. Now put the other cone on top of that, only this time facing the way you would hold an ice cream cone to eat out of it. So the two pointy ends of the cones are touching. The shape of the two cones combined is a double cone. It has a circle on the top and then it gets thinner and thinner until it is a point in the middle. Then it widens out again. Now instead of having an ice cream cone, think about something like a block of clay filling in the cones. You want to imagine something solid, but something that can be cut easily.
``I have,'' said Alice, wondering where the Pig was going with this conversation about dairy products.
``Well, normally you try to cut in straight slices, perpendicular to a cutting board or another surface. But suppose you wanted to cut thin slices off of the top instead. That's what we are going to do. We're going to cut our cone shape into slices or sections. If we cut our cheese cone with slices exactly parallel to the cutting board, we'll get a bunch of circles of different sizes. But it's not very likely that we will cut exactly parallel to the cutting board. I certainly can't. I'm not very good at cutting cheese even when I'm not trying to make special shapes.'' Alice tried to picture the Pig cutting cheese and could see where he might have some difficulties. ``So I end up cutting the cheese with slices that are just at a slight angle to the cutting board. Can you see what shape results?''
``It's kind of like a circle,'' said Alice. ``If you are only cutting at a slight angle, you'll end up with what is almost a circle.''
``Right,'' said the Pig, ``I'll get a sort of elongated circle. A shape that is rounded but not all points on its perimeter will be the same distance from its center. And that shape is our ellipse. That's why an ellipse is called a conic section. Because it is a section of a cone.''
``That makes sense,'' Alice said. ``But what happens if you cut the block of cheese at a really sharp angle, like almost entirely straight up and down?''
``Excellent question,'' said the Pig. ``What happens if we take a cross section of the double cone at a different angle, like one perpendicular, at a right angle, to the table?'' The Pig repeated the problem and paused to let Alice think about it.
``It will cut the right side up cone and the upside down cone. I'll have cut two pieces of cheese.''
``Right. The cut will start going through the wider top of the cone. Then as the cone gets thinner, the cut will no longer be hitting the cone. You'll be cutting through air. Then the knife will intersect the cone again on the bottom half, creating two separate pieces. If you look at the edge that is left on the main block of cheese, you'll see another conic section known as a hyperbola.
``Yes, as a matter of fact, there is one more shape we can make. Hyperbolas and ellipses are created at a large range of angles. Circles are created only at one very precise angle. What other angle could be important in the double cone?''
Alice thought about this. She was puzzled. ``It's not the vertical cut,'' she thought to herself, ``because we already said that made a hyberbola. What other lines are there?'' She thought some more. ``The diagonal of the cone itself?'' she asked finally.
``Yup,'' said the Pig. ``If you cut a piece of cheese parallel to a side of the cone, you will only cut cheese from one part of the cone. Since you won't have two pieces, it's not a hyperbola. And it won't be an ellipse because the shape won't have the same roundness to the end. The shape created is known as a parabola.
``Ellipses,'' said Alice. ``This room is an ellipse, just like the section on the end of a cut of cheese. Neat.''
``Conic sections have neat properties. In our elliptical room, we can whisper to each other because the sound waves focus between two points. In a parabolic room, sound would be directed out in parallel waves. Hyperbolas are used in satellite dishes and in lithotripters to collect and direct waves at kidney stones. A lot of people, including my friend Isabel, have studied conic sections.''
He continued, ``We used to come down to this gallery together a lot before she got so busy with math and family. This was a place for us to take a break from math problems.'' He laughed. ``And here I am talking math. Let me stop for a little while and show you another painting.''
The Yellow Pig led Alice to the far end of the room. They stopped briefly to admire the roof, which was, as the Pig said, in the shape of a geodesic dome. In the back of the room was only an easel, covered by a thin sheet of a velvety material.
``This is a painting called `Sheep Fiction' by Sal V'doordolly,'' said the Pig, removing the cloth to unveil the painting. Alice studied the painting. One bottom corner of the painting appeared to be a series of sketches. There were several flat outlines of sheep followed by many more sheep that had been shaded so as to look threedimensional. There were sheep that looked like they were leaping out of the picture, sheep that looked like they were falling into the picture, and even a twodimensional sheep that was eating a flower.
In the other bottom corner there were a bunch of ovallike shapes. These started out small on the left, got larger, and then receded in size again almost symmetrically. There was a sheep that looked like it had been flattened. ``Poor sheep,'' thought Alice to herself. There was a sheep that had its insides drawn. There was a sheeplike outline in dots.
In the very center of the painting were two flat sheep, like cutouts or sheep stencils. They were facing each other. On either side of them were two forward facing sheep. One sheep was black on the left side and white on the right side. The other was black on the right side and white on the left side.
The top corners contained sketches of squares and cubes in such a regular way that Alice knew there was a pattern. At the top center was a large shape that looked much like a cross made out of alphabet blocks. The blocks seemed to almost pass through each other. Directly to the left of the cross was a small rectangle, like a door. To the right was a more stylized and blocklike door.
``What's with the cross?'' Alice inquired of the Pig.
``Oh that,'' said the Pig. ``It's not really a cross. Well, it is, but that's just because it is unfolded.''
``Unfolded?'' repeated a puzzled Alice. ``What do you mean by that?''
``Well,'' started the Pig, ``it's like this. Think of a regular cross. He drew a series of squares in his notebook that took the shape of a cross. ``How many squares are there?''
``Good,'' said the Pig. ``How many sides, or rather faces, does a cube have?''
``Six,'' said Alice after a pause, ``like dice.''
``Right,'' said the Pig. ``I can fold up a cube from my net of six squares.'' Alice watched him cut out the cross and fold it into a cube. She helped him tape the edges together.
``Neat,'' said Alice. ``Can you make other shapes as well?''
``I can,'' the Pig replied. ``What do you think this will make?'' he said, pointing at his notebook. He had drawn four triangles in which all of the sides had the same length. One triangle was in the center and the other three were attached to its three sides.
``Yup,'' agreed the Pig. ``It's a pyramid with a triangular base. The other common kind of pyramid  the Egyptian kind  has five sides, one of which is a square base. In our pyramid, though, all of the sides are triangles and the same. Mathematicians call it a tetrahedron. The `tetra' part refers to the fact that it is made up of four faces. The cube is occasionally called a hexahedron because it has six faces.
``Twodimensional shapes are much easier to understand. A hexagon has six sides, or edges. A hexagon also has six corners, or vertices. A threedimensional solid has many faces in addition to edges and vertices. The cube has six square faces and the tetrahedron has four triangular faces. But how many vertices does a tetrahedron have?''
Alice folded the Pig's triangle to make a tetrahedron. She taped the edges together. Then she put it down on the floor so a point was facing up and a triangular face was on the ground. There were three points as the corners of that triangle and the one point on top. Alice turned the tetrahedron around slowly to make sure she wasn't missing any other vertices. She wasn't. ``A tetrahedron has four vertices,'' she reported.
``And how many edges?'' asked the Pig.
The edges were a bit harder to count. Alice counted twice to make sure she had the right number. There were three edges on the triangle on the floor, and then there were three more coming up to the top point. ``Six,'' she told the Pig.
The Pig thought that was right, but he had to count for himself to make sure. He kept losing count. He got another sheet of paper and drew his four triangles again. ``It's sometimes easier for me to see things in two dimensions,'' he explained. This time, instead of having his triangles connected to each other, he left a little space in between. ``Now,'' he explained, ``I have four triangles. Each triangle has three edges. That's three times four or twelve sides. When I fold up the triangles, two triangles touch along any edge. In other words, adjacent triangles share edges. So even though I have twelve edges or sides when the tetrahedron is flattened, when I fold it up, half of those edges disappear. That's half of twelve or six edges.'' This seemed to convince him that Alice had counted correctly. Alice thought he had a neat way of looking at something threedimensional. ``A tetrahedron has four vertices, six edges, and four faces,'' he concluded. ``The faces are triangles. Three triangles meet at every vertex. `Vertex' is the singular form of `vertices','' he added. ``What about cubes?''
``A cube has six square faces,'' said Alice. ``I guess you want to know how many vertices and edges a cube has too, don't you?''
``I do,'' said the Pig. ``That is, if you don't mind counting.''
``Not at all,'' said Alice, who was glad to be able to assist her guide, who seemed to have a much harder time counting the sides of shapes than she did. Counting the corners was easy. Again, she put the shape down on the floor. The four corners of one square lined up on the floor. Four corners of another square were at the top of the cube. Alice labeled them all so the Pig could see them more clearly. ``There are eight vertices.''
The Pig accepted this. ``How many squares come together at any point?''
Alice looked at the cube again. ``Three,'' she said, ``just like the last time.''
The Yellow Pig nodded. ``How many edges are there?''
``That's easy too,'' said Alice. ``There are four edges bordering the top square. And four edges bordering the second square. And then there are four edges connecting the two squares. So there are twelve edges total.''
The Pig thought about this and tried to draw it out as well. ``There are three edges per vertex,'' he mumbled to himself, ``and eight vertices in all, and each edge is shared by two faces. Three times eight divided by two is twelve.''
``So,'' said Alice, enjoying her role as teacher, ``a cube has eight vertices, twelve edges, and six faces. What other shapes are there?''
``Not that many regular ones,'' said the Pig. ``A regular polyhedron is a threedimensional solid in which all of the edges, faces, and angles between faces are the same. It's not like in two dimensions where there are regular triangles and squares and pentagons and hexagons and even 17gons. In three dimensions, you can't just start out with the same shapes and angles and expect them fold together.
In fact, there are only five such regular polyhedra; they are sometimes referred to as the Platonic solids because Plato knew of all of them.''
``Those Greeks sure knew a lot about geometry,'' said Alice.
``They did,'' said the Pig. ``They were fascinated by shapes. And for good reason. Shapes are very interesting.''
``So what are the other three solids besides the tetrahedron and the cube?'' Alice asked.
``They are a bit more complicated. The next shape is the octahedron. It has eight faces. These faces are triangular. Four of them meet at any point. Another shape is the dodecahedron. `Dodeca' means two and ten. Dodecahedra have twelve faces in the shape of pentagons. Three of them meet at any point. The final shape is the icosahedron. `Icosa' means twenty, so these solids have twenty faces. They are triangles, and five of them meet at any point.'' As he spoke, he sketched the polyhedra in order from least to most faces.
``How many vertices and edges do those shapes have?'' asked Alice.
``Well,'' said the Pig, ``You could count the vertices and edges, but I'll just tell you.'' He thought for a few moments. ``The octahedron has six vertices. It's like two square pyramids with their squares glued together. And it has twelve edges. Four from each of the pyramids and four where the pyramids' bases connect. The icosahedron has 20 faces and 12 vertices and 30 edges. The dodecahedron is in some ways the reverse of that. It has 20 vertices and 30 edges to go with its 12 faces.''
``That's an awful lot of edges,'' said Alice.
``It is,'' said the Pig. ``Which is why it's surprising that a number as small and simple as two falls out of all of those numbers.''
``What do you mean?'' Alice asked. She was intrigued by the idea of another magical number relating everything.
``Exactly what I said,'' the Pig said. ``The number of vertices, edges, and faces for these polyhedra is related. And it's the number two that relates them. Let me make a table.'' He wrote down in his notebook:
hedron  tetra  hexa  octa  dodeca  icosa 
face shape  triangle  square  triangle  pentagon  triangle 
faces  4  6  8  12  20 
vertices  4  8  6  20  12 
edges  6  12  12  30  30 
``That's what we know about faces, vertices, and edges,'' said the Pig. ``Look at the tetrahedron again. Add up the number of faces and vertices. Then subtract the number of edges.''
Alice did as instructed. ``Four plus four is eight. Eight minus six is two.''
``Now try the cube,'' the Pig said with a wink.
``Six plus eight is fourteen. Fourteen minus twelve is two. Is that where you are getting the two from?'' she asked. ``You mean I'll get two for the other shapes as well?'' The Pig just smiled. Alice could see that he wasn't going to give anything away, so she worked out the arithmetic for the octahedron. ``Eight plus six is fourteen, minus twelve is two again. Twelve plus twenty minus thirty is two. Twenty plus twelve minus thirty is two. They are all two,'' she exclaimed. ``That's neat.''
``It doesn't only work for those five solids,'' said the Yellow Pig. ``It works for any other polyhedron as well. Just count up the faces and vertices and subtract away the edges and you'll get two. It's another beautiful result in mathematics that was worked out by Euler.''
``Cool,'' said Alice.
``Mathematicians have been trying to understand dimensions for a while. One of the easiest ways to do so is to reduce an object to something of lower dimension. Having the crosslike net of a cube is one such way to do this. The net is twodimensional. It's just a surface. Another way to think of a threedimensional object in two dimensions is to project it onto the plane. Think of a clear glass cube over a white piece of paper and a light shining over it. The light passes through the cube but is blocked by the edges. So what results on the paper is a twodimensional representation of the cube. This is one of the things that V'doordolly attempts to show in his painting. Projection and perspective are extremely important to artists. It's difficult to represent something threedimensional on a flat surface. That's why we use the technique of perspective. Objects that appear closer to us are often drawn larger than objects in the background. Artists imagine a fixed point off in the distance to which everything is being projected. It's a complicated idea. Perspective drawing has undergone a lot of refinement, particularly during the Renaissance.''
Alice thought about paintings she had seen. ``Is that why things like streets in paintings get closer together in the distance? A road starts out with the two sides being very far apart and then the lines come toward each other.''
``Exactly,'' said the Pig. ``Perspective has to do with how things appear to us from certain angles. How do we see threedimensional things in art? How do we see threedimensional things in the real world? Those are things I don't understand. Our perception and eyesight are pretty advanced.''
``I know another way we can represent three dimensions,'' said Alice. ``We can rotate a threedimensional shape slowly and then sketch it from several different angles. That way you can see the back. Or you can make a movie where something rotates. Movies are only twodimensional, but they sure look real at times.''
``They do,'' agreed the Pig, ``even when they aren't. Movies are able to portray motion. And the video camera tries to imitate what our eyes do on their own. Seeing a movie is a lot like seeing something real.'' He continued, ``I can think of yet another way to represent three dimensions using only two. Think of cutting an onion into slices of rings; think of a threedimensional object as a series of slices so thin that they are smaller than slivers. A solid object is just all of those slices put together. If you cut an onion into rings, you are cutting in one direction. Your cuts are parallel planes that divide the spherical onion. A sphere becomes a series of circles. If you put those circles back together, you have a sphere.''
``Onion rings aren't all the same size,'' said Alice. ``When you cut the top of an onion or the bottom, you get small rings. When you cut closer to the middle, you get larger rings.''
``This is true,'' said the Pig. ``One slice of an onion isn't enough to tell you what an onion looks like. But a whole bunch of slices, if they are the right slices, will.''
``What do our other shapes look like if we cut them?'' asked Alice.
``That depends on how we cut them,'' said the Pig. ``The easiest way to cut them is to put them on the floor, balancing on a face, and then cut pieces along parallels to the floor.''
``I get it,'' said Alice. ``When you put down a cube and cut it, you get squares. They are all the same size.
``They are,'' the Pig agreed. ``That's not true if you cut a tetrahedron though.''
Alice placed the tetrahedron on the floor in front of her. ``My first slice is a tiny, tiny triangle from the top. It's almost like a point. My second slice is another triangle, bigger than that one. The next one is bigger than that. It's like the onion, starting off small and then getting bigger.''
``Where's the biggest triangle?'' asked the Pig.
``At the bottom,'' said Alice. ``The base is the largest part. That's different from the onion which gets smaller again. All of these shapes are so different.''
``They are,'' said the Pig. ``And it's much harder to see other ways to cut them. But what if instead of starting with the face of a cube, you started with a vertex, just as you did with the tetrahedron?''
Alice frowned. She tried to visualize this. She put the cube in front of her and held it so that one vertex was facing directly up. Another vertex was facing down. Held this way, the cube looked like a strange top.
``Three,'' said Alice. ``Oh! So the first cut will intersect those three faces. It will be a very small triangle. Can that be right? There's a triangle inside the cube?''
``It is right,'' said the Pig. ``If you cut a cube from vertex to vertex, you start off with a point, then small triangles that get larger. Things get funny in the middle.'' He traced a triangle around the cube. Then he traced a strange line around the middle of the cube. ``This line is parallel to the triangles.''
``So that's another one of our slices?'' asked Alice. ``It looks funny.''
``This line intersects every face of the cube,'' said the Pig. ``There are six faces, so it is a hexagon.''
``So,'' said Alice, ``a cube when cut that way is just a bunch of triangles getting larger until they explode into hexagons. And then the slices go back to triangles and get smaller and smaller until they are a point.''
Alice was getting good at this slice game. All she had to do was hold the object and visualize cutting it like cutting vegetables or cheeses. She liked cutting different shapes out of vegetables and cheeses. She was often accused of playing with her food too much before eating it. The Pig was waiting patiently for an answer. ``The first cut,'' said Alice, ``is just a line.'' She borrowed the Pig's pencil and drew a line around the cube a little bit lower down. She looked at it again. ``The next cut is a rectangle. There are a bunch of rectangles getting bigger. Now let's see what we get in the center. I think that's going to be the biggest rectangle and then the rectangles will get smaller.''
``It makes sense that a cube contains lots of rectangles and squares, but would you believe that tetrahedra have rectangles in the middle? You can see them if you cut a tetrahedron from edge to edge.'' He lay a tetrahedron on the floor with only one edge touching the ground. There was another edge going in the opposite direction at the top of the tetrahedron. ``Cutting this one starts out with a line and ends with a line. In between are rectangles. Only they start out being wider than they are tall and end up being taller than they are wide. And in the middle is a square.'' Alice had some trouble seeing this, but she figured the Pig was probably right.
``There's one more thing,'' he continued. ``Think about how the dimensions are related. Take a point. A point is zerodimensional. Now copy that point and slide it over somewhere to the right of that point. Connect the two points. Now you have a line. A line is onedimensional. Now copy that line and translate it down. Connect the corresponding points on the lines. That makes a twodimensional figure, a square. Copy that square and lift up the copy. Connect the squares together by their corners and you get a cube. If you make another cube and move it in a direction perpendicular to all of those directions and then connect the eight vertices, you will get a fourdimensional hypercube.''
``There's a very good reason,'' the Pig said. ``It's to help you better understand the inhabitants of the left door.''
``The inhabitants of the left door?'' repeated Alice. ``You mean the rectangular door in the painting? We're going to meet people from this painting?''
``Not exactly people,'' said the Pig with an air of mystery. ``But yes, you are going to go into the painting to talk to them.'' The thought of going into another painting made Alice somewhat queasy. The expression on her face must have made this quite clear, because the Pig reassured her, ``Don't worry. No Moebius strips. You will find everything in this land quite tame.''
Alice mostly trusted the Yellow Pig's judgment, so she relaxed considerably. ``What's behind the door?'' she inquired.
``A twodimensional world,'' said the Pig.
``A twodimensional world?'' Alice asked in disbelief.
``Yes,'' said the Pig. ``The inhabitants there are not people, but rather flat shapecreatures living on a flat plane. They are entirely contained within their plane and hence within two dimensions.''
``What do they look like?'' asked Alice.
``Well,'' said the Pig, ``to us they look like simple polygons: triangles, squares, and even some pentagons and hexagons. But that's not how they see themselves,'' he continued. ``You see, because they are in the plane, so are their eyes which are located on one side of them. They can't see each other from the top.''
``Weird,'' said Alice. ``Do they even know what they look like?''
``Mostly,'' said the Pig. ``They talk to each other, and they can guess. Shape is pretty important to them so they've spent a lot of time studying it. What do you think they look like to each other?'' he asked.
Alice wasn't sure. ``Think of a large glass table with cutouts of triangles and squares and pentagons,'' the Pig said. ``Now instead of looking at the table from above like you usually do, get at eyelevel with the table. What do you see?''
Alice thought. ``Just a little bit of their sides. I can never see a whole shape, and the shapes look different at different angles. As the shapes turn, they must look completely different to each other.''
``They do,'' said the Pig.
``With a triangle,'' continued Alice, ``I can sometimes see two sides and sometimes only one. It depends on if a point is facing me or not. I can usually see two sides of a square and two or three of a pentagon. Is that how they tell each other apart? By how many sides they see?''
``Mostly,'' the Pig said.
``That must be awfully difficult for them. Why, they have to walk all the way around each other to determine their shapes.''
``Oh, they do that,'' said the Pig. ``They have a much more elaborate greeting ritual than just handshaking. Both polygons walk around each other. It's impolite to ask someone what shape they are. Or rather, it's not so much that it's impolite, but it shows your ignorance. Any wellbred polygon has spent many years studying how to tell polygons apart.
``Wow,'' said Alice in awe, ``it all sounds so complicated.''
``It is, and yet their world is so much simpler than the one we know. They are, after all, limited to only two dimensions. In the fourth dimension, or hyperspace, things are much more complicated. But,'' he said, `` I'll stop talking now and let you see a twodimensional world for yourself.''
Alice cautiously reached up to the painting, opened the rectangular door, and stepped inside. ``Hello?'' called out Alice. Though the world she was in seemed empty, her words had no echo. ``Hello?'' she greeted the inhabitants again. She turned around and realized that the Pig was not behind her. She was all alone. She didn't worry about how she would get back out. She knew when the time was right, she would find herself on the other side of the painting's door.
``Is anyone here?'' she yelled softly, walking around this new world. She was walking on a small flat plane. It was a closed disk. She saw odd shapes which weren't moving and had things in them. These, she decided, were houses. ``How odd that their houses have no roofs,'' she thought. ``I can see right into their homes.''
She walked to one of the larger houses, and after a moment's hesitation, stepped inside. ``Hello?'' she said for the third time.
``What? Who is there? Where are you? What are you?'' asked a frightened voice.
``I'm a girl from the other side of the door. My name is Alice,'' she introduced with a curtsy. ``Please don't be afraid of me.'' Alice thought she should be much closer to the plane in which her new friend lived. ``I just need to lower myself,'' she thought. She somehow slid through the plane so only her head was above the plane and the rest of her was below it.
The small shape screamed in horror. ``You're changing size and shape!'' Alice could see that he was a pentagon, not much larger than twice the size of her hand. Alice was confused by this outburst, but tried to soothe the pentagon. ``I'm sorry if I disturbed you by barging in on you, but you are the first person, err, shape I have seen here, and your house was wide open.''
``My house was not at all open,'' said the pentagon indignantly. ``I assure you I always leave my doors closed.''
``Yes, I suppose you did,'' agreed Alice. ``But you see, I came in through the roof.''
``You came in through the roof?'' sputtered the pentagon. ``What sort of craziness is that? You came in through the roof? Why next you'll be telling me that there really is a Santa Claus.''
``I did enter through your roof,'' said Alice. It occurred to her then why the pentagon was so confused. He lived in a twodimensional world and could not see anything above him. The only directions that made sense to him were north, south, east, and west. Up and down were meaningless concepts. He had probably never thought or heard of a roof before.
``Where did you come from?'' the pentagon asked suspiciously.
``I'm afraid it may not make much sense to you,'' said Alice, ``but I came from above. Not from north, south, east, or west, but from another direction entirely. One that is perpendicular to those that I have described.''
``Impossible,'' said the pentagon, ``you are spouting nonsense.''
``You are right in a way,'' said Alice. ``Now that I think about it, I'm not sure I can explain it myself. But you see, it's very simple. You are in a twodimensional world. And I came here from the third dimension.''
``The third dimension?'' repeated the pentagon. ``Then what my father said is true. There really are magical shapes with special powers who visit us. You are lucky you chose this house to make your presence known,'' he warned. ``The town is of the opinion that such visitors are nothing but trouble, witches who are to be destroyed immediately to preserve the town. I've always wanted to meet a magical shape. You are safe here.''
This news worried Alice, but she decided to dismiss it. After all, if there was any trouble, she could just pull herself out of the plane. ``I'm not a magical shape,'' she told the pentagon. ``I'm just a person.''
``But you do have special powers,'' he said. ``You can change shape.''
``I can't change shape at all,'' said Alice. ``I can stand up or sit down or curl up into a ball, but I'm still really the same shape. Two arms, two legs, a head, and a body. Nothing different.''
``You're doing it again!'' cried the pentagon. ``You are changing shape.''
``Oh,'' said Alice. ``I see what you mean. But I'm not changing shape at all. You are just seeing different parts of me. You can't see all of me at once.''
``Well, of course not,'' said the pentagon. ``No one can see all of another shape at once. You can't see the back side.''
``You can't,'' said Alice. ``But I can see all of you, because you are flat.'' At this the pentagon seemed offended. She hastily continued. ``You see ... .'' Alice tried to come up with an analogy the pentagon would understand. ``It's like this. Think of a line segment or a bunch of such segments. All living on a longer line. Their eyes are at their front. So when they look at each other they just see a single point. All lines look the same. But when you look at them, you can look from the side. Then you see them as they really are  as lines.''
``Ah,'' said the pentagon. ``I understand now. Thank you for the explanation. I'm glad I live in two dimensions; those lines must lead an awfully dull life.''
Alice decided not to mention that two dimensions seemed pretty dull to her as well. She tried a different explanation based on something the Yellow Pig had told her not long before. ``I am threedimensional,'' said Alice. ``You are a pentagon. When someone looks at you, they notice that you have a different width at different points. It's the same with me. I have a different thickness at different places. The third dimension consists of a bunch of planes, just like this one, stacked on top of each other.'' Alice could see that she was losing the pentagon with the phrase `on top of'. ``Not north or south or east or west,'' she said again, ``but on top of. That's another whole direction entirely.''
``I'm afraid I don't think I understand,'' said the pentagon. ``But that's okay. Please tell me how you can change shape.''
``I don't change shape,'' said Alice again, slightly frustrated. ``It was that you were seeing different parts of me. You can only see one side of the part of me that intersects your plane. And as I move up and down,'' she said demonstrating again, ``you see different parts of me. My feet, for example, are larger than my ankles. Then as I move down, the part of my legs that intersects your line of vision becomes thicker. Why, I probably look like two large ovals to you right now.'' The pentagon agreed. ``I am not any one of those shapes,'' concluded Alice, ``but the solid made up of all of those shapes in succession.''
Just then there was a knock on the door. The pentagon scurried across the room. ``You can see who it is, can't you?'' he asked Alice in a whisper.
``Yes,'' she answered back quietly. ``There are three circles.''
``You better go then,'' said the pentagon. ``I am sure they know you are here and have come to find you. Meeting you was quite an experience. My father will be pleased to know I have met someone from your world. I'm sorry I couldn't follow your explanation very well. I shall think about it.'' They heard a knock on the door again. ``Please, leave before they come in,'' the pentagon requested.
Alice lifted herself up so that only her feet were in the plane. Then she lifted herself up a bit more and was outside of their plane entirely. She waved goodbye to the pentagon, knowing that he couldn't see her at all. ``Curiouser and curiouser,'' she thought to herself. The door was just in front of her. She opened it and left the painting.
``That was most strange,'' said Alice, upon reentering the art gallery. She stopped. The Yellow Pig was nowhere to be seen. ``Oh bother,'' thought Alice, ``I've lost him again. I suppose he has gone off to admire some other artwork. I'll just wait for him to return.'' She looked around again. Sitting on the floor beside the sheep painting was her teddy bear.
``There you are, teddy!,'' she exclaimed. ``I've missed you.'' She picked him up and gave him a hug. ``Where have you been? I've been looking all over for you. So has the Yellow Pig. I'd introduce you to him, but I seem to have lost him now. Oh dear. I'm going to put you in my pocket now for safekeeping until we get home.'' And assured that she would not lose her bear again, she turned her attention back to the sheep painting. It was very odd. She recognized a sheep projected onto a plane, sheep drawn in perspective, and even cross sections of sheep. ``Why, it's almost as if this painting is trying to explain sheep using only two dimensions. How odd,'' she said aloud. She knocked lightly on the second door.
``What's that?'' asked a voice.
Alice looked up from the painting, startled. ``Whwhere did you come from?'' she asked. She realized that she was talking to a sphere, but that didn't seem too unusual, all things considered.
``I came through the second door in the painting,'' the sphere responded.
``I didn't see you,'' said Alice. She was a bit confused as she had been staring very intently at the painting and thought for sure she would have noticed the arrival of the visitor.
``Of course you didn't see me,'' said the sphere. ``You weren't looking the right way. Not that I expected you to.'' Alice found his attitude to be in rather bad taste.
``Which way should I have been looking?'' she asked timidly.
``In a completely different direction than you were looking,'' replied the sphere, as if that said it all.
Alice tried a different tactic. ``My name is Alice. Who are you?''
``I,'' said the sphere haughtily, ``am a hypersphere.''
``A hypersphere? Like from the fourth dimension?'' asked Alice.
``Exactly. And I am visiting your wretchedly limited realm.''
``Wow,'' said Alice, ignoring his remark. ``There really are four dimensions? I thought the fourth dimension was just something people talked about. A concept, you know. Something mathematicians like to think about. `Suppose there is a fourth dimension ... .'''
``There's no supposing about it,'' said the hypersphere. ``There is a fourth dimension, and I am from fourdimensional space.''
``Prove it,'' said Alice.
``Prove it?'' said the hypersphere with a laugh. ``If I weren't from the fourth dimension, how did I get here?''
Alice failed to be impressed with that argument and told the hypersphere so. ``Here,'' said the hypersphere. ``Put me in one of your threedimensional boxes and watch me escape.''
Alice did so, and the hypersphere got out of the cube with ease. ``I'm convinced now,'' said Alice. ``Not because you escaped, but because of how you escaped.''
Now the hypersphere was interested. ``What do you mean?'' he asked.
``When you escaped, it looked to me like you were getting smaller. You started out as a large sphere and then got smaller and smaller until you were just a speck. Then you disappeared from my sight entirely. That's when you must have been in a different space, parallel to my own.''
Alice wasn't sure she understood what she was saying at all, but it entertained her to realize that she knew more than this great hyperbeing. ``See,'' she thought to herself, ``it's just like when I went through the door to two dimensions. The pentagon could only see sections of me. No wonder he was so confused. But if twodimensional beings don't understand the third dimension, it makes just as much sense that I wouldn't understand the fourth dimension.''
``Hmph,'' said the hypersphere. ``I guess you are right. I hadn't thought about it that way. I've always just thought of all of the tricks I can pull on you threedimensional beings.''
``Like what?'' asked Alice.
``Well,'' said the hypersphere, ``like this. Take off your right shoe.''
Alice unbuckled and removed her shiny black shoe. The hypersphere took it from her and disappeared for a moment. When he returned he had a left shoe. Alice was very puzzled by this. ``How did you do that?'' she asked, after inspecting the shoe.
``It's easy,'' replied the hypersphere. ``There's no difference between a left shoe and a right shoe.''
But try as she might, Alice could not get the shoe back on her foot. Alice was really not in the mood for such tricks, but she needed the hypersphere to transform one of her two left shoes. ``Please,'' she begged, ``Do it again.'' The sphere was happy to do so, and this time he returned a right shoe. Alice put both shoes back on her feet before the hypersphere could suggest any more tricks.
But the hypersphere had no more tricks. ``I'm bored,'' he said with a yawn. ``There's nothing to do here. I'm going home.''
``Wait,'' said Alice. ``You got here through a door, right?'' The hypersphere gave some strange indication which Alice interpreted as a nod. ``Was it a door in a painting?''
``It was,'' said the hypersphere.
``Well,'' asked Alice mischievously, ``was there another strange looking door in the painting?'' The sphere agreed that there had been. ``When you return,'' instructed Alice, ``knock on that door and wait for a response. You'll be visited by a being from the fifth dimension.''
``The fifth dimension?'' said the sphere incredulously. ``Why that's impossible. Everyone knows there are only four dimensions.''
``Really?'' asked Alice. ``I'm not surprised you find it hard to believe. It was hard for my twodimensional friend to realize there were three dimensions. It was hard for me to realize there were four. But I'll bet there are more than four dimensions. I'll bet somewhere there's someone who finds your world flat and boring.''
The hypersphere was almost roaring by this point. ``You don't know what you are talking about,'' he shouted. ``I am the king of this universe!'' His voice bellowed though his size became smaller. And then he was gone.
``Well done.'' Alice turned around. It was the Yellow Pig again.
``You saw that?'' she asked. ``I didn't imagine that?''
``I can't say if you imagined it or not, but if you imagined it, then so did I,'' replied the Pig. ``I only caught the end of your conversation I'm afraid. I think you put that hypersphere in his place very nicely.''
Alice beamed. ``Thank you,'' she said. ``And guess what?'' The Pig didn't guess, so Alice continued, ``I found my bear. He was just sitting by this painting. I have no idea how he got there. I'd like you to meet him.'' Alice pulled the bear out of her pocket.
The Yellow Pig extended his hoof to the bear, and they shook paws in a fashion. ``Pleased to meet you,'' he said. ``How do you do?''
``He won't answer you,'' said Alice. ``He just doesn't talk.''
``I see,'' the Yellow Pig said with a smile. ``It's a lovely teddy bear.'' Alice put the bear back in her pocket.
``I think I understand about dimensions. Sort of. But those were really just threats I was yelling. I have no idea what will happen if he knocks on the door in his painting. Do you think there is a fifth dimension?''
``I don't know,'' the Pig responded. ``But it wouldn't surprise me at all.''
``I don't think anything surprises me anymore,'' said Alice. ``There is one thing I don't understand that maybe you can help with. How did he change my shoes?''
``Oh,'' said the Pig. ``That is something I believe I can explain. Trace your foot prints on paper and cut them out.''
``It's what my feet look like in a twodimensional world,'' said Alice.
``Right,'' said the Pig. ``And how was your trip through the first door to the twodimensional world?''
``Very flat,'' said Alice. ``I met a nice pentagon. I think I confused him.''
``That's okay,'' said the Pig. ``He will think about it a lot and over time it will make sense to him. He may grow up to be a great mathematician even. Anyway, when you were in the twodimensional world, you could have picked up one of these foot prints and flipped it over. Then it would look exactly like the other foot print, and the pentagon would have no idea how you had done it.''
``So,'' thought Alice, who was finding analogies to be an extremely useful tool, ``the hypersphere picked up my shoes out of the third dimension, rotated them around in the fourth dimension, and then put them back down?''
``That's what I think, yes,'' said the Pig.
``So what is the fourth dimension?'' asked Alice. ``I still can't picture it.''
``I'm afraid I don't know either,'' said the Pig. ``I sometimes think of it as being inside out. Maybe in the fourth dimension it's like being on a Moebius strip and there is no inside or outside.''
``What do you mean?'' Alice asked.
``Well, instead of shoes, think about rubber gloves. How can you turn a right rubber glove into a glove that will fit on your left hand? You turn it inside out. Then it will fit perfectly. So maybe inside and out are the directions in the fourth dimension. Others may tell you the fourth dimension is time and its directions are past and future. Speaking of time,'' he said, looking at his watch, ``shall we go? It's getting awfully late.''
``I guess it is,'' said Alice. ``I've enjoyed this gallery very much.''
``Perhaps you'll come again someday,'' said the Pig, leading Alice around the other side of the room to the front door. The side wall was covered with a huge mirror.
``Hey!'' exclaimed Alice. ``Look at us in the mirror. I'm on your right side, but in the mirror I'm on your left side. And my shoes.'' Alice picked up her right foot and shook it. ``In the mirror, the shoe that moves is a left shoe. It's like the fourth dimension!''
``It is!'' said the Pig, equally excited. ``I hadn't thought of that.''
``Well,'' said Alice with a renewed sense of adventure, ``there's only one thing to do.'' She grabbed hold of the Yellow Pig's right hand, and the two of them went through the looking glass.
Alice experienced a rather peculiar sensation as she fell through the mirror. She felt as if she were somehow turning inside out and then everything was backwards. What she had previously thought of as her left hand was now her right hand. The Yellow Pig now had nine eyelashes on the eye that had previously had only eight.
While Alice and the Pig were trying to adjust, two small men introduced themselves. Alice noticed that when they shook hands, one used his left hand and the other his right. ``Welcome to Logicland,'' they said in unison. ``The room of games is just ahead. They pointed Alice and the Pig in the right direction and quickly disappeared.
``How odd,'' said Alice to the Pig. ``I wonder what that is.''
``I don't know,'' said the Pig. ``We'll have to wait and see. I've never been here before. I must say, I don't make a habit of leaping through mirrors as you do.''
``Well,'' said Alice, ``I figured I had come this far.''
``True,'' said the Pig. ``I haven't taught you any probability yet, have I?''
Alice shook her head. ``No, you haven't.''
``Well then I must,'' said the Pig, as they began walking in the direction of the game room. ``Probability is the study of percentages, of odds, of chances. How likely is it that a certain event or series of events will occur? Gambling is about probability. When you roll a normal pair of dice, each die will have a number of dots from one to six. The pair will add up to a number from two to twelve. Dice are one way of generating somewhat random numbers. An even simpler way is to use coins. A coin can land either heads up or tails up. That's two ways, and ideally both ways are equally likely to occur. That means the odds of getting heads when flipping a coin is ^{1}/_{2} or 50 percent.''
``I have some coins with me,'' said Alice. She reached into her pocket and produced six coins for the Pig.
``Good,'' said the Pig. ``Now, here's my first question: what are the odds of getting two heads if I toss a coin twice?''
Alice had to admit she had no idea.
The Pig explained, ``I'm asking about two separate events: the first coin toss and the second coin toss. And I'm asking what are the odds that both things happen. To find the probability that two independent events occur, you multiply both of their individual probabilities together. Does that make sense?''
``I think so,'' said Alice. ``The odds that both things happen is smaller than the odds of either happening.''
``Right,'' agreed the Pig. ``The odds of getting two heads is ^{1}/_{2} ·^{1}/_{2} or ^{1}/_{4}.''
``Sure,'' she replied. There was a room directly in front of them. ``This must be the way to the room of games.''
``Before we enter,'' the Pig said, ``let's talk some more about probability.'' This was agreeable to Alice, so he continued. ``What are the odds that if I toss the coin three times, all three tosses will be heads?''
``I think I can figure that out,'' said Alice, thinking aloud. ``The odds of the first coin being heads is ^{1}/_{2}. The odds of the second coin being heads is ^{1}/_{2}. The odds of the third coin being heads is also ^{1}/_{2}. So the odds of all of them being heads is just those odds multiplied together. ^{1}/_{2} ·^{1}/_{2} ·^{1}/_{2} = ^{1}/_{8}.''
``Exactly,'' said the Pig. ``And ^{1}/_{8} is (^{1}/_{2})^{3}. The 3 is because there are three coins. The odds of getting seventeen heads out of seventeen tosses is (^{1}/_{2})^{17}.''
``I see,'' said Alice. ``So now I know how do to the odds that all the coins are heads. What if I want to know the odds that they aren't all heads?''
``That's easy,'' said the Pig. ``Probability ranges on a scale from 0 to 1. If something has probability 0, in an ideal world, it will never happen. If something has probability 1, it is certain to happen. The probability of getting either all heads or not all heads is 1.'' He wrote:

``You will always either get all heads or not get all heads. To find the odds that all the coins will not be heads, simply find the odds that they are all heads, and subtract that from 1.''
``Oh,'' Alice said, ``so the odds that with two coins they aren't all heads is 1^{1}/_{4} or ^{3}/_{4}.'' The Pig nodded. ``What are the odds that with two coin tosses, exactly one of the coins is heads and the other is tails?'' she asked.
``I'm glad you asked,'' said the Pig. ``Let's look at what all of the possible outcomes are. That is, all of the combinations that we can obtain from tossing the coins.''
``We can have two heads,'' said Alice, ``or two tails, or one of each.''
``Yes,'' said the Pig, ``but you are missing something important. On the first toss we have either heads or tails.'' He wrote H and T at the top of a piece of paper in his notebook, leaving much room between the two letters. ``Then, on our second toss, we could have either H or T. From each of these first two scenarios, there are two other scenarios that can occur.''
``It is,'' said the Pig. He drew two lines coming out from the `H' and two more coming out from the `T'. Below these lines, he wrote `HH', `HT', `TH', and `TT'. ``I've listed all of the outcomes,'' he said, ``and they all occur with equal probability. Each of these occurs ^{1}/_{4} of the time.''
After a moment, Alice was convinced that this was true. She studied the Pig's diagram. ``There are two times when heads occurs exactly once,'' she said. ``One time is heads followed by tails and the other is tails first and then heads.''
``In two out of our four cases, we get one head and one tail,'' reiterated the Pig. ``That's a key fact of probability. The odds of something occurring are the odds of any single event occurring times the number of combinations that satisfy the specific conditions. Or the number of ways something can happen divided by the number of different ways things can happen. In this case there are two ways we can have one head and one tail divided by four possible outcomes of our two coin toss. That's two divided by four or ^{2}/_{4}, which we can reduce to ^{1}/_{2}. That means there's a fifty percent chance of getting a head and a tail.''
``That seems pretty simple,'' said Alice.
``Well, I guess it is,'' said the Pig. ``But that's because we were dealing with such small numbers. I can easily write out all of the combinations of two coin tosses. But what about seventeen coin tosses? That's an awful lot of different sequences of heads and tails that can occur. Or even five coins. With a five coin toss, what are the odds that two coins will be heads and three will be tails?''
``Well, we just write out all of the combinations,'' said Alice. She took the notebook from the Pig and began to write a long series of H's and T's. After a dozen or so she stopped. ``There are a lot of possible outcomes,'' she said.
``How many?'' asked the Pig.
``There are five coin tosses and two different outcomes for each coin toss. That's two times two times two times two times two.''
``That's thirty two,'' supplied the Pig. ``You were almost halfway there.''
``Yes,'' said Alice, ``but then I would have to count up all the ones with two heads and three tails. Surely there must be an easier way to do that.''
``There is,'' said the Pig. ``It involves understanding combinations and permutations, which are two very important concepts in probability. And they both depend on factorials.''
``What are factorials?'' asked Alice.
``Remember before when we looked at triangular numbers? Numbers like 1+2+3+4+5+6+7+8? Well, factorials are like that. Only instead of adding, we multiply. For example, 4 factorial is 4 ·3 ·2 ·1. And 5 factorial is 5 ·4 ·3 ·2 ·1. That's the product of the numbers from 1 to 5. It only makes sense to talk about factorials of natural numbers. Mathematicians use factorials so often that they have a special symbol. It's an exclamation point because factorials are that exciting.''
``So 4 factorial is 24,'' said Alice after working out the multiplication.
``Right,'' said the Pig. ``And to get 5! you could multiply out all of the numbers again. Or you could just multiply 4! by 5.''
``Neat,'' said Alice. ``So 5 factorial is 24 times 5.'' She wrote this out in the Pig's notebook. ``That's 120. And 6 factorial is 120 times 6. And 7 factorial is that times 7. And 8 factorial is ... .''
``I think you get the idea,'' the Pig interrupted. ``Permutations are the number of ways something can be arranged. Like, if you have five people who go to the movies. And you want to know how many different seating arrangements there are. That's 5!.''
``How?'' asked Alice, looking puzzled.
``Think of it this way,'' explained the Pig. ``First they decide who should sit in the first seat. There are five choices for people who can sit in the first seat. Whichever one of them sits there, the remaining four go through the same process again for the next seat. That's four choices. Then there are three left to fight over the next seat. Then two, and then finally the remaining one sits down. Remember what we said about multiplying probabilities together?'' Alice nodded. ``That still applies only in a slightly different way. Now we multiply together the number of ways people can sit in each seat, because the odds of them sitting in one particular arrangement is simply one divided by however many seating arrangements there are. So there are 5 times 4 times 3 times 2 times 1 or 5! different ways they could be seated. That's a problem about permutations. In the coin toss problem we didn't care about the order of heads and tails. That was a problem of combinations.''
``So if we want to know about one specific order of the coins, that involves permutations?'' Alice asked.
``Right,'' said the Pig. ``But `How many pairings of two people are possible out of the five people at the movies?' is a problem of combinations, not permutations.''
``That's sort of like our handshakes problem, isn't it? Each handshake represents a pair of people,'' said Alice.
``Yes,'' said the Pig. ``You'll find a lot of math is like that. Two seemingly unrelated problems may turn out to have a lot in common. The results of one branch of mathematics may lead to conclusions in another branch. Just look at some of the math you've learned so far: triangular numbers, Fibonacci numbers, and now factorials. They may seem like different things, but they are all related. And it turns out that permutations are very closely related to combinations. In fact, there's a magical formula for calculating combinations. It might not make much sense, but I assure you it works. And it's full of factorials. Want me to tell you the formula?''
``Sure,'' said Alice.
``Okay,'' the Pig said, ``it's [n!/( r!(nr)!)]. That's the number of ways of choosing a subset of r things from a set of n. The formula comes from the triangle you were studying earlier with Isabel.''
``I don't think I understand,'' said Alice, frustrated because she had been following the Pig until his last formula.
``That's okay,'' said the Pig. ``You'll understand it some day. Next time you see Isabel, you should ask her to explain it.''
``Okay,'' said Alice, remaining somewhat unconvinced that the formula would work. She decided to just accept it for the time being though this made her slightly uneasy. ``I guess it's easier than writing out all of the combinations.''
``It is,'' the Pig said. ``I can now rephrase my question about heads and tails. A mathematician would say `What is 5 choose 2?' How many ways are there for the 2 heads to be arranged from 5 coin tosses?''
``We use the formula,'' said Alice. ``And n is the bigger number right? That's 5. And r is the 2 from the 2 heads. So that's [5!/( 2!(52)!)] which is the same as [5!/ 2!3!].''
``You have really gotten the hang of this combinations stuff,'' said the Pig. ``That's absolutely correct. And that number just so happens to be 10.'' Alice checked the arithmetic for herself and agreed. ``So,'' continued the Pig, ``there are 10 ways to get 2 heads and 3 tails. That's out of 32 possible outcomes from the coin tosses. Now we can calculate our probability.''
``The probability that something happens is the number of ways it can happen divided by the number of total possible outcomes,'' recalled Alice.
``Right,'' said the Pig. ``Because the odds of getting any specific ordering of coins is the same as the odds of getting any other ordering of coins. It's more precise to say that the probability of a specified outcome is a sum of the probabilities that it will happen in each particular way.''
``Okay,'' said Alice. ``So in this case it's 10 ways out of 32 possibilities. That's [10/ 32].''
``Yup,'' said the Pig. ``We can reduce that fraction to [5/ 16]. There's a 5 in 16 chance of getting 2 heads and 3 tails from 5 coin tosses. There's also a 5 in 16 chance of getting 3 heads and 2 tails from 5 coin tosses. Those are the most likely things to happen. What are the odds of getting 0 heads or 1 head?''
``Getting 0 heads means all tails. That means each coin has to be tails, and there are five coins. It's not like with 2 heads and 3 tails where there were different arrangements. This time there is only 1 of the 32 arrangements so [1/ 32]. I think is easier to write out the possibilities than to use the formula. The only ways to get 1 head are `HTTTT', `THTTT', `TTHTT', `TTTHT', and `TTTTH'. That's 5 ways or a probability of [5/ 32],'' finished Alice.
``Let's see if it adds up,'' said the Pig. ``In the five coin toss, the only outcomes are 0 heads, 1 head, 2 heads, 3 heads, 4 heads, and 5 heads. And the probabilities are symmetrical. The odds of getting 0 heads and hence 5 tails are the same as the odds of getting 5 heads and hence 0 tails. So we know the probability of each outcome and we just have to make sure that the whole thing adds up to one. Look at the distribution of probabilities. It is so much more likely to get about the same number of heads and tails than it is to get either all heads or all tails. In fact, we would expect to get about the same number of heads and tails.'' He wrote:
Alice thought about the Pig's question. It seemed really unlikely that 16 coin tosses in a row would be all heads. Why, the odds of that were (^{1}/_{2})^{16} which is an incredibly small number. The odds of tossing a 17th head seemed even less likely. ``I don't know,'' said Alice, ``I have a friend who always gets heads when he tosses coins, but it does seem pretty unlikely.''
``That's where most people, especially gamblers, get tripped up,'' said the Pig. ``Getting the 17th head isn't a big deal. It's the fact that there were 16 heads before that. But that has already happened, so we don't have to concern ourselves with that. Each coin toss is a completely independent event. Surely when you toss a coin, it doesn't know if 16 heads were tossed before it or not. So that can't make a difference. The odds of the 17th coin being heads is precisely the same as the odds of any toss of the coin being heads: ^{1}/_{2}.''
``The odds of getting 17 consecutive heads is unlikely, but once we have gotten 16 heads in a row, it is not at all unlikely to get a 17th head,'' repeated Alice.
``Right,'' said the Pig. ``I think you understand most of the basic points of probability. But some probability questions are a lot more complicated than that.''
``Like what?'' asked Alice.
``Well,'' the Pig said, ``let's go for a random walk and I'll try to explain a problem. I like random walks.''
``What's a random walk?'' Alice inquired.
``A random walk,'' said the Pig, ``is one in which we stop at regular intervals and decide at random which way to continue. A onedimensional random walk involves walking in a straight line where every few paces we stop and flip a coin. If it's heads, we go forward, but if it's tails, we turn around and go the other way. Let's try it.''
Alice and the Pig set off for their random walk. The Pig pointed out the line that they were to walk. ``We'll toss a coin to decide if we should go forward three paces or backwards three paces.'' The Pig flipped the coin. ``Heads.'' They walked three steps forward.
``Let me toss the coin this time,'' begged Alice. The Pig gave her the coin. She tossed it high up into the air. It landed with heads facing upward again. They moved three more steps ahead. ``Can I toss it again?'' Alice asked. The Pig nodded. This time the coin was tails. They walked three steps back.
``Keep flipping the coin,'' instructed the Pig. Alice did so. The next toss was heads so they moved three steps forward. Then tails and they moved back. Then heads again and another heads. Then two tails before the next heads. Then another heads and three tails in a row. Alice and the Pig moved forward and backwards accordingly.
``We're not getting anywhere,'' complained Alice. ``We're just walking back and forth. Every time we move forward some, we end up going back again.''
``This is true,'' said the Pig, ``but isn't that what you would expect? After all, the odds that you'll get heads are ^{1}/_{2}, the same as the odds that you'll get tails. They should more or less balance out.''
``I guess,'' said Alice.
``What's interesting,'' said the Pig, ``is that if you toss the coin an awful lot of times, we may end up way out in one direction or the other. We wouldn't be anywhere near the center. But if we continue tossing the coin indefinitely, we can be sure that we will end up at our starting point. It might seem to take forever and ever, but it will happen eventually.''
``If you say so,'' said Alice.
``I do,'' the Pig said. ``And we can have two and threedimensional random walks as well. Though a three dimensional random walk would be a flight really, and we couldn't expect to get back to where we started then.''
Alice thought the Pig was making very little sense again. She was about to tell him so when she noticed an oddlooking creature not too far ahead of them. ``Who is that?'' asked Alice, pointing at the figure she had detected.
``Why, I have no idea,'' said the Pig. ``Let's find out.'' They abandoned their random walk and approached the mysterious creature. It appeared to be a gigantic green pickle wearing a pair of overalls.
It skipped over to Alice and the Pig and greeted them merrily. ``Hello, hello! Who are you?''
``I'm Alice and this is my friend the Yellow Pig,'' said Alice. The Yellow Pig blushed at this introduction. Alice continued timidly, ``And what are you, sir? Are you a pickle?''
``I am,'' said the pickle. ``And is today your unbirthday?''
``My unbirthday?'' asked Alice. ``What's that?''
``It's simple,'' said the pickle. ``Is it your birthday?''
``No,'' said Alice.
``Then it's your unbirthday! You have a lot more unbirthdays than birthdays. So why not celebrate your unbirthdays?'' asked the pickle.
``I'm afraid they never struck me as very special, I guess,'' replied Alice. ``Why would I celebrate unbirthdays?''
``Because there are so many of them,'' said the pickle. ``I relish the thought of having frequent holidays to celebrate. Here, I've brought you both unbirthday presents,'' he said, reaching into one of his pockets. He pulled out two necklaces. ``I now present these to you for your unbirthdays,'' he said solemnly.
Alice held back a giggle as the pickle handed her a necklace. The Yellow Pig had a rather amused smile on his face. ``Thank you for your gifts,'' said the Yellow Pig. ``Is there anything we can do for you in return?''
``Actually, maybe there is,'' said the pickle. ``A friend of mine asked me a question the other day and it has been bothering me ever since.''
``What did he ask you?'' the Pig prompted.
``He asked me a question about birthdays. He said he went to a cucumber convention recently of about two dozen cucumbers, and two of those cucumbers shared the same birthday. He wanted to know if this was unusual or not. And I'm supposed to be the one here who knows all about birthdays and unbirthdays, but I've been thinking about his problem for days, and I have no ideas.''
``I'm sure we can help you,'' said the Pig. ``I'm not bad at mathematics, and Alice here is actually quite good.'' This time it was Alice's turn to blush.
``I don't know,'' said Alice. ``That problem sounds awfully hard. Isn't there an easier problem we can solve?''
``Yes,'' said the Pig. ``There are quite a few easier problems we can solve that will help us understand how to approach this one. For starters, suppose I'm in a room with a bunch of people. What are the odds that one of them shares a birthday with me? This is different from the original problem, you see, because in this case I am one of the people sharing the birthday.''
``It seems,'' said Alice, ``that you would be a lot less likely to find your birthday partner than that anyone could. This problem is a lot more specific.''
``It is much more specific,'' said the Pig. ``But now I'm going to reword the problem again. Remember that probabilities add up to one?''
``I think I see where you are going with this,'' said the pickle. ``The odds that either you share a birthday with someone or that you don't sum to one. So instead of looking at the probability of a shared birthday, we can look at the probability that you don't share a birthday with anyone else in the room. And then we can subtract that result from one.''
``Exactly,'' said the Pig, ``you are one cool cucumber.''
``How many people are in the room?'' asked Alice.
``Well,'' hedged the Pig, ``I'm going to do something that mathematicians like to do a lot. I'm going to make the problem easier by making it more complicated.''
``Huh?'' said a confused Alice.
``Sometimes it's actually easier to tackle a more generalized problem. So in this case, let's say that there are r people in the room. I'm also going to take some complexity out of the problem. Let's assume all years have 365 days. Leap year won't make much of a difference.''
``Oh, I hadn't even thought about leap years,'' said Alice. ``How confusing.''
``So let's forget about leap year,'' said the pickle. ``People born on February 29th are lucky because they have even more unbirthdays than the rest of us.''
The Pig continued, ``Since 365 is such a big number to deal with, I'm going to generalize that too. We'll just call it n and let n = 365. Then it's a problem about n and r.''
``n and r?'' said Alice. ``Then where are the numbers? Is this another one of those numberless math problems?''
``There are a lot of those,'' said the Pig. ``This problem does have some computation in it, though. Many problems are solved not with actual computation but with logic. Doing the computation often isn't nearly as important as knowing how to set up the problem.''
``I agree,'' said the pickle. ``Now I can restate your problem: Suppose there are n days in a year, each of which are equally likely to be birthdays, and r people in a room. What are the odds that none of their birthdays are on the same day as yours?''
``What is your birthday?'' asked Alice.
``It doesn't matter,'' said the pickle. ``In this problem the birthday is just one day. Whatever day your birthday is, there are 364 days that someone else can have a birthday so it's not on the same day as your birthday. That's n1 in our problem.''
``So the probability that one person doesn't share a birthday with you is n1?'' asked Alice.
``Well, [(n1)/ n],'' said the Pig. ``because there are n possible days for the other person to have a birthday, and on n1 of them, he or she will have a different birthday.''
``Okay,'' said Alice. ``And there are r people in the room. The probability that the second person in the room doesn't share your birthday is also [(n1)/ n]. And the probability that the third person doesn't share your birthday is still [(n1)/ n]. All of the probabilities are the same.''
``And there are r of them,'' interrupted the pickle. ``So we multiply the probability [(n1)/ n] by itself r times.''
``Multiplying something by itself repeatedly is raising something to a power,'' said Alice. ``So the probability that none of the people share your birthday is ([(n1)/ n])^{r}.''
``And we originally wanted the odds that someone does share a birthday with you, so that's 1([(n1)/ n])^{r},'' finished the pickle.
``Excilantro,'' said the Pig. ``Now let's plug in some numbers,'' he said reaching for his calculator. ``Fortunately, my calculator can do extremely large calculations. Let's try to find when it is about equally likely that I will and that I won't find a birthday mate.'' He tried a lot of numbers on his calculator, with Alice and the pickle watching.
``Try a large number,'' suggested Alice. ``The probability that some one person will have the same birthday as you is pretty low.'' The Pig tried 300 which they saw tipped the odds of finding a birthday match in the Pig's favor.
``How about 200 cucumbers?'' asked the Pickle. This number was too low. After many more tries, they agreed upon 253. If there are 253 cucumbers in the room, the pickle has about a fifty percent chance of finding a birthmate.
``Neat,'' said the pickle. ``Now what about my original problem? Again, we want to find when the probability is ^{1}/_{2}, but the problem is different. Any two people can share the same birthday.''
``Let's try finding when everyone has different birthdays,'' said Alice. ``That seemed to work last time.''
``Good idea,'' said the pickle, ``we can use the n and the r again, too.''
``How many different days are there for people to have birthdays?'' asked the Pig.
``365 or n each,'' said Alice. ``So for r people, that's n^{r}.''
``And how many ways can each person have their birthday so it's not the same as anyone else's?'' he asked.
``That depends,'' said the pickle. ``If there are only two people, the first person can have his birthday on any of 365 days. The second person can have his birthday on any of 364 days. That's like our last problem.''
``Right,'' said Alice, ``but if there are three people, the first can have his birthday on 365 days, the second on 364 days, and the third on 363 days. That's n, n1, and n2.''
``If there are four people,'' began the pickle, ``that's n, n1, n2, and n3.''
``So for r people, it looks like there are n ways for the first person to have a birthday, n1 ways for the second person to have a birthday, n2 ways for the third person, and so on all the way to nr+1 ways for the rth person to have a birthday,'' Alice said.
``We can just multiply all of those together to get the number of ways r people could have no birthdays in common,'' said the pickle.
``We can use factorials,'' added the Pig. ``Remember, n! is n ·(n1) ·(n2) ·º·(nr+1) ·º·2 ·1. We just want to divide out by all of that end stuff. In other words, we want that product, but we want to remove the last nr terms from the product. That's just [n!/( (nr)!)].''
``That's how many ways there are to have different birthdays,'' said Alice. ``Out of a total of n^{r} ways to have birthdays at all.''
``Which means the probability of having no common birthdays is [n!/( (nr)!n^{r})],'' said the pickle.
``And the probability of having common birthdays is 1[n!/( (nr)!n^{r})]. That's our solution!'' exclaimed Alice.
``Now we can answer my friend's question about two dozen cucumbers in a room,'' said the pickle. ``Oh, thank you both so much.''
``So what's the answer?'' asked Alice, curious to see how this would turn out. The Pig reached for his calculator and computed their formula with n = 365 and r = 24. The result was a little over 0.5 or fifty percent.
``It wasn't unusual at all,'' said the pickle. ``How odd. Can it really be that with only twenty four cucumbers in a room you should expect that two will have the same birthday?''
``That doesn't seem like very many,'' said Alice. ``Is that the least number of cucumbers, err, people, in a room for which that is true?''
The Pig computed some more. ``Close, 23 is. With 22 people, the probability of any two people sharing a birthday is 0.4757. With 23 people, the probability is 0.5073.''
``Hmmm ... ,'' said Alice, ``that does seem like very few people. Especially since it took 253 people to have a good chance of finding one with the same birthday as you.''
``It is more than a bit counterintuitive,'' agreed the Pig, ``but think about how many different combinations of couples there are among 23 people. Why, any two of them could share the same birthday. That means you have to compare each person to every other person. That's 253 different comparisons. Surely even though the odds are slim that any specific two will be the same, they are pretty good that one of those 253 couplings will.''
``I guess so,'' said Alice. ``I hadn't thought of it that way, but you are right. That's a lot of combinations.''
``Oh, thank you, thank you, thank you,'' gushed the pickle. ``You are both wonderful. You have saved my reputation as the birthday pickle!'' And with that he trotted off.
``What an odd fellow,'' the Yellow Pig commented to Alice. ``I've never seen a birthday pickle before. He was a nice guy, though. I'm glad we could help him.''
``Me, too,'' said Alice. ``And his problem was fun. Do you have any other probability riddles like that?''
``I know of many,'' said the Pig. ``Here's one of my favorites. It tends to get people into quite an uproar, so I don't try to explain it very often.''
``Oh, please do,'' said Alice.
``Well, okay,'' said the Pig. ``Here it goes: There are three doors. Behind one of them is an adorable penguin holding a one million pigpound check. Behind the others are rather unhappy frogs. You get to pick a door and keep its contents. Clearly you would rather have the penguin than either frog. Now here's the catch. I know which door has the million pigpound check and which ones have the frogs. And after you pick the first door, instead of opening it, I show you another door with a frog behind it. Then I give you an option. You can either open the door that you have already chosen or you can switch to the other unopened door. What should you do?''
Alice thought about the problem. In the Pig's problem there were two frogs and a penguin with a check. If she picked a door, her odds were 1 in 3 that she would get a penguin. Once the Pig showed her one frog, her odds were different. The remaining two doors contained a penguin and a single frog. She explained this to the Pig. ``So now my odds are much better,'' she said. ``But I don't see how changing doors would help. There are two doors and one of them has the money and the penguin. So my odds are 1 in 2 of getting the million pigpounds and the penguin.''
``That's what many people think,'' said the Pig, ``even a lot of wellrespected mathematicians. But many people, even mathematicians, are sometimes wrong.''
``You mean it does make a difference if I switch doors or not?'' asked Alice.
``It does,'' said the Pig. ``Quite a big difference. But I'm not going to tell you which way is better. You have to figure that out for yourself so you can see why one way is better than the other.''
Alice found the Pig's teasing somewhat annoying, but decided she could solve the problem without the Pig's help if she thought about it enough. ``Okay,'' she said, ``it doesn't matter what door I pick first, right?''
``Correct,'' said the Pig. ``You can name your doors A, B, and C, and you can always pick A. Picking B or C doesn't give you any advantage over picking A. Because you don't know what is behind the doors. All of the doors are the same until you know something about one of them.''
``And there are three possible ways the frogs and penguin can be arranged,'' Alice continued. ``Door A can have the penguin, door B can have the penguin, or door C can have the penguin.'' The Pig nodded. ``So now all I have to do is consider those three cases and what happens if I switch and what happens if I don't.''
``Exactly,'' said the Pig.
``So, if the penguin is behind door A and I don't switch, I get the penguin. If I do switch, I lose.''
``In that case you are better off not switching,'' the Yellow Pig said. ``That's one out of the three cases. What about the other two?''
``If the penguin is behind door B, I initially pick door A. You show me a frog behind door C. Then if I don't switch, I'm stuck with the other frog. But if I do switch, I get the million pounds.'' She continued, ``And for the last case, I start out with door A as always, and the penguin is on the other side of door C. You open up door B to show me a frog. If I don't switch, I get a frog, and if I do switch, I get the million pounds.''
``In those last two cases it looks like it's better to switch,'' said the Pig.
``You're right it does,'' said Alice. ``So if I don't switch I have a 1 in 3 chance of winning, and if I do switch I have a 2 in 3 chance of winning. I should switch,'' she concluded.
``I think you are right,'' said the Pig. ``Let me just write it down to make sure.'' He wrote:
door A  door B  door C  don't switch  switch 
penguin  frog  frog  win  lose 
frog  penguin  frog  lose  win 
frog  frog  penguin  lose  win 
``I'm convinced,'' he said, ``And furthermore, that's one of the clearest explanations I have heard as to why you should switch. Since you did so well with that, I'll give you another probability teaser. This one is about more complicated strategies. It's known as the Prisoner's Dilemma.''
``Does it have to do with prisoners?'' asked Alice.
``It does,'' said the Pig. ``Often when people are waiting for trial, they are given the chance to cut a deal. Say there are two people who are being held as accomplices for a crime. But because there is very little evidence, the prosecution wants one of them to plead guilty and give testimony that the other is involved. In return, the informant gets off free. The accomplice who is surely guilty will then get a five year sentence.''
``What happens if neither one confesses?'' asked Alice. ``Or if both do?''
``If neither confess, they will still be convicted, but they will each only get two years in jail. And if both confess, they will both get four years in jail. So what should they do?''
Alice thought about this. ``If neither confess, they get two years each for a total of four years. If both confess, they get four years each for a total of eight. If either one confesses but not the other, they get a combined five year sentence. It seems like neither of them should tell on the other.''
``It does, doesn't it?'' the Yellow Pig agreed. ``But people are more selfish than that. If you were one of the prisoners, and you were told you could be let free without sentence, wouldn't you consider it? And what if you were afraid that your accomplice would tattle on you? Then you would be better off telling on him because then you would only get a four year sentence instead of a five year one. No matter what your partner does, it is always better for you to cooperate with the prosecution than to remain silent.''
``But if you and your partner are really clever,'' said Alice, ``you can both stay quiet and get the best collective deal.''
``Right,'' said the Pig. ``And that becomes a bit more important in the next part I'm going to tell you about. Let's make the problem more hypothetical. What if this happens again and again? Tens of times, hundreds of times, maybe even thousands. Does the strategy change? Not much. Have you ever played the game Rock, Paper, Scissors?'' he asked. Alice nodded. ``The game gets to be complicated because you try to guess what move your opponent will make next. And your opponent is trying to do the same thing. How do you guess what he will do?''
``By studying what moves he has already made,'' supplied Alice.
``It's the same thing here. Suppose you know nothing about your opponent except for his or her previous moves. If you know the other prisoner has tattled on you the past twenty times, you'll expect him to tattle on you again. So you are better off telling on him as well to reduce your own sentence. But if you know your opponent won't turn you in, you should keep silent as well. Especially since once you turn him in, he probably won't be so friendly in the future.''
``It gets very complicated, doesn't it?'' said Alice.
``It does,'' said the Pig. ``Now here's something even more complicated. What if instead of there being just two prisoners in this situation, there are dozens of them? They are having what you might call a prisoners' tournament with multiple rounds. The winner of the tournament is the person who acquires the fewest years. In each round each prisoner decides which cohorts to turn in. And all of the prisoners know who has previously turned them in. Then, the strategy of cooperation becomes much more noticeably important.''
``So you keep track of who has tattled on you and then decided on whom to tattle based on that?'' asked Alice.
``Exactly,'' said the Pig. ``Let's say that the prisoners only look at the single previous round in the tournament.''
``Well,'' said Alice. ``There are only two things that a last move could have been. Either a prisoner told on you or they didn't.''
``If a prisoner told on you,'' said the Pig, ``maybe you should keep your mouth shut in the hopes that he or she will cooperate as well. Or maybe you should tell on the prisoner because surely that prisoner will expect you to and will continue telling on you.''
``And,'' continued Alice, ``if they don't tell on you, maybe you should tell on them so you'll get fewer years. Or maybe you shouldn't tell on them because they seem so nice, and if you both continue being nice to each other, it is to both of your advantages.''
``You can see how complex this problem really is,'' said the Pig. ``In fact, there really isn't much of a best single strategy. Which strategy is the best depends on the strategies of the other prisoners in the tournament. But one strategy stands out as a pretty good bet. It's known as the `tit for tit; tat for tat' strategy.''
``Tit and tat?'' repeated Alice. ``That sounds silly.''
``Well maybe it is,'' said the Pig, ``but it's pretty simple. It goes like this: Start out being nice; that is, keep silent for your first turn. Then, if someone told on you, tell on them for the next turn. If someone didn't tell on you, don't tell on them the next time around either. Simple, huh?''
``It is,'' said Alice. ``But does it work?''
``See for yourself,'' said the Pig. ``Find a group of people and try simulating a tournament like the one I've described. See who ends up with the least combined number of years after dozens of rounds.''
``You know, I think I will,'' said Alice. ``Let's go find the pickle. And I'm sure there must be others around here.''
``Good idea,'' said the Pig. ``I need to rest for a moment, but I'll catch up to you.''
``Wait,'' said Alice. ``You've been such a help to me. There must be something I can help you with. Isn't there some problem you have never been able to solve?''
The Yellow Pig let out a sigh. ``My problem is not a math problem. You don't really want to hear this.''
``No. I mean, yes. I mean, no, I really do want to hear it,'' stammered Alice. ``Please.''
``When I was a little piglet, before I came here ... ,'' began the Pig.
``Before you came here?'' interrupted Alice. Then she apologized for interrupting because she really did want the Pig to continue.
``When I was a little piglet, I lived in Pigland. That's up there, in the clouds. It's beautiful there. There are dozens of cloud drifts.''
``That must be wonderful,'' said Alice. ``But you left.''
``I did,'' said the Pig. ``And I don't regret that. Math was my calling, but I'm not an extremely good mathematician. Nowhere near as good as my friends Isabel and Gus. I do wish Isabel would attempt more mathematics. She really hasn't done anything lately.'' He sighed again. ``Anyway, here I get to teach mathematics which is what I really wanted to do. And I love meeting new people. Most of all, I love the garden. That's why I came here in the first place.''
Alice interjected, ``It's the most beautiful garden I have ever seen.''
``My family has visited here every summer for years. My father made some donations to the gallery one time, and we have been more than welcome here ever since. I would spend hours in the garden, though it was a lot smaller then than it is now. When I was in high school the caretaker of the garden offered me a summer job helping in the garden. And it was wonderful. After college I came back here. I still help out in the garden, and I get to give tours whenever anyone visits.''
``Do you have many visitors?'' Alice asked.
``Not that many,'' said the Pig. ``Only those who are willing and ready to learn ever visit here.''
``As I was?'' asked Alice. The Pig nodded. She blushed and changed the subject. ``So your family must have been wealthy to donate to the museum.''
``They are, I suppose. My mother is fairly wellrespected in the mathematical community, though she gave up professional math when she had her first litter. With seventeen little piglets in a few years, she didn't have much time to spare.''
``I guess not,'' said Alice, who couldn't imagine having that many children, or even that many brothers and sisters.
``My father is an astrophysicist, one of the leading scientists in Pigland. Flying is big there.''
``Can you fly?'' asked Alice suddenly. ``I mean, I didn't think pigs could fly, but you live in the clouds and all.''
A sad look crossed the Pig's face. ``Pigs can fly, yes. Quite a few of them. And almost all of my brothers and sisters can. But I have never been able to fly. I've always wanted to. Why, it's practically expected in my family, but I cannot.''
Alice wanted to help her friend. ``You don't need to fly, do you? You already have so many talents.''
``I know,'' the Pig said. ``I just wish I knew how to fly. I haven't the slightest idea how to do it, and everything I try seems wrong.''
``I don't know how to fly,'' said Alice. ``I'll bet no one does. They just fly. Like birds. They probably aren't trying to fly at all. They probably want to land, only they are afraid. Or they are trying to land, and failing completely to do so.'' She was almost convincing herself.
``I suppose,'' said the Pig, in a way that made it clear the conversation was over. Alice was hesitant to leave the Pig, but she was eager to meet others. So, assured that her porcine friend would catch up with her, she continued on in search of Logicland's inhabitants.
Almost immediately she met a small dancing horse. ``Oh please, can you help me?'' asked the horse. He looked so desperate for help and so happy to see Alice, that she forgot about the Pig's math problem.
She sat down next to the Horse, for he was significantly shorter than she was. ``How can I help you?''
``I have these riddles I need to solve. And I must be logical to solve them. I'm afraid I'm not very logical, but I must solve them. The Queen said I was not to leave until I had solved the riddles. I'm afraid I have no idea how to solve them. Please,'' said the Horse, ``you must help me. There's no one else here except the King, and I dare not wake him.''
``Why not?'' inquired Alice.
``Because if I wake him, I may cease to exist!'' the Horse exclaimed anxiously.
``What are the riddles?'' asked Alice, hoping it would be easier to solve the riddles than it was to understand the Horse.
``I have them written on scraps of paper,'' the Horse said. ``Here's the first.'' Alice looked over at the paper. In a tiny, but rather legible scrawl was written:
1.
Babies are illogical.
Nobody is despised who can manage a crocodile.
Illogical persons are despised.
``That's it?'' asked Alice. ``What sort of a riddle is that?''
``I don't know,'' wept the Horse. ``I'm supposed to come to some kind of a conclusion about babies and crocodiles. And it has to be the right conclusion.''
``Don't think so hard,'' said Alice, who had no idea how to solve the Horse's riddle. ``Just relax.'' Alice was certain that the two of them would be able to solve the problem if they thought about it together. She had learned not to be afraid of new challenges. A noise startled Alice. It was the Yellow Pig.
Alice introduced the Pig to the Horse. ``Horse, this is my friend the Yellow Pig. Yellow Pig, this is the Horse.'' They began to discuss the Horse's puzzle. Alice was feeling dizzy, but she wanted to help the Horse.
The Yellow Pig took her aside. ``Do not worry about the horse. I will help him with his problem to make sure he gets to where he needs to be. Just as I helped you get to be where you are.''
``What do you mean?'' asked Alice. The Pig's words were swirling around her head.
``It is time for you and your bear to return home. You have been here long enough, and your family will worry if you are gone any longer. I've enjoyed our time together, Alice. I will miss you very much.'' The Yellow Pig extended a hoof and shook Alice's hand. Alice noticed a tear in his eye, and she hugged him. She realized it was time for her to return to her family and the more normal world she had always known.
``Goodbye,'' said Alice. ``I won't forget you, and I won't forget your math either. Come visit me sometime.''
The Pig smiled wistfully. He engaged in a conversation with the horse that Alice could not hear. And maybe it was just her imagination, but she swore she could see the two of them lift off the ground and float away. The Pig was grinning.
It was dark. The Yellow Pig was nowhere in sight. Neither was the horse. Alice was sitting in a very familiar chair. It was a chair from her living room. In fact, she was in her living room! Her stuffed animals were seated around the fireplace. She reached into her pocket to find that she still had her teddy bear.
Her cat, Dinah, walked across the room and leaped into her lap. Alice could hear it purring.
``Kitty, how I've missed you,'' she said, nuzzling her face in Dinah's soft fur. ``I wish you had gone with me. I went to a most amazing land and met most entertaining people. Why, there was an unbirthday pickle wearing overalls. He gave me this necklace,'' she said pointing at her neck. ``And I spent the whole time with a yellow pig.'' The kitten raised its head and purred some more. ``Yes, that's right. It was a yellowcolored pig. And he was so nice. He showed me his magnificent garden with flowers and trees. And he invited me to his cabin for yummy pies.''
Dinah mewed loudly. ``Oh, I'm sorry,'' said Alice, ``I'll bet no one has fed you since I left.'' She got out some food for the cat. ``You would have liked these islands that we went to. We spent hours maybe walking back and forth along bridges. And the whole time the Pig was playing a joke on me. Not a mean one really. But you would have been able to catch fish on the beaches I am quite sure. And that would make you happy, wouldn't it?'' Dinah, engrossed in her food, ignored Alice.
``Although, I'm not sure how I got back here,'' she continued. ``One minute I was going to help this horse. He was a very small horse, about your size, Dinah. And then the next thing I knew I was here. Why, it was almost like waking up from a dream.'' A look of almost horror flashed across Alice's face. ``Oh, Kitty, you don't suppose it was all a dream, do you? It seemed so real. It was a kind of bizarre wonderland. It was such an incredible experience that it has to be real. I think I will believe it is real, and that is what is important. It just has to be real, because I still have the necklace,'' she concluded, almost certainly convinced.
``The Yellow Pig. I wonder what will happen to him now.'' Dinah had finished her food and came back to sit beside Alice. ``I guess he will find somebody else to tour. Oh, I do wish I could have stayed there longer. Do you want to know how I got into that world, Kitty?'' asked Alice. ``Not the world with the Pig, but the world inside where I just came from. Why, I stepped through a mirror. Imagine that. How can I step through a mirror? I stepped into paintings as well. And walked upside down. And Kitty, pay attention now, did you know there is a fourth dimension? I met someone from the fourth dimension. He wasn't nice at all. Just like our neighbor's dog. But I got him good. I told him there was a fifth dimension.''
She continued, ``I don't know if that's true, of course, but doesn't it sound confusing? I was talking about the fifth dimension. I've learned so much from the Yellow Pig. He is something of a mathematician. That's what they call people who are really good at math or do math or something. He told me about magical numbers in plants, and numbers that never end, and introduced me to his friends. There are different kinds of infinities. Prisoners should cooperate. There were hundreds of rabbits. And pigs in holes. I have so much to teach you.''
The kitten yawned. It was ready for its afternoon nap. It smiled a knowing grin. ``Kitty, please tell me. Was I dreaming or not? Was I? Do you dream? Did you dream about it, too? Were you the one dreaming and not I? And if that was a dream, can I dream it again?'' But the kitten, ignoring Alice's plea for answers, replied only with another yawn.
Math Education
Despite dozens of examples, mathematical literature is not a very wellknown
genre. Very few people are able to name any examples of such literature, and
many are uncertain as to what is even meant by mathematical literature. In
fact, the idea that someone would write or read such literature is a novel
(pun intended) idea to most people. This is because there is confusion
surrounding mathematics, including two common prejudices: that math is
nonliterary and that math is nonfun. The ``problem''  the source of the
confusion about mathematics  is that people don't know what mathematics is.
Mathematics is not just about computation; it is not simply a tool. Math is more than skills to be applied to science or to mundane tasks such as balancing a checkbook. Pure mathematics (in contrast to applied mathematics) is an end unto itself. Pure math is the exploration of math for the sake of math, just as art is often appreciated for art's sake. I envision my thesis as a tribute to pure math, a text that encourages math appreciation. Mathematics is an art in which clever insights lead to beautiful results, such as the proofs Alice learns from the Yellow Pig and the works of M.C. Escher.
Math is also a language or mode of communication; it is a way of expressing ideas clearly and rigorously from hypothesis to conclusion. Mathematics is a way of thinking, a kind of logic. It is a way of telling a story. The mathematical story is not just one of numbers, but of problems, of knowing how to interpret, approach, solve, and understand them. It is also a story of mathematicians, questions, methods, contemplation, and beauty.
Most people are not interested in reading math for fun, probably because they do not view mathematics as fun. The idea that math, its patterns, and results, are beautiful is a foreign one. This is largely a result of two intertwined problems: the poor math education received in schools and the societal view of mathematics. Primary and secondary schools have attempted a number of approaches to math education, ranging from stressing computation and exact solutions to deemphasizing answers and focusing on problem solving approaches. Neither approach has been successful, and thus colleges are finding that students have an extremely weak mathematical background and instead of requiring them to take challenging math classes, are offering simplified classes at a much lower than college level.
A large part of the societal problem has been coined ``mathphobia''  the fear of math. People are more afraid of math than of other subjects, in part because math is neither welltaught nor emphasized in schools, thus making it difficult for students to discover the intellectual pleasure that can be found in mathematics. Just as important and perhaps more disturbing than mathphobia itself, is the fact that mathphobia is caused by mathphobia; that is to say mathphobia is a selffulfilling prophecy. And this fear of math leads directly to mathematical illiteracy.
Because mathphobia and math illiteracy seem to be socially acceptable, they become part of a vicious cycle. An intelligent or cultured person is perhaps considered to be one who is well read, familiar with the great works of literature, and knowledgeable about history and current events. The definition may vary, but it very rarely includes mathematical understanding. While most academicians would not want to admit to never having read William Shakespeare, there is no sense of embarrassment, or even discomfort, in not having studied calculus. Mathematical illiteracy (innumeracy) and mathphobia are not considered shameful. When parents and educators are lacking mathematical background and don't recognize the importance of mathematics, it is easy to see why math gets pushed aside. Even at the ``best'' schools, students are taught not only that math is difficult, but also that understanding math is not a necessary qualification for success. With this kind of example, it is no wonder that mathematical ignorance continues. And so math illiteracy becomes accepted, ignorance remains, and standards of excellence are lowered to those of mediocrity.
In summary, there are two problems to be addressed: that people don't know what math is and that people are afraid of it, believing it to be too difficult. One solution is to increase math awareness and make math fun. Mathematicians know that math can be fun, but most nonmathematicians do not because math is too often not made accessible to them. Math needs to be made accessible to everyone. One way to do this would be to have more works such as this thesis and the many examples of mathematical fiction mentioned in the introduction. These are all attempts to expose nonmathematicians to math and to encourage exploration in mathematics. Mathphobia must be addressed in schools and in the general society. The notion that math is difficult needs rethinking, and the expectations of math educators and the culture as a whole must be raised. Math books need to be enjoyable to read, and they need to be read. The goal of these books should not be merely to instruct, but to provide opportunities for the enjoyment of mathematics. Only by changing the negative perception of mathematics can we reasonably expect math education to be successful in creating a society that enjoys math and is math literate.
As a juniorhigh and high school student, I was fortunate enough to both want to learn math and to find, at both the national MathCounts competition and the Hampshire College Summer Studies in Mathematics, groups of individuals who were also interested in math. These people are represented in my thesis by the character of the Yellow Pig. They are a minority in our society. I wrote my thesis to demonstrate that creative mathematical writing exists and that math can be made accessible to nonmathematicians. I want to introduce people to mathematical concepts, share the beauty and pleasure I find in mathematics, and show that math can be enjoyable. I hope that my thesis has succeeded in convincing you that math can be fun.
Appendix A
The Square Root of 2
In order to do mathematics it is important to understand
the idea behind proofs and how to construct them. I have chosen
to demonstrate a proof that the square root of 2 is irrational.
This may not seem to be an important result, but it was to the Greeks, who were horrified by the idea of irrational, or illogical, numbers. The existence of such numbers conflicted with their concept of numbers as ratios. The Pythagoreans believed in a link between number, the soul, and the universe. Thus, the illogical in numbers implied the illogical in the universe and a disruption of harmony in the soul. This was hardly something to be taken lightly. Ultimately, however, they had to accept the irrational numbers because they proved that some numbers could not be represented by ratios.
What is a proof? A proof is a stepbystep justification of a statement. But, says Ian Stewart, it is more than this:
Textbooks of mathematical logic say that a proof is a sequence of statements, each of which either follows from the previous statements in the sequence or from agreed axioms  unproved but explicitly stated assumptions that in effect define the area of mathematics being studied. This is about as informative as describing a novel as a sequence of sentences, each of which either sets up an agreed context or follows credibly from previous sentences. Both definitions miss the essential point: that both a proof and a novel must tell an interesting story (Stewart, Nature's Numbers, 39).
And so we end with a proof  a mathematically rigorous story. The proof that ÷2 is irrational is fairly straightforward and serves as a good example of a proof. It is what mathematicians call an elegant or beautiful proof. Beauty is of the utmost importance to mathematicians; as Godfrey H. Hardy said, ``Beauty is the first test: there is no place in the world for ugly mathematics.''
The first step in a proof is to state precisely what is to be proven.
Theorem: The number ÷2 is irrational.
What does this mean? Irrational numbers are, by definition, those which are not rational. Rational numbers are fractions. Any number which can be written as the ratio between two integers is a rational number. An irrational number, then, is a number which cannot be written in the form ^{p}/_{q}.
Proofs are puzzles, and a good puzzle solver has several tricks and tactics for solving puzzles. A mathematician doesn't rely only on these techniques but uses them as tools to tackle a problem. To prove a statement, it must follow as the logical conclusion from a series of valid premises and inferences. In our proof the premises are the axioms. If the premises are the pieces of a puzzle, the inferences are the way these pieces fit together. A mathematician knows how to put the pieces together, using standard methods such as induction, the pigeonhole principle, and reduction. It is sometimes difficult to know which method to use and how to begin approaching a problem.
We will use the method of contradiction. This method stems from a form in logic known as modus tollens, which states that ``if A implies B, then notB implies notA.'' Our theorem reads: ``If x = ÷2, then x is irrational.'' The reversal, or contrapositive, is ``If x is rational, then x cannot be ÷2.'' The idea behind a proof by contradiction is to begin with an assumption that negates the desired conclusion. When absurd statements that contradict the real hypothesis follow from this assumption, mathematicians can conclude that because impossible, or contradictory, conclusions follow, the assumption must be invalid. Then, the original hypothesis must lead to the original conclusion. This approach is like playing a game of makebelieve. We pretend that instead of wanting to prove our theorem, we want to disprove it. For our theorem, we start out by considering that x is, in fact, rational, and we want to show that because x is rational, x cannot equal ÷2.
We begin our proof:
Proof: Suppose our theorem is false. That is, suppose ÷2 is rational.
We know that a rational number can be written as ^{p}/_{q} where p and q are integers. In fact, any rational number can be written not only as a fraction, but as a fraction in lowest terms. This means that it can be written so that the numerator and the denominator have no common factors. We should be convinced that statement is true, because given any fraction representation for a number, we can write the fraction in lowest terms by dividing out common factors. In a proof it is important to question and verify everything. A proof with gaps, falsities, or vagaries is open to failure. We continue our proof:
We write ÷2 = ^{p}/_{q}, where p and q are integers with no common factors greater than 1.
Now we have an equation on which we can perform simple algebra.
From which it follows by multiplication by q that ÷2q = p, and by squaring both sides, that 2q^{2} = p^{2}.
What do we know about this quantity that is represented on both sides of the equation? We know that it is an integer and that it is even because 2q^{2} is a multiple of 2.
Thus, p^{2} is an even number.
Does anything follow from this? Can we determine anything about p? It turns out that we can. If p^{2} is even, then p must be even as well. We can convince ourselves that the statement is true by considering several examples. The number 2 is even; 2^{2} = 4 which is even. Another even square number is 16; the square root of 16 is 4 which is even. On the other hand, 25 is an odd square number and its square root, 5, is not even. Concrete examples often help to make generalizations easier to internalize. To be certain that this is true, we consider the generic even case 2n and the generic odd case 2n+1. The square of 2n is 4n^{2}, which is even, and the square of 2n+1 is 4n^{2}+4n+1, which is odd.
And so p must be even.
At the beginning of our proof we used the fact that any rational number can be written in the form ^{a}/_{b}. Again, we find it useful to write an equation for p which tells us something about it. To say that a number is even means that it is divisible by 2, so it is true that p = 2a for some integer a.
We write p = 2a.
Now we substitute 2a where we previously had p, so the equation 2q^{2} = p^{2} becomes 2q^{2} = (2a)^{2}. We can simplify this to 2q^{2} = 4a^{2} or q^{2} = 2a^{2}.
By substitution, 2q^{2} = (2a)^{2} or q^{2} = 2a^{2}.
Notice how similar this equation q^{2} = 2a^{2} looks to our earlier 2q^{2} = p^{2}. We can apply the same logic as before to conclude that since 2a^{2} is even, q^{2} is even, and q is also even.
Just as before, we see that q is even.
Let's look again at precisely what we assumed. We started out by supposing that we could write ÷2 = ^{p}/_{q}, for some p and q with no common factors. But  this is the part that's key to the idea of contradiction  we have shown that p is even and that q is even. That means that both p and q are divisible by 2; 2 is a common factor of p and q. Oh no! That's a contradiction. We said that p and q didn't have any common factors, and we showed that our assumptions imply that they do.
Both p and q are even numbers, so they are both divisible by 2. This contradicts the assumption that p and q have no common factors.
Our assumption has been shown to be invalid. It falls to the ground with the big, loud thump of its own absurdity. We now know that we can't write ÷2 as ^{p}/_{q}, where p and q have no common factors. And that's what it means to say that ÷2 is rational.
So our assumption that ÷2 is rational is false. Then, ÷2 is irrational, which is what we wanted to prove.
At the end of proofs, mathematicians often write Q.E.D., an abbreviation for quod erat demonstrandum, which is Latin for ``which was to be demonstrated.''
Q.E.D.
Appendix B
Cantor and Infinity
The Yellow Pig introduces Alice to cardinality, and to rational and irrational
numbers. He tells her that there are no more rational numbers than there
are integers or natural numbers, but he does not tell her that there are
more real numbers than rationals, so many more that the real numbers cannot
be listed. The proof of this fact
 credited to Georg Cantor  relies on the techniques of contradiction and
enumeration. Suppose we do have a list
with all of the real numbers. Or, for the sake of making a ``shorter''
list, suppose we have a list with just all of the real numbers between 0 and 1.
This would be a sublist of our list of all real numbers.
We consider such a list. (Actually, we consider only the representations of reals between 0 and 1 that do not contain any 9's as digits. We must be careful because 0.99999 ... is equal to 1. This is the only way for two different decimals to represent the same real number. It is okay for us to be looking at representations of such a subset of the real numbers, because we need only to show that this subset cannot be listed to conclude that all of the reals cannot be listed.)
The list could begin like this:

To show that this list does not contain all of the reals between 0 and 1, we need to find a real number which is not already on the list. Cantor outlines a method for doing precisely this. We consider the digits along the diagonal.







































Now, we look at the second number in the list. Again, we want to insure that our new number is different from this number. We see that the second digit to the right of the decimal place is a 2, so we can tack a 3 on after the 1 in our new number. Again for the third number in our list, we consider the third digit, 6. The third digit of our new number can be 7. And so on for all of the numbers in our list. Our new number might begin 0.13721 ....
This completely outlines one procedure for constructing a ``new'' number; that is, the nth place in the new number is 1 more than the n place in the nth number, unless the nth place in the nth number is 8, in which case the nth place in the new number is 0. Now, we just need to be certain that this number is not already on the list. But (if each representation is unique) how could it be? We constructed it to differ in the nth place from the nth number, so it must be different from all of the numbers in the list!
We conclude that we can't list all of the real numbers. There are infinitely many rational numbers, but there are even more reals  uncountably many.
To be more mathematically precise, we say that the cardinality of the set of real numbers is greater than that of the set of the rationals. What does cardinality mean? One way to look at cardinality is to consider correspondences between two sets. We say the cardinality of two sets is the same if there is a onetoone correspondence, or bijection between elements of the two sets. Cantor proposed to call two sets equipollent if there exists such a correspondence between them. This terminology is useful because it allows us to distinguish various kinds of infinity.
A set D is denumerable or countable if there exists a bijection with the natural numbers. It is true that any subset of a denumerable set is denumerable, that the product of denumerable sets is denumerable, and that the set of finite subsets of a denumerable set is denumerable. Similarly, R, the set of the reals, and the set of finite subsets of R are equipollent. So, is there any set with greater cardinality than R? The answer is yes.
Given a set, there always exists another set whose cardinality is greater. Just as the collection of all subsets  not just finite subsets  of the natural numbers is not countable, the set of all subsets of the reals has a greater cardinality than that of the reals. There is no set with greatest cardinality. We can always create a set with greater cardinality than a set S by taking the set of all subsets of S.
Onward to another question: Are there any sets with cardinality greater than that of the natural numbers but less than that of the real numbers? When does infinity cease to be countable or denumerable? The result of this tricky question has been stated as the Continuum Hypothesis: Every infinite subset of the reals is equipollent with either the naturals or the reals.
Is this hypothesis true? There is no proof or disproof. I do not mean that no proof or disproof has been found; there is a proof that there can be no proof or disproof of this statement. In 1938 Kurt Gödel showed that the Continuum Hypothesis is both irrefutable and unprovable. This means that there is a problem in mathematics for which mathematics is at a loss to solve.
A paradox is a statement that cannot be either true or false. For example, if the statement ``This sentence is false'' is considered true, then it must be false. But if it is false, then it is true that ``This sentence is false,'' and this process continues. Just as ``This sentence is false'' is paradoxical, some problems in mathematics are undecidable. At the beginning of the twentieth century, David Hilbert and most mathematicians believed ``true'' and ``provable'' to be the same thing. That is, they believed that every statement in mathematics was either provable or disprovable; there was no such thing as unprovable.
Gödel, however, said that either the axiomatic system of mathematics was incapable of producing some results, or the system must contradict itself. In his terms, mathematics cannot be both complete and consistent. He showed this by constructing (via a system of encoding and manipulating mathematical statements) what is basically the selfreferential mathematical theorem ``This theorem cannot be proven.'' Because of its paradoxical nature, this theorem has no proof or disproof.
What Gödel asserted in this mathematical madness was that if ``true'' and ``provable'' are the same thing, then such a selfcontradictory statement exists. In other words, either our system is not complete and there are some things that we cannot prove or disprove, or our system is inconsistent and we are left with absurd conclusions. Because of this socalled Incompleteness Theorem, mathematics can no longer be viewed as a field in which everything can be proven or disproven. Gödel's results revolutionized the philosophy of mathematics.
Appendix C
The Golden Angle in Nature
The Pig points out much mathematics to Alice in the golden garden, but he
doesn't explain
why the Fibonacci numbers (1,1,2,3,5,8,13º) and the golden ratio
f = ([(÷5+1)/ 2]) appear so frequently in nature.
Recently Stéphane Douady and Yves Couder came to the conclusion that the occurrence of Fibonacci numbers in plant matter arises from the plant's central spiral. The tip of a growing plant contains a central lump of tissue, known as the apex, from which the main features of the plant  leaves, petals, etc.  develop. Tiny lumps called primordia form around the apex. Then the apex moves away from the primordia, causing the generative spiral to appear.
Fibonacci numbers frequently appear in petals because petals represent the outer primordia of such a spiral. In 1907 G. Van Iterson explained the appearance of sunflower heads. Sunflowers seem to have two series of interpenetrating spirals, one clockwise and the other counterclockwise. As a consequence of the golden angle in the generative spiral, these radial spirals contain successive Fibonacci numbers of primordia.
We have explained how Fibonacci numbers appear in plants, but not why. In 1979, H. Vogel performed experiments which suggested that a most effective packing is obtained when primordia are placed along the generative spiral using the golden angle. That's certainly a good reason why the golden angle occurs in nature.
But why does it lead to the most efficient packing? If a divergence angle of 90^{ƒ} is used, the primordia are arranged along four radial lines. This certainly isn't a tight packing, and it offers the plant very little support. This is true for other factors of 360^{ƒ}. The more irrational the angle is, the tighter the packing will be. The most irrational number  one that is most poorly approximable by rationals, as considered in the study of continued fractions  is f. So, the tightest packing is achieved when the divergence angle is 360(1f)^{ƒ}, the golden angle. At angles just less than (below left) or just greater than (below right) the golden angle, a fairly tight packing is achieved; however, the tightest packing (below center) occurs when the angle of divergence is the golden angle.
Another theory is that the golden angle was not always present in the generative spiral, but that over time plants have been finetuned by natural selection to favor the tightest packing of primordia.
Evolution, genetics, geometry, and dynamics all involve this special number f. The golden ratio  and more generally, mathematics  are truly ubiquitous in beauty and nature.
Appendix D
Paul Erdos
Paul Erdos, pronounced ``airdish'', was one of the greatest
mathematicians. He not only studied and proved theorems in a variety of
branches of mathematics, but he also
encouraged and supported many other mathematicians. He coauthored papers
with 485 mathematicians. These mathematicians are said to have an Erdos
number of 1, and those who collaborated with them are said to have an
Erdos number of 2; it is believed that all currently collaborating
mathematicians have an Erdos number of less than 8.
Erdos helped to transform a mostly solitary study into one of an
open and cooperative community.
Erdos, a selfproclaimed ``poor great old man, living dead, archeological discovery, legally dead, counts dead,'' lived for mathematics. From his birth in Budapest, Hungary on March 26, 1913 until his death 83 years later on September 20, 1996, Erdos produced mathematics, often for over 12 hours a day, while sustained by a variety of substances. He remarked: ``A mathematician is a machine for turning coffee into theorems'' (Hoffman, 7).
In addition to such witty sayings, Erdos invented his own language in which wives were called ``bosses,'' God was ``the supreme fascist,'' people who stopped doing mathematics had ``died,'' and children were called ``epsilons.'' Erdos was eccentric; he owned little clothing and had limited personal possessions, he had obsessions with both death and cleanliness, and was almost completely dependent on others to feed and chauffeur him. Another Hungarian mathematician, Andrew Vázsonyi, recalls that even in his youth, Erdos was odd. When the two met in 1930, he immediately asked the 14 year old Vázsonyi for a fourdigit number and proceeded to find its square. He also announced that he knew 37 proofs of the Pythagorean Theorem.
Erdos had a strong liking for small children and had a special interest in students of mathematics. He sought out child prodigies such as József Pelikán and Louis Pósa and supported their interest in mathematics. He was a patron of mathematics, sponsoring students and donating rewards for unsolved problems. He gave freely to numerous nonmathematical charities and causes, keeping hardly any money for himself.
He expended much of his energy in mathematics on combinatorics, ``the art of counting without counting,'' and graph theory. His studies included that of Ramsey Theory, named after Frank Plumpton Ramsey. The Yellow Pig explains one central question of Ramsey Theory, which involves coloring a complete graph with two colors. The Ramsey number of a graph is the minimum number of vertices needed to force a monochromatic subgraph, or a set of n points where all of the edges connecting those points are the same color. More rigorously: For two graphs G and H, let the Ramsey number R(G,H) denote the smallest integer m satisfying the property that if the edges of the complete graph K_{m} are colored in red or blue, then there is either a subgraph isomorphic to G with all red edges or a subgraph isomorphic to H with all blue edges.
As the Yellow Pig explains, R(3,3) is 6. That is, a twocolored graph of all edges connecting five vertices does not necessarily contain a monochromatic triangle, but one with six vertices must. Finding higher Ramsey numbers remains an open question. The table below lists many of the known Ramsey numbers.



































This is just one of many intriguing open problems in mathematics.
Appendix E
Escher and Hyperbolic Geometry
Geometry, as we know it, is based on several postulates or axioms, rigorous
assertions, and definitions. One that has caused much discussion in geometry
is known as the Parallel Postulate. It states:
Given any line and any point not on the line, there is only one line
through the given point that never intersects the given line.
This is
something that we take for granted in Euclidean geometry, but it turns out
that many results in geometry follow without using this postulate.
Mathematicians have studied neutral geometry, without the postulate at all,
and several nonEuclidean geometries based on the negation of the postulate.
In hyperbolic geometry there are infinitely many parallel lines through a given point, and the sum of angles in a triangle (left) is less than 180^{ƒ}. Spherical geometry is based on the idea that on a spherical surface any two lines intersect, and the sum of the angles in a triangle (right) is greater than 180^{ƒ}. In both of these alternative geometries, lines are not straight lines in the Euclidean sense, but appear as curves like arcs of circles or lines of latitude and longitude on a globe.
The problem of regularly dividing the plane interested Escher greatly. He wrote: ``I cannot imagine what my life would be like if this problem had never occurred to me. One might say that I am head over heels in love with it, and I still don't know why'' (Locher, 67). In the Euclidean plane there are seventeen essentially different ``wallpaper'' patterns using combinations of translations, rotations, reflections, and glidereflections. Escher discovered these on his own and used them in his art.
Escher was greatly influenced by a number of mathematicians, including G. Pólya, R. Penrose, and H. S. M. Coxeter, the geometer who introduced him to hyperbolic geometry. Escher met Coxeter at the International Congresses of Mathematicians in 1954 and soon after asked for an explanation of how to construct a series of objects that decrease in size as they reach the boundary of a circle. Escher came across the idea of a hyperbolic plane in 1958 from a figure in ``A Symposium on Symmetry'' sent to him by Coxeter.
It was in his ``Circle Limits,'' which the Yellow Pig stops to admire, that Escher felt the greatest sense of achievement. He saw his use of the Poincaré disk model in ``Circle Limits'' as a milestone in his career. Escher created four ``Circle Limits'' pieces using lines in the Poincaré disk model. (Actually, the third ``Circle Limits'' doesn't use lines in the sense of hyperbolic geometry. The arcs of the backbones of the fish meet the outside circle at angles of approximately 80^{ƒ}, not 90^{ƒ}.)
Escher also experimented with hyperbolic tilings in rectangular regions and spirals, using hyperbolic geometry to shrink his figures while maintaining similarity, as in ``Smaller and Smaller I'' and ``Whirlpools.''
M.C. Escher was clearly an artist, but was he also a mathematician? Escher wrote: ``... I have often felt closer to people who work scientifically (though I certainly do not do so myself) than to my fellow artists'' (Locher, 71). Many Escher admirers suspect he had more mathematical talent than he was willing to admit, but others, including Coxeter, believe he was guided not by mathematics but by aesthetics. Escher's description of his ``Circle Limits III'', shows that he was unaware of the rigorous mathematical foundations. Surely he had no idea that mathematicians would puzzle over the precise 60^{ƒ} angles and their implications to the hyperbolic geometric model.
Escher's works correspond in many ways with those of crystallographers, scientists who study the structure of crystals, but there is an important distinction to make in the motivation for their studies. Escher saw crystallographers as interested in opening up the study of symmetry for its application, whereas he was intrigued by symmetry for the sake of beauty.
Escher was well aware that he was untrained in mathematics. In his Regelmatige vakverdeling (Regular Division of the Plane) Escher wrote that without the basic principles of mathematics and symmetry it was difficult at first for him to design congruent shapes for his work (Locher, 164). He did not consider himself to be a mathematician, but, like a pure mathematician, he had strong concepts of beauty and symmetry and realized the role that mathematics must play in achieving such symmetry. He developed mathematical principles in an effort to understand their beauty. Mathematics, for him, was not about formal training, but about intuition, experimentation, and aesthetics, characteristics shared by artists, mathematicians, and creative people in other fields.
Appendix F
Lewis Carroll and Logic
Lewis Carroll was born Charles Lutwidge Dodgson on January 27, 1832. His
father, who had studied both the classics
and mathematics, always encouraged him and his eleven brothers and sisters
to learn. Dodgson attended Christ Church College where he
received first honors in mathematics in 1852 and was offered a
paid position.
He began teaching at age 23 and became a fully established member of
the community when he won a mathematical lectureship the
following year.
At this time Christ Church got a new dean  Henry George Liddell. Dodgson met Liddell's daughter Alice on April 25, 1856, just before her fourth birthday. Like Erdos, Dodgson was very interested in children. He entertained them with his stories and often photographed them and drew their portraits. Alice and her older sisters, Lorina and Edith, quickly became good friends with Dodgson. In June 1862 Dodgson, two of his sisters, their aunt, the three Liddell sisters, and Robinson Duckworth, a friend of Henry Liddell, went on a picnic at Nuneham. Dodgson wrote about such a picnic with a lory (Lorina), an eaglet (Edith), a duck (Duckworth), and a dodo (Dodgson) in his Alice's Adventures in Wonderland, published in 1865 under the pseudonym Lewis Carroll (his name translated into Latin and back to English). He continued writing stories and mathematics until his death on January 14, 1898. His works include his 1871 sequel Through the LookingGlass, his operetta of Alice in 1886, the Sylvie & Bruno stories, several volumes on logic, and many mathematical puzzles and games.
The horse in Logicland is puzzled by one of Lewis Carroll's exercises from Symbolic Logic:
1.
Babies are illogical.
Nobody is despised who can manage a crocodile.
Illogical persons are despised.
To ``solve'' this syllogism  series of logical statements  Lewis Carroll proposes the following abbreviations: a = able to manage a crocodile; b = babies; c = despised; d = logical.
The syllogism can then be rewritten as:
All b are not d.
No c are a.
All not d are c.
This gives us three statements each containing two of our letters. We see that the letters c and d both occur in two statements, once as the subject and once as the object, while the letters a and b each only occur once, as an object and a subject respectively. This suggests a reordering of the statements:
All b are not d.
All not d are c.
No c are a.
Now our statements appear tied together. We want to conclude something about b and a, and there is a natural progression from b to a via d and c.
First we consider only the first two statements. Since all b are not d, and all not d are c, we can conclude by a form of substitution that all b are c. We can represent this scenario with a diagram of three overlapping circles. This gives us eight regions: one outside of all of the circles, one inside all of the circles, three representing intersections between two circles, and three containing only one circle.
We then label the circles. For this pair of statements, we would label them c, b, and d. Next, we shade the regions that represent impossibilities. The first statement tells us that there are no b which are also d, so we can shade the two regions that represent the intersection of b and d. The second statement says that anything which is not d is c. That is, there is nothing which is neither d or c, so we can shade the remainder of the circle b which does not overlap c. Our diagram is a visual representation of the statement ``all b are c.''
While logic is not really math, the two are closely related. Perhaps most importantly, logic and mathematics require the same type of thinking. What I find most intriguing about Lewis Carroll is that he was interested in mathematics and writing, two things which are not often associated with each other but perhaps should be. After all, both are ways of communicating ideas, of telling stories.