188 4 68MB
English Pages 480 [503] Year 2021
AMS / MAA
DOLCIANI MATHEMATICAL EXPOSITIONS
Exploring Continued Fractions From the Integers to Solar Eclipses
Andrew J. Simoson
VOL 53
Exploring Continued Fractions: from the Integers to Solar Eclipses
AMS/MAA
DOLCIANI MATHEMATICAL EXPOSITIONS
VOL 53
Exploring Continued Fractions: from the Integers to Solar Eclipses Andrew J. Simoson
Dolciani Mathematical Expositions Editorial Board Harriet S. Pollatsek, Editor Priscilla S. Bremser Alfred M. Dahma Elizabeth Denne Emily H. Moore Katharine Ott
Thomas A. Richmond C. Ray Rosentrater Ayse A. Sahin Dan E. Steffy
2010 Mathematics Subject Classification. Primary 11J70, 00A05, 70F15.
For additional information and updates on this book, visit www.ams.org/bookpages/dol-53
Library of Congress Cataloging-in-Publication Data Names: Simoson, Andrew J., author. Title: Exploring continued fractions : from the integers to solar eclipses / Andrew J. Simoson. Description: Providence, Rhode Island : MAA Press, [2019] | Series: Dolciani mathematical expositions ; volume 53 | Includes bibliographical references and index. Identifiers: LCCN 2018042445 | ISBN 9781470447953 (alk. paper) Subjects: LCSH: Continued fractions. Classification: LCC QA295 .S615 2019 | DDC 512.7/2โdc23 LC record available at https://lccn.loc.gov/2018042445
Copying and reprinting. Individual readers of this publication, and nonprofit libraries acting for them, are permitted to make fair use of the material, such as to copy select pages for use in teaching or research. Permission is granted to quote brief passages from this publication in reviews, provided the customary acknowledgment of the source is given. Republication, systematic copying, or multiple reproduction of any material in this publication is permitted only under license from the American Mathematical Society. Requests for permission to reuse portions of AMS publication content are handled by the Copyright Clearance Center. For more information, please visit www.ams.org/publications/pubpermissions. Send requests for translation rights and licensed reprints to [email protected]. ยฉ 2019 by the American Mathematical Society. All rights reserved. The American Mathematical Society retains all rights except those granted to the United States Government. Printed in the United States of America. โ The paper used in this book is acid-free and falls within the guidelines โ
established to ensure permanence and durability. Visit the AMS home page at https://www.ams.org/ 10 9 8 7 6 5 4 3 2 1
24 23 22 21 20 19
In memory of my mother
Marion Valencia Enquist Simoson (1925โ1990) who modeled both beauty and whimsy in art and music through the vicissitudes of life.
Contents Introduction Strand I: Patterns Tips on problem-solving and spotting patterns A look ahead at three patterns
xiii 1 2 4
Chapter I: Tally Bones to the Integers Tally bones A table of primes? The solution to a puzzle? A base twelve or base sixty system? Base ten, base twenty, base eight, base two A binary digit interlude Solving the shepherdโs puzzle and beyond Three parting puzzles Exercises
9 9 10 12 13 15 16 19 21 23
Strand II: Leibniz and the Binary Revolution A continued fraction connection
29 34
Chapter II: Mathematical Induction Set notation and the well-ordering principle The principle of mathematical induction The fundamental theorem of arithmetic Equivalence classes Nimโ Case Study: Mancalaโ Mancala nimโ Exercises
37 37 41 43 45 47 57 60 63
Strand III: Al-Maghribรฎ meets Sudoku
69
Chapter III: GCDs and Diophantine Equations
73 vii
viii
Contents The greatest common divisor An ancient algorithm for the greatest common divisor The Diophantine solution A litmus test for Euclidโs solution Clock arithmetic Systems of Diophantine equations The totient is multiplicative A problem from Diophantusโs Arithmetica Exercises
74 78 85 88 89 92 93 93 94
Strand IV: Fractions in the Pythagorean Scale A note-naming interlude How Pythagoras generated his scale
99 100 102
Chapter IV: A Tree of Fractions Unitary fractions in ancient Egypt A continued fraction tradition Farey sequences A mediant interludeโ The Stern-Brocot tree A grand finaleโ Exercises
107 108 110 111 116 118 130 132
Strand V: Bach and The Well-Tempered Clavier A well-tempered innovation A musical interlude An equal-tempered revolution A continued fraction connection
139 141 142 144 145
Chapter V: The Harmonic Series Case Study: Jeeps in the Desert A look behind and a look ahead A generating function finaleโ Exercises
147 157 162 163 166
Strand VI: A Clay Tablet The Babylonian number system The accepted transliteration of Plimpton 322 Reciprocal pairs generate normalized Pythagorean triples Finding the realm of potential generators How the scribe may have screened for generators The purpose of the tablet
169 170 172 174 178 181 182
Contents
ix
Chapter VI: Families of Numbers Primitive Pythagorean triples Binomial coefficients Fibonacci numbers The continued fraction recursion for ๐ The Catalan numbersโ Ben-Hur numbersโ Pogo-stick hikes along continued fractions Exercises
185 185 186 190 195 197 203 209 211
Strand VII: Planetary Conjunctions A few conjunction stories A rough guess A numerical approach A continued fraction approach
221 221 222 223 224
Chapter VII: Simple and Strange Harmonic Motion A heavenly approach to circular motion An earthly approach to circular motionโ Strange harmonic motion A where, what, and why interlude The harmonic algorithm A blue moon application Exercises
229 229 234 240 244 246 251 253
Strand VIII: The Size and Shape of Utopia Island
261
Chapter VIII: Classic Elliptical Fractions The prehistory of the ellipse The trammel of Archimedes An old elliptical puzzle A model for the heavens Newtonโs case for a flattened Earthโ The French expeditions to Peru and Lapland A final riddle Exercises
271 272 274 275 278 280 289 295 299
Strand IX: The Cantor Set A lotus-flower introduction Ternary notation A reality checkโ
303 303 305 308
Chapter IX: Continued Fractions
311
x
Contents A local approach to continued fractions A global approach to continued fractions A plethora of continued fractions Why the ugly duckling ๐บ is really a swan An interlude delineating Algorithm ๐โ Dominance domains The harmonic algorithm is a chameleon Applying continued fractions to factoring integers The first infinite continued fraction Black holes and the receding Moon Exercises
311 318 322 328 330 331 332 335 336 340 345
Strand X: The Longevity of the 17-year Cicada
351
Chapter X: Transits of Venus A historical interlude A Venus-Earth-Sun model Conditions for a transit to occur Recognizing the pattern A reality check An easier way to determine when transits occur A final thought Exercises
357 358 362 364 368 373 375 375 376
Strand XI: Meton of Athens
379
Chapter XI: Lunar Rhythms Predicting the time lapse between successive new moons Checking the expected length of short and long spans Expected value of the variation in spans of yearsโ Final thoughts Exercises
383 384 389 391 393 395
Strand XII: Eclipse Lore and Legends
399
Chapter XII: Diophantine Eclipses Adapting the Earth-Moon-Sun model Eclipse duration A sufficient condition for eclipses Finding ๐ป at any lunation Using Condition 1 to find the lapse between successive eclipses Continued fraction insight
405 405 408 408 410 412 412
Contents Some Diophantine magic Lunar eclipses A reality check A final note Exercises
xi 415 418 419 420 421
Appendix I: List of Symbols Used in the Text
425
Appendix II: An Introduction to Vectors and Matrices
429
Appendix III: Computer Algebra System Codes
437
Appendix IV: Comments on Selected Exercises
453
Bibliography
465
Index
473
Introduction This book is a gentle introduction to continued fractions by way of pattern recognition and applications.
What is a continued fraction? Definition 1: Finite simple continued fractions. A finite simple continued fraction is a finite list of integers ๐๐ , called partial denominators, with ๐๐ > 0 for all ๐ > 0, denoted by [๐0 ; ๐1 , ๐2 , ๐3 , โฆ , ๐๐ ], where integer ๐ ranges from 0 to some integer ๐. Associated with this continued fraction are ๐ + 1 fractions, ๐ถ0 , ๐ถ1 , through ๐ถ๐ , referred to as convergents, whose values are ๐ถ0 = ๐0 ,
๐ถ1 = ๐0 +
1 , ๐1
1
๐ถ2 = ๐0 +
๐1 +
1 ๐2
,
and so on. To illustrate, convergent 1 for the simple continued fraction [1; 2, 3, 4, 5] is 1 3 ๐ถ1 = 1 + = , whereas convergent 4 is 2
2
1
๐ถ4 = 1 +
=
1
2+
225 . 157
1
3+
4+
1 5
225
Since ๐ถ4 is the last convergent, we write = [1; 2, 3, 4, 5]. 157 Continued fractions may be infinitely long. xiii
xiv
Introduction
Definition 2: Infinite simple continued fractions. An infinite simple continued fraction is a list of integer-valued partial denominators ๐๐ with ๐๐ > 0 for ๐ > 0, denoted by [๐0 ; ๐1 , ๐2 , ๐3 , โฆ], where ๐ is a nonnegative integer. As in the finite case, the infinite continued fraction has convergents ๐ถ๐ computed as given in Definition 1. This time there are infinitely many convergents. As the name suggests, the sequence of convergents often has a limit ๐, in which case we write ๐ = [๐0 ; ๐1 , ๐2 , ๐3 , โฆ]. We will discuss questions of convergence in Chapter IX. Each positive rational number can be written as a finite simple continued fraction. Each infinite simple continued fraction evaluates to some irrational number, and every positive irrational number can be written as a simple continued fraction, as we illustrate at various times through the text. For example, the simple continued fraction representation for โ2 is โ2 = [1; 2, 2, 2, โฆ] = [1; 2]. Its convergents (along with their decimal approximations) are 1,
7 17 41 99 3 = 1.5, = 1.4, โ 1.41667, โ 1.41379, โ 1.41429. 2 5 12 29 70
As the term simple continued fraction implies, not all continued fractions are simple. In Chapter IX, numerators of the partial denominators will be permitted to be 1 or โ1. The notation for these continued fractions is [๐0 ; ๐๐ ๐1 , ๐2 ๐2 , ๐3 ๐3 , โฆ] where ๐๐ is either 1 or โ1, with convergents ๐ถ0 = ๐0 ,
๐ถ1 = ๐0 +
๐1 , ๐1
๐ถ2 = ๐0 +
๐1 ๐1 +
๐2 , ๐2
and so on. For example, ๐ can be written as the continued fraction ๐ = [3; 7, 16, โ294, โฆ] โ {๐ถ0 = 3, ๐ถ1 =
22 355 104348 ,๐ถ = ,๐ถ = , โฆ}. 7 2 113 3 33215
(1)
Much more general continued fraction examples are given on page 35 of Strand II, in Exercise VI.10c, and in Example IX.43.
Introduction
xv
Of what use is a continued fraction? Suppose we wish to approximate the number ๐. The first six digits of ๐โs decimal expansion are 3.14159. Therefore, one seemingly good approximation for ๐ as a fraction in lowest terms should be 314159 355 . However, from (1), ๐โs second convergent, ๐ถ2 = , is simpler than 100000 314159 100000
113
and is an order of magnitude closer to ๐:
||๐ โ 314159 || โ 2.65 ร 10โ6 | 100000 |
versus
||๐ โ 355 || โ 2.67 ร 10โ7 . | 113 |
Continued fractions are, in general, an elegant way to find good fractional approximations for irrational numbers. In general, when measuring phenomena using given units, the numbers we get often appear to have no repeating pattern in their decimal expansions. The diagonal of the unit square has length โ2. The old Greek puzzle about doubling the 3 volume of a cube involves scaling its side length by โ 2. The ratio of a circleโs circumference to its diameter is ๐. Correct to five decimal places (using kilograms, meters, and seconds), the universal gravitational constant is ๐บ โ 6.67408ร10โ11 . Wherever we look we find what appear to be irrational numbers. Whenever we approximate, we use rational numbers. Strange as it might at first sound, oftentimes the rational approximations given to us by continued fractions enable us to see patterns more clearly in our universe.
A brief outline of this book. This book is an exploration of continued fractions. It includes brief forays into ideas that are from outside elementary number theory, yet are part of the standard undergraduate mathematics curriculum. Besides number theory, the text uses elements of calculus (limits, integrals, and series), vector calculus, discrete mathematics, linear algebra, probability, mathematical statistics, combinatorics, graph theory, geometry, differential equations, and analysis, as well as allusions to abstract algebra. As a guide to the reader, those sections of the book that include such forays or include enrichment material on a particular idea are marked with an asterisk. Thus, for example, the reader will see the asterisk in the Chapter VIII section Newtonโs case for a flattened Earthโ . This asterisk is a cue that this section is optional for understanding the book and may be a section to skip on a first reading. This book contains twelve strands and twelve chapters. The strands are meant to be somewhat light-hearted introductions to the following chapter. They involve a single idea, puzzle, or personality related in some way to the material of the subsequent chapter. While successive chapters of the book are related to previous chapters and foreshadow later chapters, each chapter can be read more or
xvi
Introduction
less on its own. Although the book is structured to reach a climax in Chapter IX on continued fractions, each chapter is also an end in and of itself. Here is an outline of the chapters. โข Chapter I starts with the set of positive integers. Rearranging heaps of ๐ pebbles into arrays of ๐ rows of ๐ pebbles, where ๐ and ๐ are integers, soon leads to the discovery of the fundamental theorem of arithmetic, and gives a natural way to think of taking parts of a whole. That is, splitting ๐๐ into ๐ equal 1 parts leads to the idea of the unitary fraction , a fundamental building block ๐
of continued fractions. โข Chapter II presents the well-ordering principle and mathematical induction, which, among other things, gives a division algorithm. With this tool, we show how to find the simple continued fraction of any fraction. โข Chapter III shows how a recursive application of the division algorithm leads to Euclidโs method for finding the greatest common divisor of two positive integers and for solving Diophantine equations. As we will see, Euclidโs method for the greatest common divisor of two positive integers is equivalent to finding the simple continued fraction representation for the ratio of the given two integers. ๐
โข Chapter IV shows how each positive (non-integer) fraction , where ๐ and ๐ ๐
๐
๐
are integers, is a combination of two unique simpler fractions and that ๐ ๐ solve the Diophantine equation ๐๐ฅ โ ๐๐ฆ = ยฑ1. This structure defines a tree of fractions and allows us to identify each fraction between 0 and 1 with a tree address. In fact, finite continued fractions allow us to find the tree address of any fraction, and to know the fraction at any address. โข In Chapter V, the idea of unitary fractions from earlier chapters extends naturally to the harmonic series whose terms ๐ป๐ are the sums of the first ๐ unitary fractions. Recall from calculus that Eulerโs constant ๐พ is the limit of the difference between ๐ป๐ and ln ๐. We illustrate the generation of a non-simple continued fraction using ๐พ, where the numerators of the partial denominators are allowed to be either 1 or โ1 (rather than always being 1). โข In Chapter VI, we generate families of numbers recursively and, in doing so, explore series. Recall from calculus that the real natural number ๐ is the sum โ 1 of an infinite number of unitary fractions: ๐ = โ๐=0 . We show how to find ๐! ๐โs infinite simple continued fraction representation, ๐ = [๐0 ; ๐1 , ๐2 , โฆ], and determine an explicit formula that yields the partial denominator ๐๐ for any desired positive integer ๐.
Introduction
xvii
โข Chapter VII is about simple harmonic motionโthe approximate motion of some planets and satellites about their suns or planets, respectively. We show how simple harmonic motion gives a geometrical algorithm for finding a continued fraction equal to a given number. We explore more traditional algorithms in Chapter IX. โข Chapter VIII showcases a few classic ratios involving the ellipse from the seventeenth and eighteenth centuries, ratios which we then represent as continued fractions. โข In Chapter IX, we present a variety of continued fraction algorithms, and show that each positive irrational number ๐ has many convergent continued fraction representations. When restricting integer partial denominators ๐๐ to be either only positive integers or to always have magnitude at least 2 (when ๐ โฅ 1), we show that every infinite continued fraction converges using the tree of fractions between successive integers presented in Chapter IV. โข The final three chapters are applications of continued fractions to the motion of the Moon, Earth, and Venus.
How could this book be used in the undergraduate mathematics classroom? As a minimal requirement for reading this book, the reader should be aware of mathematical induction, a topic often introduced in Discrete Mathematics (or any bridge course to writing proofs) or Calculus I. A subset of the chapters could serve as at least one of the texts for a course on number theory (Chapters I through IV, IX, and XII and some of the strands such as Strand VI), for a course on the history of mathematics (any subset works), or for a capstone course. A brave soul might use the book as a text for Discrete Mathematics. Readers interested in following a minimal path to the applications of the later chapters should familiarize themselves with Diophantine equations in Chapter III; be able to compute the general mediant of two neighboring Farey fractions, and to find the mother and father fractions for any given fraction in the Stern-Brocot tree from Chapter IV; understand the continued fraction constructions of Example II.4, Example III.8, Puzzle V.6, and Example VI.31; and read the first half of Chapter IX. As aids to the reader, the appendices include the following items. โข A list of symbols used throughout the text. โข An introduction to vectors and matrices with respect to the matrix multiplication of Chapters IV and X. โข Algorithmic code for a score of algorithms introduced in the text. In addition to a presentation of the Mathematica code for many of the algorithms used
xviii
Introduction
in this text, we provide access to them via an AMS website www.ams.org/ bookpages/dol-53 as both a pdf file and a Mathematica notebook. For most of these selections, the code is easily adaptable to any computer algebra system (CAS). โข Comments on selected exercises. Snippets of this book have appeared in print over the years. Strand II is a version of A. Simoson, Life lessons from Leibniz, Math Horizons 22:4 (2015) 5โ7, 29 ยฉ Mathematical Association of America, 2015, all rights reserved. Strand V is an adaptation of B. Linderman and A. Simoson, A Bach diesel canon, Math Horizons 25:4 (2018) 5โ7 ยฉ Mathematical Association of America, 2018, all rights reserved. Strand VIII is an expanded version of A. Simoson, Minimizing Utopia, Math Horizons 23:3 (2016) 18โ21 ยฉ Mathematical Association of America, 2016, all rights reserved, a version of which, The size and shape of Utopia, also appeared in the Proceedings of the Bridges Jyvรคskylรค 2016 Conference [139]. A portion of R. Fillers, B. Linderman, and A. Simoson, Mancala as nim, Coll. Math. J. 45:5 (2014) 350โ 356 ยฉ Mathematical Association of America, 2014, all rights reserved, appears as a case study in Chapter II. Strand VI is an expanded version of A. Simoson, Extrapolating Plimpton 322, Coll. Math. J., 50:3, ยฉ Mathematical Association of America, 2019, all rights reserved. A condensed version of J. Dodge and A. Simoson, Ben-Hur staircase climbs, Coll. Math. J. 43:4 (2012) 274โ284 ยฉ Mathe- matical Association of America, 2012, all rights reserved, appears as an example in Chapter VI. Adaptations and combinations of A. Simoson, Newtonโs radii, Maupertuisโ arc length, and Voltaireโs giant, Coll. Math. J. 42:3 (2011) 274โ284 ยฉ Mathematical Association of America, 2011, all rights reserved, and A. Sim- oson, Newtonโs 501 jeans, The Mathematical Scientist 43:1 (2018) 1โ9 ยฉ Applied Probability Trust, 2018, appear as a case study in Chapter VIII. Chapter X is a version of A. Simoson, Periodicity domains and the transit of Venus, Amer. Math. Monthly 121:4 (2014) 283โ298 ยฉ Mathematical Association of America, 2011, all rights reserved. Chapter XI is an expanded version of A. Simoson, Lunar rhythms and strange signatures, The Mathematical Scientist 41:1 (2016) 25โ39 ยฉ Applied Probability Trust, 2016. Chapter XII is a version of A. Simoson, Diophantine eclipses, The Mathematical Scientist 42:2 (2017) 74โ89 ยฉ Applied Probability Trust, 2017. This book contains some whimsy. Musings on the Ishango bone are pushed to the limit in Chapter I. Mancala of Chapter II analyzed as nim is probably intractable for most configurations. We translate the firing sequence of a twelvecylinder engine into a musical score, even though a typical diesel train engine makes 500 to 1500 rotations per minute. We consider the problem of dropping a small black hole at Earthโs surface, and we make conjectures about the longevity of the 17-year cicada.
Introduction
xix
Numerous illustrations appear in the text. Where noted in a figureโs caption, permission use has been granted. Figures appearing without acknowledgment are in the public domain. Some of the figures are my sketches. The flower figure on the cover is meant to be a visual characterization for the optimal continued fraction convergents to the natural number ๐, as explained fully in [143]. Finally, I wish to thank a number of people. โข A colleague Bill Linderman who rendered the diesel canon for the diesel engine firing of Chapter I and Strand V as a musical score using the software Sibelius. โข King University students Rhianna Fillers, Shuler Hopkins, and Sam Barker for joint work on nim of Chapter II and the synchronization example of the 17-year cicada in Strand X. โข Keri-Lynn Paulson, a King University librarian, who helped secure various high-resolution images from a number of libraries. โข Dan Kalman for directing my attention to strange Strang figures upon seeing my analysis of the signatures of strange harmonic motion as presented in Chapter VII. โข King University astronomer Raymond Bloomer for fielding many questions about celestial mechanics. โข The trustees of King University for a 2016 spring semester sabbatical to focus on this manuscript. โข Senior Acquisitions Editor Stephen Kennedy for encouraging me to submit a book manuscript featuring continued fractions. โข The Dolciani Committee chaired by Harriet Pollatsek for careful reading of multiple drafts of the manuscript. โข Senior Production Editor Lauren Foster for rendering the manuscript into its published form, and allowing me to make last minute revisions. 25 March 2019
Strand I: Patterns On 20 July 1963, a solar eclipse occurred as seen from northern Minnesota. I was ten years old and had been using a pin-hole camera to view the action of the Moon encroaching upon the disk of the Sun. Like many people who have viewed or will view a solar eclipse,1 I wondered, How can one predict these events?
Figure 1. Viewing an eclipse with a pin-hole camera, author sketch.
As I was to learn much later in what are now the details of this book, the specific answer to my question involves the properties of the integers, the greatest common divisor of two positive integers, ratios of real numbers, and continued fraction approximations for real numbers. But more generally, my question was, How do we recognize patterns?
1 The solar eclipse of 21 August 2017 mesmerized most inhabitants of the continental USA. As of the printing of this book, the next solar eclipse to mesmerize us across the continental USA will occur on 8 April 2024, as discussed on p. 420.
1
2
Strand I: Patterns
Figure 2. Camille Flammarion, LโAtmosphere: Mรฉtรฉorologie Populaire, Paris (1888), p. 163. Source: Wikimedia Commons.
Tips on problem-solving and spotting patterns Imagine yourself an ancient Babylonian astronomer/astrologer. You have been commissioned by the king to predict the next solar or lunar eclipse without fail, a task we refer to as problem ๐ซ. You have records from the past several hundred years from remote parts of the empire and beyond, giving the dates of previous eclipse occurrences. In fact, you can arrange them in order in time as ๐0 , ๐1 , ๐2 , ๐3 , ๐4 , โฆ ,
(1)
hundreds of data points. You search through the list looking for patterns. Your life itself may depend on what you find. A sense of urgency may help one look long and hard to see patterns towards solving ๐ซ. Beyond that tip, what can we do? In the 1945 book How to Solve It, George Pรณlya (1887โ1985) suggests a variety of problem-solving strategies [119]. We shall use all of the following Pรณlya tips as we try to solve ๐ซ and, more generally, as we explore continued fractions. โข Introduce suitable notation to keep track of progress towards solving ๐ซ. As of now, we have notation for finite simple continued fractions given in Definition 1 of the Introduction: [๐0 ; ๐1 , ๐2 , โฆ , ๐๐ ]. Much more notation is coming.
Tips on problem-solving and spotting patterns
3
โข To gain familiarity with ๐ซ, sketch pictures and graphs modeling ๐ซ. For example, when we consider a geometric version of continued fractions as introduced in Example 3 below and as pursued more carefully in Chapter VII, we use multiple graphs as aids to understanding, such as the one in Figure 3, p. 5. โข Solve simpler or related versions of ๐ซ. For example, consider the problem of two runners on a circular track, running at different constant speeds. When will they next meet again given that they started at the same place at time 0? โข Consider special cases of problem ๐ซ. For example, solving the problem of how often new moons occur is a step towards solving ๐ซ. โข Take advantage of symmetry within ๐ซ. Observe that two types of eclipses exist: solar and lunar. Perhaps these two phenomena follow similar patterns. โข Guess! Make sub-conjectures. For example, observe also that two kinds of solar eclipses occur. Sometimes the diagonal path of the Moon, from left to right (in the northern hemisphere), across the face of the Sun ascends, and sometimes the diagonal path descends. This observation might help in solving ๐ซ. โข Generalize. For example, in the Introduction we first established a finite simple continued fraction in Definition 1. We then generalized to an infinite simple continued fraction in Definition 2. โข Sometimes, to simplify a problem, it helps to complicate it first. For example, to continue with the previous hint, in Chapter IX we generalize further and allow numerators of partial denominator terms for continued fractions to be either 1 or โ1. Why should we wish to complicate an already complicated construct? As we demonstrate in Example V.6, sometimes a more complicated approach solves some problems more quickly than a simpler one. โข Be creative! Here is a classic example of what this hint might mean. From Platoโs Phaedo, just before Socrates drank hemlock to fulfill an Athenian death sentence, Socrates said of our ability to understand physical phenomena: If anyone should come to the top of the air [atmosphere], he could lift his head above it and see, as fishes lift their heads out of the water and see the things in our world, so he would see things in that upper world, things even more superior to those in this world. The engraving of Figure 2 shows a veritable Socratic figure lifting his head above normal perception to glimpse the mechanism by which the heavens move. Sometimes a change of perspectiveโif only we could stumble across a good oneโallows us to see a solution to problem ๐ซ.
4
Strand I: Patterns
The above list is helpful, but not exhaustive because the process of discovering new mathematics is also almost magical. Here are how two legendary mathematicians perceived this discovery process. Responding to an interview question [2], Whatโs the best part of being a mathematician, Paul Halmos (1916โ2006) said: Iโm not a religious man, but itโs almost like being in touch with God when youโre thinking about mathematics. God is keeping secrets from us, and itโs fun to try to learn some of the secrets. The itinerant mathematician Paul Erdลs (1913โ1996) had similar thoughts. As his biographer describes it [71], with respect to Erdลsโs perspective, God was the Supreme Fascist, the Number-One Guy Up There, God, who was always tormenting Erdลs by hiding his glasses, stealing his Hungarian passport, or, worse yet, keeping to Himself the elegant solutions to all sorts of intriguing mathematical problems. Erdลs often alluded to The Book, a volume kept by God containing the best mathematical proofs. It is high praise indeed to say of any particular mathematical argument, โAha, this is from The Book.โ We close this strand with three problems and patterns to be explored in this book.
A look ahead at three patterns Example 1: Meton and a nineteen-year calendar. Summer, fall, winter, springโin temperate climes, we can literally feel the change in the seasons, and soon we recognize the phenomenon of year-ness. Looking at the Moonโs phases, we soon recognize the phenomenon of moon-ness, or month-ness. Meton2 was a fifth-century bc Athenian astronomer who championed a nineteen-year calendar of 235 months. Every nineteen years, as the Babylonians before him had noticed, the Sun and the Moon against the background starry skies return to the same orientation of what had been. Such a period is not readily discerned. It is hidden within the pattern of the yearly cycle. Yet if we take the ratio of the period of the Moon about Earth and the period of Earth about the Sun, one of the first 235 few simple continued fraction convergents for this ratio is the fraction . This 19 approximation allows us to see what had been camouflaged. We explore this phenomenon more deeply in Chapter XI. โข Example 2: Newton and the idea of gravity. The Babylonians were careful observers of the heavens. The Greeks borrowed this tradition of record-keeping, 2A
sketch of Metonโs life appears in Strand XI.
A look ahead at three patterns
5
and to it added a model of circular motion about Earth, culminating in the Ptolemaic system of planetary orbits of circles bedecked by epicycles. Figure 2 is a fanciful glimpse of this clockwork-like system. After years of examining careful planetary data compiled by Tycho Brahe (1546โ1601), Johannes Kepler concluded that planetary orbits about the Sun are ellipses, and formulated three laws of planetary motion by 1619. In 1687, Isaac Newton published the Principia, deriving Keplerโs laws from first principles. Yet Newton was somewhat sheepish concerning his principle of universal gravitation, the idea that any two particles of matter in the universe attract each other. Newton had no explanation as to why or how such a force might exist. But if such a force did exist, voilร , we have an elegant explanation and understanding of celestial mechanics. Savants3 admired his work but, especially on the continent, shook their heads in disbelief. Fifty years later the notion of gravity morphed into a common idea. Yet the initial, fundamental idea of gravity, that matter attracts itself, arose from intuition. It was thinking outside the box. It was pattern recognition. My favorite portion of the Principia is this puzzle: If the ratio of Earthโs polar radius to its equatorial radius is 100 to 101, then what ratio of integers gives the ratio of gravity at the north pole to gravity at the equator? 501
Newtonโs answer is . Somewhat whimsically, we use continued fractions in 500 Chapter VIII to test whether his answer is the best possible one with denominator near 500. โข 1 2
3
4
5
1 0
113 100
200
0
6
Figure 3. Seven strands for ๐, labeled 0 through 6. 3 Prior
to 1800, the word scientist was rarely used, if ever.
300
6
Strand I: Patterns
Example 3: A geometrical algorithm for continued fractions. As noted on 22 355 page xiv, the fractions ๐ถ1 = and ๐ถ2 = in Equation (1) are approximations 7 113 to ๐. Observe that if we could somehow have identified the integers 7 and 113 as the denominators of two fractions that give good approximations to ๐ (without already knowing those fractions), then we can recover their numerators: 22 = [7๐]
and
355 = [113๐],
4
where [๐ฅ], the nearest integer function, is the integer nearest to ๐ฅ. As presented in Chapter VII, one way to identify these two denominators (7 and 113) is to inspect the graph of the set of points {(๐, sin 2๐2 ๐)| ๐ โ โค} as shown in Figure 3, where โค is the set of integers. This set of ordered pairs appears to be seven sine-like strands of beads labeled 0 through 6. The horizontal translate distance between these successive strands just happens to be 113 to the nearest integer as labeled in the figure (the approximate translate distance between strands 0 and 1).
a. ๐ =
1+โ5 2
.
b. ๐ = ๐.
Figure 4. Seed arrangements, ๐ซ๐ , in ideal sunflowers, 0 โค ๐ โค 200. For any irrational number ๐, will the set ๐ฎ๐ = {(๐, sin 2๐๐๐)| ๐ โ โค}, referred to as the signature of ๐, exhibit similar behavior? Can we find two integers ๐1 and ๐2 such that the set appears to be ๐1 sine-like strands of beads where the horizontal translate distance between successive strands to the nearest integer is ๐2 ? Furthermore, with ๐1 = [๐1 ๐] and ๐2 = [๐2 ๐], will the difference between ๐2 ๐ and ๐ be less than the distance between 1 and ๐? ๐2
๐1
In Chapter IX, we show that this geometric approach of using signatures to find fractional approximations for any given irrational number is equivalent to various standard continued fraction algorithms. 4 When
๐ฅ=๐+
1 2
with ๐ an integer, we stipulate that [๐ฅ] = ๐.
A look ahead at three patterns
7
Disentangling the snake-like intertwining of ๐ฎ๐ โs strands by using both the ๐ฅ-axis and the ๐ฆ-axis results in a pattern called phyllotaxis in plants, the arrangement of seeds, petals, or leaves [106], which can be modeled by the set ๐ซ๐ = {๐(๐)(cos 2๐๐๐, sin 2๐๐๐)| ๐ โ โค, ๐ โฅ 0} where ๐(๐) is a function for the distance of the point ๐(๐)(cos 2๐๐๐, sin 2๐๐๐) from the origin. Figure 4a shows the phyllotaxis of seeds of a sunflower with 1+โ5
๐(๐) = โ๐ and ๐ = , the golden mean. Similarly, Figure 4b shows the 2 phyllotaxis for a flower with ๐ = ๐. Note that this latter flower has seven spiral strandsโmuch like the seven sine-like strands of ๐ฎ๐ in Figure 3. โข
Chapter I: Tally Bones to the Integers In this chapter we explore the origin and nature of the integers. We outline the development of our number system from tally marks to number systems with respect to various bases. We investigate the structure of the integers themselves: the fundamental theorem of arithmetic, the idea that any positive integer can be expressed as a product of prime integers. Such structure allows us to look at parts of the whole and, in particular, integer factors of any given integer, which in turn leads naturally to fractions.
Tally bones Sitting around campfires after dining on subdued beasts of long ago, our forebears told stories, mended clothing and tools, played games, and perhaps etched records upon the bones of the beasts. A petrified baboon bone of mathematical significance was unearthed by Jean de Heinzelin in 1950 at an archeological dig at Ishango near Lake Edward bounded by the Congo and Uganda, one of the headwaters of the Nile. Considered to be at least 11 000 years old [75], this ten-centimeter-long bone bears a peculiar arrangement of tally marks. Shown in Figure 5, side 1 of the bone has two rows ๐ด and ๐ต of notches, whereas side 2 has but one row ๐ถ of notches. These notches are grouped by spacing. The numbers of notches are as indicated in the figure, so that row ๐ด consists of 11, 13, 17, 19 notches, row ๐ต consists of 11, 21, 19, 9 notches, and row ๐ถ consists of 3, 6, 4, 8, 10, 5, 5, 7 notches.5 Heinzelin has suggested that these bone markings might be the score in some unknown game. Marschack [97, pp. 27โ32] speculated that they represent a lunar calendar of sorts, primarily because the sum of each row of side 1 is 60, twice the lunar cycle of about 30 days. Even though Joseph [79, p. 34] cautions against 5 Due to ambiguity in the tally markings, the group of ten notches on row ๐ถ may possibly be a group of nine notches.
9
10
Chapter I: Tally Bones to the Integers
Figure 5. The three rows ๐ด, ๐ต, and ๐ถ of the Ishango bone, on display at The Royal Belgian Institute of Natural Sciences, Brussels, author sketch. over-interpreting these tally marks, saying that โa single bone may well collapse under the heavy weight of conjectures piled upon it,โ the temptation to propose additional conjectures is irresistible. We give some of these.
A table of primes? Definition 4: Divisibility. Let ๐ and ๐ be integers, with ๐ โ 0. We say that ๐ divides ๐, denoted by ๐|๐, if ๐ = ๐๐ for some integer ๐. Definition 5: Primes and irreducibles. An integer ๐ larger than 1 is prime6 if whenever ๐|๐๐ where ๐ and ๐ are integers, either ๐|๐ or ๐|๐. By convention, we disallow 1 as being prime. An integer greater than 1 is composite if it is not prime. A nonzero integer ๐ is irreducible if whenever another integer ๐ divides ๐, either ๐ equals ยฑ๐ or ๐ = ยฑ1. With respect to the Ishango bone, a first irresistible conjecture is that row ๐ถ followed by row ๐ด is a characterization of two patterns starting with 3. In particular, the first pattern starts 2 โ
3 = 6, 2 โ
4 = 8 and ends 10 = 2 โ
5, while the second pattern continues with 5, 7 andโonce the bone is flipped overโproceeds on to row ๐ด with the integers 11, 13, 17, 19. A modern-day observer might say of the second pattern, Aha, the primes from three through nineteen!โeven though no other evidence exists anywhere suggesting that people were aware of the notion of primeness before, say, 3000 years ago. 6 As we will see in Proposition II.8, an integer ๐ > 1 is prime if and only if ๐ is irreducible. For the remainder of this chapter we shall assume this result is true. However, various number systems other than the integers exist in which some irreducible numbers (other than โ๐ where ๐ is prime) fail to be prime. See Exercise 10cd for an example.
A table of primes?
11
Can we characterize the notion of a prime without formally alluding to multiplication? Yes. Imagine yourself a shepherd overseeing a group of twenty sheep.7 The animals more or less stay in one place, grazing. Your job is to prevent sheep from straying and to prevent predators from terrorizing the sheep. Most of your time is spent waiting. Meanwhile you have a pouch of pebbles, twenty of them, one for each sheep. You may not have names for counting from one to twenty, but you do know whether or not a sheep is missing. At times you cast the pebbles onto the smooth ground and arrange them into rows of uniform length. You discover three different rectangular arrangements where the number of rows is no more than the number of pebbles in each row as shown in Figure 6: one row of twenty, two rows of ten, and four rows of five.
one row of twenty two rows of ten
four rows of five
Figure 6. Three rectangular arrangements of twenty pebbles. If the herd had twenty-three sheep, the shepherd might at first surmise that with a larger number of pebbles, more rectangular arrangements than three might exist. But of course, the shepherd would be disappointed, for there exists only one rectangular arrangement. That is, the shepherd has discovered the notion of primeness, and is well on the way to answering Puzzle 6. Puzzle 6: A shepherdโs puzzle. Let ๐ be a positive integer. Into how many rectangular arrays can ๐ pebbles be arranged? โข We answer Puzzle 6 in Example 14. Meanwhile, we return to the Ishango bone. One bone pundit, whom we call Sam, discounts the idea of the Ishango bone as being the earliest known tabulation of primes by answering the following question. 7 Sheep
were first domesticated somewhere between 11000 and 9000 bc.
12
Chapter I: Tally Bones to the Integers
Puzzle 7: A probability puzzle. What is the likelihood of selecting four primes in order from the integers 1 through 30? 1 The answer Sam gave was . How so? Of the first thirty integers, ten are prime, so that
1 3
81
of these integers are prime. Thus the likelihood that four num1
4
bers chosen at random from the integers one through thirty are all prime is ( ) = 3
1
. Sam goes on to argue that hundreds of Ishango-like bones must exist. Since 81 only one of them has been found, Sam concluded that the four primes 11, 13, 17, and 19 were simply a random selection. However, let us interpret Puzzle 7 more carefully. Our set of four integers must all be prime, must be distinct, and must be successive primes, either in increasing order or in decreasing order. For the moment, let us imagine them as being in increasing order. Once we select the smallest ๐ of these prime numbers, the rest are chosen. Since ๐ could be a prime from 2 through 17, there are 7 ways of selecting these four prime integers. By symmetry (to allow for a decreasing order of primes), there are 14 ways to select four successive primes among the 30 integers. Furthermore, the number of ways to pick four integers where duplicate integers are allowed and where order is important is 304 . Therefore the likelihood that four prime integers like the ones on the Ishango bone should appear on a tally bone that is arbitrarily unearthed is 14/304 , that is, less than one in fifty thousand.8 Thus, it may very well be that the tally-maker of the Ishango bone knew something about primes. โข
The solution to a puzzle? Another possible explanation for the markings on the Ishango bone is that they were answers to a puzzle, somewhat in keeping with Heinzelinโs original hunch [69]. For example, a series of stories, traditions, and beliefs collected by Littmann [90, pp. 36โ37] in Ethiopia before 1910 includes this brainteaser. Puzzle 8: Camel loads of cloth. A man had three wives, and he went to the market to buy cloth for them, taking nine camels on which to carry the cloth. After he had bought the cloth he loaded the camels: On the first camel he put one load of cloth, on the second two loads, and so on. Doing this he put on each camel as many loads as its number. If he wishes to divide the cloth equally among his wives without unpacking the camels, what should he do? 8 Here is an alternate way to model Puzzle 7: Given that four distinct integers have been chosen at random in increasing order from the first 30 integers, what is the likelihood that all four are primes? This time, we need a binomial coefficient as described in Proposition VI.16 to conclude that the likelihood is 1 in 3915.
A base twelve or base sixty system?
13
Figure 7. Author sketch of Willard Wiganโs Nine camels in the eye of a needle micro-sculpture. One answer is that camels 1, 6, and 8 go to wife 1; camels 2, 4, and 9 go to wife 2; and camels 3, 5, and 7 go to wife 3. Thus each wife has 15 loads of cloth. Another solution is 1, 5, and 9 to wife 1; 2, 6, and 7 to wife 2; and 3, 4, and 8 to wife 3. โข Camels were first domesticated about four thousand years ago. Yet we can imagine a brainteaser similar to Puzzle 8 dating to eleven thousand or more years ago, the time when the Ishango-bone baboon lost its life. This time we use African elephants. Puzzle 9: Elephant loads of bananas. A tribe has four elephantsโraised from orphaned calvesโand a total of sixty clusters of bananas. Rather than load the clusters equally onto each elephant, how may the clusters be loaded onto the four elephants so that no two loads are the same? Side 1 of the Ishango bone gives two solutions. That is, place 11, 13, 17, 19 clusters onto the elephants from the least to the greatest elephant, or pack 9, 11, 19, 21 on them. โข
A base twelve or base sixty system? In his analysis, Heinzelin notes that the sum of the marks on side 2 of the bone is 48 (whereas the two rows of marks on side 1 both sum to 60). Since both 48 and 60 are multiples of twelve, he speculates that this bone and its markings could very well be evidence of the beginnings of a base twelve number system. He goes on to conclude [75]: It is possible that the modern world owes one of its greatest debts [the idea of multiples of a number and a base for a number system] to the people who lived at Ishango. It is remarkable that the oldest clue to the use of a number system by man dates to central Africa of the Mesolithic period. What a bone! Of course, using twelve as a base for a counting system is a natural idea because in one year the Moon completes its cycle of phases approximately twelve times.
period. period. What What a bone! a bone! OfOf course, course, using using twelve twelve as as a base a base forfor a counting a counting system system is is a natural a natural idea idea be-because cause in in one one year year thethe Moon Moon completes completes itsits cycle cycle of of phases phases approximately approximately twelve twelve times. times. 14 Chapter I: Tally Bones to the Integers
โฝ โฝ
a. The The 12finger 12 finger finger bones bones ofthe of thethe right right hand. hand. b. b. Two Two twelves twelves and five five ones is 29. is 29. a.a.The 12 bones of right b. Two twelves andand five ones isones 29. hand. Figure Figure 8. 8.Signing Signing anan integer, integer, author author sketch. sketch. Figure 8. Signing an integer, author sketch. Pletser Pletser and and Huylebrouck Huylebrouck [114] [114] describe describe a combination a combination of of a base a base twelve twelve and and base base sixty sixty number number system system as as is found is found in in West West Africa Africa among among thethe Yasgua Yasgua people people in in Nigeria. Nigeria. One One can can use use thethe thumb thumb to to count count from from one one to to twelve twelve onon thethe small small bones bones of of thethe four four fingers fingers of of thethe right right hand hand as as shown shown in in Figure Figure 8a.8a. For For each each twelve twelve that that is is counted, counted, wewe use use a digit a digit of of thethe leftleft hand, hand, which which means means that that thethe five five digits digits of of thethe leftleft hand hand count count altogether altogether as as 5 ร5 12 ร 12 oror 60.60.Perhaps Perhaps this this scheme scheme is is thethe basic basic Pletser and Huylebrouck [115] describe a combination of a base twelve and tradition tradition that that gave gave rise rise to to thethe Babylonian Babylonian system system of of numeration numeration using using multiples multiples base sixty number system as is found in West Africa among the Yasgua people in of of sixty. sixty. Nigeria. One can use the thumb to count from one to twelve on the small bones The The Babylonians Babylonians used used vertically vertically aligned aligned wedge-shaped wedge-shaped cuneiform cuneiform tally tally marks marks of the four fingers of the right hand as shown in Figure 8a. For each twelve that is clay to to count count from from one through through nine.They They also also used used horizontally aligned โฝ in โฝ inclay counted, we use a digit ofone the left hand,nine. which means that thehorizontally five digits of aligned the left hand count altogether as 5 ร 12 or 60. Perhaps this scheme is the basic tradition wedge-shaped wedge-shaped tally tally marks marks forfor tenten through through fifty. fifty. When When wewe write write ๐โฝ๐โฝand and that gave rise to the Babylonian system of numeration using multiples of sixty. ๐ ๐ , we , we mean mean ๐ successive ๐ successive โs and ๐ successive ๐ successive โs. โs.For For example, example, thethe tally tally โฝโsโฝand The Babylonians used vertically aligned wedge-shaped cuneiform tally marks marks 4 4 5 โฝ5 in โฝ inFigure Figure 9a9a represent represent thethe integer integer forty-five forty-five because because it it is is four four in clay to count from one through nine. They also used horizontally aligned โฝmarks tens tens and and five five ones. ones.ToTo represent represent integers integers at at least least as as large large as as 60,60, thethe BabyloniBabyloniwedge-shaped tally marks for ten through fifty. When we write ๐โฝ and โฝโs.โฝโs.ForForsuch and and such strings strings of of symbols, symbols, thethe symsymans ans alternated alternated groups groups of of โs โs ๐bolsโ , we mean ๐ successive For example, theโstally โฝโs and ๐tosuccessive bolsโ values values in in a grouping a grouping immediately immediately to thethe leftleft of of a given aโs.given grouping grouping of of and โs and
โฝ โฝ
โฝ โฝ
โฝ โฝ
โฝโฝโฝ
โฝ โฝ
โฝ
โฝ
โฝ
marks 4 5 โฝ in Figure 9a represent the integer forty-five because it is four tens and five ones. To represent integers at least as large as 60, the Babyloni-
โฝ
ans alternated groups of โs and โฝโs. For such strings of symbols, the symbolsโ values in a grouping immediately to the left of a given grouping of โs and
โฝ
โฝ
โฝ โฝ
โฝ
โฝโs are 60 times their values in that given grouping. For example, the sequence 3โฝ 4 5 โฝ as illustrated in Figure 9b can be grouped as (2 3 โฝ ) fol2 lowed by (4 5 โฝ ), which translates to twenty-three followed by forty-five; now
Base ten, base twenty, base eight, base two
15
multiply twenty-three by sixty and then add forty-five, resulting in 60 โ
23 + 45 =
โฝ
โฝ
1425. Alternatively, 2 3โฝ 4 5 โฝ is the integer 1425 because it is two sixhundreds plus three sixties plus four tens plus five ones. To avoid ambiguity in this system, space was inserted between pertinent symbols. For example, to rep-
โฝโฝ rather than 6
โฝ
resent the integer sixty-two, Babylonians wrote โฝ
2โฝ .
worth 10 worth 1 worth 600 worth 60
a. 45 = 4 โ
10 + 5 โ
1.
b. 1425 = 60(2 โ
10 + 3 โ
1) + (4 โ
10 + 5 โ
1).
Figure 9. Babylonian cuneiform tally marks.
Base ten, base twenty, base eight, base two The Babylonian place value system was simplified by the Arabs and Indians to a base ten system. As a few other traditions had done,9 they also implemented a marvelous digit to represent nothing at all, the zero. Instead of using tally marks for the integers one through nine, they used a single symbol or glyph for each grouping of ๐ tally marks, where ๐ is any of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. These are set in place value positions to represent particular multiples of specific powers of ten. Thus the sequence 4083 is four thousands plus zero hundreds plus eight tens plus three ones. The reason we use base ten of course is because we have ten fingers. The Mayans of Central America, who may very well have shunned footwear for much of the year because of living in the tropics, used base twenty, making great use of all the digits on the hands and feet. Some cultures10 counted on the spaces between fingers, developing a base eight system. As notation to help keep track of the base being used when representing any given number, we make the following definition. 9 For example, the Babylonians introduced a place-holder symbol (a zero) around 350 bc. The Mayans developed a zero symbol around the year 350; see Exercise 6. Scholars have found an instance of a zero symbol in an old Indian document known as the Bakhshali manuscript. In 2017, carbon dating showed that this old birch-bark document, found in 1881 by a farmer in the Pakistani village of Bakhshali, dates to the third or fourth century. 10 The Yuki people of northern California and the Pame people of southern Mexico counted this way [7].
16
Chapter I: Tally Bones to the Integers
Definition 10: Base ๐ notation. Let ๐ and ๐ be nonnegative integers with ๐ > 1. In base ๐, the digits are the integers from 0 through ๐ โ 1. We say that ๐ is represented in base ๐ by a string ๐ค = ๐๐ ๐๐โ1 โฆ ๐1 ๐0 of ๐ + 1 digits if ๐
๐ = ๐0 + ๐1 ๐ + ๐2 ๐2 + โฏ + ๐๐ ๐๐ = โ ๐๐ ๐๐ , ๐=0
where the ๐๐ โs are digits in base ๐. To emphasize that a given string ๐ค is the representation of an integer in base ๐, we write ๐ค๐ or (๐ค)๐ , where ๐ is represented in base ten (without any subscript). Furthermore, when ๐ is ten, ๐ค10 is usually written as ๐ค. Example 11: A base riddle: Why are Christmas and Halloween the same? To illustrate Definition 10, let ๐ be twenty-five. Then ๐ can be represented as (31)8 , an octal representation, because (31)8 = 3 โ
8 + 1 = 25. In base ten, twenty-five is (25)10 = 25, a decimal representation. Using these representations in Oct(318 ) and Dec(25) and interpreting them as calendar days in the months of October and December gives the tongue-in-cheek observation that Halloween and Christmas are the same. โข When we write ๐ = ๐, such as (31)8 = 25, we mean that ๐ and ๐ refer to the same number. As another example of writing a number in a different base, the decimal integer ๐ with base five representation (3104)5 is ๐ = (3104)5 = 3 โ
53 + 1 โ
52 + 0 โ
51 + 4 โ
50 = 375 + 25 + 0 + 4 = 404. The simplest base of all is base two, or binary. It is easily adapted to hard-wiring a computer because computers are designed to be able to check any particular location in their memory as being either open or closed, on or off. With the digits in binary being 0 and 1, the string (1011001)2 6
5
4
represents 1 โ
2 + 0 โ
2 + 1 โ
2 + 1 โ
23 + 0 โ
22 + 0 โ
21 + 1 โ
20 = 89.
A binary digit interlude As a practical application, which we revisit in Strand V, of binary digitsโthe use of two symbols to record informationโwe consider the firing sequence of an internal combustion diesel train engine of twelve cylinders. Figure 10 shows two banks of six cylinders, the right side and the left side, separated by an exhaust manifold. The exact order in which the twelve cylinders fire is somewhat arbitrary.11 For simplicity, we imagine the sequence is ๐ฟ1 ๐
1 ๐ฟ2 ๐
2 โฆ ๐ฟ6 ๐
6 . 11 In actual engines, successive cylinders in a firing sequence are on opposite sides of the manifold and successive cylinders on the same side are rarely adjacent. Thus a reasonable firing sequence might be, as in a Ferrari sports car, ๐ฟ1 ๐
6 ๐ฟ5 ๐
2 ๐ฟ3 ๐
4 ๐ฟ6 ๐
1 ๐ฟ2 ๐
5 ๐ฟ4 ๐
3 .
A binary digit interlude
17
L6
L4 L3
Exhaust Manifold
L5
R6 R5 R4 R3
L2
R2
L1
R1
Figure 10. An internal combustion engine with twelve cylinders. When a cylinder is in a potential firing state we can engineer it either to fire or to skip. After each of its twelve cylinders has either fired or skipped a firing, we say that it has passed through one cycle. Suppose that, to save fuel when idling or coasting downhill, during each cycle we want only some of the cylinders to fire. In particular, how can we engineer a solution best satisfying the following ideal features? โข Each cylinder fires in exactly fifty percent of the cycles. We want each cylinder to wear uniformly. โข No cylinder skips more than twice in succession. Successive cylinder skips cause the cylinder to grow cold, and cold cylinders produce unwanted smoke when fired. โข Exactly six cylinders fire during each cycle. We want to preserve power. โข Exactly six cylinders change their stateโfrom firing to missing or from missing to firingโfrom one cycle to the next. We want a smooth carryover between cycles in the engine so that it purrs rather than barks. We say that a bit-string is a finite sequence of zeroes and ones. Any bit-string of length twelve is a firing seqence. For example ๐ค1 = 101010101010 is the sequence fire-skip-fire-skip-fire-skip-fire-skip-fire-skip-fire-skip. A first approach to a solution is to alternate directly between ๐ค1 and 010101010101. Such a solution exhibits the first three features, but not the last because all twelve cylinders change their state from one cycle to the next. Finding a solution that
18
Chapter I: Tally Bones to the Integers
satisfies all four features is a challenge. Since there are 924 bit-strings of length twelve consisting of six 1โs and six 0โs,12 a brute-force approach to finding a solution of ๐ different cycles between ๐ค1 and 010101010101 involves searching through a space of 924๐ possibilities, an astronomically large number if ๐ is large, which is yet larger if we seek an approximate solution. However, after some experimentation, we find an approximate solution consisting of four cycles ๐ค1 , ๐ค2 , ๐ค3 , ๐ค4 shown in the first two columns of Table 1. Let ๐ค = ๐ค1 ๐ค2 ๐ค3 ๐ค4 . Table 1. A fifty percent firing solution. firing sequence ๐ค1 ๐ค2 ๐ค3 ๐ค4
binary decimal 101010101010 2730 101100110110 2870 010101010101 1365 010011001001 1225
hexadecimal 0AAA 0B36 555 4C9
base thirty-six 23U 27Q 11X 0Y1
As the reader may verify, over the firing sequence ๐ค, each cylinder fires twice (out of four cycles). No cylinder skips more than twice in succession. After startup, each cylinder repeats the pattern fire-fire-skip-skip. However, the number of cylinders firing during each cycle repeats the pattern 6-7-6-5, for an average of six. Also, the number of cylinders changing their states from one cycle to the next repeats the pattern 5-7-5-7, for an average of six. See Exercise 5 for a solution satisfying all four properties. Up to this point, any firing sequence of zeroes and ones has no numeric significance. But suppose we wish to remember a particular firing sequence. Rather than memorizing a sequence of twelve digits, we can interpret the firing sequence as a binary number ๐ and then write ๐ using a base greater than two, hence reducing the number of digits needed to record the firing sequence information. For example, the third, fourth, and fifth columns of Table 1 give the firing sequence in decimal, hexadecimal, and base thirty-six. In hexadecimal, we need sixteen digits, six more than in decimal, so as to represent ten through fifteen. By custom, we use the letters A through F to do so. Furthermore, by custom, when a hexadecimal number starts with a letter, to emphasize that it is a number we preface it with the digit 0. Thus the integer 0ABC when rendered into decimal is (0ABC)16 = (A)16 โ
162 + (B)16 โ
161 + (C)16 โ
160 = 10 โ
256 + 11 โ
16 + 12 = 2748. As can be seen, it is easier to remember, say, 0B36 in hexadecimal rather than 101100110110, yet both representations contain the same information. To represent an integer in base thirty-six, we use all the letters of the alphabet. Thus Z 12 The
number 924 is the binomial coefficient (12) as described in Proposition VI.16. 6
Solving the shepherdโs puzzle and beyond
19
has value thirty-five. Special care must be exercised to distinguish between the digit zero and the letter O and between the digit 1 and the letter I.
Solving the shepherdโs puzzle and beyond In this section we solve Puzzle 6 and a related problem about the number of positive integers less than a given positive integer ๐ that have no divisors in common with ๐. To answer these questions, we need to know how to factor any composite integer as a product of its prime divisors. We first note that the number of different primes we may encounter is unbounded. Euclid proved this result in Proposition 20 of Book IX of the Elements. He did so by assuming that only a finite number of primes exist and then reasoning to reach a contradiction. We paraphrase his argument in the following way. Proposition 12: An infinitude of primes.13 There exist an infinite number of primes. Proof. Suppose that the primes constitute a finite set ๐ซ of integers, ๐ซ = {๐1 , ๐2 , โฆ , ๐๐ }. Let ๐ = 1 + ๐1 ๐2 โฏ ๐๐ . Since ๐ is larger than each of the primes ๐๐ , ๐ is not in ๐ซ. So ๐ is not prime. Thus for some ๐, 1 โค ๐ โค ๐, prime ๐๐ divides ๐. But then ๐๐ must also divide 1 = ๐ โ ๐1 ๐2 โฏ ๐๐ , a contradiction. Therefore, there are an infinite number of primes. Beginning with this result, we eventually obtain the following proposition, a proof of which appears in the next chapter. Proposition 13: The fundamental theorem of arithmetic. Every integer larger than 1 can be written as a product of powers of prime integers, and this representation is unique up to the order of the prime powers.14 Proposition 13 can be used to answer Puzzle 6. Example 14: A solution to the shepherdโs puzzle. By the fundamental theo๐ ๐ ๐ rem of arithmetic, let ๐ = ๐1 1 ๐2 2 โฏ ๐๐ ๐ , where ๐๐ are distinct primes and ๐๐ are positive integers, 1 โค ๐ โค ๐ for some positive integer ๐. We wish to decompose n into the product ๐ = ๐ด โ
๐ต, where ๐ด and ๐ต are positive integers and ๐ด โค ๐ต. For the moment we drop this last requirement. By the fundamental theorem, ๐ด ๐ ๐ ๐ must be written as ๐ด = ๐1 1 ๐2 2 โฏ ๐๐ ๐ for integers ๐๐ , where, to ensure that ๐ด 13 Technically, this proposition shows that there are an infinite number of positive irreducible integers. See footnote 6 on p. 10. 14 See Code 1 in Appendix III for how to use a computer algebra system to illustrate both this theorem and Proposition 17.
20
Chapter I: Tally Bones to the Integers
divides ๐, we have 0 โค ๐๐ โค ๐๐ . The number ๐ of distinct ways that the ๐๐ can be selected is ๐ = (๐1 + 1)(๐2 + 1) โฏ (๐๐ + 1). For any such integer ๐ด, we have ๐ต = ๐/๐ด. However, by symmetry there are as many decompositions with ๐ด < ๐ต as there are decompositions with ๐ด > ๐ต. There is exactly one decomposition when ๐ด = ๐ต, in which case ๐ is a perfect square, in which case ๐ด = โ๐ = ๐ต. So reinstating the requirement ๐ด โค ๐ต means that when ๐ is a perfect square, ๐ pebbles can be arranged into ๐ด rows of ๐ต pebbles (๐ + 1)/2 ways. When ๐ is not a perfect square, ๐ can be arranged into ๐ด rows of ๐ต pebbles ๐/2 ways. โข Example 15: The shepherdโs puzzle for ๐ = 360. By the fundamental theorem, ๐ = 23 32 51 = 360. So ๐ = 4 โ
3 โ
2 = 24, where ๐ is defined in Example 14. Thus, by our general solution to the shepherdโs puzzle, 360 pebbles can be arranged as ๐/2 = 12 different rectangular arrays. The list of possible arrangements of 360 pebbles into rectangular arrays is 1ร360, 2ร180, 3ร120, 4ร90, 5ร72, 6ร60, 8ร45, 9ร40, 10ร36, 12ร30, 15ร24, 18ร20. โข
As another implication of the fundamental theorem, Leonhard Euler (1707โ 1783) was able to answer a related puzzle. To take an example, how many positive integers less than or equal to twelve have no divisors greater than 1 in common with twelve? The answer is four, because 2, 3, 4, 6, 8, 9, 10, and 12 all have divisors greater than 1 in common with 12, whereas 1, 5, 7, and 11 do not. To pose this puzzle in general terms, we make the following definition. Definition 16: The Euler phi function. For any positive integer ๐, let ๐(๐) be the number of positive integers less than or equal to ๐ that have no divisors larger than 1 in common with ๐. The symbol ๐ is the Euler phi function, also known as the totient function. Here is Eulerโs amazing discovery. Proposition 17: How to calculate ๐(๐). Note that ๐(1) = 1. Let ๐ be an integer ๐
๐
๐
๐
๐
with ๐ โฅ 2. With ๐ = ๐1 1 ๐2 2 โฏ ๐๐ ๐ = ฮ ๐๐ ๐, where ๐๐ are distinct primes and ๐=1
๐๐ are positive integers, 1 โค ๐ โค ๐ for some positive integer ๐, ๐
๐
๐
1 ). (2) ๐ ๐ ๐=1 ๐=1 ๐=1 Almost a proof. Observe that ๐(๐) = ๐ โ 1 when ๐ is a prime integer. To find ๐(๐2 ), note that the only integers less than or equal to ๐2 that have divisors greater than 1 with ๐2 are the ๐ integers in the arithmetic sequence ๐
๐(๐) = ๐( ฮ ๐๐ ๐ ) =
๐
ฮ ๐(๐๐ ๐ ) =
๐, 2๐, 3๐ , โฏ , ๐ โ
๐, 1
which means that ๐(๐2 ) = ๐2 โ ๐ = ๐2 (1 โ ). ๐
๐
ฮ ๐๐ ๐ (1 โ
Three parting puzzles
21
To generalize, consider ๐(๐๐ ) with ๐ โฅ 1. The only integers less than or equal to ๐๐ that share divisors greater than 1 with ๐๐ are the ๐๐โ1 integers in the sequence ๐, 2๐, โฆ , ๐๐โ1 ๐, 1
which means that ๐(๐๐ ) = ๐๐ โ ๐๐โ1 = ๐๐ (1 โ ). ๐
Now consider the integer ๐ = ๐๐ where ๐ and ๐ are different primes. Observe that the only integers having a divisor greater than 1 in common with ๐ are those having a factor of ๐ or ๐: ๐, 2๐, 3๐, โฆ , ๐๐
and ๐, 2๐, 3๐, โฆ , ๐๐.
These lists contain exactly ๐ + ๐ โ 1 distinct integers because ๐๐ = ๐๐. Thus 1 1 ๐(๐๐) = ๐๐ โ (๐ + ๐ โ 1) = (๐ โ 1)(๐ โ 1) = ๐๐(1 โ )(1 โ ). ๐ ๐ To generalize, consider ๐(๐๐ ๐๐ ), where ๐ โฅ 1 and ๐ โฅ 1. Every factor of ๐๐ ๐๐ that is greater than 1 must have either the form ๐๐ or the form ๐๐ where ๐ is also a factor of ๐๐ ๐๐ . As before, there are ๐๐โ1 ๐๐ relevant factors of the form ๐๐ and ๐๐ ๐๐โ1 factors of ๐๐ ๐๐ of the form ๐๐. A factor is counted in both lists if and only if it has the form ๐๐๐. There are ๐๐โ1 ๐๐โ1 such factors. Thus ๐(๐๐ ๐๐ ) = ๐๐ ๐๐ โ ๐๐โ1 ๐๐ โ ๐๐ ๐๐โ1 + ๐๐โ1 ๐๐โ1 1 1 = ๐๐ (1 โ )๐๐ (1 โ ) = ๐(๐๐ )๐(๐๐ ). ๐ ๐ In Chapter III, we will generalize to ๐ distinct prime factors to obtain Equation (2). โข Example 18: Calculating ๐(90). By the fundamental theorem of arithmetic, 90 = 2 โ
32 โ
5. Observe that ๐(2) = 1, ๐(32 ) = 6, and ๐(5) = 4. Thus Equation (2) yields ๐(90) = 24. To check this result, here are the 24 integers less than 90 having no divisors of 2, 3, or 5: {1, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 77, 79, 83, 89}. โข
Three parting puzzles We close this chapter with three puzzles. The first one is a segue into Chapter II. The second is an algebra review and a look ahead to continued fractions. The third is a variation on discovering an Ishango bone. Puzzle 19: A geometric sequence? Consider this pattern: Start with a circle and mark ๐ points in general position around its circumference. Now connect
22
Chapter I: Tally Bones to the Integers
3
1
1
2
a. 1 point, 1 region. 5
1 3
7
6 2
12
d. 4 points, 8 regions.
1 2
b. 2 points, 2 regions. c. 3 points, 4 regions. 11 2 10 1 5 4 3 8 7 9 6
4 8
4
15
13
14 16
e. 5 points, 16 regions.
f. 6 points, ? regions.
Figure 11. How many regions for ๐ = 6 points?
each pair of points with a line segment. Into how many regions has the circle been partitioned? By general position we mean that the points have been chosen so that no three line segments coincide at a point. When ๐ ranges from 1 to 5, we see the pattern of 1, 2, 4, 8, 16 regions as explicitly enumerated in Figure 11. How many partitioned regions appear when ๐ = 6, as shown in Figure 11f? Is it 32? A formula giving the answer for ๐ points appears in Chapter II, Equation (II.12). โข Puzzle 20: A missing digit. In the following continued fraction expression, ๐ฅ is a digit from the set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Thus the term 3๐ฅ8 means 308+10๐ฅ. Find the missing digit. 3๐ฅ8 1 โข =3+ 1 . 101 4+ ๐ฅ5
Puzzle 21: Another Ishango bone. Aliens have stumbled across the markings of Figure 12 on an Earth space probe far from our solar system. What information might they infer about it? (Hint: It has something to do with primeness and the complex numbers. Extra hint: See Exercise 10.) โข
Exercises
23
Figure 12. A different kind of Ishango bone. Exercises 1. For the Ishango bone, the numbers in rows ๐ด and ๐ต are all odd integers. Find a probability similar to that of Puzzle 7: What is the probability that when randomly selecting eight integers (not necessarily distinct or in order) from the integers 1 to 30, all eight are odd? 2. Pletser and Huylebrouck [115] suggest that the notches on the Ishango bone are a number game. They ask: How may each of the numbers in rows ๐ด and ๐ต be obtained by taking a sum ๐ of at most three successive numbers in row ๐ถ subject to the following special rule? Special rule: If either one number ๐ from row ๐ถ or two successive numbers ๐ and ๐ from row ๐ถ are selected to form a sum ๐, then ๐ may be taken as any of ๐ + 1, ๐ + 2, ๐ + ๐, ๐ + ๐ + 1, or ๐ + ๐ + 2, provided ๐ is odd. Pletser and Huylebrouck also assume that the number 10 in row ๐ถ of Figure 4 is the number 9. To illustrate the play of the game, take the number 13 in row ๐ด. To win we must find up to three numbers ๐, ๐, and ๐ in row ๐ถ such that ๐ = 13. One solution is when ๐, ๐, and ๐ are 3, 4, and 6. Furthermore, the numbers 4, 8, and 9 in row ๐ถ yield ๐ = 21, a number appearing in row ๐ต. With ๐ and ๐ as 3 and 6, ๐ = 3 + 6 + 2 = 11, whereas for 6 and 4, ๐ = 6 + 4 + 1 = 11. With ๐ = 7, ๐ = 7 + 2 = 9.
24
Chapter I: Tally Bones to the Integers
worth 20(1) worth 20(5) worth 1 worth 5
a. 2 โ
5 + 3 โ
1 = 13.
b. 400 โ
16 + 20 โ
7 + 13 = 6553.
Figure 13. Mayan counting with ones, fives, and twenties. With respect to these rules, what natural sums of numbers taken from row ๐ถ fail to yield a number as given in rows ๐ด and ๐ต? 3. Beyond the two solutions given to Puzzle 8, are there other ways to partition the camels so that each wife receives the same amount of cloth?
โฝ
โฝ
4. (a) What base ten number corresponds to the number 3 2โฝ 5 4โฝ ? (b) With the two wedge symbols of the Babylonians, how might a scribe unambiguously represent the number 601? (c) From the Babylonians we have inherited their tradition of 360โ in one revolution. Offer an explanation as to why that tradition came to be. (d) Rewrite the binary number (1011011)2 in base three. (e) What decimal numbers correspond to the base thirty-six numbers 0R2D2 and 0C3PO, the names of two droids in the Star Wars films? (f) Interpret your first name as a base thirty-six number. Rewrite this number in base ten. 5. (a) To construct a solution cycle satisfying all four properties outlined on p. 17, we consider a block of four cylinders. To transition from ๐ = 1010 to ๐ = 0101 and back again, let ๐ฅ = 1001 and ๐ฆ = 0110, and consider the sequence ๐ โ ๐ฅ โ ๐ โ ๐ฆ โ ๐. Use this idea to find a solution to the original problem of twelve cylinders. (b) Find a different solution from the one outlined in part (a). 6. The Mayan system of enumeration was much like the Babylonian one. They used a circular dot for one and a horizontal line for five. Instead of interleaving their two shapes to the left to account for higher place values, the Mayans stacked them atop each other. Instead of using base sixty, the Mayans used base twenty, so that a dot or line at a level immediately above a given level has value 20 times its value at that given level. They also invented a symbol for โข
zero:
. The Mayan integer twenty was written
, whereas their
Exercises
25
Figure 14. A page of the thirteenth-century Grolier Codex, author sketch. The codex is on display at the National Museum of Anthropology, Mexico City. โขโข
integer twenty-one was
โข โข.
The Mayan forty was
and one hundred was
. Using these clues and the examples15 given in Figure 13, try these exercises. (a) Write the numbers one through forty in Mayan. (b) Write the integer 2017 in Mayan. (c) On a Mayan stela, we see a number ๐ rendered as
โขโขโข โข โขโขโขโข What is the value of ๐? (d) Figure 14 is a page from an old Mayan book called a codex. What Mayan numbers can you recognize? 15 We have over-simplified the Mayan number system in the text. To fit the calendar better the Mayans used 18 โ
20 = 360 rather than 400 in their third level of numeration. Thus the Mayan number in Figure 13 actually represents 360 โ
16 + 20 โ
7 + 13 = 5913 rather than 6553.
26
Chapter I: Tally Bones to the Integers
7. (a) To which group of people has history more or less awarded the honor of being the first to think of primes? (b) Implement the sieve of Eratosthenes to identify all the primes between 1 and 200. That is, start with a row of the integers 1 through 200, and cross off 1 because 1 is not prime by definition. Then circle 2, and cross off every second entry in the list, namely, 4, 6, 8, โฆ. Circle the first number on the left which is neither circled nor crossed off, namely 3, and cross off every third entry in the list (which may very well include entries already crossed off). Repeat this process. 8. (a) Factor 4840 in accordance with the fundamental theorem of arithmetic. (b) Calculate ๐(4840) using Proposition 17. (c) Find an integer ๐ where ๐(๐) = 84. 9. In Puzzle 19, the sequence for the number of regions in the pattern starts 1, 2, 4, 8, 16. What are the next few terms in this pattern? 10. Let16 โค[โ10] be the set of all numbers of the form ๐ + ๐โ10 where ๐ and ๐ are integers. Let โค[๐], the Gaussian integers17 , be the set of all numbers of the form ๐ + ๐๐ where ๐ and ๐ are integers and ๐ = โโ1. An element ๐ข in a number system18 is called a unit if there is another element ๐ฃ with ๐ข๐ฃ = 1. In โค the only units are ยฑ1. In the set of rational numbers, every nonzero number is a unit. More formally, a nonzero element ๐ in a number system is prime if ๐ is not a unit and whenever ๐ divides ๐๐, either ๐ divides ๐ or ๐ divides ๐. A nonzero element ๐ is irreducible if ๐ is not a unit and whenever ๐ = ๐๐, either ๐ = ๐ข๐ for some unit ๐ข or ๐ is a unit. (a) In addition to ยฑ1, show that 3 + โ10 and 19 + 6โ10 are also units in โค[โ10]. (b) โ Characterize the entire set of units in โค[โ10]. Hint: The answer in๐ volves all the continued fraction convergents of the regular continued ๐
fraction algorithm for โ10, where regular is defined in Definition IX.21, p. 322. (c) Show that the only units in โค[๐] are ยฑ1 and ยฑ๐. 16 This problem is deceptively deep, with links to material in Chapter IX. The items marked with an asterisk may be more challenging to prove than others. Hints for some of these items are provided here and also in Appendix IV. As you work your way through this book, you may wish to return to this exercise from time to time. For a fairly complete analysis of โค[โ10 ], see [145]. 17 The Gaussian integers are named after Carl Friedrich Gauss (1777โ1855) and share many, but not all, properties of the ordinary integers โค. See Example II.25 for the characterization of the set of all Gaussian primes. 18 By a number system we mean a ring, a structure studied at length in Abstract Algebra, a course often taken by undergraduate mathematics majors in their third year.
Exercises
27
(d) โ Show that the number 2 is irreducible in โค[โ10]. That is, show that 2 is neither a unit nor expressible as a product 2 = (๐ + ๐โ10)(๐ + ๐โ10) unless one factor is ยฑ2 and the other factor is ยฑ1, where ๐, ๐, ๐, and ๐ are integers. See Appendix IV for a few key ideas. (e) โ Similarly, show that 3 and 2 + โ10 are irreducible in โค[โ10]. However, show that although 31 is prime in โค it is not irreducible in โค[โ10]. Show that 7 is the least positive prime in โค that is also prime in โค[โ10 ]. (f) Observe that 2โ
3 = (2+ โ10)(โ2+ โ10), so 2 divides the product on the right-hand side. Show that it is impossible for 2 to divide either 2 + โ10 or โ2 + โ10 in โค[โ10]. Therefore 2 is not prime in โค[โ10]. (g) In โค[๐], 5 = (1 + 2๐)(1 โ 2๐). Thus 5 is neither a Gaussian prime nor a Gaussian irreducible. Find a prime in โค that is also prime in โค[๐]. โ (h) Solve Puzzle 21 with the extra hint that it has something to do with Gaussian primes.
Strand II: Leibniz and the Binary Revolution Ours is said to be an age of the computer. The person who foreshadowed this future, the one who popularized the idea of a machine consisting of on/off switches within a milieu of a formal logical language, was Gottfried Leibniz (1646โ1716). Besides promoting these ideas, Leibniz is also credited with being a joint discoverer of calculus with Isaac Newton. It is said that he was the last to know almost everything that was known about almost anything. Throughout his long life, he traveled extensively and maintained a vibrant, voluminous correspondence with savants, theologians, statesmen, and friends. In this strand, we sketch his life.
Figure 1. Leibniz as a young man, engraving by Johann Heinrich Lips [62]. 29
30
Strand II: Leibniz and the Binary Revolution
Leibnizโs father, a philosophy professor at the University of Leipzig, maintained a large private library from which he often read selections to a very young son. Unfortunately, his father died when Gottfried was six. But Gottfried was allowed continued access to this library, reading texts in Latin and Greek. By the time he was ready for the university, he had already read the masters in philosophy and letters, and could engage his professors as a veritable equal. He earned a degree in philosophy at age sixteen, a degree in law at nineteen, and a doctoral degree in law at twenty. So extensive was Leibnizโs approach to reading that he became an expert in numerous fields: Philosophy, mathematics, astronomy, physics, chemistry, geology, botany, psychology, medicine, natural history, jurisprudence, ethics, political science, history, antiquities, languages (German, European, Chinese), linguistics, etymology, philology, poetry, theology, church reunification, diplomacy, technology, structure of scientific societies, libraries, the book trade. [4, p. 2] His resultant writings, as republished and published-for-the-first-time by the Berlin Academy of Sciences, โwill eventually extend to one hundred twenty large quarto volumesโ [4, p. 2]. As he described himself: So many thoughts occur to me in the morning during an hour in which I am still in bed, that it takes me all morning, and sometimes all day and more, to write them down. [4, p. vi]
Figure 2. A multiplication machine. Image courtesy of the Gottfried Wilhelm Leibniz Bibliothek. What motivated Leibniz?
Strand II: Leibniz and the Binary Revolution
31
Gottfried was born in Leipzig in 1646, two years before the end of the Thirty Yearsโ War, a religious conflict that devastated central Europe for an entire generation. Leibniz had been raised as a Lutheran. In addition, he had freely read the gamut of extant theological ideas in his fatherโs library. He believed that if people could truly communicate on conflicting issues, genuine agreement could be found. Thus, he championed the idea of a natural language in which ideas could be formulated without misunderstanding. A small-scale setting for developing such a language is mathematics, and he pioneered formal logicโprimarily in the hope that this language could grow to encompass diplomacy and theology, which in turn might lead to the abolition of war and, in particular, religious strife. He spent much of his life trying to harmonize what was truly substantive in Protestant and Catholic perspectives globally and, more locally, in Lutheran and Calvinist perspectives.
Figure 3. The first binary numbers. Image courtesy of the Gottfried Wilhelm Leibniz Bibliothek. As an example of Leibnizโs ideas on harmonizing Christendom, he advocated a balance of power strategy. For instance, Leibniz thought that Louis XIV needed to be kept in check lest another Thirty Yearsโ War break out afresh. He advanced the idea that if Louis really wanted warโand the commensurate potential material gain and dubious prestige of such activityโthen instead of devastating Europe, why not conquer Egypt,1 which at that time had been controlled for several 1 One hundred and twenty some years after Leibniz suggested this idea, Napoleon did just that in 1798โ1801. In addition to an army, Napoleon brought along a team of scientists and mathematicians
32
Strand II: Leibniz and the Binary Revolution
hundred years by the Mamelukes, a caste of Muslim warrior-slave-rulers continuously refurbished by child-trafficking in eastern Europe and western Asia. In part to seek audience with Louisโs advisors so as to promote this foreign policy, Leibniz traveled to Paris. Concurrently, he had become intrigued with Blaise Pascalโs addition machine. Leibniz improved Pascalโs machine to be also a multiplication machine, as illustrated in Figure 2. He demonstrated this device at the French Academy of Sciences and in London at the Royal Academy. The Leibniz Society has recreated a working model of his machine wherein the computations are performed in binary with steel bearings. The idea of the binary number system originated in reports sent to Leibniz from China by another traveler, Jesuit scholar-missionary Joachim Bouvet, concerning the ancient Chinese text, the I Ching. In this text the yin, the zero, was represented as a broken line ( ) and the yang, the one, as a solid line ( ). When these symbols are stacked, lower layers correspond to higher multiples of two.2 Thus, two is represented as , three as , four as , and so on, as indicated in Figure 3. When young Leibniz first arrived in Paris in 1672, he made it a point to meet Christiaan Huygens, the reigning mathematics authority on the continent, and promptly explained to him why ๐2 is the sum of the first ๐ odd positive integers. Perhaps he reasoned in the following way. Start by writing the sum ๐๐ of the first ๐ odd integers as ๐๐ = 1 + 3 + โฏ + (2๐ โ 1), where 2๐ โ 1 is the ๐th odd integer. Now imagine that ๐ is even. (In this case, ๐ ๐ the middle two odd integers are 2( ) โ 1 and 2( + 1) โ 1.) These ๐ integers can 2 2 be paired: first and last, second and penultimate, and so on. After doing so we are left with ๐/2 pairs, each of which sums to 2๐, ๐๐ =(1 + (2๐ โ 1)) + (3 + (2๐ โ 3)) ๐ ๐ ๐ + โฏ + ((2( ) โ 1) + (2( + 1) โ 1)) = ( )(2๐) = ๐2 . 2 2 2 We leave the other case, finding ๐๐ when ๐ is odd, to the reader. In the ensuing chapter, we show another way to obtain this result. After listening to Leibnizโs explanation about ๐๐ , Huygens posed a related, more challenging problem. Define ๐๐ , the ๐th triangular number, to be the sum to study the feasibility of a Suez canal. In attempting to fulfill that commission, the team uncovered the wonders of ancient Egypt. Joseph Fourier, a leader of this scientific expedition, assembled an expeditionary report, the final volume of which was printed in 1829. Figures III.1, VII.1, VII.8, and IX.1 of this book are from that report. 2 Contrast this stacking with the Mayan system in which higher layers of symbol groupings correspond to higher values.
Strand II: Leibniz and the Binary Revolution
33
Figure 4. The first integral signs. Image courtesy of the Gottfried Wilhelm Leibniz Bibliothek. of the first ๐ positive integers.3 Huygensโs problem was to find the sum of the reciprocals of all triangular numbers. Within a week, Leibniz had derived the identity4 โ
1 1 1 1 1 1 1 1 1 + โฏ = 2((1 โ ) + ( โ ) + ( โ ) + โฏ) = 2. (1) = 1+ + + ๐ 3 6 10 2 2 3 3 4 ๐=1 ๐ โ
Within three years, after more mentoring from Huygens, Leibniz discovered the calculus. Figure 4 shows perhaps the first instance of an integral sign from an old Leibniz manuscript. When Leibniz formally wrote the calculus details nine years later, he communicated some of these pertinent papers to the French Academy through Nicholas Malebranche, a scholar and priest whom he himself had mentored, and who in turn recruited the Bernoulli brothers (Jacob and Johann) to make greater sense of these early discoveries.5 Leibniz was ever active in bringing people together. He belonged to both the Royal Society and the French Academy of Sciences. He established the Berlin Academy and served as its president, and he advised Peter the Great in person, which in due course led to the creation of the Russian Academy. Figure 5 is a map showing Leibnizโs wanderings over the years to professional societies, libraries, and courts. For the last forty-one years of his life, Leibniz served as librarian to a succession of three dukes at Hanover. Each new duke had his own priorities. As Leibniz described it: It bothers me that I am not in a great city like Paris or London, where there are plenty of learned men from whom one can benefit and receive assistance. Here [in Hanover] one scarcely finds anyone to talk to; it is not regarded as appropriate for a courtier [like me] to speak of learned matters. [4, p. 196] 3 With
regard to its name, ๐๐ equals the number of dots in the triangular array of ๐ rows, where โข row 1 contains one dot, row 2 contains two dots, and so on. Thus ๐1 counts โข, ๐2 counts โข โข , and ๐3 โข counts โข โขโข โขโข . 4 In Chapter II, we will โreproveโ Equation (1), this time using mathematical induction. 5 In Chapter VIII, we will consider one early application of the integral and show how Isaac Newton was able to predict that Earth was flattened at its poles by about 17 miles.
34
Strand II: Leibniz and the Binary Revolution
Figure 5. Leibnizโs travel itinerary. Duke 1โs primary focus for Leibniz was to establish a legal library. Duke 2โs focus was on improving silver mining operations, the primary revenue source for the duchy. And Duke 3โs focus was on documenting the lineage of the House of Hanover to its origins in the old Roman Empire. In due course, Duke 3 became an elector in the Holy Roman Empire, and ultimately was chosen as Englandโs sovereign George I, the successor to Queen Anne. For each of these transitions of power and vision in a new duke, Leibniz needed to reinvent himself and make himself useful. Imagine returning from researching a genealogical lead in some remote corner of the Empire to find that all the libraryโs books had been crated and stored in an attic. What would you do? Yet he remained in Hanover, creative and productive until the end.
A continued fraction connection Leibnizโs first great discovery was the series ๐ 1 1 1 = 1 โ + โ + โฏ, 4 3 5 7 an honor he shares with two other independent discoverers [127]: James Gregory (1638โ1675) and an Indian mathematician Kerala Gargya Nilakantha (circa
A continued fraction connection
35
1450โ1550). In 1776, Leonhard Euler discovered that this series is equivalent to the strange-looking continued fraction [16, p. 82] ๐ 1 = . 4 12 1+ 32 2+ 52 2+ 72 2+ 2+ โฑ That is, 1 โ
1 2 = = 3 3
1 12 1+ 2
,1โ
13 1 1 + = = 3 5 15
1 1+
, and so on. We give
12 2+
32 2
a proof in Chapter IX. For a fun Leibniz continued fraction see Puzzle 5 of Chapter II.
Chapter II: Mathematical Induction The unit integer 1 is the least positive integer, and every positive integer ๐ has a unique and larger successor ๐ + 1. From any given positive integer, we can proceed to its successor, and so on forever. This archetype of inductive reasoning and construction leads to a fundamental idea and tool called mathematical induction. It is widely used for proving sequences of appropriately related mathematical statements, a practice going back to at least the days of Euclid in the third century bc. In this chapter, we review some set notation, pose the well-ordering principle for the set of positive integers, formalize mathematical induction, rework three examples from Chapter I and Strand II in this context, and introduce the notion of equivalence relations. In Example 4, we show how the division algorithm, a consequence of the well-ordering principle, allows us to generate a finite simple continued fraction representation for any given fraction. As an example that synthesizes the topics from the previous chapter and Strand II with the ideas of this chapter and introduces the Chapter IV graph-theoretical notion of a tree, we showcase the mathematical game of nim. Analyzing nim involves applications of mathematical induction, binary arithmetic, and equivalence relations. It also provides an introduction to an alternative way to define the set of fractions, an idea we sketch in Exercise IV.10. Lastly, we feature a nim version of mancala, perhaps the worldโs oldest board game.
Set notation and the well-ordering principle Definition 1: Some set notation. A set is a collection of elements. We leave the terms collection and element undefined. The notation ๐ โ ๐ด means that ๐ is an element of the set ๐ด. We let โ denote the set of natural numbers, โ = {0, 1, 2, 3, 4, โฆ}.6 The set of integers {0, ยฑ1, ยฑ2, โฆ} is denoted by โค. The set of 6 Some
texts define the set of natural numbers to exclude 0.
37
38
Chapter II: Mathematical Induction
all positive integers is denoted by โค+ . We say that the set ๐ด is a subset of the set ๐ต, denoted by ๐ด โ ๐ต, if every element in ๐ด is in ๐ต. A subset ๐ด of ๐ต is a proper subset of ๐ต if ๐ด โ ๐ต. In Definition 1, we stated that the terms collection and element are left undefined. These are examples of primitive terms that have no definition, yet nevertheless may strike the human mind as being vaguely sensible. In like fashion, we assume that our number system possesses a few primitive properties that seem intuitively reasonable. Such properties are taken as axioms, somewhat self-evident statements that are assumed to be true.7 One of these axioms is the well-ordering principle of the set of the positive integers. Axiom 2: The well-ordering principle of โค+ . If ๐ด is a nonempty subset of โค+ , then ๐ด has a least member. An intuitive rationale. Although axioms cannot be proved, we offer an intuitive argument which may suggest why this axiom is self-evident. To find the least member of any nonempty set ๐ด of โค+ , we choose an integer ๐ โ ๐ด. Suppose ๐ is the least element in ๐ด. Well and good! If ๐ is not the least element, then from ๐ด we discard all those integers larger than ๐, leaving a finite set of integers ๐ด1 . This new set must contain an integer ๐1 smaller than ๐. Discard ๐ from ๐ด1 leaving the set ๐ด2 . If ๐1 is the least member of ๐ด2 , again, well and good: It is the least member of ๐ด. Otherwise we repeat this process on ๐1 so as to find an integer ๐2 in ๐ด2 with ๐2 < ๐1 , and so on. But we can only repeat this back-pedaling process a finite number of times because ๐ด1 is a finite set. โข As examples of using this axiom, observe that ๐น = {7, 15, 31} is a nonempty subset of โค+ , and its least member is 7. The least element for the set of positive even integers is 2. However, the set of even integers has no least member. Axiom 2 gives us the familiar division algorithm. When ๐ and ๐ are integers with ๐ > 0, recall that the phrase ๐ divides ๐, denoted by ๐|๐, is defined in Definition I.4, p. 10. Proposition 3: The division algorithm. Given ๐, ๐ โ โค+ , we have ๐ = ๐๐ + ๐ for some unique integers ๐ and ๐ with 0 โค ๐ < ๐. Proof. See Exercise 1, a detailed outline of the proof asking the reader to provide the reasons for each step. 7 The first few class discussions in a course on real analysis often are devoted to stating these axioms explicitly. In this book we will typically be less formal and assume without comment the usual basic rules for the arithmetic and ordering of the integers.
Set notation and the well-ordering principle
39
Example 4: The division algorithm generates continued fractions. As a preview of continued fractions from Chapter IX, we apply the division algorithm 532 repeatedly to write the fraction as a finite simple continued fraction, defined 1193 in Definition 1 of the Introduction. At each stage we box a newly generated partial denominator. Since this positive fraction is less than 1, the initial partial denominator is 0 . A first application of the division algorithm gives 1193 = 2 โ
532 + 129. Thus 1 532 1 = = . 1193 129 1193 2+ ( ) 532 532 A second application gives 532 = 4 โ
129 + 16. Thus 532 = 1193
1 1 2+ 532 ( ) 129
1
=
1
2+ 4+
.
16 129
A third application gives 129 = 8 โ
16 + 1. Because the remainder of this last division was 1, two partial denominators were boxed in this last step. We now have 532 1 1 , = = 1 1 1193 2+ 2+ 1 1 4+ 4+ 1 129 8+ ( ) 16 16 532
giving the finite simple continued fraction = [0; 2, 4, 8, 16]. As it turns 1193 out, the only other simple continued fraction representation for this fraction is [0; 2, 4, 8, 15, 1]. โข Puzzle 5: Find the error. Figure 6 is a page from Leibnizโs notebooks. He 4290000 is calculating the continued fraction for . As observed in a 2013 blog by 135424 Stephen Wolfram, Leibniz made a mistake somewhere in his calculations. Use the ideas of Example 4 to correct his mistake. (Note: Leibniz uses the symbol ฮ as an equal sign.8 ) โข Definition 6: Relatively prime. We say that two positive integers ๐ and ๐ are relatively prime if 1 is the only positive common divisor of ๐ and ๐. 8 The first person to use the symbol = to represent equality of two items was the Englishman Robert Recorde in 1557.
40
Chapter II: Mathematical Induction
Figure 6. A page from Leibnizโs notebook. Image courtesy of the Gottfried Wilhelm Leibniz Bibliothek. Proposition 7: A linear combination of two relatively prime integers. Let ๐ and ๐ be positive integers. Then ๐ and ๐ are relatively prime if and only if there exist integers ๐ฅ and ๐ฆ with ๐๐ฅ + ๐๐ฆ = 1. Proof. Let ๐ and ๐ be relatively prime and let ๐ = {๐๐ฅ+๐๐ฆ| ๐๐ฅ+๐๐ฆ > 0, ๐ฅ, ๐ฆ โ โค}. Observe that ๐ โ โ
because ๐ โ ๐ (take ๐ฅ = 1 and ๐ฆ = 0). By the well-ordering axiom, let ๐ be the least member of ๐. So ๐ = ๐๐ฅ0 + ๐๐ฆ0 for some integers ๐ฅ0 and ๐ฆ0 . Suppose that ๐ > 1. By Proposition 3, there exist unique integers ๐ and ๐ with 0 โค ๐ < ๐ and ๐ = ๐๐ + ๐. So ๐ = ๐ โ ๐๐ = ๐ โ (๐๐ฅ0 + ๐๐ฆ0 )๐ = ๐(1 โ ๐ฅ0 ๐) + ๐(โ๐๐ฆ0 ), which means that ๐ = 0 (otherwise ๐ would be a lesser positive element of ๐ than is ๐). So ๐ divides ๐. Similarly, ๐ divides ๐. Therefore ๐ = 1, and so ๐๐ฅ0 +๐๐ฆ0 = 1. To prove the converse, suppose ๐๐ฅ0 + ๐๐ฆ0 = 1 for some integers ๐ฅ0 and ๐ฆ0 . Let ๐ be a common integer divisor of ๐ and ๐. Then ๐ must divide 1, which means that ๐ = 1. Therefore ๐ and ๐ are relatively prime. Proposition 8: Equivalence of primes and irreducibles in โค. Let ๐ > 1 be an integer. Then ๐ is prime if and only if ๐ is irreducible. Proof. Recall the notions of prime and irreducible from p. 10. Let ๐ be irreducible and suppose that ๐|๐๐, where ๐ and ๐ are positive integers. We must show that ๐ divides either ๐ or ๐. Assume that ๐ fails to divide ๐. Then ๐ and ๐ are relatively prime. By Proposition 7 there exist integers ๐ฅ and ๐ฆ with ๐๐ฅ + ๐๐ฆ = 1. Therefore ๐๐๐ฅ + ๐๐๐ฆ = ๐. (2)
The principle of mathematical induction
41
Since ๐|๐๐๐ฅ and ๐|๐๐๐ฆ, we must have ๐|(๐๐๐ฅ + ๐๐๐ฆ). By Equation (2), then ๐|๐. Therefore ๐ is prime. Conversely, suppose ๐|๐ for some positive integer ๐ when ๐ is prime. So there is a positive integer ๐ with ๐๐ = ๐. Observe that ๐ โค ๐ and ๐ โค ๐. By definition, ๐ divides either ๐ or ๐. If ๐|๐, then ๐ โฅ ๐. So ๐ = ๐, which means that ๐ = 1. Otherwise ๐|๐, which means that ๐ = ๐, and so ๐ = 1. Thus ๐ is irreducible. As we progress through this book we will see that much mathematical structure is developed inductivelyโthe custom of defining new values in terms of already established values. The following definition gives an archetypal example of what we mean. Definition 9: The factorial function. Define the factorial of zero, denoted by 0!, as 0! = 1. For each ๐ โ โค+ , the factorial of ๐, denoted by ๐!, is ๐! = ๐(๐ โ 1)!. To illustrate, 5! = 5โ
4! = 5โ
4โ
3! = 5โ
4โ
3โ
2! = 5โ
4โ
3โ
2โ
1! = 5โ
4โ
3โ
2โ
1โ
0! = 120. A major tool used to prove families of inductively related statements is developed in the next section.
The principle of mathematical induction Example 10: Families of statements. When we write a sentence ๐ฎ involving an as-yet-to-be-specified number of items such as ๐ฎ โถ My dog Fido has buried
bones in the back yard.
(3)
we could fill in the blank with any specific integer ๐. With ๐ = 5, we denote the sentence by ๐ฎ5 . Thus the open sentence (3) becomes ๐ฎ5 โถ My dog Fido has buried 5 bones in the back yard. In general, we write ๐ฎ๐ โถ My dog Fido has buried ๐ bones in the back yard. We thus have an infinite family of related statements {๐ฎ๐ }โ ๐=1 . As a more interesting example, we revisit Leibnizโs identity from Strand II about the sum of a finite number of successive odd integers beginning with 1. We write his claim as a family of related statements with a fill-in-the-blank integer: ๐ฎ1 โถ 1 = 12 . ๐ฎ2 โถ 1 + 3 = 22 . ๐ฎ3 โถ 1 + 3 + 5 = 32 . .. . ๐ฎ๐ โถ 1 + 3 + 5 + โฏ + (2๐ โ 1) = ๐2 . .. .
โข
42
Chapter II: Mathematical Induction
When successive statements within a family of statements are sufficiently related, sometimes we can prove that all of the statements are true using the following variation of the well-ordering principle. Proposition 11: Mathematical induction. For each ๐ โ โค+ , let ๐ฎ๐ be a statement about ๐. If ๐ฎ1 is true, and if ๐ฎ๐+1 is true whenever ๐ฎ๐ is true, then ๐ฎ๐ is true for all ๐ โ โค+ . Proof. Let ๐ด = {๐ โ โค+ | ๐ฎ๐ is false}. Observe that 1 โ ๐ด because we are given that ๐ฎ1 is true. Suppose ๐ด โ โ
. Let ๐ be the least member of ๐ด. Such an element must exist by the well-ordering principle. Observe that ๐ > 1, so ๐ โ 1 โ โค+ and ๐ โ 1 โ ๐ด. Thus ๐ฎ๐โ1 is true, which by the given hypothesis means that ๐ฎ๐ is true, too, a contradiction. Therefore ๐ด = โ
and so ๐ฎ๐ is true for all ๐ โ โค+ . At times we use an alternate, yet equivalent, version of Proposition 11, called strong mathematical induction, whose proof is left as an exercise. Proposition 12: Strong mathematical induction. Let ๐ฎ๐ be a statement for each integer ๐ โ โค+ . If ๐ฎ1 is true, and if ๐ฎ๐ is true whenever ๐ฎ๐ is true for 1 โค ๐ < ๐, ๐ โ โค+ , then ๐ฎ๐ is true for all ๐. We apply mathematical induction to prove two identities presented in Strand II and a theorem from Chapter I. Proposition 13: An odd sum. For each ๐ โ โค+ , ๐
โ (2๐ โ 1) = ๐2 .
(4)
๐=1
Proof. Let ๐ฎ๐ be Equation (4). Observe that ๐ฎ1 is the statement 1 = 12 . Thus ๐ฎ1 is true. Assume that ๐ฎ๐ is true for some integer ๐ โฅ 1. Then 1+3+โฏ+(2๐โ1)+(2๐+1) = (1+3+โฏ+(2๐โ1))+(2๐+1) = ๐2 +(2๐+1) = (๐+1)2 , which means that ๐ฎ๐+1 is true. Therefore by induction the statement ๐ฎ๐ is true for all ๐ โ โค+ . Recall that the ๐th triangular number ๐๐ from Strand II is the sum of the first ๐ positive integers. Proposition 14: A triangular sum. For each ๐ โ โค+ , ๐
๐๐ = โ ๐ = ๐=1
๐(๐ + 1) . 2
(5)
The fundamental theorem of arithmetic
43
Proof. The proof of this proposition is Exercise 2a. โ
1 = 2. The next proposition is a proof of an ๐ ๐=1 ๐
From Strand II, recall that โ equivalent statement.
Proposition 15: A telescoping series. โ
โ
1 1 1 = โ( โ ) = 1. 2๐ ๐ ๐ + 1 ๐ ๐=1 ๐=1 โ
(6)
๐
1 1 = 1โ . Observe that ๐ฎ1 is ๐ + 1 ๐(๐ + 1) ๐=1
Proof. Let ๐ฎ๐ be the statement ๐ฎ๐ โถ โ
1 1 true because = 1 โ . Now assume that ๐ฎ๐ is true for some integer ๐ โฅ 1. 1โ
2 2 Then ๐+1 ๐ 1 1 1 โ = (โ )+ ๐(๐ + 1) ๐(๐ + 1) (๐ + 1)(๐ + 2) ๐=1 ๐=1 1 1 1 1 = (1 โ โ , )+( )=1โ ๐+1 ๐+1 ๐+2 ๐+2 which means that ๐ฎ๐+1 is true. Therefore by induction the statement ๐ฎ๐ is true for all ๐ โ โค+ . Finally, since 1/(๐ + 1) approaches zero as ๐ increases, Equation (6) is true.
The fundamental theorem of arithmetic As promised in Chapter I, and having established the equivalence of primes9 and irreducibles in Proposition 8, we now prove the fundamental theorem of arithmetic by mathematical induction. The proof is broken into three parts over the next three propositions. Proposition 16: A product of primes. Every integer ๐ > 1 can be written as a product of primes. Proof. Let ๐ฎ๐ be the statement that ๐ can be written as a product of primes. Observe that ๐ฎ2 is true because 2 is prime. Suppose for some positive integer ๐, ๐ฎ๐ is true for all integers ๐ with 2 โค ๐ < ๐. If ๐ is prime then ๐ฎ๐ is true. Otherwise ๐ is composite. Thus there exists a prime ๐ with ๐ = ๐๐ for some positive integer ๐ with 2 โค ๐ < ๐. By the 9 In this chapter, unless we specify otherwise, we assume that a prime integer must be positive. The reader may wish to recall the general definition of a prime number in Exercise I.10 and to look ahead to the use of equivalence classes in Example 25.
44
Chapter II: Mathematical Induction
inductive hypothesis ๐ can be written as a product of primes. Therefore ๐ = ๐๐ can be written as product of primes. So ๐ฎ๐ is true. By the principle of strong mathematical induction, the proposition is true. ๐
Proposition 17: When a prime divides a product. If prime ๐ divides ฮ ๐๐ ๐=1
where ๐๐ are positive integers, 1 โค ๐ โค ๐, then ๐|๐๐ for some ๐.
Proof. The proposition is true for ๐ = 1 by default. Suppose the proposition ๐+1
๐
is true for some ๐ โฅ 1 and that ๐| ฮ ๐๐ . By Definition I.5, then ๐| ฮ ๐๐ or ๐=1
๐=1
๐|๐๐+1 . If the latter case occurs the proposition is true for ๐ + 1. Otherwise, by the inductive hypothesis, ๐|๐๐ for some ๐, 1 โค ๐ โค ๐. Therefore the statement is true for ๐ + 1. Proposition 18: Unique factorization. Every positive integer ๐ greater than 1 can be written as a product of primes in exactly one way (up to the order of the primes). Proof. The proposition is true when ๐ is 2 or 3. Assume that the proposition is true for all integers less than ๐ for some integer ๐ > 3. By Proposition 16, ๐ can be written as a product of primes. Suppose ๐ can be factored in two different ways: ๐ = ๐1 ๐2 โฏ ๐๐ = ๐1 ๐2 โฏ ๐๐ ,
(7)
where ๐๐ and ๐๐ are primes, 1 โค ๐ โค ๐, 1 โค ๐ โค ๐. By Proposition 17, ๐๐ |๐๐ for some ๐. So ๐๐ = ๐๐ . Thus ๐๐ can be canceled from Equation (7), leaving โ = ๐1 ๐2 โฏ ๐๐โ1 = ๐1 ๐2 โฏ ๐๐โ1 ๐๐+1 โฏ ๐๐ .
(8)
If โ โฅ ๐ then ๐ = ๐๐ โ
โ > ๐, a contradiction. Thus โ < ๐. So unique factorization holds for โ, which means that it does for ๐ as well. Therefore the two products in Equation (7) contain the same primes, perhaps in different orders. Corollary 19: The fundamental theorem of arithmetic. Every integer ๐ > 1 ๐
๐ผ
can be written uniquely as a product of distinct primes, ๐ = ฮ ๐๐ ๐ , where ๐1 < ๐2 < โฏ < ๐๐ and ๐ผ๐ โ โค+ , 1 โค ๐ โค ๐.
๐=1
Not every number system shares with the integers the property of unique factorization into irreducibles. For example, consider the set โค[โ10] of all numbers of the form ๐+๐โ10 where ๐ and ๐ are integers, as presented in Exercise I.10. The integer 6 factors both as 2 โ
3 and as (2 + โ10)(โ2 + โ10), and Exercises I.10d and I.10e show that each of the factors 2, 3, and ยฑ2 + โ10 is irreducible in โค[โ10].
Equivalence classes
45
The next proposition uses the fundamental theorem of arithmetic to prove a statement about an irrational number. Recall that a rational number is a quotient of integers whose denominator is not 0. Proposition 20: โ2 is not a rational number. ๐
Proof. We use an indirect proof and assume that โ2 = , where ๐, ๐ โ โค+ and ๐ ๐ and ๐ have no common divisors in โค+ except 1. Since 1 < 2 < 4, we have 1 < โ2 < 2, which means that โ2 โ โค+ , which in turn means that ๐ > 1. Let ๐ be a prime divisor of ๐. Since 2๐2 = ๐2 , ๐|๐2 . By Proposition 17, the only prime divisors of ๐2 are prime divisors of ๐. So ๐|๐, a contradiction. Therefore โ2 is not a rational number. For a related result, Exercise 5c asks the reader to show that the number ๐ is not rational.
Equivalence classes In Strand II, we used the terms even and odd integers somewhat naturally. These are archetypal examples of what are called equivalence classes. To make this notion precise, first recall that two items are said to be related to each other if they have a special property in common. Thus we might say that two people are related if they have the same biological mother. Alternatively, two people may be related in another sense because they have the same eye color. Is every item always related to itself? If we define a specific relation so that two objects are related if they are not the same, then I am related to the universe, but I am not related to me. A much more tame kind of relation that has proven to be especially helpful in sorting various collections for ease of classification, study, and conversation consists of those relations that satisfy three somewhat natural properties. Definition 21: Equivalence relation. We say that a relation ๐
on the set ๐ is an equivalence relation if for any ๐, ๐, ๐ โ ๐, ๐
has three properties: i. Reflexive: ๐ ๐
๐, where ๐ ๐
๐ is read p is related to p. ii. Symmetric: ๐ ๐
๐ whenever ๐ ๐
๐. iii. Transitive: ๐ ๐
๐ whenever ๐ ๐
๐ and ๐ ๐
๐. For each ๐ โ ๐, the equivalence class containing ๐ is the set ๐๐ = {๐ โ ๐| ๐ ๐
๐}.
46
Chapter II: Mathematical Induction
Example 22: Other non-equivalence relations. Let ๐, ๐ โ โค. Define ๐ and ๐ to be related to each other, denoted by ๐ โผ ๐, if |๐ โ ๐| = 1. Thus 1 โผ 2, and 2 โผ 3. But 1 is not related to 3 because |1 โ 3| = 2 โ 1. Therefore relation โผ is not an equivalence relation. As a second example, define the integers ๐ and ๐ to be related to each other if ๐|๐. Thus 3 is related to 6 because 3|6, but 6 fails to be related to 3. โข Proposition 23: Distinct equivalence classes on ๐ partition ๐. Let โผ be an equivalence relation on a nonempty set ๐. Let ๐, ๐ โ ๐. Then ๐๐ โฉ ๐๐ = โ
or ๐๐ = ๐๐ . Furthermore, ๐ is the union of all the equivalence classes. Proof. We leave the proof of this proposition to the reader. Proposition 24: The equivalence classes of even and odd integers. Let โก be the relation on โค where ๐ โก ๐ if and only if 2|(๐โ๐). Then โก is an equivalence relation on โค and partitions โค into two equivalence classes, the odd integers and the even integers. Proof. Let ๐, ๐, ๐ โ โค. Observe that ๐ โก ๐ because 2 divides 0 = ๐ โ ๐. Furthermore, if 2|(๐ โ ๐), then 2|(๐ โ ๐). Finally, if 2|(๐ โ ๐) and 2|(๐ โ ๐), there exist integers ๐ and ๐ with ๐ โ ๐ = 2๐ and ๐ โ ๐ = 2๐ so that ๐ โ ๐ = ๐ โ ๐ + ๐ โ ๐ = 2๐ + 2๐ = 2(๐ + ๐). Thus 2|(๐ โ ๐). Since โก possesses all three properties, โก is an equivalence relation. For every ๐, by Proposition 3, ๐ = 2๐ + ๐ with 0 โค ๐ โค 1. If ๐ = 0, then ๐ is even and is equivalent to 0. If ๐ = 1, then ๐ is odd and is equivalent to 1. As a more interesting example of equivalence relations we look again at the Gaussian integers10 โค[๐] = {๐ + ๐๐| ๐, ๐ โ โค}. Example 25: An equivalence relation on the Gaussian integers.โ We say that two numbers ๐ and ๐ are associates if ๐ = ๐ข๐ for some unit ๐ข. For example, the irreducibles 1 + ๐ and โ1 โ ๐ are associates, as are 1 โ ๐ and โ1 + ๐. We say that two numbers ๐ and ๐ are equivalent, denoted by ๐ โผ ๐, if ๐ and ๐ are associates. Gauss showed that, under this equivalence relation, โค[๐] possesses the unique factorization property and that, with ๐, ๐, and ๐ in โค, the prime Gaussian integers are those complex numbers of the form ๐ข๐ or ๐ + ๐๐ where, respectively, ๐ข is a unit and |๐| is a prime integer that cannot be written as a sum ๐2 + ๐2 for some integers ๐ and ๐, or ๐2 + ๐2 is a prime integer. Note that 2 factors uniquely (with respect to the equivalence relation โผ) into the prime irreducibles (1 + ๐)(1 โ ๐), whereas 3 and โ3 are equivalent and are both Gaussian primes. โข 10 Gaussian integers and units were introduced in Exercise I.10.
ยฑ๐.
In โค[๐], the only units are ยฑ1 and
Nimโ
47
Nimโ As an example involving binary numbers, mathematical induction, equivalence classes, and taking parts of wholes, we consider the two-person mathematical game nim. We characterize a winning strategy for nim. In so doing, what the reader may find surprising is that one plus one in โnim additionโ is no longer two. The term nim was coined in 1901 by C. L. Bouton [15], who may have borrowed the term from German since nimm means to take, and taking is what nim is all about. Nim refers to a wide variety of impartial two-person games, a great catalogue of which is [10]. By impartial we mean that from any configuration in the game, the same moves are available to each player. In the normal play convention for nim, the first person unable to make a move loses.
Figure 7. The Decision of the Flower. The simplest version of nim is equivalent to a popular solitaire French game, Effeuiller la Marguerite, dating back to at least 1820, played by successively plucking petals from a daisy and alternately saying She loves me and She loves me not, as is illustrated in Figure 7a.11 We can interpret the game as the dynamics between two ideal players Yes and No for Yes, she loves me and No, she loves me not. If the flower has an even number of petals, as in Figure 7b, the starting player loses. And if the flower has an odd number, the starting player wins. More interesting versions of this game arise if we vary the rules. Rather than speak of petals, we use the more generic term blocks. 11 Figure 7a depicts a maiden and a cavalier. The maiden is plucking the petals of the flower as the couple playfully sees whether the flower suggests that they love each other or not.
48
Chapter II: Mathematical Induction
Definition 26: Configurations. A collection of a finite number of blocks arranged into stacks of blocks is called a configuration. The size of a stack is the number of blocks in the stack. The term configuration n refers to a single stack of ๐ blocks, ๐ โ โ. The term configuration (๐, ๐) refers to two stacks of sizes ๐ and ๐, respectively, ๐, ๐ โ โ, and so on. A configuration ๐ is a subconfiguration of the configuration ๐ if the set of stacks of blocks in ๐ is a subset of the set of stacks of blocks in ๐. We say that a configuration ๐ is simpler than a configuration ๐ if the number of stacks in ๐ is no more than the number of stacks in ๐ and the number of blocks in ๐ is less than the number in ๐. For example, ๐ = (5, 2, 2, 4, 1) is a configuration of five stacks of sizes 5, 2, 2, 4, and 1 for a total of 14 blocks. The configuration (1, 2) is a subconfiguration of ๐. The configuration (1, 2, 3) is a simpler configuration than ๐ but not a subconfiguration. The configuration (10, 2) is simpler than ๐ because it has but two stacks and twelve blocks versus the five stacks and fourteen blocks of ๐. The version of nim we consider in this section is the two-person game ๐ฉ involving a finite collection of blocks. Nim game ๐ฉ: Play begins with a configuration. At each turn, a player can choose any stack, and from that stack remove one or more blocks. The first person unable to make a move loses. By convention, person ๐ is the player who has the first move in the game of nim, and person โฌ is the second player. In our analysis, we assume that if a player has a winning strategy then the player follows that strategy.
Figure 8. Who winsโthe first player or the second player? If this game is new to you, play it with a friend. Try to identify winning strategies. In one of your trials, play Puzzle 27 below. Your stacks of blocks can be piles of coins, heaps of pebbles, or stacks of books.
Nimโ
49
Puzzle 27: A first game. You are confronted with the configuration (5, 2, 4), as illustrated in Figure 8. Whatโs your first move in this game of nim? (The solution to this puzzle is found in Example 45.) โข As we show, the key to finding a good first move is to create a way to assign a value to each stack and then sum these values. Making this assignment precise is the goal of the next few pages. Definition 28: More configuration terminology. Let ๐1 and ๐2 be two configurations of ๐1 and ๐2 stacks totaling ๐1 and ๐2 blocks, respectively, where ๐1 , ๐2 , ๐1 , ๐2 โ โ. We say that the union of the two configurations, denoted by ๐1 โช ๐2 , is the union of the two configurations, consisting of the ๐1 + ๐2 stacks. Given a configuration ๐, we say that a configuration ๐ which is the result of a single nim move from ๐ is a child configuration of ๐. The child set of ๐ is the set of the children of ๐. When we say that a player reduces12 a configuration ๐ to a configuration ๐ we mean that ๐ is the resultant configuration from ๐. To illustrate, let ๐1 = 5 and ๐2 = (2, 4). Then the configuration ๐1 โช ๐2 = (5, 2, 4) consists of eleven blocks as shown in Figure 8. Incidentally, (5, 2, 4) is the same configuration as (2, 4, 5). Furthermore, (1, 0) and 1 are the same configurations, as are (1, 2) and 1 โช 2. When a player removes two blocks from the stack of two blocks in ๐2 = (2, 4), the resultant configuration is (0, 4). Equivalently, the player has reduced ๐2 to (0, 4). As another way to say it, the player has chosen the child (0, 4) of (2, 4). The child set of ๐2 = (2, 4) is the set {(1, 4), (0, 4), (2, 3), (2, 2), (2, 1), (2, 0)}. Observe that (0, 0), (0, 1), (0, 3), (1, 0), (1, 1), (1, 2), and (1, 3), although they are simpler configurations than ๐2 , are not children of ๐ because at each move we cannot remove blocks from more than one stack. A configuration is in a playerโs favor if it is possible for that player to win by some sequence of moves beginning with that configuration regardless of what moves the opponent makes. As stated earlier, yet to emphasize it again, in analyzing this game we assume that, when possible, a player always chooses moves that will lead to a win. The next proposition shows that when a nim configuration consists of two copies of the same configuration of blocks, then ๐ always loses. Proposition 29: The tweedledee principle. Suppose that ๐1 and ๐2 are identical configurations of stacks of blocks, each consisting of ๐ blocks, ๐ โ โ. Faced 12 Making a nim move means exchanging a configuration for a child configuration. We will refer to this process in a variety of ways. As another variation besides those in Definition 28, when we say that a player chooses a child ๐ of ๐, we mean that the player has reduced ๐ to ๐.
50
Chapter II: Mathematical Induction
with the union of the two configurations, ๐1 โช ๐2 of 2๐ blocks, player ๐ loses this game of nim. Proof. We use a tweedledee13 principle to show that ๐ loses. If ๐ = 0, then ๐ loses. Let ๐ = 1. As play begins, ๐ makes a move in one of the two subconfigurations, ๐1 or ๐2 . Player โฌ counters by executing the exact same move in the subconfiguration not chosen by ๐. The resultant configuration now consists of 0 blocks, which means that ๐ loses. Now assume that whenever ๐ < ๐ for some positive integer ๐ > 1, ๐ loses. Suppose play starts with each configuration having ๐ blocks. Then โฌ mirrors ๐โs move, resulting in a configuration consisting of two identical subconfigurations, each with at most ๐ โ 1 blocks. By the strong mathematical induction principle, ๐ loses. Corollary 30: Given two stacks of ๐ and ๐ blocks with ๐ > ๐ โฅ 0, ๐, ๐ โ โ, ๐ wins by removing ๐ โ ๐ blocks from the stack of ๐. Proof. The proof of this corollary is left as an exercise for the reader. How can we extend the strategy of Proposition 29 to configurations of at least three stacks? Our approach is to assign a nim value to each configuration. We do so by giving the empty configuration the nim value 0 and working our way to more exotic configurations one block at a time. The key idea we use to assign nim values is the observation that the child set for ๐, the configuration of a single stack of ๐ blocks, is {0, 1, 2, โฆ , ๐ โ 1}, where ๐ โ โค+ . With this idea in mind, we make the following definition. Definition 31: The minimal excluded number [10, p. 56]. Given a proper subset ๐ด of โ, the minimal excluded number of ๐ด, denoted by mex(๐ด), is the least member of ๐ด๐ = {๐ โ โ| ๐ โ ๐ด}. For example, let ๐ด = {0, 1, 2, 3, 5, 7}. Since ๐ด๐ = {4, 6} โช {8, 9, 10, โฆ}, mex(๐ด) = 4. Given a finite subset ๐ด of โ, ๐ด๐ with respect to the universal set โ is nonempty. By Axiom 2, ๐ด๐ has a least member, and so mex(๐ด) exists. Definition 32: Nim value of configurations. Let ๐ be a configuration, and let ๐(๐) denote the nim value of ๐. If ๐ is the empty configuration, then ๐(๐) = 0. If ๐ is not empty, then ๐(๐) is defined recursively: ๐(๐) = mex{๐(๐)| ๐ is a child of ๐}. 13 The term tweedledee alludes to Lewis Carrollโs twin characters Tweedledee and Tweedledum from Aliceโs further adventures in Through the Looking-Glass, published in 1871. Whatever one twin does the other also does.
Nimโ
51
If ๐(๐) = 0, then either ๐ is the empty configuration or all the child configurations of ๐ have positive nim values. On the other hand, if ๐(๐) = ๐ > 0, then ๐ has children with nim values 0 through ๐ โ 1. Although no child of ๐ has nim value ๐, ๐ could have a child with nim value greater than ๐. Armed with this recursive definition, the next example shows how to calculate the nim value of the configuration ๐ = (1, 2). Example 33: The nim value of (1, 2). The nim values of the pertinent configurations simpler than (1, 2) are as given below. โข ๐(0) = ๐(0, 0) = 0. Observe that as configurations, 0 = (0, 0) because both consist of zero blocks. โข ๐(1) = ๐(1, 0) = mex{๐(0, 0)} = mex{0} = 1. By symmetry, ๐(0, 1) = 1. โข ๐(1, 1) = mex{๐(1, 0), ๐(0, 1)} = mex{1, 1} = 0. โข ๐(2) = ๐(0, 2) = mex{๐(0, 1), ๐(0, 0)} = mex{1, 0} = 2. Therefore ๐(1, 2) = mex{๐(0, 2), ๐(1, 1), ๐(1, 0)} = mex{2, 0, 1} = 3.
โข
By mathematical induction, we show that every configuration of ๐ blocks has nim value no more than ๐. Proposition 34: The existence of nim values. Let ๐ โ โ, and let ๐ be a configuration of ๐ blocks. Then ๐(๐) = ๐ for some integer ๐ with 0 โค ๐ โค ๐. Proof. By our previous work we know that ๐(0) = 0 and ๐(1) = 1. Since there is but one configuration of a stack of one block, the proposition is true when ๐ = 1, as well as when ๐ = 0. Assume that for some positive integer ๐ โฅ 2 the proposition is true for all integers ๐ with 0 โค ๐ < ๐. Let ๐ be a configuration of ๐ blocks. Each child of ๐ contains at most ๐โ1 blocks. By the inductive hypothesis, the nim value for any child of ๐ is some integer ๐ with 0 โค ๐ < ๐. The minimal excluded number ๐ for such sets of nim values exists and is no greater than ๐. Lemma 35: Nim value of a single stack. Let ๐ be the configuration ๐, a stack of ๐ blocks, ๐ โ โ. Then ๐(๐) = ๐. Proof. The proof is left as an exercise. Knowing the nim value of a configuration ๐ tells us who should win that nim game, as the next proposition shows. While reading these nim proofs, remember that every configuration of positive nim value must have a child with value 0. Proposition 36: A loss for ๐. Let ๐ be a configuration, and let ๐ be the first player. Player ๐ loses the game if and only if ๐(๐) = 0.
52
Chapter II: Mathematical Induction
Proof. Let ๐ be the number of blocks in ๐. If ๐ = 0, then ๐(๐) = 0 and ๐ loses because there are no blocks in ๐ (which means that ๐ is unable to make a move). Assume that for some ๐ โฅ 1, ๐ loses whenever ๐(๐) = 0 and ๐ has at most ๐ โ 1 blocks. Let ๐ be a configuration of ๐ blocks with ๐(๐) = 0. Once the game starts, ๐ chooses some child ๐ of ๐. Since each child of ๐ has nim value greater than 0, ๐(๐) > 0. Since ๐(๐) > 0, one of its children โฐ must have value 0. So โฌ chooses โฐ. Since โฐ has fewer than ๐ blocks and ๐(โฐ) = 0, ๐ loses by the inductive hypothesis. Let ๐ be a configuration for which ๐ loses. Suppose ๐(๐) > 0. ๐ chooses a child ๐ of ๐ for which ๐(๐) = 0. As we have already shown, the player moving in such a configuration loses. So โฌ loses and ๐ wins. Thus ๐(๐) cannot be positive, which means that ๐(๐) = 0. Now we can refine Proposition 29 in the context of nim values. Proposition 37: A necessary condition for nim equality. Let ๐1 and ๐2 be configurations with ๐(๐1 ) = ๐ = ๐(๐2 ), ๐ โ โ. Then ๐(๐1 โช ๐2 ) = 0.
(9)
Proof. Let ๐ make a move. Without loss of generality, assume that the move is to child ๐ of ๐1 with resultant configuration ๐ โช ๐2 . Observe that ๐(๐) = ๐ โ ๐ for some integer ๐ โ โ. If ๐ > ๐, some child โฐ of ๐ must have value ๐. So โฌ has a move that produces the same type of configuration as the original configuration yet with fewer blocks. If ๐ < ๐, some child โฑ of ๐2 must have value ๐. So โฌ has a move that produces the same type of configuration as the original configuration yet with fewer blocks. Therefore as long as ๐ has a move, โฌ has a move, which means that ๐ loses this game of nim. Thus, by Proposition 36, ๐(๐1 โช๐2 ) = 0. Corollary 38: A sufficient condition for nim equality. If ๐1 and ๐2 are configurations with ๐(๐1 โช ๐2 ) = 0, then ๐(๐1 ) = ๐(๐2 ). Proof. Suppose that ๐(๐1 ) = ๐1 , ๐(๐2 ) = ๐2 , ๐1 โ ๐2 , and ๐(๐1 โช ๐2 ) = 0, ๐1 , ๐2 โ โ. Without loss of generality, assume that ๐1 > ๐2 . Player ๐ chooses a child ๐ of the subconfiguration ๐1 with ๐(๐) = ๐2 . By Proposition 37, the configuration now facing player โฌ, ๐ โช ๐2 , has nim value 0. By Proposition 36, โฌ loses this game of nim, a contradiction. Therefore, ๐(๐1 ) = ๐(๐2 ). Corollary 39: A nim equivalence. Let ๐ and ๐ be configurations with nim values ๐ and ๐, respectively, ๐, ๐ โ โ. Then ๐(๐ โช ๐) = ๐(๐, ๐), where (๐, ๐) is the configuration of two stacks of sizes ๐ and ๐. Proof. Using an argument similar to the proof of Proposition 37, it follows that ๐(๐ โช ๐ โช ๐ โช ๐) = 0,
Nimโ
53
where ๐ and ๐ in this context are configurations of a stack of ๐ blocks and a stack of ๐ blocks, respectively. By Corollary 38, ๐(๐ โช ๐) = ๐(๐ โช ๐) = ๐(๐, ๐). The utility of Corollary 39 is that since the configurations ๐ โช๐ and (๐, ๐) are equivalent14 in the sense of having a common nim value, finding a good move in the latter configuration might suggest a good move in the former configuration. To help in finding nim values of configurations, we define nim addition. Definition 40: Nim addition. Let ๐, ๐ โ โ. The nim sum of ๐ and ๐, denoted โ โ by ๐ + ๐, is ๐ + ๐ = ๐(๐, ๐). Observe that ๐(๐, 0) = ๐(๐) = ๐(0, ๐) = ๐ for all ๐ โ โ since (๐, 0), (0, ๐), and ๐ are different ways of representing a single stack of size ๐. To calculate ๐(๐, ๐) where ๐, ๐ โ โ, we must find the minimal excluded number from the set {๐(๐ โ 1, ๐), ๐(๐ โ 2, ๐), โฆ , ๐(0, ๐)} โช {๐(๐, ๐ โ 1), ๐(๐, ๐ โ 2), โฆ , ๐(๐, 0)}. โ
Thus, by Example 33 and Definition 40, 1 + 2 = 3. As the reader may verify, โ the nim sums ๐ + ๐ for all integers 0 โค ๐, ๐ โค 3 are given in Table 1. โ
Table 1. The nim values ๐ + ๐, where 0 โค ๐ โค 3 and 0 โค ๐ โค 3. โ
+
0 1 2 3
0 0 1 2 3
1 1 0 3 2
2 2 3 0 1
3 3 2 1 0
โ
Definition 41: We say that a subset ๐ of โ is closed under nim addition if ๐ + ๐ โ ๐ for all ๐, ๐ โ ๐. Table 1 shows that {0, 1, 2, 3} is closed under nim addition, as are the sets {0} โ and {0, 1}. However, the set {0, 1, 2} is not closed because 1 + 2 = 3. Before attempting to extend this table to include nim values ๐ with ๐ > 3, observe that since the order of the stacks in nim is unimportant, nim addition is both commutative and associative. Thus, whenever we find configurations โ โ โ โ where ๐ + ๐ = ๐ + ๐, we can conclude that ๐ = ๐ (because if ๐ + ๐ = ๐ + ๐ then 14 Exercise 7c asks the reader to show that nim equality is an equivalence relation on the set of all nim configurations.
54
Chapter II: Mathematical Induction โ
โ
โ
โ
๐ = ๐ + 0 = ๐ + ๐ + ๐ = ๐ + ๐ + ๐ = ๐ + 0 = ๐). Therefore, in any table of nim sums, no nim value will occur more than once in any row or any column.15 A convenient way to extend Table 1 is to use mathematical induction, taking advantage of the structure of closed sets of nim values under nim addition. Proposition 42: Evaluating nim sums. Let ๐๐ = {0, 1, โฆ , 2๐+1 โ 1}, where ๐ is an integer with ๐ โฅ โ1. Then ๐๐ is closed under nim addition for ๐ โฅ โ1. In particular, when ๐ โฅ 0, โ 2๐ + ๐ = 2 ๐ + ๐ (10) where 0 โค ๐ < 2๐ , ๐ โ โ. Proof. Observe that ๐โ1 = {0}. The proposition is true when ๐ = โ1, ๐ = 0, and ๐ = 1, as evidenced by Table 1. Let ๐ โ โ, ๐ โฅ 2, and assume that the proposition is true for all integers ๐ with 0 โค ๐ โค ๐โ1. Let ๐ = 2๐ โช๐โช(2๐ +๐), three stacks of size 2๐ , ๐, and 2๐ +๐. ๐ makes a move, leaving โฌ facing a child configuration of ๐. The child set of ๐ is the set of all configurations of the following forms: {2๐ โช (๐ โ ๐) โช (2๐ + ๐),
2๐ โช ๐ โช ๐} (11) where 0 < ๐ โค ๐ and 0 โค ๐ < 2๐ . Player โฌ can reduce the first two configurations of (11) to 2๐ โช (๐ โ ๐) โช (2๐ + (๐ โ ๐)), which has the same form as ๐. If player ๐ persists in making these kinds of moves, player โฌ can always reciprocate in kind. However, since ๐ is finite, player ๐ must eventually make a move to one of the latter two configurations of (11). Faced with a configuration โ ๐ โช ๐ โช (2๐ + ๐), โฌ realizes by the induction hypothesis that ๐ + ๐ = ๐ for some integer ๐ where 0 โค ๐ < 2๐ . So โฌ moves in the subconfiguration of 2๐ + ๐ to its child with nim value ๐, leaving ๐ to face a configuration equivalent to the configuration ๐โช๐, whose nim value is 0. By Proposition 36, ๐ loses the game. A similar argument can be made when โฌ faces the configuration 2๐ โช ๐ โช ๐, an exercise we leave for the reader. Thus, in every possible scenario, ๐ must eventually move facing a configuration of value 0, and loses. By Proposition 36, ๐(๐) = 0. By โ Corollary 38, 2๐ + ๐ = 2๐ + ๐. Finally, we show that ๐๐ is closed. Let ๐ฅ, ๐ฆ โ ๐๐ . We consider the case where ๐ฅ โฅ 2๐ and ๐ฆ โฅ 2๐ , and leave the other cases to the reader. So ๐ฅ = 2๐ + ๐ and ๐ฆ = 2๐ + ๐ where ๐ and ๐ are nonnegative integers less than 2๐ . Since โ ๐, ๐ โ ๐๐โ1 , we have ๐ + ๐ = ๐ for some ๐ โ ๐๐โ1 . Thus โ
2๐ โช ๐ โช (2๐ + (๐ โ ๐)),
โ
โ
โ
๐ฅ + ๐ฆ = (2๐ + ๐) + (2๐ + ๐) = 2๐ + ๐ + 2๐
โ
+
๐ โช ๐ โช (2๐ + ๐),
โ
โ
โ
โ
๐ = (2๐ + 2๐ ) + (๐ + ๐) = 0 + ๐ = ๐,
โ
which means that ๐ฅ + ๐ฆ โ ๐๐ . 15 For readers who have studied abstract algebra, the sets of nim values closed under nim addition are groups.
Nimโ
55
Corollary 43: Almost binary addition. Let ๐1 , ๐2 , โฆ , ๐๐ be ๐ distinct positive integers. For ๐ โ โ, โ
(2๐1 + 2๐2 + โฏ + 2๐๐ ) + ๐ = 2๐1
โ โ + 2 ๐2 +
โฏ
โ โ + 2๐๐ +
๐.
Proof. Without loss of generality, let ๐1 > ๐2 > โฏ > ๐๐ . Successive applications of Proposition 42 give โ โ + 2 ๐2 +
2 ๐1 + 2 ๐2 + โฏ + 2 ๐๐ = 2 ๐1
โฏ
โ + 2 ๐๐ ,
which implies the corollary. Corollary 43 means that we can find nim sums using binary notation, as we make precise in the following algorithm. โ
Algorithm 44: Using binary to find nim sums.16 To calculate ๐ + ๐ write each integer in binary, add without carrying to obtain a sum, and convert the sum โ to decimal notation. By adding without carrying we mean that (1)2 + (1)2 = (0)2 , โ โ (1)2 + (0)2 = (1)2 , and (0)2 + (0)2 = (0)2 . Proof. Let ๐, ๐ โ โ. Writing both ๐ and ๐ as sums of distinct powers of two gives ๐
๐
๐ = โ ๐๐ 2๐
and
๐ = โ ๐๐ 2๐
๐=0
๐=0
for some nonnegative integers ๐ and ๐๐ , ๐๐ โ {0, 1}. Thus ๐ โ
๐ + ๐ = โ (๐๐
โ
+ ๐๐ )2๐
= ((๐๐
โ
+
โ
๐๐ )(๐๐โ1 + ๐๐โ1 ) โฏ (๐0
โ
+
๐0 ))2 ,
๐=0 โ
โ
โ
where the notation ((๐๐ + ๐๐ )(๐๐โ1 + ๐๐โ1 ) โฏ (๐0 + ๐0 ))2 is to be interpreted as the juxtaposition of binary digits. See Table 2. โ
To illustrate this algorithm, consider 7 + 2. We know that 7 = (111)2 and โ 2 = (10)2 . Adding without carrying gives (111)2 + (10)2 = (101)2 = 5. To see why the algorithm works in this special case, note that the binary representation of 7 follows from writing 7 as a sum of powers of 2: 7 = 4 + 2 + 1. Thus by Proposition 42, โ
โ
โ
โ
โ
โ
โ
โ
7 + 2 = (4 + 2 + 1) + 2 = 4 + 2 + 1 + 2 = (4 + 1) + (2 + 2) = 5 + 0 = 5. In general, one way to evaluate nim sums is to write each addend in binary, then cancel any pair of the same power of two. The result is the nim sum of different powers of two, whose value is the ordinary sum of the powers of two. Now we can solve Puzzle 27. 16 Code 2 in Appendix III shows how to implement nim addition using a computer algebra system (CAS).
56
Chapter II: Mathematical Induction
Example 45: Puzzle 27 revisited. To see who wins in the nim configuration of Figure 8, the nim sum associated with three stacks of 5, 2, and 4 blocks is โ
โ
โ
5 + 2 + 4 = (101)2 + (10)2
โ
+
(100)2 = (11)2 = 3.
Since 3 > 0, ๐ should win the game by Proposition 36. To find a winning move, ๐ must move in one of the three stacks so that the nim value of the resultant configuration has value 0. ๐โs only such play is to remove one block from the stack of two blocks so that the new nim sum is 0. By Proposition 36, โฌ will (eventually) lose the game. โ โ โ โ Another way to see this result is to observe that 5 + 2 + 4 = 2 + (5 + 4) = โ 2 + 1. That is, we can view the original configuration of (5, 2, 4) as equivalent to the configuration (2, 1). A winning move for ๐ in the latter configuration is to remove one block from the stack of two blocks, which is also a winning move for ๐ in the configuration (5, 2, 4). โข โ
Table 2. The nim values ๐ + ๐, where 0 โค ๐ โค 7 and 0 โค ๐ โค 7. โ
+
0 1 2 3 4 5 6 7
0 0 1 2 3 4 5 6 7
1 1 0 3 2 5 4 7 6
2 2 3 0 1 6 7 4 5
3 3 2 1 0 7 6 5 4
4 4 5 6 7 0 1 2 3
5 5 4 7 6 1 0 3 2
โ
6 6 7 4 5 2 3 0 1
โ
7 7 6 5 4 3 2 1 0
Example 46: Finding a good move in 30 + 40 + 50. We write 30 = (11110)2 , 40 = (101000)2 , and 50 = (110010)2 . The nim sum of these three stacks of blocks by the algorithm is 11110 101000 โ + 110010 100 Thus the nim sum of 30, 40, and 50 is 4. If ๐ removes four blocks from the stack of 30, the resultant configuration has nim value 0, as indicated below: 11010 101000 โ + 110010 0
Case Study: Mancalaโ
57
Therefore, โฌ loses this game of nim. Another way to find a good first move in nim is to make use of the associative โ โ and commutative properties of nim addition. Write the game 30 + 40 + 50 as the โ โ โ game 30 + (40 + 50). Since 40 + 50 = 26, we now view the game as a configuraโ tion of two stacks rather than three whose nim value is 30 + 26. At this point, by Corollary 30, we know that to win this game, we must remove four blocks from the stack of 30. Fortunately, we see how to translate this move to the original configuration, namely, remove four blocks from the stack of 30. However, if we โ โ โ rewrite the game as (30 + 50) + 40 = 44 + 40, we know that somehow we must remove four blocks from the configuration (30, 50). But from which stack should we remove four? Thus, this regrouping of the configuration is unhelpful. โข Example 47: Another round of nim. Find a good first move in the game with these three stacks: (1011011)2 , (1100100)2 , and (1001010)2 . 1011011 1100100 Observe that the nim sum of these three numbers is โ + 1001010 1110101 Since the nim value of the game is (1110101)2 , there is a good move. In fact, there are two good moves, one by moving in the first stack and the other by moving in the third stack. We proceed by moving in the first stack. In order to have the resultant nim sum be 0, we replace (1011011)2 = 91 with (0101100)2 = 44. That is, we remove forty-seven blocks from the first stack. Finding the other good first move is left for the reader. โข As these examples show, without knowing Algorithm 44 or an equivalent rule, most players new to nim would seldom stumble upon a good move, let alone recognize it as such. A little mathematics can be powerful even in the humblest of settings.
Case Study: Mancalaโ Mancala is probably the oldest board game in human history. For mancala versions between two players having access to the same pieces, mancala is a nim game. Fortunately, the theory developed for analyzing the nim game ๐ฉ of the previous section applies to this new game. Definition 48: Mancala terminology. Mancalaโs board is often partitioned into one to four rows with 6 to 12 basins or pits in each row, although the concrete board of Figure 9 has many more. The word mancala means to move or to count. The moveable pieces or stones are beans, pebbles, shells, nuts, or chips, more
58
Chapter II: Mathematical Induction
Figure 9. An unusually large number of pits in a Zambian Mancala board, author sketch. or less indistinguishable, and are distributed according to some rule to start the game. Often a larger basin, a storehouse or roumba, may appear at the end of each board. Mancala is usually a game between two players, ๐ and โฌ. Play alternates between the two, with ๐ making the first move. A move consists in selecting a pit, removing all of its stones, and then seeding or depositing them a stone at a time into successive adjacent pits, moving around the board in a circular fashion until those stones are gone. In mancala versions where each player has their own stones, the usual object of the game is to clear oneโs stones into the roumba before the opponent does. Multiple mancala variations exist, some of which involve elaborate moves.17 We focus on a version that incorporates much of the spirit and strategy inherent within this family of games, namely Tchoukaillon, a solitaire game devised in 1977 by Vรฉronique Gautheron [35] to model and analyze end-game play in regular two-person mancala. Definition 49: Tchoukaillon terminology. The board consists of a single row of ๐ + 1 pits, denoted by ๐0 to ๐๐ where ๐ โ โค+ . The roumba is ๐0 . A finite number of stones are initially scattered among ๐1 through ๐๐ . In contrast to the nim game ๐ฉ of the previous section, where a configuration is a collection of stacks of 17 Backgammon is a version of mancala, although the playerโs moves are restricted by rolling dice. The childrenโs game Sorry! is also a version of mancala, where the playerโs moves are restricted by drawing cards.
Case Study: Mancalaโ
59
blocks, for mancala a configuration is an arrangement of stones in the pits on the board. A legal move consists in selecting a pit ๐๐ , for ๐ from 1 to ๐, removing its stones, and then seeding them to the left (depositing one stone in each pit ๐ with 1 โค ๐ < ๐), with the last stone deposited in the roumba. A player wins once all stones on the board are placed there. Whereas many initial stone arrangements are unwinnable, the configuration shown in Figure 10 is winnable.
roumba pits: 0
1
2
3
4
5
6
Figure 10. A Tchoukaillon board with six regular pits and a roumba.
Figure 11. A poor move in Tchoukaillon from the configuration given in Figure 10. To illustrate game dynamics: With respect to the board of Figure 10, we remove ๐6 โs stones and seed them, yielding the configuration shown in Figure 11. This new configuration results in a loss, since ๐1 now contains two stones forever trapped there. That is, with ๐ being a positive integer, choosing to move by selecting ๐๐ when it contains more than ๐ stones is an invalid move, because after seeding the stones as far as is possible, more stones yet remain in the hand. Definition 50: More Tchoukaillon terminology. We say that ๐๐ is hot if it contains exactly ๐ stones, and that ๐๐ is cold if it contains more than ๐ stones. If ๐ < ๐ and both ๐๐ and ๐๐ are hot, ๐๐ is said to be hotter than ๐๐ and ๐๐ is said to be cooler than ๐๐ , where ๐, ๐ โ โค+ . Note that only hot pits correspond to legal moves. To represent stone configurations, we adopt the notation 1-0-0-2-4-6 and 2-11-3-5-0, respectively, to codify the configurations of Figures 10 and 11. To streamline this notation, sometimes we drop a configurationโs trailing right-hand zeroes. For example, the configuration 2-1-1-3-5-0 is the same as the configuration 2-11-3-5.
60
Chapter II: Mathematical Induction
Rather than moving haphazardly in a Tchoukaillon configuration, a better algorithm is to move in the coolest hot pit (any other move will transform some hot pit into a cold pit, whereupon its stones are forever trapped therein). Adopting this strategy means that the first move from Figure 10 should be 0-0-0-2-4-6, followed by 1-1-1-3-5, followed by 0-1-1-3-5, followed by 1-2-2-4, and so on.
Mancala nimโ When played between two people, Tchoukaillon is a nim game which we call mancala nim. For this game, a move consists in selecting pit ๐๐ containing ๐ stones, for some ๐, and seeding them to the left, the last of which is placed in the roumba. Play then passes to the next person. The first person unable to move loses. Example 51: Playing a game of mancala nim. Who wins with the initial configuration of Figure 10โthe first player ๐ or the second player โฌ? To see that ๐ should win the game, consider the following progression of moves. As convenient notation, any pit no longer corresponding to a valid move is marked with an X. โข ๐ moves from 1-0-0-2-4-6 to 0-0-0-2-4-6. โข โฌ must move to 1-1-1-3-5, because it is the only available move. โข ๐ moves to X-2-2-4. โข At this point, โฌ has two possible moves, one to X-X-3 and the other to X-0-2-4. โข If โฌ moves to the former option, X-X-3, then ๐ counters with the winning move to X-X, and โฌ loses the game. On the other hand, what happens when โฌ moves to the latter option, X-0-2-4? โข Then ๐ must move to X-1-3. โข โฌ must move to X-2, because that is the only available move. โข ๐ counters with the winning move to X. Thus, in every scenario of moves, โฌ loses the game. Therefore, ๐ wins the game. โข Puzzle 52: A mancala challenge. It is your turn to make a move in the configuration of Figure 12, consisting of three board configurations ๐ณ, ๐ด, and ๐ต. At each turn, a player selects exactly one of the three configurations and makes a move therein. Which initial move should lead to a win? (The resolution to this puzzle may be found in Example 55.) โข
Mancala nimโ
61
X
Y
Z
Figure 12. What is the best first move? To begin our search for a good first move for ๐ in this puzzle, we compute the nim value of each configuration ๐ณ, ๐ด, and ๐ต. We note that if there is no move from a configuration ๐, then the nim value of ๐ is 0. However, calculating the nim value of any configuration means considering all of the configurationโs children, and grandchildren, and great grandchildren, and so on. A game tree will help us keep track of this information. Definition 53: A game tree. Briefly, a game tree is a map showing the relationship between all configurations that could possibly occur from the initial configuration ๐ of the game. We visualize each configuration as a point or a node of the tree. The initial configuration is called the root of the game tree. To indicate that the configuration โฐ is a child of ๐, the map includes an arrow from ๐ to โฐ. Any node that has no children is called a leaf node of the tree. Example 54: Finding the nim value ๐(๐ต).18 Consider the configuration ๐ต =10-3-0-5-0 of Figure 12, the third configuration in Puzzle 52. The game tree for ๐ต is shown in Figure 13. The nodes are displayed as ellipses with the configuration written within. For brevity, since the number of stones in each of the pits ๐1 through ๐6 can be represented by a single digit, we drop the hyphen notation. Thus the configuration 0-2-1-1 can also be written as 0211. The node labeled ๐ด is the root node of the tree, namely configuration ๐ต. Since ๐ต has three children, three arrows point from node ๐ด to the nodes labeled ๐ต, ๐ถ, and ๐ท. The leaves of this tree are labeled ๐ท, ๐ฝ, ๐พ, ๐, ๐, and ๐. At each node, within the ellipse we include a small circle in which we write the nim value of the configuration corresponding to that node. 18 Code
3 in Appendix III shows how to use a CAS to find the nim value of a mancala nim board.
62
Chapter II: Mathematical Induction
a node label A configuration B 00305 0 E H
01005 0 N P
1211 1
1011
X1005 0
D
X1X1 0 G X211
11X1 1 J
X211 1
K 01X1 0
X011 0
Q
1 X011
0
O
X011 0
0211 0 S
C
F
11005 2 I
root node nim value of configuration
10305 1
a leaf node 1
T 0011 0
Figure 13. A complete game tree for ๐ต =1-0-3-0-5-0. To find the nim values for the configurations in this game tree we work from the leaves to the root, as outlined below. โข By Definition 32, the nim value for each leaf configuration is 0 because a leaf has no children. Thus, ๐(๐ท) = ๐(๐ฝ) = ๐(๐พ) = ๐(๐) = ๐(๐) = ๐(๐) = 0. โข Since ๐ has only one child, ๐, it follows that ๐(๐) = mex{๐(๐)} = mex{0} = 1. Similarly, ๐(๐) = ๐(๐ผ) = ๐(๐น) = ๐(๐บ) = 1. โข Similarly, ๐(๐) = mex{๐(๐)} = mex{1} = 0 and ๐(๐ถ) = 0. โข Since ๐ has two children, ๐(๐) = mex{๐(๐), ๐(๐)} = mex{0, 0} = 1. โข ๐(๐ป) = mex{๐(๐)} = mex{1} = 0. โข ๐(๐ธ) = mex{๐(๐ป), ๐(๐ผ)} = mex{0, 1} = 2. โข ๐(๐ต) = mex{๐(๐ธ), ๐(๐น)} = {2, 1} = 0. โข Lastly, ๐(๐ด) = mex{๐(๐ต), ๐(๐ถ), ๐(๐ท)} = {0, 0, 0} = 1. Therefore ๐(๐ต) = ๐(1-0-3-0-5) = 1. The game tree for configuration ๐ด of Puzzle 52 is shown in Figure 15. The reader should use this game tree to verify
Exercises
63
that ๐(๐ด) = 2. Exercise 10b asks the reader to generate the game tree for ๐ณ and verify that ๐(๐ณ) = 0. โข With this ability to find the nim values of mancala nim configurations, we can now solve Puzzle 52. Example 55: Revisiting Puzzle 52. Let ๐ be the configuration ๐ = ๐ณ โช ๐ด โช ๐ต, โ โ (Figure 12). From Example 54 we know that ๐(๐) = 0 + 2 + 1 = 3. By Proposition 36, ๐ should win the game. ๐โs first move should be to a configuration ๐ that has nim value 0. But which move should we advise player ๐ to make? We may ignore configuration ๐ณ because its nim value is 0. We focus on the configuration ๐ด โช ๐ต where ๐(๐ด) = 2 and ๐(๐ต) = 1. Choosing a child of ๐ด with nim โ value 1 means that the nim value of the resultant configuration is 1 + 1 = 0. ๐ดโs two children are 0-0-0-2-4-6
and
2-1-1-3-5-0,
the nim values for which are 0 and 1, respectively, as the reader may verify using ๐ดโs game tree shown in Figure 15. Thus, ๐ chooses the child configuration 21-1-3-5. Now โฌ faces a mancala nim configuration of nim value 0 and loses. Therefore, ๐ wins. โข Exercises 1. Prove the division algorithm for โค+ by supplying a reason for each Why? . The division algorithm: Let ๐, ๐ โ โค+ . There exist unique integers ๐ and ๐ where ๐ = ๐๐ + ๐, 0 โค ๐ < ๐. โข Let ๐ = {๐ โ ๐๐| ๐ โ ๐๐ โฅ 0, ๐ โ โ}. ๐ โ โ
. Why? โข Let ๐ = min(๐), where min(๐) is the minimum integer belonging to ๐. Observe that ๐ exists and is a nonnegative integer. Why? โข Thus, ๐ = ๐ โ ๐๐0 for some ๐0 โ โ. If ๐ โฅ ๐ then ๐ โ ๐๐0 โฅ ๐. So ๐ โ ๐(๐0 + 1) โฅ 0, a contradiction. Why? โข Therefore 0 โค ๐ < ๐. Now we must show uniqueness of ๐ and ๐. To do this we let ๐ = ๐๐1 + ๐1 and ๐ = ๐๐2 + ๐2 with 0 โค ๐1 < ๐ and 0 โค ๐2 < ๐. We assume that ๐1 > ๐2 and reach a contradiction. Observe that ๐1 โฅ ๐2 + 1. Why? โข Thus ๐๐2 + ๐2 = ๐ โฅ ๐(๐2 + 1) + ๐1 โ ๐2 โฅ ๐ + ๐1 , a contradiction. Why? โข Therefore, ๐1 = ๐2 . This result in turn means that ๐1 = ๐2 . Why? 2. (a) Prove that the ๐th triangular number ๐๐ is ๐(๐ + 1)/2, where ๐๐ is the sum of the first ๐ positive integers.
64
Chapter II: Mathematical Induction (b) Prove that ๐ < 2๐ for all ๐ โ โ. (c) Prove that 1(1! ) + 2(2! ) + โฏ + ๐(๐! ) = (๐ + 1)! โ1 for all ๐ โ โ. (d) Prove that Proposition 11 and Proposition 12 are equivalent. ๐
๐(๐ + 1)(2๐ + 1) . One way to 6 ๐=1 prove this formula is to derive it from Exercise 2a. To do so, observe that ๐3 โ (๐ โ 1)3 = 3๐2 โ 3๐ + 1. Summing these expressions as ๐ goes from 1 to ๐ gives
3. (a) The sum of the first ๐ squares is โ ๐2 =
๐
๐
๐
๐
๐3 = 3 โ ๐2 โ 3 โ ๐ + โ 1 = 3 โ ๐2 โ ๐=1
๐=1
๐=1
๐=1
3๐(๐ + 1) + ๐. 2
2
Solve this equation for โ ๐ to obtain the desired result. ๐
(b) Now replicate the idea used in part (a) to find a formula for โ ๐3 . Start ๐=1
with ๐4 โ (๐ โ 1)4 .
2 3
L
1
4
7
5 6
Figure 14. Revisiting Puzzle ๐1 of Chapter I. 4. (a) With respect to Puzzle ๐1 of Chapter I, let ๐(๐) be the number of regions into which a circle has been partitioned by line segments between all pairs of ๐ nodes (points along the circumference), where no three line
Exercises
65
segments contain the same point. Let ๐ + 1 be a new node on this circle containing ๐ nodes. Give an argument showing that if the line segment between node ๐ + 1 and node ๐ crosses ๐ line segments (where node ๐ is one of the given ๐ nodes), then the number of regions into which the circle has been partitioned is ๐ + 1 more than ๐(๐). (b) Consider Figure 14 showing that ๐(6) = 31, where ๐(๐) is defined in part (c). Note that ๐(0) = 1. For integer ๐ โฅ 1, let ๐(๐) = ๐(๐) โ ๐(๐ โ 1). To find, say, ๐(7), observe that six more line segments must be inserted into Figure 14 to complete the partition. In particular, consider the dashed line segment โ between node 7 and node 3. โ crosses six solid line segments; alternatively, this number is also obtained by multiplying the number of nodes on one side of โ by the number of nodes on the other side of โ, namely, 2 โ
3. By part (c), inserting โ into the figure contributes 2 โ
3 + 1 = 7 towards the value of ๐(7). Thus insertion of six new line segments between node 7 and the other six nodes gives ๐(7) = (0 โ
5 + 1) + (1 โ
4 + 1) + (2 โ
3 + 1) + (3 โ
2 + 1) + (4 โ
1 + 1) + (5 โ
0 + 1) 5
= โ (๐(5 โ ๐) + 1) = 26. ๐=0
Show that ๐(๐) = (๐ โ 1)(๐2 โ 5๐ + 12)/6 for all ๐ โฅ 1. ๐
(c) Show that ๐(๐) = ๐(1) + โ๐=1 ๐(๐) for all ๐ โฅ 1. (d) Use Exercises 2a and 3 and the preceding parts of this exercise to show that ๐4 โ 6๐3 + 23๐2 โ 18๐ + 24 ๐(๐) = (12) 24 for all ๐ โ โค+ . 5. (a) Let ๐ be a real number, ๐ โ 1, and ๐(๐) = 1 + ๐ + ๐2 + โฏ + ๐๐ . Use mathematical induction to show that ๐ฎ๐ โถ ๐(๐) =
1 โ ๐๐+1 1โ๐
is valid for all ๐ โ โค+ . (b) From part (a), obtain the geometric series formula โ
1 = โ ๐๐ , 1 โ ๐ ๐=0
(13)
where |๐| < 1. โ
1 , ๐! ๐=0 recreate Joseph Fourierโs 1815 proof that ๐ is irrational by following the outline below.
(c) Using Definition 9 and Equation (13), and knowing that ๐ = โ
66
Chapter II: Mathematical Induction โ
โ
1 1 < โ ๐ = 1.) (๐ + 1)! ๐=1 2 ๐=1
โข Show that 2 < ๐ < 3. (Use the relation โ โข Assume that ๐ = ๐ โฅ 2. โข Multiply ๐ =
๐ ๐
๐ ๐
where ๐ and ๐ have no factors in common and ๐
โ
๐! ๐! +โ . ๐! (๐ + ๐)! ๐=0 ๐=1
by ๐! and obtain ๐(๐ โ 1)! = โ
1 1 1 + + โฏ must be โข So + ๐+1 (๐ + 1)(๐ + 2) (๐ + 1)(๐ + 2)(๐ + 3) an integer, a contradiction, because this infinite sum is positive but 1 less than 1 by Equation (13) when ๐ = . 3
6. Find the nim values for the following configurations in the nim game ๐ฉ, and determine nim moves, if they exist, for which the resultant configurations have value 0. (a) 35 โช 45 โช 55. (b) 17 โช 21 โช 27 โช 12. (c) 100 โช 200 โช 300. 7. (a) Describe a winning strategy for this variation of the game of nim: A player is only allowed to move either one or two blocks at a time from a stack. (b) Describe a winning strategy for this variation of the game of nim: A player is only allowed to move either two or three blocks at a time from a stack. (c) Define a relation โผ on the set of all nim configurations by ๐ โผ ๐ if and only if ๐(๐ โช ๐) = 0. Show that โผ is an equivalence relation. 8. (a) The first ten winning Tchoukaillon positions are the following configurations. What are the eleventh and twelfth configurations? 1โถ 2โถ 3โถ 4โถ 5โถ
1-0-0-0-0-0 0-2-0-0-0-0 1-2-0-0-0-0 0-1-3-0-0-0 1-1-3-0-0-0
6โถ 7โถ 8โถ 9โถ 10 โถ
0-0-2-4-0-0 1-0-2-4-0-0 0-2-2-4-0-0 1-2-2-4-0-0 0-1-1-3-5-0
(b) Finish the sequence of moves begun on p. 60 to solve the Tchoukaillon configuration of Figure 10. 9. The value of a mancala nim position ๐ซ is the minimal excluded value of the nim values of ๐ซโs children. Recall that if ๐ซ has no children, its nim value, denoted by ๐(๐ซ), is 0, and observe that ๐(1-0-0-0-0-0) = 1. (a) Show ๐(0-2-0-0-0-0) = 0, ๐(1-2-0-0-0-0) = 1, and ๐(1-1-1-4-0-0) = 2. (b) Find the nim values ๐(1-2-3-0-0-0), ๐(1-1-0-4-0-0), and ๐(0-0-0-0-0-6).
Exercises
67
Figure 15. A complete game tree for ๐ด =1-0-0-2-4-6 of Puzzle 52. (c) Find a configuration whose nim value is 3. (d) Explain why, in generating the game tree for any single board of a mancala nim game, no configuration will appear as two distinct nodes. 10. (a) Consider the mancala nim configuration in Figure 10. Show that if ๐โs first move is to X-1-1-3-5-0, then โฌ should win the game. (b) The game tree for configuration ๐ด of Puzzle 52 is given in Figure 15. Using the same process as outlined in Example 54, verify the nim value ๐(๐ด) = 2. (c) Generate a game tree for configuration ๐ณ of Puzzle 52. Conclude that ๐(๐ณ) = 0.
Strand III: Al-Maghribรฎ meets Sudoku This strand focuses on an old brainteaser about partitioning an inheritance into ninths. It was posed by Molla Mohammed on pilgrimage from India to Mecca around 1590. A landowner has 81 trees. Each year, the first tree produces one basket of fruit, the second tree produces two baskets of fruit, and so on, so that the eighty-first tree produces 81 baskets of fruit. How may he partition these trees among his nine sons so that each one receives nine trees and an equal number of baskets of fruit each year? [76, 77] This riddle is sometimes referred to as the Mecca problem. It first appeared in the appendix of a book on algorithms and Diophantine equations, Tuhfetuโlรdรขd lizevil Rรผลd veโsโSedad written by the Algerian-born mathematician Ali bin Veli Ibn Hamza al-Cezรขirรฎ, also known as Al-Maghribรฎ. In this strand we analyze the structure of this riddle and show that it is a slight variation of the popular Sudoku puzzles of today.
Figure 1. An orchard of 81 trees? An engraving circa 1820 [33, E. M., Vol. I, Plate 83]. 69
70
Strand III: Al-Maghribรฎ meets Sudoku
Since Table 1 below contains the answer to the riddle, the reader may wish to attempt a solution before reading further. To do a warm-up exercise first, try a simpler version of the puzzle: A landowner has twenty-five trees and five daughters. Tree ๐ produces ๐ baskets of fruit each season, 1 โค ๐ โค 25. How may the trees be partitioned so that each daughter receives five trees and an equal number of baskets of fruit each season? To represent his solution, Al-Maghribรฎ formed a 9 ร 9 grid into which he placed the trees as represented by the integers 1 through 81, one tree per cell of the grid. Then each sonโs tree allotment is the set of trees whose numbers appear in his corresponding column; that is, the first sonโs trees are in column one, the second in column two, and so on, so that the ninth sonโs trees are in column 9. Table 1. Al-Maghribรฎโs solution. 1 18 26 34 42 50 58 66 74
2 10 27 35 43 51 59 67 75
3 11 19 36 44 52 60 68 76
4 12 20 28 45 53 61 69 77
5 13 21 29 37 54 62 70 78
6 14 22 30 38 46 63 71 79
7 15 23 31 39 47 55 72 80
8 16 24 32 40 48 56 64 81
9 17 25 33 41 49 57 65 73
As can be seen, the first son receives trees {1, 18, 26, 34, 42, 50, 58, 66, 74}, the second son receives {2, 10, 27, 35, 43, 51, 59, 67, 75}, and so on. In total, the annual production of each sonโs trees tallies to 369 baskets. Table 2. Subtracting an arithmetic sequence from Table 1. 1 9 8 7 6 5 4 3 2
2 1 9 8 7 6 5 4 3
3 2 1 9 8 7 6 5 4
4 3 2 1 9 8 7 6 5
5 4 3 2 1 9 8 7 6
6 5 4 3 2 1 9 8 7
7 6 5 4 3 2 1 9 8
8 7 6 5 4 3 2 1 9
9 8 7 6 5 4 3 2 1
Strand III: Al-Maghribรฎ meets Sudoku
71
One way to see the logical structure in Al-Maghribรฎโs solution is to subtract successive multiples of 9 from each row, beginning with zero. That is, subtract 0 from each cell of the first row, subtract 9 from each cell of the second row, subtract 18 from the third row, and so on, and finish by subtracting 72 from the last row to obtain Table 2. Each row of Table 2 is a right circular translation of the preceding row. This pattern is one choice from a complete set of mutual derangements.1 Thus the columns have a common sum, which also meansโwithout actually summing themโthat the columns of Table 1 have a common sum. The reader may observe that Table 2 looks much like a completed Sudoku square.2 In fact, if we rearrange its rows, it is one. We rearrange the rows ๐
๐ of Table 2, 1 โค ๐ โค 9, in the order ๐
1 , ๐
4 , ๐
7 , ๐
2 , ๐
5 , ๐
8 , ๐
3 , ๐
6 , ๐
9 to obtain Table 3, to which we have added four extra internal lines so as to parTable 3. Rearranging the rows of Table 1. 1 7 4 9 6 3 8 5 2
2 8 5 1 7 4 9 6 3
3 9 6 2 8 5 1 7 4
4 1 7 3 9 6 2 8 5
5 2 8 4 1 7 3 9 6
6 3 9 5 2 8 4 1 7
7 4 1 6 3 9 5 2 8
8 5 2 7 4 1 6 3 9
9 6 3 8 5 2 7 4 1
tition the 9 ร 9 grid into nine 3 ร 3 grids. Each of these sub-grids contains all the integers from 1 through 9, and each row and column of the 9 ร 9 grid contains all the integers from 1 through 9. Table 3 is a completed Sudoku puzzle. From this new array, we generate an alternate solution to the Mecca problem by adding the arithmetic sequence of successive multiples of nine to its rows, so obtaining Table 4. In fact, any completed Sudoku puzzle gives rise to a Mecca problem solution. Just as we did in going from Table 3 to Table 4, all that must be done is to add the successive multiples of nine to successive rows of the puzzle. 1 Two ordered lists of length ๐ containing all of the integers 1 through ๐ are derangements of each other if their ๐th members are never the same for all ๐ with 1 โค ๐ โค ๐. 2 A Sudoku square is a 9 ร 9 grid in which every row, column, and 3 ร 3 block contains the digits 1โ9 exactly once [126]. Sudoku was originally called Number Place, appearing for the first time in 1979 in Dell Puzzle Magazine. It gained great popularity in Japan and much of Asia before earning its place on the puzzle pages of American newspapers and a variety of popular magazines.
72
Strand III: Al-Maghribรฎ meets Sudoku Table 4. A different Mecca problem solution than Table 1. 1 16 22 36 42 48 62 68 74
2 17 23 28 43 49 63 69 75
3 18 24 29 44 50 55 70 76
4 10 25 30 45 51 56 71 77
5 11 26 31 37 52 57 72 78
6 12 27 32 38 53 58 64 79
7 13 19 33 39 54 59 65 80
8 14 20 34 40 46 60 66 81
9 15 21 35 41 47 61 67 73
The Mecca problem generalizes: A parent wishes to distribute ๐2 trees to ๐ children equitably. An equitable distribution is one in which each child has the same number of trees and each childโs total tree production is the same. As before, for 1 โค ๐ โค ๐, tree-๐ produces ๐ baskets of fruit annually. How may this partition be done? To solve this general problem, simply find ๐ derangements of distinct integers from the first ๐ integers. A very simple pattern that does so is when the first row is {1, 2, 3, 4, โฆ , ๐}, the second row is {2, 3, 4, 5, โฆ , ๐, 1}, the third row is {3, 4, 5, 6, โฆ , ๐, 1, 2}, and so on, so that the last row is {๐, 1, 2, 3, โฆ , (๐ โ 1)}. Now add the arithmetic sequence 0, ๐, 2๐, 3๐, โฆ , (๐ โ 1)๐ to these rows in the same manner as is done in going from Table 3 to Table 4, and we have a solution. The Mecca problem asks a landowner to partition 81 trees of varying productivity into nine disjoint sets so that each set is equally productive. In this next chapter we present another partitioning problem: A landowner has two gardens of ๐ trees and ๐ trees; find the maximal number ๐ of children the landowner can have so that each child can inherit an equal part from each garden. For example, if ๐ = 5, then each child inherits ๐/5 trees in the first garden and ๐/5 trees in the second garden where ๐/5 and ๐/5 are integers.
Chapter III: GCDs and Diophantine Equations Diophantus of Alexandria (third century) gathered together problems of an algebraic nature into a work called Arithmetica. Of these problems about two hundred have survived to our day. Some involving higher-order equations are surprisingly tricky. As the Byzantine mathematician Maximum Planudes said: Thy soul, Diophantus, be with Satan because of the difficulties of your theorems. Fortunately, Diophantus supplies a strategy for solving each problem along with a solution. In fact, Diophantus addresses his collection to a friend, Dionysius, saying: Knowing that you are anxious to learn how to investigate problems in numbers, I have tried to set forth for you the nature and power subsisting in numbers. Although Diophantus was content to supply just one answer to his various indeterminate problems, many of his problems and methods of solution can be generalized. The simplest of these problems is a two-dimensional arithmetic procedure to find integers ๐ฅ and ๐ฆ for given integers ๐, ๐, and ๐ satisfying ๐๐ฅ + ๐๐ฆ = ๐.
(1)
Equations of this type are called linear Diophantine equations in his honor. In this chapter we define the greatest common divisor of two positive integers, show three different ways to calculate it, and show how it is related to Equation (1) and to finite simple continued fractions. Then we solve Equation (1) and apply the idea within the system of modular arithmetic. In Chapter XII, we use Diophantine equations to predict the occurrences of solar eclipses. 73
74
Chapter III: GCDs and Diophantine Equations
The greatest common divisor Definition 1: GCD. Let ๐, ๐ โ โค+ . The greatest common divisor (GCD) of ๐ and ๐, denoted by gcd(๐, ๐), is the greatest integer ๐ that divides both ๐ and ๐. Because gcd(๐, ๐) = 1 is an important special case, we revise Definition II.6 on relatively prime integers. Definition 2: Relative primeness. Let ๐, ๐ โ โค+ . We say that ๐ and ๐ are relatively prime if gcd(๐, ๐) = 1. Proposition II.7 showed that gcd(๐, ๐) = 1 if and only if there exist integers ๐ฅ0 and ๐ฆ0 with ๐๐ฅ0 + ๐๐ฆ0 = 1. But the proof revealed neither how to find integers ๐ฅ0 and ๐ฆ0 nor (in the absence of ๐ฅ0 and ๐ฆ0 ) how to determine when two positive integers are relatively prime. We remedy that shortcoming in this section. One way to determine the greatest common divisor of two given integers ๐ and ๐ is to use the fundamental theorem of arithmetic, writing each integer as a product of powers of primes, thereby revealing the greatest common divisor ๐. Example 3: The GCD via the fundamental theorem. Let ๐ = 1683 and ๐ = 1768. These integers factor as ๐ = 23 โ
13 โ
17 and ๐ = 32 โ
11 โ
17. Thus the greatest common divisor of these integers is ๐ = 17. โข One difficulty in applying the decomposition approach illustrated in Example 3 is that factoring an arbitrary integer is tedious and is impractical in real time if the integer is very large. However, another approach is always successful. It is sometimes called the chocolate bar algorithm. 6
4 10 cm
5 1
2 3
26 cm
Figure 2. A chocolate bar, 10 cm by 26 cm.
The greatest common divisor
75
Proposition 4: The chocolate bar algorithm. Let ๐, ๐ โ โค+ with ๐ < ๐. Then gcd(๐, ๐) = gcd(๐, ๐ โ ๐).
(2)
To find ๐ = gcd(๐, ๐), apply Equation (2) repeatedly until obtaining ๐ = gcd(๐, ๐) = ๐ for some ๐ โ โค+ . Proof. Observe that the integer ๐ is a divisor of both ๐ and ๐ if and only if ๐ is a divisor of both ๐ and ๐ โ ๐. Hence gcd(๐, ๐) = gcd(๐, ๐ โ ๐). Since repeated use of this idea leads to a pair of positive integers whose sum is always less than the previous pair, the algorithm must always reach an integer pair of the form (๐, ๐) where ๐ โ โค+ . So gcd(๐, ๐) = ๐. The next example illustrates Proposition 4. Example 5: Eating a chocolate bar. Imagine that Ann loves chocolate. Her favorite chocolates are two-dimensional rectangular bars. Let ๐ and ๐ be the integer width and length of a chocolate bar, with ๐ โค ๐. By custom, Ann eats the bar by breaking off the largest possible square from one end, and eats that piece. Thus, if ๐ = ๐, Ann eats the entire bar. Otherwise she eats an ๐ ร ๐ square from the end, leaving a bar with dimensions ๐ ร (๐ โ ๐). To illustrate these dynamics, let ๐ = 10 and ๐ = 26. See Figure 2. Ann eats the bar in six steps. At step 1, she breaks off a 10 ร 10 square from the left-hand side, leaving a 10 ร 16 rectangular bar. At step 2, she breaks off another 10 ร 10 square, leaving a 10 ร 6 rectangular bar. At step 3, she breaks off a 6 ร 6 square, leaving a 4 ร 6 bar. At step 4, she breaks off a 4 ร 4 square, leaving a 2 ร 4 bar. At step 5, she breaks off a 2 ร 2 square, leaving a 2 ร 2 square. At step 6, she eats the last square. Therefore, by Proposition 4, gcd(10, 26) = 2. โข This chocolate bar algorithm is equivalent to what is called Euclidโs greatest common divisor algorithm. Rather than successively breaking off squares from a chocolate bar, his algorithm repeatedly utilizes Proposition II.3, the division algorithm: ๐ = ๐๐ + ๐, where ๐ and ๐ are unique nonnegative integers and 0 โค ๐ < ๐. After using the division algorithm to decompose an idealized chocolate bar into ever smaller rectangular pieces, Euclidโs algorithm gives instructions for reassembling the pieces so that the greatest common divisor ๐ of ๐ and ๐ is written as a linear combination of ๐ and ๐, namely, ๐๐ฅ + ๐๐ฆ = ๐ (3) for some integers ๐ฅ and ๐ฆ. Observe that Equation (3) is equivalent to Equation (1) when ๐ = ๐. Proposition 6: Euclidโs algorithm. Let ๐ and ๐ be positive integers such that gcd(๐, ๐) = ๐. To find a solution ๐ฅ0 and ๐ฆ0 of integers for Equation (3), use the following procedure.
76
Chapter III: GCDs and Diophantine Equations
Step i: If 0 < ๐ โค ๐, write ๐ = ๐๐ + ๐, where ๐ โฅ 1 and 0 โค ๐ < ๐. If ๐ = 0, jump to step iii. Otherwise proceed to step ii. Step ii: Repeat step i by redefining ๐ as ๐ and ๐ as ๐. Step iii: Let ๐ be the last ๐ that divides the last ๐. Step iv: For each equation ๐ = ๐๐ + ๐ with ๐ โ 0 in the cascade of equations generated in steps i and ii, solve for ๐ and back-substitute until producing Equation (3). Proof. In step i, we repeatedly use the division algorithm from Chapter II. Step iii is valid by Proposition 4. Observe that the initial remainder was a specific nonnegative integer and the successive remainders form a strictly decreasing sequence of integers. Thus we eventually reach step iii. By the same argument used in Proposition 4, at each step the gcd(๐, ๐) remains invariant for each new pair of integers (๐, ๐). The last step involves straightforward but tedious arithmetic. The next two examples illustrate Euclidโs algorithm.3 Example 7: Revisiting Example 5. We apply Euclidโs algorithm to find the greatest common divisor of ๐ = 26 and ๐ = 10. โข By step i, 26 = 2 โ
10 + 6. By step ii, let ๐ = 6 and ๐ = 10. โข By step i, 10 = 1 โ
6 + 4. By step ii, let ๐ = 4 and ๐ = 6. โข By step i, 6 = 1 โ
4 + 2. By step ii, let ๐ = 2 and ๐ = 4. โข By step i, 4 = 2 โ
2 + 0. By step iii, ๐ = 2. โข By step iv, solve each of the above equations (except for the last equation) for its remainder ๐: 2 = 6 โ 4,
4 = 10 โ 6 ,
and
6 = 26 โ 2 โ
10.
Back-substituting and simplifying repeatedly gives 2 = 6 โ 4 = 6 โ (10 โ 6) = 2 โ
6 โ 10 = 2 โ
(26 โ 2 โ
10) โ 10 = 2 โ
26 โ 5 โ
10. Therefore gcd(10, 26) = 2 and 2 = 2 โ
26 โ 5 โ
10, so that ๐ฅ0 = 2 and ๐ฆ0 = โ5 with respect to Proposition 6. โข Example 8: Revisiting Example 3. We apply Euclidโs algorithm to find the greatest common divisor of ๐ = 1768 and ๐ = 1683. This time we assemble the successive equations ๐ = ๐๐+๐ as generated by the algorithm in Table 5, in which each quotient ๐ is boxed. Back-substituting and simplifying the equations from 3 Code 4 in Appendix III illustrates the Mathematica command to obtain ๐๐ฅ + ๐๐ฆ = ๐ for any given positive integers ๐ and ๐, with ๐ being the greatest common divisor of the two integers.
The greatest common divisor
77
column three of the table give 17 = 85 โ 68 = 85 โ (1683 โ 19 โ
85) = 20 โ
85 โ 1683 = 20 โ
(1768 โ 1683) โ 1683 = 20 โ
1768 โ 21 โ
1683. Therefore gcd(1683, 1768) = 17 and โ21 โ
1683 + 20 โ
1768 = 17, so that ๐ฅ0 = โ21 and ๐ฆ0 = 20 with respect to Proposition 6. Table 5. Bookkeeping for the remainders in Example 8. iteration ๐ = ๐๐ + ๐
solving for ๐
1
1768 = 1 โ
1683 + 85
85 = 1768 โ 1683
2
1683 = 19 โ
85 + 68
68 = 1683 โ 19 โ
85
3
85 = 1 โ
68 + 17
17 = 85 โ 68
4
68 = 4 โ
17 + 0
To find the finite simple continued fraction representation for the fraction we use the ideas of Example II.4 and assemble the successive quotientsโ 1683 which have been boxed in Table 5โas a list of partial denominators: the finite simple continued fraction [1; 19, 1, 4]. Observe that 104 1 , = (4) [1; 19, 1, 4] = 1 + 1 99 19 + 1 1+ 4 1768
which is
1768 1683
โข
in reduced form.
In general, every time we use Euclidโs algorithm to find the greatest common divisor of two positive integers ๐ and ๐, we are generating a finite simple ๐ continued fraction for . For this reason, these simple continued fractions, as ๐ in Equation (4), are referred to as Euclidean continued fractions. Observe that although the simple continued fraction [1; 10, 1, 3, 1] is an alternate expression for the continued fraction in Equation (4), it is not a Euclidean continued fraction. In general, whenever we use Euclidโs algorithm to generate a simple contin๐ ued fraction for a fraction , the last partial denominator will never be 1 (unless ๐ ๐
๐
= 1), because otherwise the last remainder would be equal to the last divisor
in the Euclidean algorithm, a contradiction. Thus, unless we specify otherwise, ๐ when we refer to the simple continued fraction for the fraction we mean the ๐
Euclidean continued fraction.
78
Chapter III: GCDs and Diophantine Equations
An ancient algorithm for the greatest common divisor Yet a third way to calculate the greatest common divisor of two positive integers ๐ and ๐ is to start with an array of ๐ ร ๐ dots arranged as ๐ rows and ๐ columns. Imagine this array is a series of finger pokes upon a smooth sandy region near a cooking fire, possibly after dark.4 Figure 3a gives one such array.
a.
b.
Figure 3. A 5 ร 3 grid and its associated sona drawing. Around this fire, children gather, and a master story-teller narrates an Aesopโs fable-type legend while tracing a curve through the sand, usually using the right index finger. The curve starts somewhere on the grid (not at a dot) of the array, and always proceeds along the avenues between the dots, where the avenues are inclined at 45โ to the rows and columns. No avenue is ever retraced. The only time the curve changes direction is outside the array of dots. If the storyteller pauses in indecision or if the story-tellerโs finger returns in futility to the start point before each dot is sequestered by the curve from the other dots, the children laugh, knowing the master erred. Figure 3b shows the completed curve through an array of 5 ร 3 dots. The master must know beforehand which arrays of dots yield single-loop solutions through the maze of avenues, a situation that occurs only when ๐ and ๐ are relatively prime. However, if ๐ and ๐ have greatest common divisor ๐ > 1, the completed curve through all the avenues will consist of ๐ loops, and the masterโs index finger will be raised ๐ times to trace the curve. These dots and curves in the sand are called sona drawings. More formally, we make the following definition. Definition 9: Sona drawings. Let ๐ฎ(๐, ๐) be a rectangular array of ๐ ร ๐ dots as ๐ rows of ๐ dots. Following Schlatter [129], we impose a coordinate scheme upon this array and encompass the array with a rectangle whose corners are at coordinates (0, 0), (2๐, 0), (2๐, 2๐), and (0, 2๐), so that each of the coordinates of the ๐๐ dots are odd as shown in Figure 4. Thus, for example, there is a dot 4 This algorithm has a long tradition among the Cockwe people of greater Angola [55], and may date far into the past.
An ancient algorithm for the greatest common divisor
M
L
K
J
79
I
N
H
O
G
P
F A
B
C
D
E
Figure 4. The sona drawing of Figure 3b as a beam of reflected light, ๐ = 5, ๐ = 3. at (1, 1) and at (2๐ โ 1, 2๐ โ 1). At (1, 0), position a laser angled at 45โ to the horizontal axis so that the laser beam is directed up and to the right. Imagine that the bounding sides of the rectangle are mirrors, and the path taken by the masterโs tracing finger is the path of the laser beam reflected by the mirrors. The laser beam as a path will bounce off the sides of the rectangle and eventually return to (1, 0).5 If for some ๐ with 2 โค ๐ โค ๐, the point (2๐ โ 1, 0) is not on this path, position the laser (with angle 45โ ) at that point and generate another laser path. Continue this process until every point of the form (2๐ โ 1, 0) is on a laser path. The union of all these laser paths forms a sona drawing. Using Definition 9 means that the rounded turns of the sona drawing of Figure 3b will now be replaced with right-angle reflections in the mirrors as shown in Figure 4. These sona drawings can be idealized as loops in a graph. To make this language precise, we have the following definition. Definition 10: Graphs. A graph ๐ข is a set of vertices ๐ and a set of edges ๐ธ. Each of the edges is labeled by a pair of vertices from ๐. We may think of an edge ๐ด๐ต as a curve, such as a line segment, whose endpoints are the two vertices ๐ด and ๐ต. For example, the game trees introduced in Chapter II are graphs.6 5 Since the boundary of the rectangle contains only finitely many possible reflection points, the beam must eventually reflect at a point on the boundary it has already visited. Let ๐ be the first such revisited point. Let ๐ and ๐ be the two boundary points connected to ๐ by 45-degree lines. If ๐ โ (1, 0), the beam must have arrived and left ๐ and then returned to ๐, which means that either ๐ or ๐ had been already visited twice, a contradiction. So ๐ = (1, 0). 6 In particular, a game treeโs vertices are all the various nim configurations that could conceivably occur in a game, and each of its edges connect a configuration ๐ to a child configuration ๐ of ๐.
80
Chapter III: GCDs and Diophantine Equations
Definition 11: Sona graphs. The sona graph ๐ข(๐, ๐) is the graph associated with ๐ฎ(๐, ๐). The vertices of ๐ข(๐, ๐) are the 2(๐ + ๐) points along the boundary of a 2๐ร2๐ rectangle bounding an array of ๐ร๐ dots. Specifically, these verticesโ coordinates are of the form (2๐ โ 1, 0), (2๐, 2๐ โ 1), (2๐ โ 1, 2๐), and (0, 2๐ โ 1), where 1 โค ๐ โค ๐ and 1 โค ๐ โค ๐. The edges of the graph are the segments between successive points of reflection in the laser beam paths. For example, in Figure 4, segment ๐ท๐บ is an edge between the vertices ๐ท and ๐บ, but segment DE is not an edge of the graph. Since we used the terms path and cycle somewhat informally in Definition 9, we now give a more formal definition. Definition 12: Paths and cycles. A path in ๐ข is a finite string of (not neccessarily distinct) vertices where each pair of adjacent vertices is an edge in ๐ข. A cycle in ๐ข is a path of otherwise distinct vertices beginning and ending with the same vertex. Each loop in a sona drawing is a cycle in the corresponding sona graph. Every cycle is a path. Definition 13: Covers. Let ๐ข be a graph with vertex set ๐. Let ๐ซ be a set of paths in ๐ข. We say that ๐ซ covers ๐ข if the set of all vertices in ๐ซ is ๐. Example 14: A cycle in ๐ข(5, 3). In Figure 4, we have labeled the sixteen vertices of ๐ข(5, 3) by the letters ๐ด through ๐. The path in the sona graph is the cycle ๐ค: ๐ค = ๐ด๐ฝ๐บ๐ท๐๐๐ถ๐ป๐ผ๐ต๐๐ฟ๐ธ๐น๐พ๐๐ด. The set {๐ค} is a cover of ๐ข(5, 3).
โข
Before explaining how Figures 3b and 4 demonstrate that gcd(5, 3) = 1, consider an example of a pair of integers whose greatest common divisor is more than 1. Example 15: A sona graph containing three cycles. Consider the sona graph ๐ข(9, 6). This time we cannot complete the sona drawing with just one cycle. We must raise our drawing finger and start afresh, not just a second time but a third as well, as shown in Figure 5. Starting the sona curve along the ๐ฅ-axis at ๐ฅ = 1, 11, or 13 generates the cycle of Figure 5a. Starting at ๐ฅ = 3, 9, or 15 generates the cycle of Figure 5b. Starting at ๐ฅ = 5, 7, or 17 generates the cycle of Figure 5c. It is no coincidence that the greatest common divisor of 6 and 9 is indeed 3. โข
An ancient algorithm for the greatest common divisor
a. The cycle starting at (1, 0).
c. The cycle starting at (5, 0).
81
b. The cycle starting at (3, 0).
d. Union of the three cycles.
Figure 5. The 9 ร 6 sona drawing. The patterns obtained in sona drawings when following Definition 11 are called plaited mats. Use of different colored cords or reeds for each cycle in these mats make rather attractive craft designs. Definition 16: The number of cycles in a sona graph. For ๐, ๐ โ โค+ , let ๐ฌ(๐, ๐) be the number of distinct cycles in the sona graph ๐ข(๐, ๐). For instance, ๐ฌ(5, 3) = 1 and ๐ฌ(9, 6) = 3 by Examples 14 and 15. The proofs for the next three propositions are left to the reader. Proposition 17: Distinct cycles are disjoint. Let ๐ค and ๐ฃ be distinct cycles in ๐ข(๐, ๐) where ๐, ๐ โ โค+ . The cycles ๐ค and ๐ฃ have no vertices in common. Proposition 18: Every vertex is part of a sona cycle. With ๐, ๐ โ โค+ , let ๐ be a vertex in the sona graph ๐ข(๐, ๐). Then ๐ is part of some cycle in the graph ๐ข(๐, ๐). Proposition 19: Edge crossings. Let ๐, ๐ โ โค+ . In the sona graph ๐ข(๐, ๐) the (laser-traced) edges of the graph cross each other or touch each other at (2๐โ1, 2๐) and (2๐, 2๐ โ 1) for all ๐, ๐ โ โ with 1 โค ๐ โค ๐ and 1 โค ๐ โค ๐.
82
Chapter III: GCDs and Diophantine Equations
(2n โ 2j + 1, 2n)
(2n, 2n โ 2j + 1)
(0, 2j โ 1)
(2j โ 1, 0) Figure 6. A sona cycle within a square. Proposition 20: Square sona arrays. Consider the sona graph ๐ข(๐, ๐) where ๐ โ โค+ . This sona graph contains ๐ distinct cycles. That is, ๐ฌ(๐, ๐) = ๐. Proof. Each cycle in ๐ข(๐, ๐) has exactly four vertices. In particular, if the cycle starts along the bottom edge of the rectangle at (2๐ โ 1, 0) for some integer ๐ with 1 โค ๐ โค ๐, then the resultant cycle is given by the following string of vertices (where each vertex is labeled by its coordinates). We use a rightward arrow to indicate that adjacent vertices are connected by an edge in ๐ข(๐, ๐). (2๐ โ 1, 0) โ (2๐, 2๐ โ 2๐ + 1) โ (2๐ โ 2๐ + 1, 2๐) โ (0, 2๐ โ 1) โ (2๐ โ 1, 0). Figure 6 illustrates this structure. Since ๐ข(๐, ๐) contains exactly 4๐ vertices, Proposition 17 implies that ๐ฌ(๐, ๐) = ๐. Example 21: A prelude to a proof of Proposition 22. Consider ๐ข(9, 6) in Figure 7. In Example 15 we showed that three cycles cover the graph. By Proposition 17 there is no other way to cover the graph using only cycles. We can also view this figure as the juxtaposition of two smaller graphs ๐ข(6, 6) and ๐ข(3, 6). We represent this juxtaposition using a gray vertical line separating these two smaller graphs. Figure 7 shows a 9 ร 6 array partitioned by a gray vertical line into a 6 ร 6 array on the left and a 3 ร 6 array on the right. We claim that ๐ฌ(9, 6) = ๐ฌ(3, 6). To see why this is so, let ๐ = ๐ด๐น๐ธ๐ท๐ถ๐ต๐ด be the cycle in ๐ข(3, 6) shown in Figure 7. ๐ touches the gray line at ๐ถ and ๐น. Into cycle ๐ we splice cycles from ๐ข(6, 6) (and ห within ๐ข(9, 6): remove vertices ๐ถ and ๐น) to form the cycle ๐ ห = ๐ด๐
๐๐๐ธ๐ท๐๐ ๐๐ต๐ด. ๐
An ancient algorithm for the greatest common divisor R
X
83
D
S C E B F
Y Z
T
A
Figure 7. Severing a square in a rectangular grid. Each of the three cycles in ๐ข(3, 6) will include two points on the gray line and so will have two cycles from ๐ข(6, 6) spliced into it. Thus the number of cycles or loops needed to complete the sona drawing of a 9 ร 6 array is the same as for the 3 ร 6 array. โข Proposition 22: Rectangular sona arrays. Consider the sona graph ๐ข(๐, ๐) where ๐, ๐ โ โค+ with ๐ < ๐. Then ๐ฌ(๐, ๐) = ๐ฌ(๐ โ ๐, ๐). Proof. We claim that ๐ข(๐, ๐) can be viewed as the juxtaposition of two smaller graphs ๐ข(๐, ๐) and ๐ข(๐ โ ๐, ๐) in the following sense. Recall that ๐ข(๐, ๐) is embedded in a rectangular frame (of mirrors) whose bottom-left and top-right coordinates are (0, 0) and (2๐, 2๐). Arrange the two smaller graphs so that ๐ข(๐, ๐)โs bottom-left and top-right coordinates are at (0, 0) and (2๐, 2๐) and so that ๐ข(๐ โ ๐, ๐)โs bottom-left and top-right coordinates are at (2๐, 0) and (2๐, 2๐). Let โ be the vertical line through (2๐, 0), the common side between the two rectangular arrays. We can imagine โ to be a double-sided mirror. Line โ contains a total of ๐ vertices that do not belong to ๐ข(๐, ๐) but do belong to both of the smaller graphs. By Proposition 19, the collection of edges in ๐ข(๐, ๐) looks exactly the same as the collection of edges in the two smaller graphs. The only difference is that each edge ๐ = ๐ด๐
in ๐ข(๐, ๐) that passes through โ at vertex ๐น consists of two edges ๐1 = ๐ด๐น โ ๐ข(๐, ๐) and ๐2 = ๐น๐
โ ๐ข(๐ โ ๐, ๐). In our proof we shall splice cycles together from the two smaller graphs in an appropriately oriented manner. Let ๐ and ๐ be cycles in ๐ข(๐ โ ๐, ๐) and ๐ข(๐, ๐), respectively, that have a common vertex ๐น on โ. We write ๐ = ๐ด๐น๐ค๐ด and ๐ = ๐น๐
๐๐๐น, where ๐ค is a path (of distinct vertices not including ๐ด and ๐น) in ๐ข(๐ โ ๐, ๐). (In Figure 7, ๐ค = ๐ธ๐ท๐ถ๐ต.) Depending on the relative orientations of ๐ and ๐, we know that either ๐ด๐
or ๐ด๐ is an edge of ๐ข(๐, ๐). If ๐ด๐
is an
84
Chapter III: GCDs and Diophantine Equations
edge, the result of replacing vertex ๐น in ๐ with ๐ (after dropping ๐น from ๐) is the sequence of vertices โฐ = ๐ด๐
๐๐๐ค๐ด. Otherwise it is โฐ = ๐ด๐๐๐
๐ค๐ด. Convert each cycle in ๐ข(๐ โ ๐, ๐) into a cycle in ๐ข(๐, ๐) in the following manner. Let ๐ be a cycle in ๐ข(๐ โ ๐, ๐). The cycle ๐ will contain at least one vertex from โ, and, by Proposition 20, to each vertex in โ there corresponds a cycle from ๐ข(๐, ๐) containing that vertex and no other vertex in โ. Replace each vertex in โ โฉ ๐ with its corresponding appropriately oriented cycle from ๐ข(๐, ๐), and eliminate the vertex in โ from both cycles. Since the resulting cycle does not include any vertices from โ, it is a cycle in ๐ข(๐, ๐). We claim that every cycle in ๐ข(๐, ๐) can be produced in this manner. Every vertex of ๐ข(๐, ๐) is included in a ๐ข(๐, ๐) cycle and every ๐ข(๐, ๐) cycle is connected to a ๐ข(๐ โ ๐, ๐) cycle via a vertex in โ. Hence every vertex in ๐ข(๐, ๐) (as well as every vertex in ๐ข(๐ โ ๐, ๐)) will be included in one of our newly constructed ๐ข(๐, ๐) cycles. Since the gluing procedure above will cover every vertex in ๐ข(๐, ๐), every ๐ข(๐, ๐) cycle is produced from a ๐ข(๐ โ ๐, ๐) cycle. Therefore ๐ฌ(๐, ๐) = ๐ฌ(๐ โ ๐, ๐).
Figure 8. A sona lioness.
Corollary 23: Sona drawings and GCDs. The number of disjoint cycles in the sona graph ๐ข(๐, ๐) is gcd(๐, ๐). Proof. By Proposition 22, the condition ๐ฌ(๐, ๐) = ๐ฌ(๐ โ ๐, ๐) when 0 < ๐ < ๐ means that we can treat the ๐ ร ๐ array of dots as the chocolate bars of Proposition 4. Thus ๐ข(๐, ๐) = gcd(๐, ๐). Finally, with respect to the story being told while sona cycles are being drawn on the ground, once the master story-teller finishes the tale and the sona drawing is complete, the master makes two more finger swishes in the sand. A tail appears on the left-hand side and a head on the right-hand side of the drawing. As in
The Diophantine solution
85
Figure 8, a stylized lioness appears, who perhaps was the main character in the tale being told.7
The Diophantine solution The Euclidean algorithm, Proposition 6, gives a way to solve the linear Diophantine equation (1). Definition 24: Standard form of a linear Diophantine equation. Let ๐, ๐ โ โค+ and ๐ โ โค with ๐ โ 0. Let ๐ = gcd(๐, ๐). A linear Diophantine equation, ๐๐ฅ + ๐๐ฆ = ๐, is in standard form if ๐ = 1. A general solution to a Diophantine equation is a representation that characterizes all possible solutions of the equation. Let ๐, ๐, ๐ โ โค+ and ๐ โ โค\{0} with gcd(๐, ๐) = ๐. If ๐ does not divide ๐, then the equation ๐๐ฅ + ๐๐ฆ = ๐ has no solution. If ๐|๐ and ๐ > 1, the equation ๐๐ฅ + ๐๐ฆ = ๐ can be simplified to the standard form ๐ ๐ ๐ ( )๐ฅ + ( )๐ฆ = . ๐ ๐ ๐ Thus we pose the following solution scheme for linear Diophantine equations in standard form. Proposition 25: A Diophantine theorem. Given nonzero relatively prime integers ๐ and ๐, a nonzero integer ๐, and an integer solution ๐ฅ = ๐ฅ0 and ๐ฆ = ๐ฆ0 to ๐๐ฅ + ๐๐ฆ = ๐, the general solution to ๐๐ฅ + ๐๐ฆ = ๐ is given by ๐ฅ = ๐ฅ0 + ๐๐ก and ๐ฆ = ๐ฆ0 โ ๐๐ก
(5)
for all integers ๐ก. Proof. Observe that any ๐ฅ and ๐ฆ given by Equation (5) is a solution to ๐๐ฅ + ๐๐ฆ = ๐ because ๐(๐ฅ0 + ๐๐ก) + ๐(๐ฆ0 โ ๐๐ก) = ๐๐ฅ0 + ๐๐ฆ0 = ๐. Let ๐ฅ = ๐ฅ1 and ๐ฆ = ๐ฆ1 be another solution. Then ๐(๐ฅ1 โ๐ฅ0 )+๐(๐ฆ1 โ๐ฆ0 ) = 0. Since gcd(๐, ๐) = 1, we have ๐|(๐ฅ1 โ ๐ฅ0 ) and ๐|(๐ฆ1 โ ๐ฆ0 ) (proving this last statement is Exercise 5b). Thus ๐ฅ1 โ ๐ฅ0 = ๐๐ก and ๐ฆ1 โ ๐ฆ0 = ๐๐ for some integers ๐ and ๐ก. So 7 G. H. Hardy (1877โ1947) once remarked about his work as a number theorist, โI have never done anything useful. No discovery of mine has made, or is likely to make, directly or indirectly, for good or ill, the least difference to the amenity of the world.โ He was mistaken, as his work has many real-world applications. In much the same way, the greatest common divisor algorithm as sona drawings was never intended to be useful other than as a story-telling technique. Thus, for eons this useful number-theoretic algorithm awaited the day when it would be used in cryptology, solving Diophantine equations, finding modular inverses, and generating continued fractions, to name just a few of its uses.
86
Chapter III: GCDs and Diophantine Equations
๐ฅ1 = ๐ฅ0 + ๐๐ก and ๐ฆ1 = ๐ฆ0 + ๐๐ , which almost matches Equation (5). Since ๐ฅ = ๐ฅ1 and ๐ฆ = ๐ฆ1 is a solution to the Diophantine equation, ๐(๐ฅ0 + ๐๐ก) + ๐(๐ฆ0 + ๐๐ ) = ๐, which means that ๐๐๐ก + ๐๐๐ = 0. Since ๐๐ โ 0, ๐ = โ๐ก. So ๐ฅ1 = ๐ฅ0 + ๐๐ก and ๐ฆ1 = ๐ฆ0 โ ๐๐ก, which matches Equation (5) exactly. Therefore every solution to the Diophantine equation is given by Equation (5). Table 6. Sales of $5 and $7 tickets from Example 26. ๐
104
(๐ฅ, ๐ฆ)
(46, 4)
๐ฅ+๐ฆ
50
105
106
(39, 9) (32, 14) 48
107
108
109
110
(25, 19)
(18, 24)
(11, 29)
(4, 34)
44
42
40
38
46
Example 26: A Diophantine ticket sales problem. Tickets for a small concert sell at $7 for a balcony seat and $5 to stand on the main floor. Ticket sales amount to $258. How many tickets were sold? Solution. Let ๐ฅ and ๐ฆ be the number of $5 tickets sold and the number of $7 tickets sold, respectively. Our Diophantine equation to solve is 5๐ฅ + 7๐ฆ = 258.
(6)
By Euclidโs algorithm, 5 โ
3 + 7 โ
(โ2) = 1. Therefore one solution to Equation (6) is ๐ฅ0 = 3 โ
258 = 774 and ๐ฆ0 = โ2 โ
258 = โ516. By Equation (5) (with ๐ = โ๐ก), solutions to Equation (6) are given by ๐ฅ = 774 โ 7๐ โฅ 0
and
๐ฆ = โ516 + 5๐ โฅ 0,
since we cannot sell a negative number of tickets of either kind. These two inequalities can be written as 774 516 ๐ โค โ 110.57 and ๐ โฅ โ 103.2. 7 5 Thus we have solutions to Equation (6) whenever 104 โค ๐ โค 110. Table 6 gives the ticket sales as ๐ ranges from 104 to 110. Observe that the total number of tickets could be any even integer from 38 through 50. โข The next example is more challenging. Example 27: A classic Diophantine coconut problem. Five sailors are marooned on a tropical island. They pile coconuts in a heap during the day and agree to divide them equally at sunrise. During the night, sailor 1 wakes, divides the nuts into five equal piles with one left over, which he gives to a friendly monkey; he hides one pile, combines the rest into a single heap, and retires. Subsequently, sailor 2 wakes and does the same thing, as do the third, fourth, and fifth sailors.
The Diophantine solution
87
At sunrise, the remaining pile of coconuts (less one) is divisible by 5. Find the least possible number ๐ of coconuts in the original pile. Solution. Let ๐, ๐, ๐, ๐, and ๐ be the number of coconuts that the respective sailors hid. Then we have six equations: ๐ = 5๐+1, 4๐ = 5๐+1, 4๐ = 5๐+1, 4๐ = 5๐+1, 4๐ = 5๐+1, 4๐ = 5๐+1. Observe that we can eliminate the variables ๐ through ๐ by replacing them with an equivalent expression in terms of ๐. That is, 42 ๐ = 5(4๐) + 4 = 5(5๐ + 1) + 4 = 52 ๐ + 9, and so on. Thus the six equations can be replaced with a single Diophantine equation: 45 ๐ โ 56 ๐ = 11529. (7) 5 By Euclidโs algorithm, 4 ๐ฅ โ 56 ๐ฆ = 1 gives ๐ฅ = โ4776 and ๐ฆ = โ313. Thus ๐0 = โ4776 โ
11529 and ๐0 = โ313 โ
11529 is a solution to Equation (7), which means that any solution must be of the form ๐ = ๐0 + 56 ๐ก and
๐ = ๐0 + 45 ๐ก,
where ๐ก is an integer. The least value of ๐ก for which both ๐ and ๐ are nonnegative is ๐ก = 3525. So the least value of ๐ is ๐ = ๐0 + 56 โ
3525 = 15621. Rather than using Euclidโs algorithm to find a particular solution to Equation (7), a clever way to do so is to let ๐0 = โ4 coconuts. What? A negative number of coconuts? Yes, because sailor 1 rises, gives 1 coconut to the monkey (from the pile of โ4 coconuts), so there are now โ5 coconuts in the pile which he splits into fifths. He hides ๐ = โ1 coconut and puts the remaining โ4 coconuts in a pile. Aha, a fixed point! The other sailors do likewise, giving ๐ = โ1 = ๐ = ๐ = ๐ = ๐. Thus, ๐ = โ4 + 56 ๐ก, and the least positive value of ๐ is at ๐ก = 1, namely, ๐ = โ4 + 56 = 15621. โข Example 28: Solving a Diophantine equation via continued fractions. As a prelude to Chapter IX, we solve the Diophantine equation 532๐ฅ + 1193๐ฆ = 2 via simple continued fractions. 532 Let ๐น = . By Definition 1 of the Introduction, and from Example II.4, 1193 the simple continued fraction for ๐น is 532 1 ๐น = [0; 2, 4, 8, 16] = . = 1 1193 2+ 1 4+ 1 8+ 16 Now consider the convergents ๐ถ1 , ๐ถ2 , and ๐ถ3 : 4 33 1 1 1 = = , ๐ถ1 = , ๐ถ2 = ๐ถ3 = . 1 1 2 9 74 2+ 2+ 1 4 4+ 8
88
Chapter III: GCDs and Diophantine Equations 33
The penultimate convergent ๐ถ3 = gives us a way to find a particular solution to 74 the Diophantine equation. (In general, this result holds for other linear Diophantine equations because successive convergents are Farey neighbors, as will be seen in Proposition IV.15 and Lemma IX.17.) Observe that 532โ
(โ74)+1193โ
33 = 1. Thus we know that ๐ฅ0 = 2(โ74) = โ148 and ๐ฆ0 = 2 โ
33 = 66 is a solution to our equation. By Proposition 25, any solution to the equation is given by ๐ฅ = โ148 + 1193๐ก
and
where ๐ก โ โค.
๐ฆ = 66 โ 532๐ก, โข
A litmus test for Euclidโs solution As we have seen, applying Euclidโs algorithm to relatively prime integers ๐ and ๐ with 0 < ๐ < ๐ yields a specific pair of integers ๐ฅ = ๐ฅ0 and ๐ฆ = ๐ฆ0 such that ๐๐ฅ + ๐๐ฆ = 1, even though there are an infinite number of solutions to that Diophantine equation. For example, with ๐ = 5 and ๐ = 11, โ2 โ
5 + 1 โ
11 = 1 = 9 โ
5 โ 4 โ
11. Since there are an infinite number of solutions to ๐๐ฅ + ๐๐ฆ = 1, how can we recognize which solution Euclidโs algorithm will produce? The following litmus test is due to Rankin [121]. Definition 29: Euclidean pair. We say that {๐ฅ0 , ๐ฆ0 } is a Euclidean pair of integers for the relatively prime integers ๐ and ๐, 0 < ๐ < ๐, if Euclidโs algorithm generates the linear combination ๐๐ฅ0 + ๐๐ฆ0 = 1. Proposition 30: Rankinโs litmus test. Let ๐ and ๐ be relatively prime with 0 < ๐ < ๐. Then {๐ฅ, ๐ฆ} is the Euclidean pair for ๐ and ๐ if and only if ๐๐ฅ + ๐๐ฆ = 1, |๐ฆ| โค ๐/2, |๐ฅ| โค ๐/2, and at least one of the preceding two inequalities is a strict inequality. Proof. To prove this proposition we apply induction on the number ๐ of times the division algorithm is used in Euclidโs algorithm before generating a zero remainder. Let {๐ฅ, ๐ฆ} be a Euclidean pair for ๐ and ๐. For ๐ = 1, the only time a zero remainder arises on the first division is when ๐ = 1; by definition, {1, 0} is the Euclidean pair for ๐ = 1 and ๐ โฅ 2; observe that 1 โค ๐/2 and 0 < ๐/2. Assume that the litmus test is true for some integer ๐ โฅ 1 when applying Euclidโs algorithm to any two relatively prime positive integers 0 < ๐ < ๐ for which ๐ divisions occur before attaining a zero remainder. Suppose that Euclidโs algorithm requires ๐ + 1 divisions to attain a zero remainder for the relatively prime integers 0 < ๐ < ๐. The requirement of ๐ + 1 divisions forces ๐ to be at least 2. By the division algorithm we have ๐ = ๐๐+๐, where ๐ is a positive integer and 0 โค ๐ < ๐. But ๐ โฅ 1, because Euclidโs algorithm needs ๐ + 1 divisions to attain a zero remainder. Let {๐ฅ, ๐ฆ} be the Euclidean pair for the relatively prime
Clock arithmetic
89
integers ๐ and ๐. By the inductive hypothesis, ๐๐ฅ+๐๐ฆ = 1, |๐ฆ| โค ๐/2, and |๐ฅ| โค ๐/2. Substituting ๐ = ๐ โ ๐๐, we have 1 = ๐๐ฆ + ๐ฅ(๐ โ ๐๐) = ๐(๐ฆ โ ๐๐ฅ) + ๐๐ฅ. Furthermore, |๐ฅ| โค
๐๐ + ๐ ๐ ๐ ๐ ๐ and |๐ฆ โ ๐๐ฅ| โค |๐ฆ| + ๐|๐ฅ| โค + ๐( ) = = . 2 2 2 2 2
Since ๐ and ๐ cannot both be even, at least one of these latter two inequalities is a strict inequality. Finally, suppose that for the relatively prime integers ๐ and ๐, 0 < ๐ < ๐, there exist integers ๐ฅ1 and ๐ฆ1 for which ๐๐ฅ1 + ๐๐ฆ1 = 1, |๐ฆ1 | โค ๐/2, |๐ฅ1 | โค ๐/2, and at least one of the latter two inequalities is strict. Euclidโs algorithm produces two integers ๐ฅ0 and ๐ฆ0 with ๐๐ฅ0 + ๐๐ฆ0 = 1, |๐ฆ0 | โค ๐/2, and |๐ฅ0 | โค ๐/2, where at least one of the two inequalities is strict. If ๐ฅ0 = ๐ฅ1 and ๐ฆ0 = ๐ฆ1 , we are done. Otherwise the Diophantine algorithm says that any solution to ๐๐ฅ + ๐๐ฆ = 1 is given by ๐ฅ = ๐ฅ0 + ๐๐ก and ๐ฆ = ๐ฆ0 โ ๐๐ก for some integer ๐ก. Thus, ๐ฅ1 = ๐ฅ0 + ๐๐ก0 and ๐ฆ1 = ๐ฆ0 โ ๐๐ก0 for some integer ๐ก0 โ 0, which means that ๐ | | |๐ฅ1 | = |๐ฅ0 + ๐๐ก0 | โฅ ||๐ฅ0 | โ ๐|๐ก0 || = ๐|๐ก0 | โ |๐ฅ0 | โฅ ๐ โ |๐ฅ0 | โฅ . | | 2 ๐
Similarly, |๐ฆ1 | โฅ , a contradiction. 2
Clock arithmetic If in our study of Diophantine equations ๐๐ฅ + ๐๐ฆ = ๐ we restrict ๐ to have a fixed value, we are then studying what is called modular arithmetic. For example, given a bungee cord of length ๐ and a wheel or clock of circumference ๐ with tick marks at successive integer arc lengths around the wheel labeled clockwise 0 through ๐ โ 1, imagine stretching the cord by a factor of ๐ฅ. Now wrap this cord clockwise around the wheel with one end fixed at tick mark 0. For what ๐ฅ value will the other end of the cord of length ๐๐ฅ be at ๐? That is, given a starting point ๐ and knowing that ๐ is some tick mark on the wheel, how many steps of size ๐ around the wheel must we take before landing precisely on ๐? Definition 31: Modular arithmetic. Let ๐ โ โค+ , and let ๐, ๐ โ โค. We say that ๐ and ๐ are equivalent modulo ๐, denoted by ๐ โก ๐ mod ๐, if ๐ divides ๐ โ ๐. We say that integer ๐ is a primitive residue modulo ๐ if 0 โค ๐ < ๐. When we write ๐ mod ๐ we mean the primitive residue equivalent to ๐ modulo ๐.
90
Chapter III: GCDs and Diophantine Equations
The reader should check that relation โก is an equivalence relation on โค. In general, any primitive residue ๐ is the unique smallest nonnegative integer in its equivalence class modulo ๐. The reader may further check that adding and multiplying modulo ๐ are well-defined operations on equivalence classes. For example, modulo 11, an integer equivalent to 5 multiplied by an integer equivalent to 7 is an integer equivalent to 2 because 35 = 3 โ
11 + 2, and so on. To show the utility of this idea, we construct a simple cryptographic scheme for encoding secret messages. Example 32: A clock cryptosystem. To encode messages using the English alphabet of 26 letters, let ๐ = 26. In this context, we identify each alphabet letter with a primitive residue 0 through 25 as indicated by the first two columns of Table 7. The third column of the table contains the primitive residue modulo 26 for the product of 7 and the entry in the second column. If ๐๐ is entry ๐ in the third column, then letter ๐ in the fourth column is letter ๐๐ of the alphabet. For example, the letter ๐ธ corresponds to integer 5, which when multiplied by 7 is 35, which is equivalent to 9 modulo 26. Thus we encode letter ๐ธ by the letter ๐ผ. Therefore the word HELLO is encoded as DIFFA. โข To decode a message with respect to the cryptosystem of Example 32, we must undo a multiplication by 7. One way to accomplish this task is to read Table 7 backwards. For example, to decode the letter ๐ด, we find its location in the fourth column of the table and read across to the first column to get the letter O. But how can we decode without using the table? As in โ where the multiplica1 tive inverse of 7 is , we seek the multiplicative inverse of 7 modulo 26. If such a 7 number exists, it will be some primitive residue from 0 through 25. Which one is it? Definition 33: Modular multiplicative inverses.8 Let ๐ โ โค+ and ๐, ๐ โ โค. We say that ๐ is the multiplicative inverse of ๐ modulo ๐, denoted by ๐ = ๐โ1 , if ๐๐ โก 1 mod ๐. For a given ๐ โ โค+ , some integers have no modular multiplicative inverses. Proposition 34: Inverse existence. Let ๐, ๐ โ โค with ๐ โ 0 and ๐ โฅ 2. Then ๐โ1 exists modulo ๐ if and only if ๐ and ๐ are relatively prime. Proof. Observe that ๐ and ๐ are relatively prime if and only if ๐๐ฅ + ๐๐ฆ = 1 has a solution ๐ฅ0 and ๐ฆ0 , if and only if ๐๐ฅ0 โก 1 mod ๐ for some integer ๐ฅ0 . 8 Code 4 in Appendix III shows how a CAS can be used to solve equations of the form ๐๐ฅ โก ๐ mod ๐.
Clock arithmetic
91
Table 7. Enciphering the alphabet via multiplication modulo 26. plain letter A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
letter value 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0
code value 7 14 21 2 9 16 23 4 11 18 25 6 13 20 1 8 15 22 3 10 17 24 5 12 19 0
code letter G N U B I P W D K R Y F M T A H O V C J Q X E L S Z
Example 35: A continuation of Example 32. Applying Proposition 34 to ๐ = 26, observe that the only primitive residues having multiplicative inverses are 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25. As the reader may check, the multiplicative inverses of these numbers are as given in Table 8. In particular, we review how to find the multiplicative inverse Table 8. Inverses modulo 26. ๐ ๐ mod 26 โ1
1 1
3 9
5 21
7 9 11 15 15 3 19 7
17 19 23 11
21 5
23 25 17 25
of 7. By Euclidโs algorithm, 1 = 7 โ
(โ11) + 26 โ
(3) โก 7 โ
(โ11) mod 26 โก 7 โ
15 mod 26.
92
Chapter III: GCDs and Diophantine Equations
So the multiplicative inverse of 7 is 15. To decode a message such as WAABNSI, we multiply ๐ by 15 modulo 26 and get 23 โ
15 โก 7 mod 26. Thus ๐ decodes as ๐บ. Continuing this process yields the plain text message GOODBYE. โข
Systems of Diophantine equations In honor of an old tradition exemplified by early Chinese brainteasers dating back to the first century involving systems of linear Diophantine equations, the following proposition used to solve them is known as the Chinese remainder theorem. Proposition 36: The Chinese remainder theorem. Given a set of ๐ pairwise relatively prime positive integers ๐๐ , 1 โค ๐ โค ๐, the system of ๐ equations ๐ฅ โก ๐
๐๐ mod ๐๐ with ๐๐ โ โค has a unique solution ๐ฅ mod ๐ where ๐ = ฮ ๐๐ . ๐=1
Proof. Let ๐๐ = ๐/๐๐ , 1 โค ๐ โค ๐. By hypothesis, gcd(๐๐ , ๐๐ ) = 1. Consider the equations ๐๐๐ง โก 1 mod ๐๐ . (8) Multiplying Equation (8) through by the multiplicative inverse of ๐๐ modulo ๐๐ gives the unique solution ๐ฅ๐ to Equation (8) with 0 โค ๐ฅ๐ < ๐๐ . Let ๐
๐ฅ = โ ๐๐ ๐๐ ๐ฅ๐ .
(9)
๐=1
Since ๐๐ โก 0 mod ๐๐ whenever ๐ โ ๐, we have ๐ฅ โก ๐๐ ๐๐ ๐ฅ๐ mod ๐๐ for all ๐ with 1 โค ๐ โค ๐. Furthermore, since ๐๐ ๐ฅ๐ โก 1 mod ๐๐ , ๐ฅ โก ๐๐ mod ๐๐ . So ๐ฅ is a solution to the system of ๐ equations. To show uniqueness, let ๐ฅฬ be another solution. Then ๐๐ |(๐ฅ โ ๐ฅ), ฬ which means that ๐|(๐ฅ โ ๐ฅ), ฬ which means that ๐ฅ โก ๐ฅฬ mod ๐. Example 37: A pirate puzzle from ancient China. Seventeen pirates steal a chest of gold coins. Dividing the treasure into equal portions leaves a remainder of three coins. Fighting over who should get these coins leaves a dead pirate. Equal division again leaves a remainder of ten coins. Fighting again leaves another dead pirate. This time equal division has no remainder. Find the least number of possible booty coins. Solution. With respect to the Chinese remainder theorem, the puzzle involves three equations, ๐ฅ โก 3 mod 17,
๐ฅ โก 10 mod 16,
and ๐ฅ โก 0 mod 15
so that ๐1 = 17, ๐2 = 16, ๐3 = 15, ๐1 = 3, ๐2 = 3, and ๐3 = 0. Solving the system 16 โ
15๐ฅ1 โก 1 mod 17,
17 โ
15๐ฅ2 โก 1 mod 16,
and ๐ฅ3 โก 17 โ
16 โก 1 mod 15
A problem from Diophantusโs Arithmetica
93
gives ๐ฅ1 = 9, ๐ฅ2 = 15, and ๐ฅ3 = 8. Therefore ๐ฅ โก 3(16 โ
15)9 + 10(17 โ
15)15 + 0(17 โ
16)8 โก 44730 mod 4080 โก 3930. Thus the minimum number of gold coins is 3930.
โข
The totient is multiplicative Let ๐ be the totient function of Definition I.16. As promised in Chapter I, armed with the notion of greatest common divisor, we can show that ๐ is multiplicative, namely, that ๐(๐๐) = ๐(๐)๐(๐) whenever ๐ and ๐ are relatively prime. But first we state a cancellation property of modular arithmetic, whose proof we leave as an exercise. Proposition 38: A modular cancellation property. Let ๐๐ + ๐ โก ๐๐ + ๐ mod ๐, where ๐ โ โค+ and ๐, ๐, ๐, ๐ โ โค with gcd(๐, ๐) = 1. Then ๐ โก ๐ mod ๐. Proposition 39: Eulerโs phi function. Let ๐ and ๐ be relatively prime positive integers. Then ๐(๐๐) = ๐(๐)๐(๐). Proof. Observe that an integer ๐ is relatively prime to ๐๐ if and only if ๐ is relatively prime to both ๐ and ๐. Let ฮฆ(๐) be the number of elements in the set ๐ that are relatively prime to ๐๐ so that ๐(๐๐) = ฮฆ({1, 2, โฆ , ๐๐}). By intersecting {1, 2, โฆ , ๐๐} with the equivalence classes of integers modulo ๐, we decompose the set {1, 2, โฆ , ๐๐} into the disjoint union of the sets ๐๐ = {๐๐ + ๐| 0 โค ๐ < ๐}, 0 โค ๐ < ๐. By our previous observation, if gcd(๐, ๐) โ 1 then gcd(๐๐, ๐๐ + ๐) โ 1, so ฮฆ(๐๐ ) = 0. Suppose that gcd(๐, ๐) = 1. By our earlier observation again, ฮฆ(๐๐ ) is the number of elements of ๐๐ that are relatively prime to ๐. Since gcd(๐, ๐๐ + ๐) = gcd(๐, (๐๐ + ๐) mod ๐) and since, by Exercise 5d, {(๐๐ + ๐) mod ๐| 0 โค ๐ < ๐} = {0, 1, 2, โฆ , ๐ โ 1}, we conclude that ฮฆ(๐๐ ) = ฮฆ({0, 1, 2, โฆ , ๐ โ 1}) = ๐(๐). Since there are ๐(๐) values of ๐ for which ฮฆ(๐๐ ) โ 0 and for each such ๐, ฮฆ(๐๐ ) = ๐(๐), we conclude that ๐(๐๐) = ฮฆ({1, 2, โฆ , ๐๐}) = ๐(๐)๐(๐).
A problem from Diophantusโs Arithmetica To close this chapter, we showcase a typical problem from the Arithmetica. Example 40: Diophantus Problem 24 from Book I.โ Find three numbers such that if each receives a given fraction of the sum of the other two, the results are all equal. Let it be required that the first number receives a third of the sum of the two remaining numbers, the second receives a fourth of the sum of the two
94
Chapter III: GCDs and Diophantine Equations
remaining numbers, the third receives a fifth of the sum of the two remaining numbers, and the resulting numbers are equal. Solution. Let ๐ be the common value of all three sums, and let ๐ฅ, ๐ฆ, and ๐ง be the three numbers. In todayโs algebra we write the three sums as 1 1 1 ๐ = ๐ฅ + (๐ฆ + ๐ง), ๐ = ๐ฆ + (๐ฅ + ๐ง), and ๐ = ๐ง + (๐ฅ + ๐ฆ). 3 4 5 This linear system of three equations with four unknowns can be replaced with three equations each of which involves ๐ and one of ๐ฅ, ๐ฆ, and ๐ง. Doing so gives 13๐ = 25๐ฅ,
17๐ = 25๐ฆ,
and 19๐ = 25๐ง.
Diophantus gives but one solution, namely, ๐ฅ = 13, ๐ฆ = 17, ๐ง = 19, and ๐ = 25. But any rational multiple of this solution set gives a valid rational solution set to the problem. โข Exercises 1. (a) A mother has five daughters and 25 trees. Tree ๐ produces ๐ baskets of figs each year, 1 โค ๐ โค 25. How may she partition the trees so that each daughter has four trees and each daughterโs total fig production is the same? Table 9. Two Sudoku puzzles. 8 6 3 2 9 4 5 7 1 a.
1 2 6 4 3 5 7 9 4 7 9 2 5 1 8 3 9 5 1 8 7 2 6 4 7 6 3 1 4 8 9 5 8 3 5 7 2 6 4 1 5 1 8 6 9 3 2 7 3 4 2 9 6 7 1 8 2 8 4 5 1 9 3 6 6 9 7 3 8 4 5 2 A completed Sudoku puzzle.
5
6 4
9
7
6 9 8
5 3 8 7 6 2 1 2 3 4 8 4 2 3 8 9 1 4 5 3 9 5 4 b. A Sudoku puzzle.
(b) Use the completed Sudoku puzzle in Table 9a to generate another solution to the Mecca problem. (c) Complete the Sudoku puzzle in Table 9b to generate another solution to the Mecca problem. (d) The landowner of the Mecca problem labeled his trees 1 to 81 according to their fruitfulness. On a sandy region of his orchard, he drew a 9ร9 grid. After much trial and error he succeeded in entering all 81 integers into the grid so that the column sums were all the same. Thus son 1 receives
Exercises
95
the trees labeled in the first column, son 2 receives the trees labeled in the second column, and so on. As he was admiring his solution, an infrequent rain shower rendered some numbers illegible. He recovered the first row easily enough. But what about the empty cells in the grid of Table 10? Can you help him recover his solution? Table 10. A Mecca problem puzzle. 1
2
3 15
4
28 43
30
5 6 16 17
26 45 47 60 75
7
8
9
22 38 51 49 57
48 56 71 68
31
69 80
41 58 64
73
78
2. Suppose Ali and Mweni have 16 children. Using hexadecimal notation, label them 1, 2, 3, 4, 5, 6, 7, 8, 9, ๐ด, ๐ต, ๐ถ, ๐ท, ๐ธ, and ๐น. They also have 162 trees, and tree ๐ produces ๐ baskets of figs annually. How may Ali and Mweni partition the trees equitably? Write your answer in hexadecimal form, remembering for example that the decimal integer 256 is the hexadecimal string 100. 3. Mo and Hanna have 25 children. To pose a 25 ร 25 Mecca problem they use a base 26 numbering system. In this system, ๐ด is worth 1, ๐ต is worth 2, ๐ถ is worth 3, and so on, so that letter ๐ is worth 25. The letter ๐ represents zero. Any integer up to 625 can be written using at most two of these symbols. For example, the integer symbolized by NM is 377 (being 26 โ
14 + 13). Again as in Exercise 1d, rain has eradicated some of the symbols in the 25 ร 25 array of Table 11. Complete the table. 4. Besides the plaited mat pattern as exemplified in Figure 3, the Cockwe people have many more such patterns. Some of these involve placing extra mirrors in an array of dots. In particular, we place a horizontal (double-sided) mirror between each dot in even numbered columns. For example, Figure 9a shows a 5 ร 3 grid with four mirrors placed in the second and fourth columns. The rules for sand drawing are the same as before, but now we have more reflective surfaces. The result is called a lionโs stomach. Figure 9b shows the completed sona drawing. (a) Draw a 7 ร 5 and a 9 ร 5 lionโs stomach.
96
Chapter III: GCDs and Diophantine Equations Table 11. A 25 ร 25 Mecca problem challenge.
A
B
C
D
BN CD DF
BG CC
BP CV
BO CJ DJ
E AS BU
DU EO FJ
EU GN HO HU IT
MD MX NN PB PK
LP ND OE
HL IE IU
LO
KD KX LX
RQ
UW WZ
WQ
IQ KB LL
ID JH
H AD
CM DQ ER FZ FX HZ IJ
CS
I
J
K AI
L
BQ BX DN
DI
DP
DL EC
EB FD GB HP
SE
PX QT SB
TM VZ WD
UR VH WU
O
BW CT
BZ CB
CF
EF FI GZ HH
LS NJ NR PC
NG NP
NA
RU SU UP
UL
VP XA
WF
WR
NE
QC QS RV
SW UD
UZ UO
VN
T
CE
EW GP HJ
JP KU LW NI
OF
RE
S
U AH
V AC
CP
CN
W AA
EZ
PH RG
R
JI
KM LA
MZ MW
Q AE BS
FN GG
HS JF JX
P
X
Y
BD
BH
EJ
EG FK
DD
GE
QE RB RP TG VB VD
N
GU
KC KQ
RF RI SM
M
FP
NL OS QH
SS TX UK
GL HI
G
NC
QY SL
F AP
PR QI RS TW VA
VK
KP ML MV OC OU
LZ
FQ
ST TI UJ
FR GK GY
HV IY
IG JD
HW JC
KA
LD MH MO OJ OP PJ
OA OY PN
QJ SC
RO
SA
TO
TX
MM OH OQ PV
VY
EX GD GT
KN
RC SK TQ
FC GF HB IM JG
MG
TE UY VL
MI MN
OG QG QR RJ SR
QU
MT NM
PI QB QQ RN TZ UC
SJ TF
UV
WV
XZ
WI
VM WE
WJ
(b) How many loops are needed to complete an ๐ ร ๐ lionโs stomach? Experiment with various values of ๐ and ๐.
a.
b.
Figure 9. A sona lion stomach. (c) Generate the sona drawing associated with the dot-and-mirror configuration of Figure 10, which Gerdes [55] refers to as a chased chicken design. 5. (a) Let ๐, ๐ โ โค+ . Show that gcd(๐, ๐) = gcd(๐ mod ๐, ๐). (b) If ๐๐ฅ = ๐๐ฆ and gcd(๐, ๐) = 1, show that ๐|๐ฆ and ๐|๐ฅ. (c) Show that gcd(๐๐, ๐) = 1 if and only if gcd(๐, ๐) = 1 = gcd(๐, ๐), where ๐, ๐, and ๐ are positive integers. (d) Let gcd(๐, ๐) = 1 and let ๐ be an integer with 0 โค ๐ < ๐. For each integer ๐ with 0 โค ๐ < ๐, show that there is an integer ๐ that solves the equation ๐ โก ๐๐ + ๐ mod ๐ .
Exercises
97
Figure 10. A chased chicken. | | (e) Show that |๐ฅ + ๐ฆ| โฅ ||๐ฅ| โ |๐ฆ|| for all ๐ฅ, ๐ฆ โ โ. | | (f) Show that the geometric mean of two different positive real numbers ๐ and ๐ is less than the arithmetic mean of the numbers. That is, show that โ๐๐ < ๐+๐ . 2
6. (a) Using the encoding scheme of Example 4, encode the phrase, โFor the Cokwe, these drawings are their writings.โ (b) Using this same scheme, decode IGUD BGS JDGJ HGCCIC CA JAA BKCGHHIGV JDI UAFFIUJKXI HGCJ. (c) Decode the message below, which was encoded using multiplication by 5 mod 26. QERTILEBNQ NEFY JYYR NERTYT TWKR VNLWAIN E DYK MYR WFYL MERU IYRYLEVSWRQ 7. Solve this problem of Diophantus, Problem 29 from Book I: Find two numbers such that their sum and the difference of their squares are given numbers. Let it be required that the sum of the numbers is 20 and the difference of their squares is 80. 8. Solve this puzzle from Brahmagupta (circa 650 ad) [112]: An old woman goes to market and a horse steps on her basket and crushes the eggs. The rider offers to pay for the damages and asks her how many eggs she had brought. She does not remember the exact number, but when she had taken them out two at a time, there was one egg left. The same happened when she picked them out three, four, five, and six at a time, but when she took them seven at a time they came out even. What is the smallest number of eggs she could have had?
98
Chapter III: GCDs and Diophantine Equations
9. Solve this Trattato dโArithmetica puzzle attributed to Paolo dellโAbbaco, circa 1370 [146]: A man sent one of his children to a garden to fetch seven apples, saying: โYou will find three gatekeepers, each of whom will say: โI want half of all your apples and two more from those which remain after the division.โ I want to know how many have to be taken at the beginning, so that seven will remain at the end.โ 10. Solve this puzzle from the 850 ad Indian collection of puzzles, Ganita-sฤrasaแน
graha of Mahฤvฤซra [146]: When a certain man brought mango fruits home, his elder son took one fruit first and then half of what remained. After the elder son did this, the younger son did similarly with what was left there. He further took half of what was thereafter left; and the other son took the other half. Find the number of fruits brought by the father.
Strand IV: Fractions in the Pythagorean Scale As an application of fractions, the subject of this next chapter, we look at how the musical scale developed. Among the discoveries attributed to Pythagoras is the Pythagorean scale. According to Iamblichus, a fourth-century philosopher who wrote at length about this legendary mathematician, one day Pythagoras walked by a blacksmith shop where he heard hammers beating on iron. At the forge, he realized that some combinations of hammers sounding simultaneously produced pleasant harmony, whereas other combinations of hammers produced merely noise.
Figure 1. Pythagoras at the lyre, an old woodcut. Iamblichus continues the legend, saying that Pythagoras then experimented with various amounts of water in vessels, various lengths of pipes, and various lengths of strings on an instrument with a moveable bridge allowing for careful measurement of musical ratios. In Figure 1, Pythagoras is plucking strings of the same lengths where the strings are stretched at one end by distinct weights. He 99
100
Strand IV: Fractions in the Pythagorean Scale
concluded that sequences of tones based on low-integer relationships produced pleasing harmony. In particular, any musician will notice that changing the length of a vibrating string will change its tone. For example, consider a violin whose strings have unit length, with endpoints 0 and 1. Let ๐ก be a real number between 0 and 1. We say that a string is clamped at ๐ก if the string has been depressed (onto the violinโs fingerboard) at point ๐ก.1 Hence an unclamped string is a string that has not been 1 clamped anywhere between 0 and 1. When a vibrating string is clamped at ๐ก = , 2 the sound produced has twice the frequency (an octave above) of the unclamped string. In general, when the string is depressed at ๐ก, the sound produced by the 1 vibrating string of length ๐ก is times the frequency of the unclamped string. ๐ก Let ๐0 be the unit tone, tone 1 (frequency 1), produced by an unclamped string of length 1. (Throughout this discussion, the string is held at constant tension.) Let ๐1 be tone 2 (frequency 2), produced by the unclamped string of 1 length . Pythagoras wished to design a finite sequence of tones ๐0 = ๐1 < ๐2 < 2 โฏ < ๐๐ = ๐1 so that, like successive rungs in a ladder, the notes from ๐1 through ๐๐ sound as if they progress in equal increments from the unit tone to an octave above the unit tone. Pythagoras devised a method to approximate this idea where ๐ = 13 so that the tones progress in 12 increments. Before we show how he did this, we first pause to discuss how we might name these thirteen notes.
A note-naming interlude Consider the tone progression ๐ค = ๐1 -๐2 -๐3 -๐4 -๐5 -๐6 -๐7 -๐8 -๐9 -๐10 -๐11- ๐12 -๐13 . How could Pythagoras have given them more appealing names? Since the first and the last notes of ๐ค should be named the same because they are an octave apart, Pythagoras has twelve notes to name. He could have used the first twelve letters of the Greek alphabet. So his twelve notes followed by ๐ผ would be ๐ผ, ๐ฝ, ๐พ, ๐ฟ, ๐, ๐, ๐, ๐, ๐, ๐
, ๐, ๐, ๐ผ. This progression of notes forms what is called a chromatic scale (where the last ๐ผ is played an octave above the initial ๐ผ). Because the last note is twice the frequency of the first note, such a scale sounds like a complete musical phrase to the human ear. However, other progressions that skip some notes also form complete musical phrases to the ear. In Pythagorasโs day, the customary progression choice was what we call a minor scale. The sequence of notes in the minor scale starting with ๐ผ are ๐ผ, ๐พ, ๐ฟ, ๐, ๐, ๐, ๐, ๐ผ, which we rename as the sequence ๐ด, ๐ต, ๐ถ, ๐ท, ๐ธ, ๐น, ๐บ, ๐ด. See Table 1. By 1 To produce a somewhat ethereal effect, a violinist sometimes lightly touches a vibrating string at various places rather than clamping the string.
A note-naming interlude
101
Figure 2. A fingerboard to infinity, pencil sketch by author. custom, the notes in the chromatic scale not included in this ๐ด minor scale are called ๐ฝ โก ๐ดโฏ , ๐ = ๐ถ โฏ , ๐ โก ๐ทโฏ , ๐
โก ๐น โฏ , and ๐ โก ๐บ โฏ . Thus a minor scale has eight notes, and the first and last notes are an octave apart.2 Since the chromatic scale has thirteen notes, there are twelve intervals between them. By custom, each of these intervals is called a half-step or a semitone. Thus, a scale spans six steps. When some people hear an ๐ด minor scale, they may experience a melancholy, reflective, somber, or spooky sensation. As musical tastes changed over the years from Pythagorasโs day, musicians tended to favor scales that induced a 2 When a musician composes a melody in a certain key, the notes in the melody are restricted to the eight notes in that key or scale. To interject tension or surprise into the melody, the composer sometimes inserts one or more of the other five notes. By custom, these notes are called accidentals, a word vaguely suggesting that they have been included in the piece by serendipitous accident.
102
Strand IV: Fractions in the Pythagorean Scale Table 1. Naming the notes in the Pythagorean chromatic scale.
Pythagorean notes ๐ผ ๐ฝ Notes in ๐ minor ๐ด Notes not in ๐ minor ๐ดโฏ
๐พ ๐ต
๐ฟ ๐ถ
๐
๐ ๐ท
๐ถโฏ
๐
๐ ๐ธ
๐ ๐น
๐ทโฏ
๐
๐นโฏ
๐ ๐บ
๐
๐ผ ๐ด
๐บโฏ
bright, sweet, festive sensation. With respect to the ๐ด minor scale, they changed a few notes. The result was the ๐ด major scale: ๐ด๐ต๐ถ โฏ ๐ท๐ธ๐น โฏ ๐บ โฏ ๐ด. The one major scale that uses no sharps is the ๐ถ major scale: ๐ถ๐ท๐ธ๐น๐บ๐ด๐ต๐ถ. Its progression of semitones and whole tones from ๐ถ to ๐ถ is exactly the same as the progression of semitones and whole tones from ๐ด to ๐ด in the ๐ด major scale. It is for this reason (the absence of sharps) that we identify tone 1 (๐0 ) with ๐ถ0 , or simply ๐ถ, and tone 2 (๐1 ) with ๐ถ1 (equivalently, frequency 1 with ๐ถ0 and frequency 2 with ๐ถ1 ) for the rest of this strand and for Strand V.
How Pythagoras generated his scale To add a note to his scale between ๐ถ0 and ๐ถ1 , Pythagoras experimented with the 2 tone produced when the string of length vibrates, so generating a tone with 3
3
frequency . He discovered that this tone played together with ๐ถ0 produced a 2
3
pleasant-sounding chord. What note is this one? Since tone is half-way between 2 tone 1 and tone 2, perhaps it should be the note in the middle of the thirteennote chromatic scale. In the key of ๐ถ major, the middle note is ๐น โฏ (because ๐น โฏ is the middle note of the chromatic ๐ถ scale, ๐ถ๐ถ โฏ ๐ท๐ทโฏ ๐ธ๐น๐น โฏ ๐บ๐บ โฏ ๐ด๐ดโฏ ๐ต๐ถ). But no. 3 The note with frequency belongs in the ๐ถ major scale because it sounds so 2
3
well when played with ๐ถ. So custom has dictated that this note of frequency 2 is ๐บ. The sound of ๐ถ and ๐บ played together, denoted as chord ๐ถ๐บ, is called a fifth because there are five notes of the ๐ถ major scale between ๐ถ and ๐บ. From this fifth, Pythagoras generated other fifths, creating a circle of fifths as shown in Figure 3, progressing counterclockwise to higher and higher tones about the circle. Alternatively, proceeding clockwise to higher and higher tones about this same circle gives a succession of fourths such as ๐ถ๐น. One way to generate the fractions corresponding to the notes of the Pythagorean scale is to use a geometric sequence and equivalence classes. We say that tones ๐ and ๐ are equivalent to one another if the ratio of their frequencies is some integer power of two. For example, the tones equivalent to ๐ถ are all those tones obtained by successively doubling or halving the frequency of ๐ถ. We say
How Pythagoras generated his scale
103
C
G
F
ction of dire th f f o o u le
A
directi
E B
A#
ircle of fifth s ec s rth
of circ on
D
D# G#
C#
F#
Figure 3. The circle of fourths and fifths. that ๐ is the canonical member of its equivalence class if 1 โค ๐ < 2. Thus ๐ถ is canonical whereas ๐ถ1 is not canonical. How can we generate other tones or notes in a scale starting from ๐ถ? Since multiplying ๐ถ by any power of two will merely give us a note equivalent to ๐ถ, we could try multiplying ๐ถ by powers of some prime ๐ other than two. The Pythagoreans chose ๐ = 3. Starting with ๐ถ = 1, we let ๐ = 3๐ ๐ถ = 3๐ where ๐ is any integer, and then find the canonical tone equivalent to ๐ . Thus the other tones in the Pythagorean scale, for โ4 โค ๐ โค 7, were taken as 1 1 1 1 (1) , , , , 1, 3, 9, 27, 81, 243, 729, 2187, 81 27 9 3 whose canonical tones are 128 32 16 4 3 9 27 81 243 729 2187 , , , , 1, , , , , , , . (2) 81 27 9 3 2 8 16 64 128 512 2048 The reason we terminate the progression in (1) is because the canonical tones given by (2) provide a more or less uniformly spaced progression of sounds from tone 1 to tone 2. To recap and to arrange (2) in increasing order, the uniformly spaced progression of twelve sounds from the chromatic Pythagorean scale are given in Table 2. Table 2. The Pythagorean scale. Tone Ratio ๐ Cents ๐(๐)
๐ถ
๐ถโฏ
๐ท
๐ทโฏ
๐ธ
๐น
๐นโฏ
๐บ
๐บโฏ
๐ด
๐ดโฏ
๐ต
๐ถ1
1
2187
9
32
81
4
729
3
128
27
16
243
2
1
2048
8
27
64
3
512
2
81
16
9
128
1
0
113.7
203.9
294.1
407.8
498
611.7
702
792.2
905.9
996.1
1109.8
1200
104
Strand IV: Fractions in the Pythagorean Scale
Now suppose we wished a musical scale to be equally tempered. That is, we want the ratio ๐ถ โฏ /๐ถ to be the same as the ratio ๐ท/๐ถ โฏ , and so on. Then ๐ท = (๐ถ โฏ /๐ถ)2 ๐ถ. Similarly, ๐ทโฏ = (๐ถ โฏ /๐ถ)3 ๐ถ, and so onโan exponential relationship. Since there are twelve half-steps in the chromatic scale from ๐ถ to ๐ถ1 , the musical world has opted to define this exponential relationship as ๐ โถ [0, 1200] โ [1, 2] with ๐(๐ฅ) = 2๐ฅ/1200 where ๐ฅ is measured in cents. Thus the cent value associated with ๐ถ is 0, and the cent value associated with an octave above ๐ถ is 1200. To create an even-tempered scale, we would choose ๐(0) = ๐ถ, ๐(100) = ๐ถ โฏ , ๐(200) = ๐ท, and so on, so that ๐(1200) = ๐ถ1 . Let ๐ = ๐(๐ฅ), the tone at parameter ๐ฅ. Inverting this exponential gives the cent value of the tone ๐ as ๐(๐) = 1200 log2 ๐. 1
Thus, for example, ๐(๐ท) = 1200 log2 (๐ท) = 1200 log2 (๐(200)) = 1200 log2 (2 6 ) = 200, and so on. However, the Pythagorean scale is not equally tempered, as illustrated in Table 2 and Figure 4. Most of the notes of the scale, indicated as dots in the figure, are not quite on the logarithmic curve ๐ฆ = 1200 log2 (๐), and the cent values for Pythagorean notes fail to be at integer multiples of 100 except at ๐ถ and ๐ถ1 .
12 hundreds of cents, x
B
C1
A G
6 E 2
F
D C
1.2
1.6
2
X
Figure 4. The Pythagorean scale arranged along a logarithmic curve ๐(๐) = 1200 log2 ๐. A perfect fifth should span ๐(1.5) โ 702.0 cents. Thus ๐ถ๐บ is a perfect fifth. But not all Pythagorean fifths are perfect. For example, from Table 2, chord ๐ถ โฏ ๐บ โฏ spans 792.2โ113.7 = 678.5 cents. Table 3 lists the spans of all Pythagorean fifths. An elegant feature of the Pythagorean scale is that all complementary fourths and fifths are nearly ideal. That is, the ideal span of a fourth and its corresponding
How Pythagoras generated his scale
105
Table 3. Spans of Pythagorean fifths. Chord ๐ถ๐บ ๐ถ โฏ ๐บ โฏ Cents 702 678.5
๐ท๐ด ๐ทโฏ ๐ดโฏ 702 702
๐ธ๐ต ๐น๐ถ ๐น โฏ ๐ถ โฏ 702 702 702
๐บ๐ท 701.9
๐บ โฏ ๐ทโฏ ๐ด๐ธ 701.9 701.9
๐ดโฏ ๐น ๐ต๐น โฏ 701.9 701.9
fifth together should be near 1200 cents. For example, the fifth CG has span 702 and the fourth G๐ถ1 has span 498, giving a total of 1200. Unfortunately, as we explore in Strand V, the Pythagorean scale fails to produce good-sounding thirds. So other scales eventually surpassed it in popularity. One particular chord is especially dissonant. Sometimes called the devilโs chord, it is between a fourth and fifth. This tri-tone spans six half-steps, and is often used in jazz music to create tension. A perfect devilโs chord such as ๐ถ๐น โฏ has ratio โ2, and its span is ๐(โ2) = 600 cents. Legends say that the early Pythagoreans believed all numbers to be rational. And it is said that a certain Pythagorean, perhaps Hippasus of Metapontum, who lived about a century after Pythagoras, demonstrated that โ2 cannot be rational3 and was shortly thereafter drowned for the impropriety. Perhaps Hippasus hummed snatches of tri-tone progressions while awaiting his judgesโ deliberations, further sealing his doom. As a final curiosity regarding the Pythagorean scale, Pliny the Elder in Book II of his Natural History (first century ad) says that Pythagoras used the semitones of his scale to describe the distances between heavenly bodies, designating the distance between Earth and the Moon as a whole tone, that between the Moon and Mercury a semitone, between Mercury and Venus the same, between her and the Sun a tone and a half [a minor triad], between the Sun and Mars a tone, between Mars and Jupiter half a tone, between Jupiter and Saturn half a tone, between Saturn and the Zodiac a tone and a half: the seven tones thus producing the so-called diapason, a universal harmony, the music of the spheres.4
3 Here is his argument: suppose that โ2 = ๐/๐ where ๐ and ๐ are relatively prime integers; then 2๐2 = ๐2 which means that 2|๐. Thus 2๐2 = 4๐2 for some integer ๐, which means that 2|๐, a contradiction. 4 In the Ptolemaic system of the universe, the planets, Sun, and stars circled Earth. Earth itself was fixed in space. As the heavenly bodies circled, they sang, at least according to the poets. Alternatively, with respect to the woodcut of Figure I.1, the rotating wheels and gears of this abstract clockwork universe, as they rubbed against each other, made universal harmony.
Chapter IV: A Tree of Fractions In previous chapters we have seen that mathematical structure is often defined in terms of simpler mathematical structures. The integer 1 is the successor of 0, 2 is the successor of 1, and so on, thus creating the natural numbers โ. Each successor is never the same as any of its predecessors. In like fashion, the principle of mathematical induction allows us to prove an infinitude of sufficiently related statements. For example, in Chapter III, we established Euclidโs algorithm to compute the greatest common divisor of any two positive integers via induction. In this chapter, we construct the set of rational numbers, โ, where โ={
๐ ๐, ๐ โ โค, and ๐ โ 0}. ๐
|
To do so, we focus on the rational numbers ๐
๐ ๐
(3)
between 0 and 1. Any other rational
number ๐ is of the form ๐ = ๐ + , where ๐ โ โค and 0 โค ๐ < ๐. ๐ Historically, we will see that the Egyptians developed their fractions directly from the positive integers. For every ๐ โ โค+ , they defined the unitary fraction 1 . We explore how they then could write any fraction as a non-repeating sum of ๐ these natural fractions. To generate the rational numbers, we could be content 1 with Equation (3). But this method creates many duplicates. For example, 2
2
3
occurs infinitely often as , , and so on. We seek a more lean method, one that 4 6 will generate fractions only in reduced form. To do so, we start with 0 and 1, and 1 generate the first true fraction , a fraction that does not belong to โ. Observe that 2
0 and 1 are the two numbers simpler than
1 2
1
that are nearest to . For this reason, 1
2
we might say that 0 and 1 are the parents of . In like fashion, each fraction 2 between 0 and 1 has two parents. How can we do this? To ask the question in reverse, given a rational number between 0 and 1, how can we find its parents? Establishing a way to accomplish these genealogical feats is the purpose of this 107
108
Chapter IV: A Tree of Fractions
chapter. As we will see in Chapter IX, this genealogical structure of the rational numbers is the key idea in the construction of continued fractions.
Unitary fractions in ancient Egypt A far older list of mathematical problems than those of Diophantus comes from the Rhind Papyrus,5 dating to about 1650 bc. The document begins: This book was copied in regnal year 33, month four of Akhet, under the majesty of the King of Upper and Lower Egypt, Awserre, given life from an ancient copy made in the time of the King of Upper and Lower Egypt, Nimaatre. The scribe Ahmose writes this copy. So this original list of problems is about 4000 years old, perhaps older. In keeping with the Egyptian tradition of writing parts of a whole as the sum of distinct 1 unitary fractionsโfractions of the form where ๐ โ โค+ โthe Rhind Papyrus ๐
2
opens with a table, which we reproduce as Table 4, on how to decompose 2๐+1 as a non-repeating unitary sum, for 1 โค ๐ โค 50. The remainder of the papyrus is a list of 84 exercises, mostly involving the manipulation of fractions. 2
Table 4. Rewriting as a sum of unitary fractions, where ๐ is ๐ an odd integer with 3 โค ๐ โค 101. ๐: parts 3: 2-6 5: 3-15 7: 4-28 9: 6-18 11: 6-66 13: 8-52-104 15: 10-30 17: 12-51-68 19: 12-76-114 21: 14-42
๐: parts 23: 12-276 25: 15-75 27: 18-54 29: 24-58-174-232 31: 20-124-155 33: 22-66 35: 30-42 37: 24-111-296 39: 26-78 41: 24-246-328
๐: parts 43: 42-86-129-301 45: 30-90 47: 30-141-470 49: 28-196 51: 34-102 53: 30-318-795 55: 30-330 57: 38-114 59: 36-236-531 61: 40-244-488-610
๐: parts 63: 42-126 65: 39-195 67: 40-335-536 69: 46-138 71: 40-568-710 73: 60-219-292-365 75: 50-150 77: 44-308 79: 60-237-316-790 81: 54-162 2
1
๐: parts 83: 60-332-415-498 85: 51-255 87: 58-174 89: 60-356-534-890 91: 70-130 93: 62-186 95: 60-380-570 97: 56-679-776 99: 66-198 101: 101-202-303-606 1
To decipher Table 4, the first entry, 3: 2-6, means = + , and so on. Some 3 2 6 of these decompositions can be obtained from the formula 2 2 ๐+1 2 2 = โ
= + , (4) ๐๐ ๐+1 ๐๐ ๐(๐ + 1) ๐๐(๐ + 1) where both ๐ and ๐ are odd integers. Since ๐ is an odd integer, both of the last two fractions in Equation (4) reduce to unitary fractions. 5 Alexander
Henry Rhind purchased this old Egyptian manuscript in Luxor in 1858.
Unitary fractions in ancient Egypt
109
Example 1: Decomposing fractions into non-equal unitary fractions. To 2 decompose this way, let ๐ = 5 and ๐ = 13 in Equation (4). Then 65
2 2 2 2 1 1 = = + = + . 65 5 โ
13 6 โ
13 6 โ
5 โ
13 39 195 2
However, decomposing via Equation (4) with ๐ = 41 and ๐ = 1 gives a differ41 ent solution than Table 4: 2 1 1 = + . 41 21 861 As a final decomposition problem, how might the scribe Ahmose have decom23 23 posed ? Since 51 = 3 โ
17, Ahmose might rewrite as 51
51
23 6 + 17 6 17 1 2 = = + = + . 51 3 โ
17 3 โ
17 3 โ
17 3 17 Ahmose then consults Table 4 for the entry 17: 12-51-68, and so 1 1 1 1 23 = + + + . 51 3 12 51 68
โข
Figure 5. Problem 80 of the Rhind Papyrus, author sketch. To illustrate the notation used by the Egyptians, Figure 5 is a sketch of Problem 80 from the Rhind Papyrus. The first line of the text translates as: โWith respect to the vessels used by the clerks in the granary, here is how to take a succession of halvesโโwhich is the eye of Horus algorithm using the geometric 1 1 sequence 1, , , โฆ [27]. The scribe illustrates this algorithm starting with 1 hekat 2 4 of grain, which is equal to ten henu of grain, half of which is five, and so on, as annotated in the figure. The hieroglyphic symbol for one is |, the symbol for ten 1 is โฉ, and the symbol for is . The symbol to denote a unitary fraction is ; 2
thus, to denote one-tenth, scribes wrote โฉ , and so on.
110
Chapter IV: A Tree of Fractions
Example 2: Dividing 700 loaves of bread. Problem 63 of the Rhind Papyrus requires that we divide 700 loaves of bread among four people in the sequential 2 1 1 1 proportions6 โถ โถ โถ . Asking questions in this manner is a clever way to ask for
๐ ๐
3
2
3
4
of something without explicitly asking. That is, let the four peopleโs
proportions be ๐ค, ๐ฅ, ๐ฆ, and ๐ง. Then 4 3
, which means that ๐ค = ๐ฅ=
4๐ฅ 3
,๐ฅ=
๐ค
3๐ฆ 2
๐ฅ
2 1
4
๐ฅ
3 2
3 4๐ง
๐ฆ
= / = ,
, and ๐ฆ =
3๐ฆ 3 4๐ง = โ
= 2๐ง 2 2 3
3
1 1
3
๐ฆ
2 3
2
๐ง
= / = , and
1 1
= / = 3 4
. Back-substituting gives
and
๐ค=
4 8๐ง โ
2๐ง = . 3 3
Therefore
8๐ง 4๐ง + 2๐ง + + ๐ง = 7๐ง, 3 3 2 1 which means ๐ง = 100, ๐ฆ = 133 , ๐ฅ = 200, and ๐ค = 266 loaves. 700 = ๐ค + ๐ฅ + ๐ฆ + ๐ง = 3
โข
3
A continued fraction tradition The Egyptian tradition of unitary fractions has been kept alive through the ages in continued fractionsโbecause the unitary fraction is the basic building block of simple continued fractions. An early example of a finite simple continued fraction comes from Archimedes. Example 3: An Archimedean continued fraction. In On the Measurement of 1351 a Circle (circa third century bc), Archimedes represents the fraction as 780
โ 1351 1โ 1 = โ5 + 1 780 3โ 5+ โ 1 10 + โ 10
โ โ โ. โ โ โ 1351 1 = [5; 5, 10, 10]. In terms of Definition 1 of the Introduction on p. xiii, 780 3
โข
Puzzle 4: A golden continued fraction. Let ๐ถ๐ = [1; 1, 1, 1, 1, โฆ , 1], a list containing ๐ partial denominators of 1 after the semicolon. Let ๐ถ = lim ๐ถ๐ , an ๐โโ
infinite simple continued fraction. Can you guess the value of ๐ถ? As a hint, the first few convergents of ๐ถ simplify to the following fractions: 1 3 1 5 1 8 1 13 1+ = , 1+ = , 1+ = . 1 1 1 = 3, 1 + 1+1 2 5 8 1+ 1+ 1+ 1 1 1+
1+1
6 The
2
Egyptians allowed the use of the fraction . 3
1+1
1+
1+
1 1+1
Farey sequences
111 โข
A solution to this puzzle appears in Example VI.30.
Farey sequences In this section, our goal is to see how we can generate all fractions between 0 and 1 from more elementary fractions, starting with 0 and 1. Towards this end we need some terminology. Definition 5: Fraction terminology. We say that any fraction that is not an 0 1 integer is a true fraction.7 When we write 0 and 1 as fractions, we use and , 1 1 respectively. For the remainder of this chapter, unless we specify otherwise, when ๐ we refer to any true fraction we mean that gcd(๐, ๐) = 1 and ๐ < ๐. Thus every fraction
๐ ๐
๐
we encounter in this chapter, unless specified otherwise, will belong to
the unit interval [0, 1] and be in reduced form. We say that than ๐
๐ ๐ ๐
if ๐ < ๐; when ๐ = ๐,
๐ ๐
๐
is simpler than
๐
๐ ๐
is a simpler fraction
if 0 < ๐ < ๐. When we write
= we mean that ๐ = ๐ and ๐ = ๐ as well as acknowledging that the two ๐ fractions have the same value. ๐
When we encounter a possible non-reduced fraction relabel it as ๐ ๐
๐ ๐
where
, we mean that
๐ ๐
๐ ๐
๐
๐ ๐
in this chapter, we
is the reduced form of . When we refer to the fraction ๐
is in reduced form from the equivalence class of all fractions ๐
whose value is the same as the value of . ๐
2
Example 6: Reduced form. To illustrate Definition 5, the fraction is reduced, 4
37
3
5
whereas the fraction is non-reduced. The fraction is simpler than because 6 42 91 both are reduced fractions and 42 < 91. โข Definition 7: The mediant. We say that the mediant of two fractions denoted by
๐ ๐
๐
๐+๐
๐
๐+๐
โ , is
๐ ๐
๐
and , ๐
.
Example 8: An application of the mediant. The mediant operator is often used when awarding partial credit for an answer to a multi-part question on an exam. For example, suppose a multi-part exercise has two parts, ๐ด and ๐ต. According to a pre-devised rubric, part ๐ด is worth five points and part ๐ต is worth four points. If a student earns three points on part ๐ด and two points on part ๐ต, 3 2 then that student has earned the mediant score โ , or five of nine points. โข 5
7 We
4
could refer to 0 and 1 as untrue fractions or pseudo fractions, but never false fractions.
112
Chapter IV: A Tree of Fractions
The next definition honors John Farey (1766โ1826), a geologist who used the mediant while studying sound propagation through matter. Definition 9: Farey sequences. The Farey sequence of order ๐, denoted by โฑ๐ , is the set, in ascending order, of all (reduced) fractions in [0, 1] whose denomi๐ ๐ nators are at most ๐. Furthermore, we say that and are adjacent fractions ๐ ๐ or neighbors if they are adjacent fractions in some Farey sequence โฑ๐ , where ๐ ๐ ๐ ๐ ๐ ๐, ๐, ๐, ๐, โ โ and ๐ > 0. If and are neighbors and < , then is the left-hand neighbor of
๐ ๐
and
๐ ๐
๐
๐
๐
๐
๐
๐
is the right-hand neighbor of . ๐
The first few Farey sequences are 0 1 0 1 1 โฑ1 = { , } , โฑ2 = { , , } , 1 1 1 2 1 0 1 1 1 2 1 3 2 3 โฑ5 = { , , , , , , , , , 1 5 4 3 5 2 5 3 4
0 1 1 2 1 โฑ3 = { , , , , } , 1 3 2 3 1 4 1 0 1 1 , } , โฑ6 = { , , , 5 1 1 6 5
0 1 1 1 2 3 1 โฑ4 = { , , , , , , } , 1 4 3 2 3 4 1 1 1 2 1 3 2 3 4 5 1 , , , , , , , , , }. 4 3 5 2 5 3 4 5 6 1 ๐
๐
To generate โฑ๐+1 from โฑ๐ , for each pair of adjacent fractions and in โฑ๐ ๐ ๐ where ๐ + ๐ = ๐ + 1, insert their mediant between them. As we show in Proposition 14, the mediant is already in reduced form and lies between the two fractions. To establish this result, we use a little algebra. Definition 10: Cardinality. Let ๐ be a set consisting of a finite number ๐ of elements, where ๐ is a nonnegative integer. We say that the cardinality of ๐, denoted by |๐|, is ๐. Recall from Definition I.16 that ๐(๐) is the number of positive integers less than or equal to ๐ that are relatively prime to ๐. ๐
Proposition 11: Farey sequence size.8 For any ๐ โ โค+ , |โฑ๐ | = 1 + โ ๐(๐). ๐=1
Proof. Observe that the proposition is true when ๐ = 1 because |โฑ1 | = |{0, 1}| = 2 = 1+๐(1). Assume that the proposition is true for a given positive integer ๐, and show that this implies the proposition is true for ๐ + 1. If gcd(๐, ๐ + 1) > 1 then ๐ is not in reduced form. It can be reduced to a true fraction with denominator ๐+1 less than ๐ + 1. This reduced fraction is already in โฑ๐ . If gcd(๐, ๐ + 1) = 1 and ๐ ๐ 1 โค ๐ โค ๐, then is a new fraction; that is, โ โฑ๐ . Thus ๐+1
๐+1
| | ๐ gcd(๐, ๐ + 1) = 1, 1 โค ๐ โค ๐}|| = |โฑ๐ | + ๐(๐ + 1). |โฑ๐+1 | = |โฑ๐ | + ||{ ๐+1
|
8 Propositions
11 through 15 can also be found in [103, pp. 255โ268].
Farey sequences
113
๐+1
So |โฑ๐+1 | = 1 + โ ๐(๐), making the proposition true by induction for all ๐. ๐=1
Proposition 12: Farey denominators. No two adjacent Farey fractions have 0 1 the same denominator except and . 1
๐
Proof. Let
๐
Definition 5,
and ๐ ๐
๐ ๐
and
1
belong to โฑ๐ , where ๐, ๐, ๐ โ โ and ๐ โฅ 2. With respect to ๐ ๐
are in reduced form. Without loss of generality, we assume ๐
that ๐ < ๐ < ๐, which means that ๐ โ ๐ โฅ 2. Let ๐
Since ๐ โค ๐ โ 1, we have ๐ ๐
๐
๐
โ โฑ๐ . Observe that
and , being separated by ๐
๐ ๐
๐ ๐
๐
0.
> 0.
Proposition 14: Uniqueness of the in-between fraction. If ๐๐ โ ๐๐ = ยฑ1, ๐ ๐ then โ is the unique fraction (already in reduced form) from โฑ๐+๐ between ๐
๐
๐
๐
and and thus is the simplest fraction in that interval (not including the end๐ ๐ points). ๐
๐
Proof. Observe first that โ is already in reduced form because (๐ + ๐)๐ โ (๐ + ๐ ๐ ๐)๐ = ๐๐ โ ๐๐ = ยฑ1, which means that ๐ + ๐ and ๐ + ๐ are relatively prime. ๐ ๐ ๐ ๐ ๐ Let be a fraction between and . Without loss of generality, let < . ๐
Consider the case where ๐+๐ ๐+๐
โ
๐ ๐
>
๐ ๐
๐
๐ ๐
0.81 โ 1 + โ ln 2 = ๐ 2 . 2 Observe that 1 ๐. An integer is said to be a regular number if its only prime divisors are 2, 3, or 5. If the numerator and denominator of ๐ฅ (in reduced form) are both regular, then ๐ฅ is said to be a super-regular number. Let ๐ฅ be super1 1 regular; we say that the ordered pair (๐ฅ, ) is a reciprocal pair2 if ๐ฅ > . ๐ฅ ๐ฅ Any three positive real numbers ๐, ๐, and ๐ satisfying the equation ๐2 + ๐2 = ๐2 2 Scribes had access to standard tables giving the sexagesimal representations of the reciprocals of regular integers up to sixty-four, along with the outlier eighty-one, in, for example, tablet MLC 1670 [124, Figure 7].
The Babylonian number system
171
c
a
b
Figure 2. The diagonal rule, also called the Pythagorean theorem. form a Pythagorean triple,3 denoted by (๐, ๐, ๐). A Pythagorean triple (๐, ๐, ๐), where ๐, ๐, and ๐ are positive integers, is a primitive Pythagorean triple if the greatest common divisor of ๐, ๐, and ๐ is 1. 73
In this notation, is rendered โจ1; 13โฉ. For convenience, and to save space 60 in a table, we sometimes write the number โจ๐0 ; ๐1 , ๐2 , ๐3 , โฆ , ๐๐ โฉ as a list of ๐๐ โs separated by spaces: ๐0 ๐1 ๐2 โฆ ๐๐ , allowing two decimal digits for each ๐๐ , 1 โค ๐ โค ๐. For example, the number on line thirteen of column IV of Plimpton 322 is 7 โฝ followed by a gap followed by 3 โฝ 4
5 โฝ , namely, โจ 0; 27 00 03 45 โฉ or
โฝ
โฝ
2
the list 0 27 00 03 45. Its value is
27 60
+
0 602
+
3 603
45
+
=(
604
2
161 240
) . Note that
1 2
is a
1
fraction of order one, while , as shown below, has order infinity. 7
Example 2: A nonterminating sexagesimal fraction. To find the sexagesi1 mal representation of , we follow this outline: 7
1
1
7 1
7
โข To find the number ๐ฅ of sixtieths in , solve ๐ฅ โ 8.57. Thus the number of 8
โข After subtracting the number ๐ฆ of ๐ฆ โ 34.29. Thus,
60 1 602 1 7
from โs in
1 7 1
105
1 60
โs in
โข Continuing gives
1 7
60
for ๐ฅ. Doing so gives
is โ๐ฅโ = 8.
we obtain a remainder: , solve the equation
1 105
1
โ
7
=
8 60 ๐ฆ
3600
=
1 105
. To find
. Doing so gives
in Babylonian starts out as โจ0; 08 34โฉ.
โข To continue, the remainder now is gives ๐ง โ 17.14. So
7
๐ฅ
=
1 7
1 105
โ
34 3600
=
1 12600
. Solving
1 12600
=
๐ง 603
โ โจ0; 08 34 17โฉ.
= โจ0; 08 34 17 08 34 17 โฆโฉ = โจ0; 08 34 17โฉ.
3 Given a rectangle of side lengths ๐ and ๐ with diagonal ๐, as in Figure 2, scribes knew the diagonal rule: ๐2 + ๐2 = ๐2 . Mansfield [95, p. 7], citing a number of sources, says, โEvidence of the Diagonal rule can be found in quite a few tablets.โ Thus, he concludes, we โnow call [it] Pythagorasโ theorem,โ or the Pythagorean theorem.
172
Strand VI: A Clay Tablet
Interestingly, Sachs [128, p. 152] deciphers a tablet cataloged as M10 where the 1 scribe showed that lies between โจ0; 8, 34, 16, 59โฉ and โจ0; 8, 34, 18โฉ. โข 7
The following lemma gives a way to determine when a rational number has order ๐. Lemma 3: Fractions of order ๐. Let ๐ฅ be a positive rational number. If ๐ฅโ
60๐ = โ๐ฅ โ
60๐ โ, then ๐ฅ is at most of order ๐, where โ๐ฅโ is the floor function. Proof. Let ๐ฅ = โจ๐0 ; ๐1 ๐2 โฆโฉ. The fractional part ๐ of ๐ฅ โ
60๐ is ๐ = โจ0; ๐๐+1 ๐๐+2 โฆโฉ. If the order of ๐ฅ is more than ๐, then ๐ โ 0. However, if ๐ฅ is at most of order ๐, then ๐ = 0, in which case ๐ฅ โ
60๐ = โ๐ฅ โ
60๐ โ.
The accepted transliteration of Plimpton 322 The data in Plimpton 322 has been interpreted as a table where each row involves two positive numbers ๐ and ๐ and where ๐ < 1 and ๐2 + 1 = ๐2 .
(1)
So the Pythagorean triple (๐, 1, ๐) can be viewed as the side lengths of a normalized triangle, or a normalized rectangle where ๐ is the short side, 1 is the long side, and ๐ is the hypotenuse of the triangle or the diagonal of the rectangle. Shown in Figure 1, parts of the tablet are damaged and unreadable. Nevertheless, this missing information can be recovered by understanding the undamaged part of the tablet. For convenience, we use the term scribe to refer to the tabletโs author. The heading of the tablet describes the contents of the table: the diagonal [hypotenuse]4 from which 1 is torn, so that the short side is found [124]. Beneath the heading are fifteen lines of information, broken into four columns. Since many, if not all, researchers who have examined the tablet concluded that the original tablet contained additional columns on the left-hand side, we use the convention of labeling the columns from right to left.5 Table 1 is a transliteration6 of Plimpton 322. This table contains two tables separated by a double vertical line. The left-hand part is a transition from Babylonian to the sexadecimal notation of Definition 1, and the right-hand part is a transition into decimal notation. For example, the first entry in column IV on the left is 59 00 15, which we write as 2
59 15 212415 14161 0 119 + = = + =( ) , 60 602 603 14400 120 603 4 Robson
uses the term โtakiltum-square of the diagonal.โ usual custom in Plimpton 322 articles is a left to right labeling of the columns. 6 This table incorporates the six well-recognized corrections of mostly copy or careless scribal errors. An analysis of each of these errors appears in Britton [17, pp. 524โ526]. 5 The
The accepted transliteration of Plimpton 322
173
Table 1. A transliteration of Figure 1. IV
II
I
IVโ
2 49
1
119 ) ( 120
1 20 25
2
3367 ) ( 3456
III
59 00 15
1 59
56 56 58 14 50 06 15
56 07
2
2
2
55 07 41 15 33 45
1 16 41
1 50 49
3
4601 ( 4800 )
53 10 29 32 52 16
3 31 49
5 09 01
4
12709 ( 13500 )
48 54 01 40
1 05
1 37
5
( 65 ) 72
47 06 41 40
5 19
08 01
6
319 ) ( 360
43 11 56 28 26 40
38 11
59 01
7
2291 ( 2700 )
41 33 45 14 03 45
13 19
20 49
8
799 ( 960 )
38 33 36 36
8 01
12 49
9
481 ( 600 )
35 10 02 28 27 24 26 40
1 22 41
2 16 01
10
4961 ) ( 6480
1 15
11
( 43 )
2
2
2
2
2
2
2
33 45
45
29 21 54 02 15
27 59
48 49
12
1679 ( 2400 )
2 41
04 49
13
161 ( 240 )
25 48 51 35 06 40
29 31
53 49
14
1771 ( 2700 )
23 13 46 40
28
53
15
28 ) ( 45
27 00 03 45
2
2
2
2
2
IIIโ
๐
IIโ
119
120
169
3367
3456
4825
4601
4800
6649
12709
13500
18541
65
72
97
319
360
481
2291
2700
3541
799
960
1249
481
600
769
4961
6480
8161
3
4
5
1679
2400
2929
161
240
289
1771
2700
3229
28
45
53
a result we place in row 1 and column IVโ in the right-hand portion of the table.7 To obtain the last equality in the above equation, the scribe would need to re212415 duce8 and then take the square root of both numerator and denominator9 3 60 119
to obtain 7 Some
120
. We record the numerator 119 in column IIIโ of the right-hand part
researchers, including Robson [124], suggest that each of the column IV numbers originally included a leading 1. Under this assumption, the entry in column IV would be 1 59 00 15, the 119 2 entry in column IVโ would be 1 + ( ) by Equation (1), and so on. 120 8 Scribes had algorithms to scale two numbers by the same quantity [95, p. 7]. 9 Scribes knew how to take the square roots of large perfect squares [95, pp. 8โ11].
174
Strand VI: A Clay Tablet
of the table, and, since 1โ
60+59 = 119, we write 1 59 in column III. Similarly, the 59 15 28561 169 sexadecimal number 1 59 00 15 is 1 + + 3 = = ( )2 . The Babylonian 60 60 14400 120 representation for 169 is 2 49, the entry in column II, whose value we also record in column IIโ as the decimal number 169. In an additional column ๐ between IIโ and IIIโ we record the value 120.
Reciprocal pairs generate normalized Pythagorean triples The Babylonians had various geometrical algorithms, often of a cut-and-paste type, to calculate areas. To illustrate this custom, consider the next example. Example 4: Three squares in arithmetic progression. Exercise 3 from tablet MS 5112 is a puzzle concerning three squares: 3โฝ 2
โฝ
โฝ
The sum of the areas of three squares is 2
and the sum of their
sides is โฝ . What are the sides? From a lifetime spent deciphering Babylonian mathematical phraseology, Friberg [50, pp. 318โ319] clarifies: The square sides form an arithmetical progression. Furthermore the sum of the sides being โฝ means that the sum of their sides is 60. Let ๐, ๐, and ๐
be squares with respective side lengths ๐, ๐, and ๐ with 0 < ๐ < ๐ < ๐. Define ๐ so that ๐ โ ๐ = ๐ = ๐ โ ๐. So 60 = ๐ + ๐ + ๐ = 3๐. To recap, we know that ๐2 + ๐2 + ๐2 = 1380 + 20 = 1400 and 3๐ = 60; our goal is to find ๐, ๐, and ๐. Attacking this problem, a scribe might partition ๐ so that a copy of ๐ is cut symmetrically from its center as shown in Figure 3. Inside ๐ and outside this copy of ๐, cut out a small square ๐ท at each of ๐โs vertices so that two opposing vertices of each copy of ๐ท coincide with a vertex of ๐ and a vertex of ๐. Furthermore, adjacent to each of the four copies of ๐ท, cut out a copy of ๐ท inside ๐ and outside ๐, both above and below ๐. Label the four remaining unnamed rectangular regions as two copies of ๐ธ and two copies of ๐น; next, paste together these last four rectangles to encompass ๐
, hence forming a square congruent to ๐. Since the area of four copies of ๐ท is ๐2 , the sum of the areas of ๐, ๐, and ๐
is 3๐2 + 2๐2 = 1400. Because three copies of the side length ๐ make 60, we have ๐ = 20. Therefore two squares of side length ๐ together have area 200, which means that ๐ = 10. So ๐ = 10, ๐ = 20, and ๐ = 30. โข One way scribes found solutions to (1) was via a geometrical cut-and-paste algorithm involving reciprocal pairs.10 10 This solution scheme appears on clay tablet YBC 6967 as cited by both Neugebauer and Sachs [109, Plate. 17] and Robson [124, Figure 10].
Reciprocal pairs generate normalized Pythagorean triples
p
175
q r Square Q
Square P
D D
E
Square R
D D
F
F
D D
D D
E
DD
D D
E F
F
E
D D
D D
Figure 3. A Babylonian area problem from tablet MS 5112. Algorithm 5: Generating Pythagorean triples using reciprocal pairs (and 1 a single parameter). Let (๐ฅ, ) be a reciprocal pair. Babylonian scribes discov๐ฅ ered a relationship equivalent to the equation 2
(๐ฅ +
2
1 1 ) โ (๐ฅ โ ) = 4, ๐ฅ ๐ฅ
1
1
1
1
2
๐ฅ
2
๐ฅ
(2)
which means that ( (๐ฅ โ ), 1, (๐ฅ + )) is a Pythagorean triple. Proof. Scribes may have discovered Equation (2) by the cut-and-paste proofwithout-words of Figure 4. To put words to this proof: From a square of side
176
Strand VI: A Clay Tablet
x+1/x
โ
1 x
x โ1/x
x+1/x
x โ1/x
1 x 1
x 1 x 1 x
x
1 x
1 1
1 x
1
Figure 4. An old Babylonian algorithm to generate Pythagorean triples. length ๐ฅ +
1 ๐ฅ
remove a square of side length ๐ฅ โ
1 ๐ฅ
, leaving an L-shaped re-
gion.11 Partition this L-shaped region into five regions: three rectangles each 1 1 1 of area ๐ฅ ร = 1, one rectangle of area (๐ฅ โ ) ร , and one rectangle of area 1 ๐ฅ
1
๐ฅ
๐ฅ
๐ฅ
ร . Paste together the two smaller rectangles to form a fourth rectangle of ๐ฅ
1
1
area 1. Thus the difference of (1 + )2 and (1 โ )2 is 4, whereupon the desired ๐ฅ ๐ฅ conclusion follows. Example 6: Generating a Pythagorean triple via Algorithm 5. Let ๐ฅ = 2. 1 1 5 3 3 5 Let ๐ = (๐ฅ + )/2, ๐ = (๐ฅ โ )/2, and ๐ = 1. Then ๐ = and ๐ = . So ( , 1, ) ๐ฅ ๐ฅ 4 4 4 4 is a three-tuple satisfying (1), and is similar to the Pythagorean triple (3, 4, 5) corresponding to the triple on line 11 of Plimpton 322, (40, 60, 75). โข 11 A suggestion for this L-shaped cut-and-paste construction appears in Britton [17, figure 10]; besides that reference, this proof-without-words figure may be new in the mathematical literature.
Reciprocal pairs generate normalized Pythagorean triples
177
1
Each entry in column IV of Figure 1 is ((๐ฅ โ )/2)2 for some rational number ๐ฅ ๐ฅ. To illustrate, let ๐ = โจ0; 27 00 03 45โฉ, the thirteenth number in column IV of Table 1. Solving 2
๐ = ((๐ฅ โ for ๐ฅ > 0 gives ๐ฅ =
15 8 1
1 )/2) ๐ฅ
1
= 2 โ . In our number system, ๐ = 8 289 ( )2 . 240
5832225 604
= (
161 2 240
) .
Furthermore, ((๐ฅ + )/2)2 = Accordingly, the entries on line thirteen, ๐ฅ columns III and II, are ๐ = 161 and ๐ = 289. The first fifteen rows of Table 3 on p. 180 show that the generators listed in Table 2 do indeed generate the data of Plimpton 322. Table 2. The generator ๐ฅ for each line of Plimpton 322. line
๐ฅ
1
2+
2
2+
3
2+
4
2+
5
2+
line 2 5 10 27 11 32 17 54 1 4
๐ฅ
6
2+
7
2+
8
2+
9
2+
10
2+
2 9 4 25 2 15 1 12 1 40
line
๐ฅ
11
2+0
12
2โ
13
2โ
14
2โ
15
2โ
2 25 1 8 1 27 1 5
An alternate way to generate Pythagorean triples appeared in about 300 bc as a lemma preceding Proposition 29 in Book X of Euclidโs Elements. Lemma 7: Euclidโs lemma for Pythagorean triples (using two parameters). Let ๐ข and ๐ฃ be relatively prime positive integers of opposite parity (one is odd and the other is even) with ๐ข > ๐ฃ. Then the ordered triple (๐, ๐, ๐) is a primitive Pythagorean triple where ๐ = ๐ข2 โ ๐ฃ 2 ,
๐ = 2๐ข๐ฃ,
๐ = ๐ข2 + ๐ฃ 2 .
(3)
Proof. Adapted from Kozlov [85], we offer a proof-without-words figure for Equation (3) in Figure 16, which is also outlined in Exercise 1e.12 12 To establish primitiveness (in which a scribe may be uninterested), here is a modern-day number theory approach: Since ๐ข and ๐ฃ are of opposite parity, both ๐ and ๐ are odd integers. Let ๐ be the greatest common divisor of ๐, ๐, and ๐. Since ๐ and ๐ are odd, ๐ is also odd. Since ๐|(๐ + ๐) and ๐|(๐ โ ๐), we have ๐|(2๐ข2 ) and ๐|(2๐ฃ2 ). So ๐|๐ข2 and ๐|๐ฃ2 . Thus ๐ = 1, making (๐, ๐, ๐) a primitive Pythagorean triple.
178
Strand VI: A Clay Tablet
Although it is questionable whether the Babylonians knew Lemma 7, a few calculations using Algorithm 5 will soon lead to discovering Euclidโs method, as we observe in the next lemma. Lemma 8: Equivalence of the reciprocal pair algorithm and Euclidโs แต lemma. Let ๐ฅ = > 1 where ๐ข and ๐ฃ are relatively prime positive integers. 1
1
2 2
๐ฅ
๐ฃ
1
1
2 2
๐ฅ
Let ๐ผ = (๐ฅ โ ) and ๐พ = (๐ฅ + ). Then (2๐ข๐ฃ๐ผ, 2๐ข๐ฃ, 2๐ข๐ฃ๐พ) is the Pythagorean triple (๐ข โ ๐ฃ2 , 2๐ข๐ฃ, ๐ข2 + ๐ฃ ). 1
1
1
1
2
๐ฅ
2
๐ฅ
Proof. We know that ( (๐ฅ โ ), 1, (๐ฅ + )) is a Pythagorean triple. Observe that 1 1 1 ๐ข ๐ฃ ๐ข2 โ ๐ฃ 2 1 1 1 ๐ข ๐ฃ ๐ข2 + ๐ฃ 2 ๐ผ = (๐ฅ โ ) = ( โ ) = and ๐พ = (๐ฅ + ) = ( + ) = , 2 ๐ฅ 2 ๐ฃ ๐ข 2๐ข๐ฃ 2 ๐ฅ 2 ๐ฃ ๐ข 2๐ข๐ฃ giving the desired result. 17
125
= , the generator for line 4 of To illustrate the lemma, let ๐ฅ = 2 + 54 54 Plimpton 322 from Table 2. So ๐ข = 125 and ๐ฃ = 54. Notice that ๐ข and ๐ฃ are rela125 tively prime and that 2๐ข๐ฃ = 13500. The generator ๐ฅ = gives the Pythagorean 12709
18541
54
triple ( , 1, ), which when multiplied by 2๐ข๐ฃ = 13500 gives the primi13500 13500 tive Pythagorean triple (12709, 13500, 18541).
Finding the realm of potential generators What rule did the scribe use to assemble the numbers in column IV in the order given? To investigate, we ask the scribe to be patient with us while we use the 1 1 1 1 computer to find potential generators ๐ฅ for triples ( (๐ฅ โ ), 1, (๐ฅ + )). After 2 ๐ฅ 2 ๐ฅ doing so, we may be able to see from a global perspective what the scribe probably discovered by a trial-and-error local perspective. Recall the terms order of a number and regular number from Definition 1. Observe that the fraction of greatest order in column IV of Table 1 offers a clue about our search space. The twelfth number in this column is of order eight. Since it is a perfect square, its square root is of order four. Let ๐ฅ be a generator. 1 1 Since (๐ฅโ ) is the short side of a rectangle whose long side is 1, we have 0 < ๐ฅโ 1 ๐ฅ
2
๐ฅ
< 2, which means that 1 < ๐ฅ < 1+ โ2 โ 2.41. Now we could hunt for all super-
regular numbers of at most order four between 1 and 1 + โ2 whose reciprocals are also at most of order four, but the corresponding search space contains almost nineteen million (about 604 โ2) fractions. To shorten our search for super-regular numbers among this multitude of fractions, we consider all fractions between 1 and 1 + โ2 of at most order three whose reciprocals are at most order four. Thus, our search space is now less than a third of a million fractions.
Finding the realm of potential generators
179
If we consider all ๐ฅ values with 1 < ๐ฅ < 1 + โ2, ๐ฅ โ 2, and specify that ๐ฅ must be written as a fraction of the form ๐ฅ = 2 ยฑ ๐/603 while 1/๐ฅ must be written as a fraction of the form ๐/604 where ๐ and ๐ are positive integers, 0 < ๐ < 603 , and 0 < ๐ < 604 , then by use of Lemma 3 the possible values in decreasing order ห are negative) for ยฑ๐/603 are the elements of magnitude (since the elements of ๐ต หโช๐ต ห where of ๐ด ห = { 2 , 10 , 11 , 17 , 38 , 1 , 2 , 49 , 4 , 2 , 7 , 1 , 6 , 1 } ๐ด 5 27 32 54 125 4 9 288 25 15 64 12 125 40 and ห = โ{ 3 , 2 , 14 , 1 , 4 , 1 , 2 , 19 , 34 , 22 , 5 , 1 , 19 , 2 , 7 , 58 , ๐ต 64 25 135 8 27 5 9 72 125 75 16 3 50 5 16 125 1 14 239 14 26 19 11 13 2 67 88 18 47 3 4 , , , , , , , , , , , , , , , 2 27 432 25 45 32 18 20 3 96 125 25 64 4 5 22 53 91 106 194 7 8 527 23 14 23 122 79 , , , , , , , , , , , , }. 27 64 108 125 225 8 9 576 25 15 24 125 80 Since the Babylonian list of generators between 1 and 1 + โ2 from Table 2 have denominators of at most 54, our scribe (by trial and error, as we discuss in the next section) may have found all super-regular numbers between 1 and 1 + โ2 with denominator at most 60. Imposing this rule, we let ๐ด be the list of elements ห whose denominator is less than 60, along with 0 as its last member. Let from ๐ด ห whose denominator is less than 60. Then ๐ต be the list of elements from ๐ต 2 10 11 17 1 2 4 2 1 1 ๐ด={ , , , , , , , , , , 0} 5 27 32 54 4 9 25 15 12 40 and ๐ต = โ{
2 1 4 1 2 5 1 19 2 7 1 14 14 26 19 11 , , , } โช โ{ , , , , , , , , , , , , 25 8 27 5 9 16 3 50 5 16 2 27 25 45 32 18 13 2 18 3 4 22 7 8 23 14 23 , , , , , , , , , , }. 20 3 25 4 5 27 8 9 25 15 24
With respect to Table 2, observe that the eleven terms values 2 + ๐
๐ ๐
๐ ๐
in ๐ด correspond to the
that generate the first eleven terms in column IV, and the first four
terms โ in ๐ต correspond to the values 2 โ ๐ fifteenth terms in column IV.
๐ ๐
that generate the twelfth through
Example 9: Extending Plimpton 322. As we have seen, if we take the first fifteen generators of ๐ด โช ๐ต, we generate the data in Plimpton 322. What about
180
Strand VI: A Clay Tablet Table 3. Extended Plimpton 322 table via reciprocal pairs, 1 1 ๐ where (๐ฅ โ ) = . 2
๐ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
๐/๐ 2/5 10/27 11/32 17/54 1/4 2/9 4/25 2/15 1/12 1/40 0 โ2/25 โ1/8 โ4/27 โ1/5 โ2/9 โ5/16 โ1/3 โ19/50 โ2/5 โ7/16 โ1/2 โ14/27 โ14/25 โ26/45 โ19/32 โ11/18 โ13/20 โ2/3 โ18/25 โ3/4 โ4/5 โ22/27 โ7/8 โ8/9 โ23/25 โ14/15 โ23/24
๐ฅ
๐
๐ฅ = 2 + ๐/๐ 12/5 64/27 75/32 125/54 9/4 20/9 54/25 32/15 25/12 81/40 2 48/25 15/8 50/27 9/5 16/9 27/16 5/3 81/50 8/5 25/16 3/2 40/27 36/25 64/45 45/32 25/18 27/20 4/3 32/25 5/4 6/5 32/27 9/8 10/9 27/25 16/15 25/24
(๐/๐)2 (119/120)2 โ 0.9917 (3367/3456)2 โ 0.9742 (4601/4800)2 โ 0.9585 (12709/13500)2 โ 0.9414 (65/72)2 โ 0.9028 (319/360)2 โ 0.8861 (2291/2700)2 โ 0.8485 (799/960)2 โ 0.8323 (481/600)2 โ 0.8017 (4961/6480)2 โ 0.7656 (3/4)2 = 0.7500 (1679/2400)2 โ 0.6996 (161/240)2 โ 0.6708 (1771/2700)2 โ 0.6559 (28/45)2 โ 0.6222 (175/288)2 โ 0.6076 (473/864)2 โ 0.5475 (8/15)2 โ 0.5333 (4061/8100)2 โ 0.5014 (39/80)2 โ 0.4875 (369/800)2 โ 0.4613 (5/12)2 โ 0.4167 (871/2160)2 โ 0.4032 (671/1800)2 โ 0.3728 (2071/5760)2 โ 0.3595 (1001/2880)2 โ 0.3476 (301/900)2 โ 0.3344 (329/1080)2 โ 0.3046 (7/24)2 โ 0.2917 (399/1600)2 โ 0.2494 (9/40)2 โ 0.2250 (11/60)2 โ 0.1833 (295/1728)2 โ 0.1707 (17/144)2 โ 0.1181 (19/180)2 โ 0.1056 (52/675)2 โ 0.07704 (31/480)2 โ 0.06458 (49/1200)2 โ 0.04083
2
๐ 119 3367 4601 12709 65 319 2291 799 481 4961 3 1679 161 1771 28 175 473 8 4061 39 369 5 871 671 2071 1001 301 329 7 399 9 11 295 17 19 52 31 49
1
๐ 120 3456 4800 13500 72 360 2700 960 600 6480 4 2400 240 2700 45 288 864 15 8100 80 800 12 2160 1800 5760 2880 900 1080 24 1600 40 60 1728 144 180 675 480 1200
175
๐ 169 4825 6649 18541 97 481 3541 1249 769 8161 5 2929 289 3229 53 337 985 17 9061 89 881 13 2329 1921 6121 3049 949 1129 25 1649 41 61 1753 145 181 677 481 1201
the sixteenth generator, ๐ฅ = 2 โ ? Observe that (๐ฅ โ )/2 = , which gener9 ๐ฅ 288 ates the Pythagorean triple (175, 288, 337). Thus, had the scribe chosen to extend the table, then the sixteenth line would probably have contained the cuneiform
How the scribe may have screened for generators
181
175
versions of ( )2 , 175, and 337. Generated by the method of reciprocal pairs, Ta288 ble 3 extends Plimpton 322 to thirty-eight lines, giving the same table as appears in, for example, [1], [17], [30, pp. 173โ176], and [95], each of which used either Lemma 5, Lemma 7, or some combination of the two methods to generate the table. โข
How the scribe may have screened for generators The regular integers greater than one and less than sixty form the set
{2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48, 50, 54}. (4)
How would the scribe have found super-regular generators ๐ฅ from (4)? The scribe probably began with ๐ฅ = 2, the simplest non-trivial super-regular number. As we have seen, ๐ฅ = 2 generates line 11 of Plimpton 322. Then the scribe may have searched for other super-regular numbers near 2. In particular, ๐ the scribe may have tried numbers of the form ๐ฅ = 2 ยฑ , where ๐ is a regular ๐ number from (4) and ๐ is an integer with 1 โค ๐ < ๐. Thus, finding super-regular generators is now a matter of trial and error. To begin this trial-and-error process, we consider the simplest case first, ๐ฅ = 1 5 3 5 2 ยฑ , yielding ๐ฅ = and ๐ฅ = . The former possibility, ๐ฅ = , generates the 2
Pythagorean triple (
2 21
20
29
, 1,
20
2
); but then 3
21 20
2
is the long side of this triple rather
than 1. The latter possibility, ๐ฅ = , generates line 22 of Table 3. 2
Now we try the hardest case, ๐ = 54, so that ๐ฅ = 2 ยฑ reciprocal of ๐ฅ is
1 ๐ฅ
=
54 108ยฑ๐
๐ 54
for 1 โค ๐ < 54. The
. For which of these fractions is 108ยฑ๐ regular? We try
๐ = 53, giving denominators of 55 and 161, neither of which is regular. Next we try ๐ = 52, giving 56 and 160. The latter number 160 is regular. The scribe notes 54 27 that can be scaled to . This fraction is super-regular. Butโthe sexagesimal 160
1
80
fails to appear in the standard look-up table of reciprocals. (Recall form for 80 that the standard look-up tables give reciprocals for the numbers in (4) along with 64 and 81.) However, the scribe does not panic. He or she simply takes half the reciprocal of the regular number 40, and then scales by 27 to obtain the 40 sexagesimal form for the reciprocal of the super-regular number ๐ฅ = . This ๐ฅ 27 value generates line 23 in Table 3.
182
Strand VI: A Clay Tablet
In like fashion, all of the other cases can be similarly handled.13 In the end, should the scribe have continued this process, a Plimpton-like table of thirtyeight lines would be generated when the generators are arranged in decreasing order. The reader may wish to contrast this approach (using reciprocal pairs expanded about 2) with the eleven-step approach (using a combination of the two generating methods) found in Mansfield and Wildberger [95, pp. 10โ11].
The purpose of the tablet Robson [124] has proposed that Plimpton 322 was a teaching aid, a table of drill problems. Friberg [50, p. 448] concurs, explaining that students had hand tablets (like yesteryearโs hand slates or hand whiteboards in some of todayโs classes) on which they wrote class lecture notes: and at the end of the school day the students took the hand tablets home, where they . . . filled in the details of the problems and . . . the solutions. Plimpton 322 . . . could obviously serve as a rich source of data for [these] hand tablets. These drill problems would include finding super-regular numbers ๐ฅ, inverting 1 1 ๐ when ๐ is them, evaluating (๐ฅ ยฑ ), squaring them, simplifying a fraction 2 ๐ฅ ๐ regular, scaling pairs of numbers, and finding the square roots of ๐ and ๐ given that both of them are perfect squares. About such a rationale, Mansfield and Wildberger [95] observe that some of Plimpton 322โs column IV numbers โare just too big to allow students to reasonably obtain the square roots of the quantities required.โ14 Armed with this supposition, along with the understanding that the curvature of the fragment [of Plimpton 322] suggests that a third, or more, of the table has been lost. A reasonable estimate is that the missing third, or so, can have contained about four narrow columns [50, p. 424] it is natural and fitting to make conjectures. One of these is that Plimpton 322 was constructed to serve as a (angle-less) trigonometry table. Perhaps other extant, untranslated-as-yet tablets exist to support this claim. Meanwhile, the suggestion is enticing, and we leave the reader with a trigonometric application of Plimpton 322. 13 Regarding
1
the feasibility of a scribe writing any fraction in sexagesimal when ๐ is a regular ๐ number, Sachs [128, p. 151] reassures us, saying, โThe reciprocals of all regular numbers, without exception, could be found [by a scribe].โ 14 Many extant clay tablets contain surprises for mathematicians. For example, Friberg [50, pp. 456โ459] deciphers tablet BM 34601 as calculating the sexagesimal expansion of 392 . What student would be expected to do this? Similarly, it could be that Plimpton 322, written in the midst of such a tradition, contained challenge exercises.
The purpose of the tablet
183
Example 10: Using Plimpton 322 as a trigonometry table. Suppose we are given two sides ๐ผ and ๐ฝ of a rectangle (or a triangle) with ๐ผ < ๐ฝ. To use Table 1 to ๐ผ approximate the diagonal (or hypotenuse) ๐พ, first compute or approximate ( )2 . ๐
๐ฝ ๐ผ
๐
๐ฝ
Find row ๐ of the table for which the entry ( )2 in column IVโ is nearest to ( )2 . Let ๐๐ and ๐๐ be the entries in columns ๐ and IIโ , respectively, of row ๐. Then ๐พโ
๐๐ ๐ฝ ๐๐
. ๐ผ
For example, with ๐ผ = 27 and ๐ฝ = 31, ( ) โ 0.7575. Row 11 provides the ๐ฝ
nearest match. With ๐11 = 4 and ๐11 = 5, ๐พ โ ๐ฝ๐11 /๐11 = 31 โ
5/4 = 38.75. The actual value is ๐พ = โ๐ผ2 + ๐ฝ 2 = โ1690 โ 41.11 for a relative error of about 6%. Using a suggestion from Knuth [84], we let the reader and scribe interpolate15 to a better approximation. โข
15 Mansfield and Wildberger [95] have found tablets suggesting that a Babylonian would be knowledgeable about interpolation.
Chapter VI: Families of Numbers In this chapter, we look for patterns within families of numbers. Given a data sequence ๐0 , ๐1 , ๐2 , โฆ, can we find a formulation for ๐๐ ? The terms may be ordered in time, such as a sequence of eclipse dates, or ordered in increasing value, or apparently ordered higgledy-piggledy. Given a phenomenon such as primitive Pythagorean triples of Strand VI or how far a jeep can proceed into the desert on ๐ tanks of gas from Chapter V, can we generate the corresponding family and find recursive relationships such as ๐๐ = ๐๐โ1 + ๐๐โ2 among the neighbors in the family? In particular, we consider five families of numbers: primitive Pythagorean triples (again), binomial coefficients, Fibonacci numbers, Catalan numbers, and Ben-Hur numbers. Thousands of similar families exist.16 We have selected these particular families because they are somewhat representative of the others and because they are interesting in and of themselves. As a look ahead to Chapter IX, for a given irrational number ๐, we will see that continued fraction algorithms generate entire families {๐ถ๐ }๐โฅ0 of good fractional approximations which converge to ๐ while satisfying the recursive formula ๐ถ๐ = ๐๐ ๐ถ๐โ1 โ ๐ถ๐โ2 using the notation developed in Chapter IV, where integer ๐๐ is chosen so that ๐ถ๐ is near ๐.
Primitive Pythagorean triples Puzzle 11: How many triples? As shown in the preceding strand, any primitive Pythagorean triple can be generated by two relatively prime positive integers ๐ข and ๐ฃ, one of which is even. Let ๐๐ be the number of primitive Pythagorean triples where ๐ข + ๐ฃ = 2๐ + 1. ๐1 = 1 because the only solution to ๐ข + ๐ฃ = 3 with ๐ข > ๐ฃ > 0 is (๐ข, ๐ฃ) = (2, 1), which generates the triple (3, 4, 5). ๐2 = 2 because the only solutions to ๐ข + ๐ฃ = 5 with ๐ข > ๐ฃ > 0 are (๐ข, ๐ฃ) = (4, 1) and 16 The On-Line Encyclopedia of Integer Sequences has cataloged over a quarter million sequences of interest.
185
186
Chapter VI: Families of Numbers
29
37
12 35
(u, v) = (6, 1)
20
25
21 (u, v) = (5, 2)
24
7
(u, v) = (4, 3)
Figure 5. The three triples counted by ๐3 . (๐ข, ๐ฃ) = (3, 2), giving (15, 8, 17) and (5, 12, 13). Thus the family of numbers ๐๐ starts with ๐1 = 1 and ๐2 = 2. The three triples counted by ๐3 appear in Figure 5. Find ๐4 , ๐5 , and ๐6 . Can you guess a formula for ๐๐ ? Since the answer is the next proposition, the reader may wish to try this puzzle before reading further. โข The key to Puzzle 11 is the Euler phi function ๐ of Chapters I and III. Proposition 12: An Euler phi function application. The number ๐๐ of primitive Pythagorean triples where ๐ข + ๐ฃ = 2๐ + 1, ๐ข > ๐ฃ > 0, and gcd(๐ข, ๐ฃ) = 1 is ๐(2๐ + 1)/2. Proof. Observe that if ๐ข and 2๐ + 1 are not relatively prime, then ๐ข and ๐ฃ are not relatively prime. The number of positive integers less than 2๐ + 1 that are relatively prime to 2๐ + 1 is ๐(2๐ + 1). Because 2๐ + 1 is odd and by Propositions I.17 and III.39, ๐(2๐+1) is even. Therefore, there exist precisely half this number of distinct pairs (๐ข, ๐ฃ). Example 13: Pythagorean triples where ๐ข + ๐ฃ = 15. To illustrate Proposition 12, we consider ๐7 . Since 2 โ
7 + 1 = 15 = 3 โ
5, and since ๐(15) = 2 โ
4 = 8, there should be four pairs of primitive-Pythagorean-triple generators. They are (14, 1), (13, 2), (11, 4), and (8, 7), giving the respective triples (195, 28, 197), (165, 52, 173), (105, 88, 137), and (15, 112, 113).
โข
Binomial coef๏ฌcients The binomial coefficients are the coefficients of ๐ฅ๐ , denoted by (๐), in the expan๐ sion of (1 + ๐ฅ)๐ , where ๐ and ๐ are integers with 0 โค ๐ โค ๐. Thus (1 + ๐ฅ)๐ is the generating function for the family of binomial coefficients. Example 14: Expanding a power of 1 + ๐ฅ. To illustrate binomial coefficients we expand (1 + ๐ฅ)4 : (1 + ๐ฅ)4 = 1 + 4๐ฅ + 6๐ฅ2 + 4๐ฅ3 + ๐ฅ4 .
Binomial coef๏ฌcients Binomial coef๏ฌcients Binomial coef๏ฌcients
187 187 187
b. Decimal notation. a. A triangle from 1303. Source: Wikimedia Commons. b. Decimal notation. a. A triangle from 1303. a. A triangle from Source: Wikimedia Commons. b. Decimal notation. Source: Wikimedia1303. Commons. Figure 6. Pascalโs triangle of binomial coefficients. Figure 6. 6. Pascalโs Pascalโs triangle triangle of of binomial binomial coefficients. coefficients. Figure 4 4 4 4 4 Thus ( ) = 1 = ( ), ( ) = 4 = ( ), and ( ) = 6. โข 0 4 1 3 2 Thus (4) = 1 = (4), (4) = 4 = (4), and (4) = 6. โข 0 4 1 3 2 Thus 1 = (4), (4relationship and (4) =the 6. binomial coefficients by exโข (4) = ) = 4 = (4), between We obtain a recursive 0 4 1 3 2 amining the function relationship (1 + ๐ฅ)๐ for the binomial coefficients. Wegenerating obtain a recursive between the binomial coefficients by ex๐ We obtain a recursive relationship binomial coefficients by examining the generating function (1 + ๐ฅ)between for thethe binomial coefficients. amining15: theAgenerating (1 +For ๐ฅ)๐integers for the binomial coefficients. Proposition binomialfunction recursion. ๐ and ๐ with 1 โค ๐ โค ๐, Proposition 15: A binomial For ๐ + 1 recursion. ๐ ๐ integers ๐ and ๐ with 1 โค ๐ โค ๐, ( ) =recursion. ( ) + (For).integers ๐ and ๐ with 1 โค(5) Proposition 15: A binomial ๐ โค ๐, ๐ ๐ ๐ + 1๐ โ 1 ๐ ๐ (5) ( )=( ) + ( ). ๐1 ๐ ๐โ 1 ๐+ ๐๐ + ๐(. The ) ๐=+( ๐ฅ(1 +) ๐ฅ) ). coefficient of ๐ฅ ๐ in (5) Proof. Observe that (1 + ๐ฅ)๐+1 =((1 ๐+ ๐ฅ) ๐โ1 ๐ ๐+1 ๐+1 ๐โ1 ๐ ๐ ๐ ๐+1 that (1 + ๐ฅ) of ๐ฅ= (1 in + (1 ๐ฅ)++ . which The coefficient of ๐ฅ ๐ in coefficient ๐ฅ)๐ฅ(1 is + means that (1 + ๐ฅ)Proof. is (Observe ). The ( ๐๐ฅ)), ๐โ1 ๐ ๐ ๐+1 ๐โ1 ๐+1 ๐ ๐ in (1 + ๐ฅ)๐ ๐ ๐ ๐+1 ๐= (1 ๐ of ๐ฅ๐ means (1 + ๐ฅ)Observe ). The (The Proof. (1 ๐ฅ) +๐ฅ ๐ฅ)the +coefficient ๐ฅ(1 + ๐ฅ)is.of in the coefficient of is ๐ฅ ( inthat ๐ฅ(1 ++ ๐ฅ)coefficient is ( ).ofAnd ๐ฅ ๐),coefficient inwhich (1 + ๐ฅ) is that ๐
๐โ1
๐โ1
๐ ๐ (1 ๐ฅ)๐+1 is (๐+1 coefficient in (1the + ๐ฅ)coefficient is ( ๐ ), of which the+coefficient of ).๐ฅ ๐The ๐ฅ(1 + ๐ฅ)๐ isof ๐ฅ ๐ inmeans (1 + ๐ฅ)that is ( ๐ฅ๐๐โ1 ). And the proposition isintrue. (๐). Thus ๐ ๐โ1 ๐โ1 ๐ ๐ ๐ ๐ ๐ ๐ ๐ Thus the proposition ( ).coefficient the of ๐ฅ in ๐ฅ(1is+true. ๐ฅ) is ( ). And the coefficient of ๐ฅ in (1 + ๐ฅ) is ๐ ๐โ1 The ๐ binomial coefficients are used to count items within a very broad context. the proposition is true. ( ). Thus The binomial coefficients are used to count items within a very broad context. ๐ Proposition 16: Binomial coefficients as a counting tool. Let ๐ and ๐ be The0binomial are used to count within a very broad context. integers with โค ๐ 16: โค ๐.coefficients Without regard to the order incounting which items areLet chosen, Proposition Binomial coefficients as aitems tool. ๐ and ๐ be ๐ the number of with ways 0toโคchoose items from ๐ items integers ๐ โค ๐.๐Without regard to theisorder ( ). in which items are chosen, ๐ the number of ways to choose ๐ items from ๐ items is (๐). ๐
188
Chapter VI: Families of Numbers
Proposition 16: Binomial coefficients as a counting tool. Let ๐ and ๐ be integers with 0 โค ๐ โค ๐. Without regard to the order in which items are chosen, the number of ways to choose ๐ items from ๐ items is (๐). ๐
Proof. Observe that the number of ways to choose 0 items from 0 items is 1, because there is one way to do nothing at all. Thus the proposition is true (by default) for ๐ = 0. The proposition is true when ๐ = 1. Assume it is true when ๐ โฅ 1. Let ๐ด be a set of ๐ + 1 distinct items. Remove an item ๐ from ๐ด, forming a set ๐ต of ๐ distinct items. When 1 โค ๐ โค ๐, the number of ways to choose ๐ โ 1 items from ๐ต is ( ๐ ). Let ๐ be one of these ways. Place ๐ into ๐, forming a set ๐โ1 ๐ of ๐ elements. The size of the set of all sets ๐ formed in this way is the number of ways ( ๐ ) to choose ๐ items from ๐ด so that ๐ is one of the items. Furthermore, ๐โ1
the number of ways to choose ๐ items from ๐ต is (๐). This is the same number ๐ of ways to choose ๐ items from ๐ด where ๐ is not chosen. By Proposition 15, the number of ways to choose ๐ items from ๐ด is (๐+1). When ๐ = ๐ + 1 or ๐ = 0, ๐ there is exactly 1 way to choose all ๐ + 1 items or 0 items, respectively, from a set of ๐ + 1 items. Therefore the proposition is true for ๐ + 1. Example 17: Choosing two items from four. Suppose we wish to choose two suits from the set of four suits {โฃ, โข, โก, โ }. Itemizing the number of ways to do this gives {โฃ, โข}, {โฃ, โก}, {โฃ, โ }, {โข, โก}, {โข, โ }, {โก, โ }, a total of six ways, which is the same as (4) by Example 14.
โข
2
The recursive relationship identified by Proposition 15 gives, by way of mathematical induction, a formula to compute any particular binomial coefficient. Proposition 18: A binomial formula. For integers ๐ and ๐ with 0 โค ๐ โค ๐, ๐ ๐! . ( )= ๐ ๐! (๐ โ ๐)!
(6)
Proof. As observed earlier in the proof of Proposition 16, (๐) = 1. Since ๐
0
๐
0! 0!(0โ0)!
=
1, the proposition is true when ๐ = 0. By definition, ( ) = 1 and ( ) = 1 for all ๐ โ โค+ . Since
๐! 0!(๐โ0)!
=1=
๐! ๐!(๐โ๐)!
0
๐
, the proposition is true when ๐ = 0 and
๐ = ๐, for all positive integers ๐. The first non-trivial instance of ๐ and ๐ with respect to this proposition is ๐ = 2 and ๐ = 1. By Proposition 15, 2 1 1 2! . ( )=( )+( )=1+1=2= 1 0 1 1! (2 โ 1)!
Binomial coef๏ฌcients
189
Assume that the proposition is true for a given ๐, and consider (๐+1) where 1 โค ๐ ๐ โค ๐. By Proposition 15 and the inductive hypothesis, (
๐+1 ๐ ๐ ๐! ๐! (๐ + 1)! + = . )=( )+( )= ๐ ๐โ1 ๐ (๐ โ 1)! (๐ โ ๐ + 1)! ๐! (๐ โ ๐)! ๐! (๐ + 1 โ ๐)!
By mathematical induction, the proposition is true. The earliest use of binomial coefficients dates (as far as I know) to Pingala (circa second century bc) in the Sanskrit manuscript Chandasastra. When the binomial coefficients are assembled into a triangular tree according to the relationship of Proposition 15, they are called the Pascal triangle after Blaise Pascal (1623โ1662), who used them in a treatise on probability. Figure 6 shows two versions of the triangle, the first one in the Chinese script of Zhu Shijie from 1303, and the other in decimal notation. The node at the top of this triangle corresponds to (0) in row zero. The numbers in row ๐ are (๐), 0 โค ๐ โค ๐. 0 ๐ As a small connection between the Pythagorean family of numbers and the binomial coefficients we offer the following puzzle. Puzzle 19: Consecutive binomial coefficients and Pythagorean triples. Find17 positive integers ๐ and ๐ such that ๐ ๐ ๐ (( ), ( ), ( )) ๐ ๐+1 ๐+2 โข
forms a Pythagorean triple.
While the black plague was raging in London in 1665, Isaac Newton (1643โ 1727) stayed in his country home for the next eighteen months. During this time, among other accomplishments, he discovered the general binomial theorem. Proposition 20: Newtonโs binomial series. Let ๐ผ โ โ; then for all ๐ฅ with |๐ฅ| < 1, (1 + ๐ฅ)๐ผ = 1 + ๐ผ๐ฅ +
๐ผ(๐ผ โ 1)๐ฅ2 ๐ผ(๐ผ โ 1)(๐ผ โ 2)๐ฅ3 + + โฏ. 2! 3!
(7)
Proof. The proof is a straightforward application of Taylorโs theorem. As a special case, we have Equation (8). Corollary 21: A special square root expansion. For all ๐ฅ โ โ with |๐ฅ| < 1, 1 โ1 โ ๐ฅ
โ
= โ ๐=0
(2๐) ๐
22๐
๐ฅ๐ .
(8)
17 As a hint, try the range of values 60 through 70 for ๐. As it turns out, this solution is unique when 2๐ < ๐. For a further hint, see Luca [92].
190
Chapter VI: Families of Numbers 1
Proof. Apply Proposition 20 with ๐ผ = โ , and in place of ๐ฅ write โ๐ฅ or use 2 Taylorโs theorem directly. Then follow the outline given in Exercise 6.
Fibonacci numbers In 1202, Leonardo Pisano18 (circa 1170โ1250) wrote Liber Abaci, a discourse on the Arabic numbers explaining why computing with them is easier than computing with Roman numerals. The most famous problem from that work concerns the propagation of rabbits: A certain man put a pair of rabbits in a place surrounded on all sides by a wall. How many pairs of rabbits can be produced from that pair in a year if it is supposed that every month each pair begets a new pair which from the second month on becomes productive? The answer to Fibonacciโs riddle is the twelfth term in the sequence 1, 1, 2, 3, 5, 8, 13, 21, โฆ , a family of integers known as the Fibonacci numbers. We recast Fibonacciโs rabbit riddle as a riddle about climbing stairs on a pogostick. We invite the reader to show that the number of rabbits at month ๐ is the same as the number of ways to climb ๐ stairs on a pogo-stick.19 Puzzle 22: Pogo-stick climbs. On a pogo-stick, how many ways can person ๐ climb a staircase of ๐ stairs taking one or two stairs at a time? In particular, how many ways can ๐ climb the twelve stairs in Figure 7? (We assume that ๐ goes up the staircase at each step.) In our counting convention, we say that there is one way to climb a staircase of zero steps. That is, there is one way to do nothing at all. Figure 8 shows the various ways to pogo-stick climb staircases of sizes 1 through 4. In particular, we use a unit square to indicate the one way to climb a staircase of one stair. We use two unit squares and a single 1 ร 2 rectangle to show the two ways to climb a staircase of two stairs. For ๐ = 3 and ๐ = 4, we use gray and black rectangles to highlight the recursive structure of these Fibonacci numbers. To climb three stairs, ๐ can start with a pogo-stick jump of one step and finish in the two ways shown in case ๐ = 2, or ๐ can start with a pogo-stick jump of two steps and finish 18 Somehow during repeated hand-copying and translating Liber Abaci, Leonardoโs name was rendered Fibonacci. Leonardo was the son of Bonaccio Pisano. In the Latin script, this relationship was written filius Bonaccio and was perhaps translated as Fibonacci. 19 One way to start this problem is to let ๐ be the total number of pairs of rabbits in month ๐. We ๐ assume that at month 1 we have ๐1 = 1 pair of baby rabbits. In the next month, this pair of rabbits has matured, so at month 2 we have 0 pair of baby rabbits and 1 pair of adult rabbits, which means that ๐2 = 1. In the next month, that single pair of adults will produce 1 pair of baby rabbits, for a total of ๐3 = 2. Analyze what happens over the next few months.
Fibonacci numbers
191
Figure 7. Replica of the grand ballroom staircase aboard the Titanic.
n=1
n=2
n=4
n=3
Figure 8. Pogo-stick staircase climbs taking one or two stairs at a time. in the one way of case ๐ = 1. If we let ๐๐ represent the ๐th Fibonacci number, this recursion can be written as ๐๐ = ๐๐โ1 + ๐๐โ2
where ๐0 = 1 = ๐1 ,
(9) โข
for ๐ โฅ 2. Table 4 shows the values of ๐๐ as ๐ ranges from 0 to 12. Table 4. The first few terms for Puzzle 22. ๐ ๐๐
0 1
1 2 3 4 5 6 1 2 3 5 8 13
7 21
8 9 34 55
10 11 89 144
12 233
192
Chapter VI: Families of Numbers
From the definition of generating function from Chapter V and by Table 4, the generating function for the Fibonacci numbers is ๐(๐ฅ) = 1 + ๐ฅ + 2๐ฅ2 + 3๐ฅ3 + 5๐ฅ4 + โฏ . The next proposition shows how to represent this open form of ๐ as a closed form. Proposition 23: A closed Fibonacci form. The closed form for the Fibonacci generating function is 1 ๐(๐ฅ) = . (10) 1 โ ๐ฅ โ ๐ฅ2 Proof. Multiply Equation (9) by ๐ฅ๐ : ๐๐ ๐ฅ๐ = ๐๐โ1 ๐ฅ๐ + ๐๐โ2 ๐ฅ๐ . Sum Equation (11) over all ๐ โฅ 2: โ
โ
(11)
โ
โ ๐๐ ๐ฅ๐ = โ ๐๐โ1 ๐ฅ๐ + โ ๐๐โ2 ๐ฅ๐ . ๐=2
๐=2
(12)
๐=2
Rewrite the first, second, and third summations of Equation (12), respectively, as โ
โ
โ ๐๐ ๐ฅ๐ = โ ๐๐ ๐ฅ๐ โ 1 โ ๐ฅ = ๐(๐ฅ) โ 1 โ ๐ฅ, ๐=2 โ
๐=0
โ
โ
โ
โ ๐๐โ1 ๐ฅ๐ = โ ๐๐ ๐ฅ๐+1 = ๐ฅ โ ๐๐ ๐ฅ๐ = ๐ฅ( โ ๐๐ ๐ฅ๐ โ ๐0 ) = ๐ฅ(๐(๐ฅ) โ 1), ๐=2
and
๐=1 โ
๐=1
๐=0
โ
โ
โ ๐๐โ2 ๐ฅ๐ = โ ๐๐ ๐ฅ๐+2 = ๐ฅ2 โ ๐๐ ๐ฅ๐ = ๐ฅ2 ๐(๐ฅ). ๐=2
๐=0
๐=0
Therefore, Equation (12) becomes ๐(๐ฅ) โ 1 โ ๐ฅ = ๐ฅ(๐(๐ฅ) โ 1) + ๐ฅ2 ๐(๐ฅ).
(13)
Solving Equation (13) for ๐ gives the desired result. Proposition 24: A formula for the ๐th Fibonacci number. Let ๐ = 0.618 and ๐ = โ
โ5+1 2
โ โ1.618. Then ๐๐ =
5 + โ5 2 + . 10๐๐ (5 + โ5)๐๐
Proof. The roots of 1 โ ๐ฅ โ ๐ฅ2 are ๐ =
โ5โ1 2
and ๐ = โ
1 ๐ด ๐ต = ๐ฅ + 1 โ ๐ฅ โ ๐ฅ2 1โ 1โ ๐
๐ฅ ๐
โ5+1 2
. Solving
โ5โ1 2
โ
Fibonacci numbers gives ๐ด =
5+โ5 10
and ๐ต =
193 2 5+โ5 โ
. By the geometric series, โ
๐
โ
๐
1 ๐ฅ ๐ฅ ๐ด ๐ต = ๐ด โ ( ) + ๐ต โ ( ) = โ ( ๐ + ๐ )๐ฅ๐ ๐ ๐ ๐ ๐ 1 โ ๐ฅ โ ๐ฅ2 ๐=0 ๐=0 ๐=0 when |๐ฅ| < ๐. The coefficient of ๐ฅ๐ is the desired result. Corollary 25: A concise Fibonacci formula. The ๐th Fibonacci number is also given by 5 + โ5 ๐๐ = [ ], 10๐๐ where [๐ฅ] denotes the integer nearest to the real number ๐ฅ. 2 | | | is a decreasing sequence and has value 0.28 at ๐ = 0, the Proof. Since | | (5+โ5)๐๐ |
๐th Fibonacci number is the integer nearest to
5+โ5 10๐๐
.
Rather than Proposition 24 or Corollary 25, an alternative approach to finding a non-recursive formula for ๐๐ is to use binomial coefficients. Proposition 26: A binomial approach to the Fibonacci numbers. The ๐th Fibonacci number is ๐ 2
โ โ
๐๐ = โ ( ๐=0
๐โ๐ ). ๐
Proof. One way to compute the number ๐๐ is to consider a specific case for ๐ and then generalize. To climb ๐ = 7 stairs using jumps or strides of length 1 or 2, we must do one of the following: โข Seven steps, each of stride length 1. There is one way to do this, namely, 1 = (7โ0). 0
โข Six steps, 1 of stride 2 and 5 of stride 1. There are 6 ways to do this, 6 = (7โ1). 1
โข Five steps, 2 of stride 2 and 3 of stride 1. There are 10 ways to do this, 10 = (7โ2). 2
โข Four steps, 3 of stride 2 and 1 of stride 1. There are 3 ways to do this, 3 = (7โ3). 3
7 โ โ 2
7โ๐ So ๐7 = โ ( ) = 21. Generalizing this example, as the reader may do, gives ๐ ๐=0 the proposition.
194
Chapter VI: Families of Numbers
The next two results show how to use Fibonacci numbers to generate Pythagorean triples. Proposition 27: Another Fibonacci recursion. Let ๐๐ be the ๐th Fibonacci 2 number. For each integer ๐ โฅ 1, ๐๐โ1 + ๐๐2 = ๐2๐ . Proof. The number of ways for ๐ to pogo-stick climb 2๐ stairs is ๐2๐ . Alternatively, the number of ways to climb ๐ stairs is ๐๐ . So the number of ways for ๐ to climb 2๐ stairs so that ๐ actually lands on step ๐ is ๐๐2 . For ๐ to climb 2๐ stairs so as not to land on step ๐, ๐ must land on step ๐ โ 1, then take a jump of two 2 steps to land on step ๐ + 1. The number of ways for ๐ to do this is ๐๐โ1 . Corollary 28: Fibonacci-Pythagorean triples. For each integer ๐ > 2, (๐๐โ2 ๐๐+1 , 2๐๐โ1 ๐๐ , ๐2๐ ) is a Pythagorean triple. 2 2 Proof. By algebra, we know that (๐๐2 โ๐๐โ1 , 2๐๐โ1 ๐๐ , ๐๐โ1 +๐๐2 ) is a Pythagorean 2 2 triple. By Proposition 27, ๐๐โ1 + ๐๐ = ๐2๐ . Furthermore, by Equation (9), 2 ๐๐2 โ ๐๐โ1 = (๐๐ โ ๐๐โ1 )(๐๐ + ๐๐โ1 ) = ๐๐โ2 ๐๐+1 .
And so we have the corollary. Definition 29: The golden mean. The number ๐ = golden mean, where ๐ =
โ5โ1 2
1
=
๐
1+โ5 2
is called the
, as defined in Proposition 24.
Example 30: A look aheadโthe continued fraction for the golden mean. As a prelude example for Chapter IX, we find the continued fraction for the golden mean. As will be seen, we repeatedly use the identity ๐ = 1 + ๐. Using the same idea as introduced in Example II.4, where we generated the 532 , we write ๐ in the following form: continued fraction for the fraction 1193
๐=1+๐=1+
1 1
( ) ๐
=1+
1 1 1 =1+ =1+ ๐ 1+๐ 1+
1
1 ( ) ๐
Since we can continually expand ๐ as 1 +
1 ๐
=1+
1 1+
1
.
๐
, the simple continued fraction of
๐ is [1; 1, 1, 1, โฆ] with respect to the notation introduced in Definition 2 of the Introduction. Furthermore, the first few convergents of this infinite simple continued fraction are 1 3 5 2 1 1 1+ = , = , = , 1+ 1+ 1 1 1 1 2 3 1+ 1 1+ 1
1+
1
The continued fraction recursion for ๐
195
and so on. That is, the convergents of ๐ are the ratios of successive Fibonacci numbers. Exercise 2 explores how well these ratios approximate ๐. โข
The continued fraction recursion for ๐ Surprisingly, the continued fraction for ๐ has a Fibonacci-like recursive structure. Euler discovered this result in 1744. Example 31: Successive continued fraction partial denominators for ๐. Using the same ideas as in Example II.4 and Puzzle V.6 (and using the standard division algorithm), we find the first few remainders obtained from generating the continued fraction for ๐. In doing so we uncover a repeating pattern within ๐. Since this pattern is more clear in the number ๐ โ 1, we find the partial denominator representation for ๐ โ 1: ๐ โ 1 = [๐0 ; ๐1 , ๐2 , ๐3 , โฆ]. To highlight these partial denominators ๐๐ as we generate them, we box them. Step 0: By the division algorithm, ๐ โ 1 = 1 + (๐ โ 2). Thus ๐0 = 1 and the first remainder is ๐1 = ๐ โ 2 โ 0.718. 1
Step 1: By the division algorithm,
๐1
=
1 ๐โ2
1 ๐2
=
๐โ2 3โ๐
convergent is ๐ถ2 = 1 + Step 3: Similarly,
1 ๐3
= 2 + 1
Step 4: Similarly,
1 ๐4
= 1 +
11
1 ๐5
= 4+
8โ3๐ ๐โ3
3
3
. So ๐3 = 1, ๐4 =
11โ4๐ 3๐โ8
, ๐ถ3 = 1 +
7
1 1+
= ,
1
4
1 2+ 1
19โ7๐ 4๐โ11 19 7
. So ๐4 = 1, ๐5 =
19โ7๐ 4๐โ11
, ๐ถ3 = 1+
1 1+
=
1 2+
1
7
,
.
87โ32๐ 7๐โ19
, and ๐โs fifth convergent is
12
1 1+ 1
. So ๐5 = 4, ๐6 =
87โ32๐ 7๐โ19
, ๐ถ4 = 1+
1 1+
=
1 1
2+
1 1+
32
,
, and the second
1+
55
๐โ2
.
4
and ๐โs fourth convergent is Step 5: Similarly,
. Thus ๐2 = 2, ๐3 =
8
3๐โ8
and ๐โs third convergent is
3โ๐
= 2. So ๐โs first convergent
5
11โ4๐
= 1 +
๐โ3
1
. Thus ๐1 = 1, ๐2 =
= . So ๐โs second convergent is .
1 2
1+
8โ3๐
๐โ2
1
and the first convergent ๐ถ1 for ๐ โ 1 is ๐ถ1 = 1 + is 3. Step 2: Similarly,
3โ๐
= 1 +
87 32
.
1 4
196
Chapter VI: Families of Numbers
Continuing, we generate the list of partial denominators for ๐ โ 1: ๐ โ 1 = [1; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, 1, 10, โฆ]. โข
So the continued fraction for ๐ is ๐ = [2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, โฆ].
Example 32: Successive terms in (๐ โ 1)โs remainders of Example 31. The numerator and denominator expressions in the remainders of Example 31 are all of the form ๐๐+๐ where ๐ and ๐ are integers. Better yet, we write the denominators as ๐๐ โ ๐ where ๐, ๐ โ โ. We partition these expressions into three families of numbers, denoted by ๐ผ๐ , ๐ฝ๐ , and ๐พ๐ . The first few terms have the values given in Table 5. (The terms ๐ผ0 = ๐ โ 1 and ๐ฝ0 = โ1 were chosen as initial values so as to agree with a recursion we will characterize.) Table 5. Successive expressions in the continued fraction remainders of ๐ โ 1. ๐ผ0 ๐โ1
๐ฝ0 ๐พ0 โ1 ๐ โ 2
๐ผ1 ๐โ3
๐ฝ1 3๐ โ 8
๐พ1 4๐ โ 11
๐ผ2 7๐ โ 19
๐ฝ2 32๐ โ 87
๐พ2 39๐ โ 106
Observe that ๐ผ0 + ๐ฝ0 = ๐พ0 , ๐ฝ0 + ๐พ0 = ๐ผ1 , ๐พ0 + 2๐ผ1 = ๐ฝ1 , and ๐ผ1 + ๐ฝ1 = ๐พ1 . In general, it appears that the pattern is given by ๐ผ๐ = ๐ฝ๐โ1 + ๐พ๐โ1 ,
๐ฝ๐ = 2๐๐ผ๐ + ๐พ๐โ1 ,
and
๐พ๐ = ๐ผ๐ + ๐ฝ๐
(14) โข
for all ๐ โ โค+ . Proposition 33: The pattern of ๐.โ For each ๐ โ โ, let 1 ๐
๐ฅ (๐ฅโ1)๐ ๐๐ฅ ๐ด๐ =โซ ๐๐ฅ, ๐! 0
1 ๐+1
๐ต๐ = โโซ 0
1 ๐
๐ถ๐ = โโซ 0
๐ฅ
๐ฅ (๐ฅโ1) ๐!
(๐ฅโ1)๐ ๐๐ฅ ๐๐ฅ, ๐!
๐+1 ๐ฅ
๐
๐๐ฅ.
Then ๐ผ๐ = ๐ด๐ , ๐ฝ๐ = ๐ต๐ , and ๐ถ๐ = ๐พ๐ . Furthermore, ๐ผ๐ , ๐ฝ๐ , and ๐พ๐ converge to 0 as ๐ increases. Proof. See Exercise 4 for a proof and also a verification of the pattern in Equation (14), which is an adaptation from [28]. To illustrate this proposition, consider ๐พ2 = 39๐ โ 106 from Table 5. We know 106 106 that 39๐ โ 106 โ 0. Thus ๐ โ and ๐ โ โ 0.00033. 39
39
The Catalan numbersโ
197
d 0
n
Figure 9. A graphical representation of ๐0 .
The Catalan numbersโ In this section, we solve a classic puzzle, first solved by George Pรณlya (1887โ1985) in 1921. Puzzle 34: A random walk. Suppose that ๐ is a robot that moves back and forth along a number line, advancing one step (a unit length) to the right or one step to the left at each second with equal likelihood. If ๐ starts at the origin (home), what is the likelihood that ๐ will eventually return home? (We assume ๐ never stops.) โข Definition 35: Step terminology. A step sequence ๐ = {๐ 1 , ๐ 2 , ๐ 3 , โฆ} is a sequence whose terms ๐ ๐ are either 1 or โ1. A rightward step is recorded as 1 and a leftward step as โ1. Furthermore, ๐โs signed distance from 0 at time ๐ with respect to a step sequence ๐ is ๐
๐(๐) = โ ๐ ๐ . ๐=1
When we use the phrase step sequence of length n we mean the first ๐ terms of the step sequence. For example, the sequence ๐0 = {โ1, โ1, 1, 1, โ1, 1, 1} is a random walk of length seven. Figure 9 is a graphical representation of ๐0 given by the points (๐, ๐(๐)) joined by line segments. Thus the graph of ๐0 is formed by connecting the points (0, 0), (1, โ1), (2, โ2), (3, โ1), (4, 0), (5, 0), and so on. Figure 10 shows two random walks each of 100 steps. On the first walk ๐ returns home (whenever ๐(๐) = 0) several times on the hike, whereas in the second ๐ fails to do so. Observe that if ๐(๐) = 0 for the random walk ๐, then the number of 1โs and the number of โ1โs from ๐ 1 to ๐ ๐ must be the same. Thus if ๐(๐) = 0, then ๐ must be even. With this idea in mind we make the following definition.
198
Chapter VI: Families of Numbers S
S
100 0
0
a. ๐(๐) = 0 for several ๐ โค 100.
100
b. ๐(๐) > 0 for 0 < ๐ โค 100.
Figure 10. Two random walks, each of 100 paces. Definition 36: Primitive hikes. We say that a step sequence ๐ of length 2๐ is a mountain hike if ๐(0) = ๐(2๐) = 0 and ๐(๐) โฅ 0 for all integers ๐ with 0 โค ๐ โค ๐. Let ๐ถ๐ be the number of mountain hikes of length 2๐ for all ๐ โ โ. We say that a mountain hike ๐ of length 2๐ is a primitive mountain hike if ๐(๐) > 0 for all integers ๐ with 0 < ๐ < 2๐. Figure 11 shows the number of mountain hikes of length two, four, and six. For each hike, the light gray horizontal line is a base line. Of these eight hikes, four are primitive mountain hikes. If we shift the hikes up by one unit, prepending 1 and appending โ1 to each step sequence, then the mountain hikes in the figure become primitive mountain hikes of length four, six, and eight, respectively. Figure 12 shows that ๐ถ4 , the number of mountain hikes of length eight, is also the number of primitive mountain hikes of length ten. Figure 18 shows that ๐ถ5 , the number of mountain hikes of length ten, is the number of all primitive mountain hikes of length twelve. Generalizing these observations, we have the following proposition. Proposition 37: Primitive versus standard hikes. The number of mountain hikes of length 2๐ is the number of primitive mountain hikes of length 2๐ + 2. Furthermore, the step sequence corresponding to any primitive mountain hike longer than two must end with two left steps. Proof. The first statement follows from the definitions of primitive mountain hike and mountain hike. The simplest primitive mountain hike is {1, โ1}. Since clipping the first and last steps from any primitive mountain hike of length at least four gives a mountain hike of length at least two, and since every mountain hike must end in โ1, every primitive mountain hike ends with two left steps. The family of numbers ๐ถ๐ is called the Catalan numbers; they have a long history, summarized in Exercise 8. To find a way to determine the value of ๐ถ๐ in general, we try to view the Catalan numbers recursively so that ๐ถ๐ is defined in terms of ๐ถ๐ for values of ๐ smaller than ๐. One way to do this is to realize that each mountain hike must begin with a primitive mountain hike. Furthermore, since all mountain hikes
The Catalan numbersโ
a. ๐ถ1 = 1.
199
b. ๐ถ2 = 2.
c. ๐ถ3 = 5.
Figure 11. Mountain hikes for ๐ = 1, 2, 3.
of length 2 are primitive, ๐ถ0 = ๐ถ1 = 1, while otherwise, ๐ถ๐ is the number of primitive hikes of length 2๐ + 2. For example, Figure 12 sorts the fourteen mountain hikes counted by ๐ถ4 into four categories. Each hike itself is partitioned into two sub-hikes by a dashed vertical line. The sub-hikes to the left of the vertical line are primitive mountain hikes. The first of these categories, pictured in the top tier of the figure, consists of five mountain hikes, each of which is a primitive mountain hike of length two followed by a mountain hike of length six. The number of hikes in this category is 5 = ๐ถ0 ๐ถ3 . The second of these categories consists of two hikes, each of which is a primitive hike of length four followed by a mountain hike of length four. The number of hikes is 2 = ๐ถ1 ๐ถ2 . The third of these categories consists of two hikes, each of which is a primitive hike of length six followed by a mountain hike of length two. The number of hikes is 2 = ๐ถ2 ๐ถ1 . Finally, the fourth of these categories consists of five hikes, each of which is a primitive hike of length eight followed by a mountain hike of length zero. The number of hikes is 5 = ๐ถ3 ๐ถ0 . Thus the total number ๐ถ4 of mountain hikes of length eight is ๐ถ4 = ๐ถ0 ๐ถ3 + ๐ถ1 ๐ถ2 + ๐ถ2 ๐ถ1 + ๐ถ3 ๐ถ0 . In Exercise 5a, we ask for a similar partitioning of all 42 hikes, as counted by ๐ถ5 . The general convolution formula for ๐ถ๐ is thus ๐
๐ถ๐ = โ ๐ถ๐โ1 ๐ถ๐โ๐
with
๐ถ0 = 1.
(15)
๐=1
Definition 38: The Catalan generating function. The generating function โ for the Catalan numbers is ๐(๐ฅ) = โ๐=0 ๐ถ๐ ๐ฅ๐ .
200
Chapter VI: Families of Numbers
Primitive mountain hikes of length 2, followed by a mountain hike of length 6.
Primitive mountain hikes of length 4, followed by a mountain hike of length 4.
Primitive mountain hikes of length 6, followed by a mountain hike of length 2.
Primitive mountain hikes of length 8, followed by a mountain hike of length 0. Figure 12. Partitioning the hikes as counted by ๐ถ4 . Proposition 39: A Catalan relation. The Catalan function ๐(๐ฅ) satisfies the equation ๐(๐ฅ) โ 1 = ๐ฅ๐(๐ฅ)2 . (16) Proof. By Definition 38 and Equation (15), โ
โ
โ
๐
โ
(๐ฅ โ
๐(๐ฅ))๐(๐ฅ) = ( โ ๐ถ๐โ1 ๐ฅ๐ )( โ ๐ถ๐ ๐ฅ๐ ) = โ โ ๐ถ๐โ1 ๐ถ๐โ๐ ๐ฅ๐ = โ ๐ถ๐ ๐ฅ๐ . ๐=1
๐=1
๐=1 ๐=1
๐=1
โ
Since โ ๐ถ๐ ๐ฅ๐ = ๐(๐ฅ) โ 1, we have ๐ฅ๐(๐ฅ)2 = ๐(๐ฅ) โ 1. Solving for ๐(๐ฅ) gives its ๐=1
closed form. Proposition 40: A closed Catalan form. The closed form of the Catalan generating function is 1 โ โ1 โ 4๐ฅ ๐(๐ฅ) = . (17) 2๐ฅ
The Catalan numbersโ
201
Proof. Solving Equation (16) for ๐(๐ฅ) via the quadratic formula gives ๐(๐ฅ) = 1ยฑโ1โ4๐ฅ 2๐ฅ
lim๐ฅโ0
. Because ๐ถ0 = 1, we know that lim๐ฅโ0 ๐(๐ฅ) must be 1. Observe that
1+โ1โ4๐ฅ 2๐ฅ
fails to exist and, by LโHรดpitalโs rule, lim๐ฅโ0
1โโ1โ4๐ฅ 2๐ฅ
= 1.
From Corollary 21, we can find a formula for ๐ถ๐ . Proposition 41: A Catalan formula. For each ๐ โ โ, ๐ถ๐ =
1 2๐ ( ). ๐ ๐+1
(18)
Proof. By Corollary 21, Newtonโs binomial series gives โ
1 โ1 โ ๐ฅ
= โ ๐=0
(2๐) ๐
22๐
๐ฅ๐
(19) 1
for all ๐ฅ with |๐ฅ| < 1. Substituting 4๐ฅ for ๐ฅ in (19) means that for all ๐ฅ with |๐ฅ| < , 4
1
โ
= โ(
2๐ ) ๐ฅ๐ . ๐
โ1 โ 4๐ฅ ๐=0 Integrating Equation (20) from 0 to ๐ (and then replacing ๐ with ๐ฅ) gives โ
โ
1 1 1 1 2๐ 2๐ โ โ1 โ 4๐ฅ = โ ( ) ๐ฅ๐+1 = ๐ฅ โ ( ) ๐ฅ๐ ๐ ๐ 2 2 ๐ + 1 ๐ + 1 ๐=0 ๐=0
(21)
1
1โโ1โ4๐ฅ
4
2๐ฅ
for all ๐ฅ with |๐ฅ| < . Dividing Equation (21) by ๐ฅ shows that ๐(๐ฅ) = โ โ๐=0
(20)
๐ถ๐ ๐ฅ๐ , proving the desired result.
=
We can now answer our puzzle. Proposition 42: Solution of the random walk puzzle. With respect to Puzzle 34, ๐ returns to 0 with probability 100 percent. Proof. If ๐โs first step is to the right and ๐ eventually returns to 0, ๐ will do so for the first time along a primitive mountain path. The probability that ๐ 1 returns to 0 along a primitive mountain path of length two is ๐ถ0 ( )2 = ๐ถ0 /4. The 2 probability that that ๐ returns to 0 along a primitive mountain path of length four 1 is ๐ถ1 ( )4 = ๐ถ1 /42 . In general, the probability that ๐ returns to 0 along a primitive 2
mountain path of length 2๐ + 2 is ๐ถ๐ /22๐+2 = ๐ถ๐ /4๐+1 . Thus the probability that โ ๐ returns to 0 along a primitive mountain path is โ๐=0 ๐ถ๐ /4๐+1 . By symmetry, since ๐โs first step may be to the left, the probability that ๐ returns to 0 at least โ 1 1 once is 2 โ๐=0 ๐ถ๐ /4๐+1 = ๐( ) = 1 by Proposition 40. 2
4
202
Chapter VI: Families of Numbers
Pรณlya went on to show that if ๐ is allowed to take unit steps north and south as well as east and west with equal likelihood, the probability that ๐ returns home is again 1. But if ๐ is allowed to take unit steps up and down as well as in the four natural planar directions with equal likelihood, then ๐ has about probability 34% of returning home in an arbitrary random walk. Puzzle 43: A Chichen Itza random walk. Robot ๐ is positioned half-way up a staircase of ninety-one steps on the Chichen Itza pyramid at step forty-six, a step we call home. As in Puzzle 34, at each second, ๐ goes either up one stair or down one stair. After forty-five seconds, how far from home on the average is ๐? (The signed distance ๐(๐) on the average of course is zero.) โข To solve this puzzle we first calculate the average squared distance from home after ๐ steps. Proposition 44: Average squared distance from home. In a random walk, after ๐ steps, ๐โs average squared distance from home is ๐. Proof. By Definition 35, 2
๐
๐
๐(๐) = ( โ ๐ ๐ ) = โ ๐ 2๐ + 2 โ ๐ ๐ ๐ ๐ = ๐ + 2 โ ๐ ๐ ๐ ๐ , 2
๐=1
๐=1
๐ ๐
.
b. A ๐ cross-section.
Figure 21. Orientation ๐ต, a unit mass ๐ on the equator. To facilitate the resulting integration (since the ๐ cross-sections of Earth are no longer congruent as they were in orientation ๐ด), we take ๐๐ = ๐ ๐๐ ๐๐ง ๐๐ (rather than ๐ ๐๐ ๐๐ ๐๐ง). As before, the downward attraction on ๐ induced by point mass ๐ is proportional to ๐(๐ โ ๐ง) ๐๐ ๐๐ง ๐๐ . 3 (๐2 + (๐ โ ๐ง)2 ) 2 By symmetry, we partition Earth into four congruent sections, the regions deter๐ ๐ 3๐ 3๐ mined by 0 โค ๐ โค , โค ๐ โค ๐, ๐ โค ๐ โค , and โค ๐ โค 2๐. See Figure 20. 2 2 2 2 The sum over all downward attractions of point masses in each of the sections is exactly the same. Thus, when ๐ > ๐
, the sum of all of these attractions in Earth is ๐/2
๐ต(๐, ๐
) = 4 ๐ผ(๐, ๐
) โซ 0
where ๐ =
๐2 cos2 ๐ ๐
2
๐
โซ โซ โ๐
โ
๐2 โ๐ง2 ๐
๐(๐ โ ๐ง) 3
๐๐ ๐๐ง ๐๐,
(14)
(๐2 + (๐ โ ๐ง)2 ) 2
0
+ sin2 ๐. The outermost limits of integration are obtained ๐
by observing that ๐ ranges from 0 to , the section of one-quarter of Earth. In 2 each ๐ cross-section of this quarter of Earth, ๐ง ranges from โ๐ to ๐, from one side of the equator to its antipodes, as can be seen in Figure 21b. Thus the limits of integration for the middle integral are โ๐ and ๐. Finally, the set of all points for
286
Chapter VIII: Classic Elliptical Fractions
fixed ๐ and fixed ๐ง values is a line segment, shown as a dotted line in Figure 21b. The left-hand endpoint of this segment is ๐ = 0, and the right-hand endpoint is obtained by solving Equation (12) for ๐. Thus the limits of integration for the innermost integral are 0 and
๐2 โ๐ง2
. Again, by straightforward techniques (see โ ๐ Exercise 4b), Equation (14) simplifies to Equation (13). Now we check the result of these last two propositions with Newtonโs claim.
Proposition 20: Newtonโs ratio. With ๐ด(๐, ๐
) and ๐ต(๐, ๐
) as in Propositions 17 and 19, ๐ด(101, 100) 501 . โ 500 ๐ต(101, 100) Proof. By a CAS,6 ๐ด(101, 100)/๐ต(101, 100) โ 1.001985254, which is almost the same as 501/500 = 1002/1000 = 1.002. Example 21: The continued fraction for Newtonโs ratio.โ As a whimsical 501 question we ask: Is Newtonโs estimate of the best fraction (with denominator near 500) for the real number ๐ =
500 ๐ด(101, 100) ๐ต(101, 100)
โ 1.001985254?
From Chapter VIII, the first few harmonic convergents for ๐ are 1 โ
505 1514 โ . 504 1511
Checking the distances of the fractions || 501 โ ๐|| โ 0.000015 | 500 |
501 500
and
and
505 504
from ๐ gives
|| 505 โ ๐|| โ 0.0000028. | 504 |
505
501
is about an order of magnitude better than . But of That is, the convergent 504 500 course, Newtonโs fraction is certainly close enough to ๐ for all practical purposes. Nevertheless it is fun to wonder what Newton may have done with a computer.7 โข To account for the force of gravity on a unit mass at the equator of a rotating Earth, we need a little physics. Proposition 22: Centripetal force. The outward acceleration ๐ on a mass whose position at time ๐ก is ๐(๐ก) = ๐(cos ๐๐ก, sin ๐๐ก, 0) is ๐ = ๐๐2 . The force of this acceleration on a unit mass ๐ at the equator is also ๐๐2 . 6 See
Code 13 in Appendix III for a way to implement this calculation.
7 Paul Nahin, a prolific writer of popular mathematics, raises this question in Number Crunching
[108, pp. 305โ323].
Newtonโs case for a ๏ฌattened Earthโ
287
y y = 230/229
1.0044
1.0040 3953.5 1.0036 3950
thousands of miles
R 3975
Figure 22. The graph of ๐(๐
) = ๐ด(๐0 , ๐
)/๐ถ(๐0 , ๐
) versus
230 229
.
Proof. The second derivative of ๐(๐ก) is ๐โณ (๐ก) = โ๐๐2 (cos ๐๐ก, sin ๐๐ก, 0). This is the centripetal acceleration towards the center of this circle which must be applied to keep the mass on the path ๐(๐ก). Thus the outward acceleration (away from the center) has magnitude ๐๐2 . Definition 23: The length of a sidereal day. A sidereal day is the average length of time ๐ it takes for Earth to complete one rotation about its axis with respect to the background of the fixed stars. ๐ is about 23 hours, 56 minutes, and 4 seconds. Equivalently, ๐ โ 86 164 seconds. Proposition 24: Gravity at the equator of a rotating Earth. Let ๐ > ๐
. The gravity, denoted by ๐ถ(๐, ๐
), acting on a unit mass ๐ at the equator of a rotating Earth with period ๐ is ๐ถ(๐, ๐
) = ๐ต(๐, ๐
) โ ๐ (
2๐ 2 ) . ๐
(15)
Proof. Let mass ๐โs position at time ๐ก be ๐(๐ก) = ๐(cos ๐๐ก, sin ๐๐ก, 0) where ๐ = By Propositions 19 and 22, ๐ถ(๐, ๐
) is given by Equation (15).
2๐ ๐
.
For the final steps in calculating ฮ๐ (the amount by which Earth is flattened at the poles), Newton needed an approximation for the ratio of gravity at the pole and at the equator and an approximate value of Earthโs equatorial radius ๐. He ๐ assumed that at Paris, a ball falls = 2174 Paris lines in one second within a vac2 uum, where ๐ is the acceleration due to gravity at Paris.8 With this information, 8 There are 12 Paris lines to a Paris inch. Each Paris foot is composed of twelve Paris inches. And a Paris foot is about 12.79 English inches. As to why Newton used Paris units rather than English or London units, Newton respected the observational/experimental skill of Giovanni Cassini and felt free to use his data.
288
Chapter VIII: Classic Elliptical Fractions
Figure 23. Zeroing in on ฮ๐. Newton estimated that the ratio of gravity at the north pole and at the equator is as 230 is to 229. Finally, Newton used Cassiniโs estimate for ๐, namely ๐ = 3971 miles. Proposition 25: Newtonโs guess. If the ratio of polar gravity to equatorial gravity is 230/229 and if Earth is uniformly dense and ๐ = ๐0 = 3971 miles โ 6389.3 km, then ฮ๐ โ 17.1 miles โ 27.5 km. Proof. Let ๐(๐
) = ๐ด(๐0 , ๐
)/๐ถ(๐0 , ๐
). Figure 22 shows the graph of ๐ as ๐
ranges 230 from 3950 to 3975.9 As can be seen, ๐(3953.5) โ . The difference between 229 3971 and 3953.5 is 17.5 miles, very near Newtonโs guess of 17.1 miles. With better data, we might imagine that Newtonโs guess for ฮ๐ would improve. Yet reaching the north pole and taking gravity measurements there was science fiction in Newtonโs day.10 Puzzle 26: A better ratio. Calculate the value for ฮ๐ in Newtonโs model of Earth given that the acceleration due to gravity at the north pole is ๐๐ โ 9.832 m/sec2 and at the equator is ๐๐ โ 9.781 m/sec2 [91, p. 40]. To solve this puzzle, we use the 9 See
Code 13 in Appendix III to render this graph. for first reaching the north pole (or coming very close to it) is usually given to Robert Peary and his team of 1909. 10 Credit
The French expeditions to Peru and Lapland
289
method of minimizing the square root of the sum of the squares of the errors.11 Let โ(๐, ๐
) = โ(๐ด(๐, ๐
) โ ๐๐ )2 + (๐ถ(๐, ๐
) โ ๐๐ )2 . To find ๐ and ๐
values for which โ(๐, ๐
) is close to 0, we plot โโs contours. That is, we say that contour ๐ is the set of all points (๐, ๐
) for which โ has value ๐. With a computer algebra system,12 we plot the contours of โ(๐, ๐
) where โ is 0.01 and 0.005 m/sec2 , obtaining Figure 23. This information suggests that a close approximation for ฮ๐ occurs at (๐, ๐
) โ (3972, 3938) for a difference of 44 miles, over twice the approximation given in Proposition 25. Ironically, with better data,13 Newton would have gotten worse results, whereas with his slightly flawed data values, Newton came very close to the actual value of ฮ๐. โข
The French expeditions to Peru and Lapland As noted in the previous sections of this chapter, both Cassini and Newton assumed that Earth is an ellipsoid. Its profile is given parametrically by (๐ฅ, ๐ฆ) = (๐ cos ๐, ๐
sin ๐),
(16)
where ๐ is Earthโs equatorial radius, ๐
is Earthโs polar radius, and ๐ is a parameter with 0 โค ๐ โค 2๐, a representation discussed in Proposition 9. They disagreed on which was larger, ๐ or ๐
. In the early 1730s, as an effort to resolve this by then forty-plus-year stalemate, Pierre-Louis Moreau de Maupertuis (1698โ1759) successfully lobbied the French Academy of Sciences to launch expeditions both to the far north and to the equator to measure a degree of arc length along lines of longitude on Earthโs surface. Meanwhile, Maupertuisโs mathematics mentor Johann Bernoulli had written to him about the foolhardiness of these expeditions: Tell me, do the observers [of the proposed expeditions] have a predilection for one or the other of the two sentiments? Because if they favor the flattened Earth, they will find it flattened; if on the contrary, they are imbued with the idea of the elongated Earth, their observations will not fail to confirm its elongation; the difference between the compressed spheroid and the elongated is so slight, that it is easy to be mistaken if one wants to be mistaken in favor of one or the other opinion. [155, pp. 94โ95] 11 By virtue of letting ๐ be a unit mass on Earthโs surface in Definitions 16 and 18, we may interpret the units of ๐ด(๐, ๐
) and ๐ถ(๐, ๐
) as either newtons (a force) or m/sec2 (an acceleration). 12 See Code 13 in Appendix III to generate the contour graph. 13 One of the reasons why this new estimate of ฮ๐ is over 30 miles too much is that Earth fails to be uniformly dense, a key Newtonian assumption.
290
Chapter VIII: Classic Elliptical Fractions
Figure 24. A commemorative pyramid marking the northernmost node of the arctic expedition network, Kittisvaara, Finland; photo by author, 2012. The chosen site at the equator was near Quito in South America, a territory controlled by Spain, and the chosen site for the far north was in Lapland, controlled by Sweden. Diplomatic agreements were made between heads of state to allow a French expedition to take measurements on non-French soil. To facilitate these concessions and for both Spain and Sweden to maintain watch on a team of potential spies and contraband artists, Spain appointed two young navy lieutenants fresh from the military academy to work together as equals with the French in the Viceroyalty of Peru, while the Swede Anders Celsius, of the Celsius thermometer,14 had early on attached himself to the French team going to the arctic circle. To make their measurements, the geodesic teams laid out a network of triangles, most of the vertices of which were atop mountains. Some of these vertices are now national landmarks in Ecuador and Finland. For example, Figure 24 shows the marker at latitude 66โ N in Finland. The angles at each of the networkโs vertices were measured using the best of English optics. One edge, the baseline, from each network was measured using rods laid end to end. In Peru, the baseline is now the site of Quitoโs airport. In Finland, the baseline lay mostly along the frozen Tornio River. Figure 25 shows the French geodesic team taking measurements under the light of the aurora borealis during wintertime and perpetual darkness. By the summer of 1737, Maupertuisโs team had returned from Lapland with the arc length along one degree of longitude near the arctic circle measured as 69.52 miles (57 395 toises), and, in 1744, the equatorial team 14 Unlike in the modern Celsius scale, Celsius originally set the freezing point of water at 100โ and the boiling point at 0โ .
The French expeditions to Peru and Lapland
291
Figure 25. Measuring the baseline along the Tornio River at the arctic circle; sketch by J. Ansseau, 1882 [46]. arrived at the measurement of 68.76 miles (56 768 toises) for one degree of arc at the equator [70, p. 227]. How can we use this information to determine ฮ๐? The answer involves a little calculus.
How ฮ๐ gives ฮ๐ Definition 27: Latitude of an ellipse. By the latitude ๐ at a point ๐ on the ellipse as given by Equation (16), we mean the angle ๐ between a normal to the ellipse at ๐ and a line through ๐ parallel to the ๐ฅ-axis. The polar angle ๐ at a point ๐ on the ellipse is the angle at the origin ๐ measured between the positive ๐ฅ-axis and ray ๐๐. How does the parameter ๐ of the ellipse (๐ฅ, ๐ฆ) = (๐ cos ๐, ๐
sin ๐) relate to the latitude ๐ of the ellipse? Figure 26 shows the profile of a planet where ๐ = 2 and ๐
= 1. Proposition 28: Parameter, latitude, and polar relations. Consider the parametrized ellipse ๐(๐) = (๐ cos ๐, ๐
sin ๐). The latitude ๐ corresponding to parameter ๐ is ๐ ๐(๐) = tanโ1 ( tan ๐) ๐
and the polar angle ๐ corresponding to parameter ๐ is ๐ฆ ๐
๐(๐) = tanโ1 ( ) = tanโ1 ( tan ๐). ๐ฅ ๐ Proof. The slope of the tangent line to the parametrized curve at ๐ is given by ๐๐ฆ ๐๐ฆ/๐๐ ๐
cos ๐ ๐
= = = โ cot ๐, ๐๐ฅ ๐๐ฅ/๐๐ โ๐ sin ๐ ๐
292
Chapter VIII: Classic Elliptical Fractions
y ฮธ = 66.5ยฐ ฯ โ 29.9ยฐ
x
corresponding to ฯ โ 0.885019
Figure 26. An extreme model of Earthโs profile. which means that the latitude ๐ corresponding to parameter ๐ is ๐(๐) = tanโ1 (
๐ tan ๐) ๐
or, equivalently, that the parameter ๐ corresponding to latitude ๐ is ๐(๐) = tanโ1 (
๐
tan ๐). ๐
Meanwhile, the polar angle ๐ corresponding to parameter ๐ is ๐ฆ ๐
๐(๐) = tanโ1 ( ) = tanโ1 ( tan ๐). ๐ฅ ๐ Example 29: Arc length at the arctic circle and at the equator. For the ellipse of Figure 26, if ๐ = 66.5โ N, the latitude of the arctic circle, then ๐โs radian measure is 1.16064 radians, which corresponds to the parameter value ๐(1.16064) โ 0.855019, so that ๐(0.855019) โ 0.521805 radians, or about 29.9โ . โข Before we show the results of the French expeditions, we pause to solve Puzzle 4. Example 30: A solution to Puzzle 4. By Proposition 28, let ๐1 and ๐2 be ๐ ๐
parameters corresponding to 10โ and 80โ , namely, ๐1 = tanโ1 ( tan(10๐/180)) ๐
and ๐2 = tan
โ1
๐
( tan(80๐/180)). The arc length from the equator to 10โ on ๐ชโs ๐
surface is ๐1
๐๐ก (๐, ๐
) = โซ 0
2 2 2 2 โ๐ sin ๐ + ๐
cos ๐ ๐๐,
293
nt
10 โ5
R 7.0
co
co nto
R
ou r
0.1 ur
7.5
(9.132711, 7.213024)
10
โ4
The French expeditions to Peru and Lapland
7.21300 8.5
ฯ
9.13275 9.13270 ฯ
9.5
a. A first zoom.
10 โ4
contour 0.01
co nt ou r
6.5
co nt o
ur
7.21305
b. A closer zoom.
Figure 27. Zooming in on the solution to Puzzle 4. where ๐ก represents ten degrees. The arc length from 80โ to the north pole on ๐ชโs surface is ๐ 2
๐๐ (๐, ๐
) = โซ โ๐2 sin2 ๐ + ๐
2 cos2 ๐ ๐๐, ๐2
where n represents the north pole. Then the square root of the sum of the squares of the differences between ๐๐ก and 1 and between ๐๐ and 2 is ๐ = โ(๐๐ก โ 1)2 + (๐๐ โ 2)2 , a function in terms of ๐ and ๐
. We wish to find values ๐ = ๐0 and ๐
= ๐
0 for which ๐ is zero. As in Puzzle 26, we plot the contours of ๐. To obtain a reasonable first-guess range of points over which to plot various contours of ๐, we know that the arc length from the equator should be somewhere between 9 and 18 units, so the perimeter of the ellipse is between 36 and 72. Circles of these circumferences should have radii between about 6 and 12 units. Figure 27a shows various contours as ๐ ranges from 8 through 10 units and as ๐
ranges from 6 to 8 units. Figure 27b shows a much smaller window. The dot near the center point of these contours is the point at which ๐ would be 0. We approximate the coordinates of this point as (๐0 , ๐
0 ) โ (9.132711, 7.213024). Checking our work gives ๐๐ก (๐0 , ๐
0 ) โ 0.99999994 and ๐๐ (๐0 , ๐
0 ) โ 1.9999905. Let ๐ = ๐
0 /๐0 โ 0.78979987. The first few convergents for ๐ as given by the harmonic algorithm of Chapter VII are 1 โ
4 15 124 511 1657 โ โ โ โ . 5 19 157 647 2098
Chapter VIII: Classic Elliptical Fractions
Polar radius R in miles
294
3957
contour 0.005 3956
contour 0.01 3975 3974 Equatorial radius ฯ in miles
Figure 28. The polar and the equatorial expeditionsโ ๐ and ๐
.
For ellipsoid ๐ช, the ratio of its polar axis to its equatorial axis is about | 15 โ ๐| โ 0.0003). | 19 |
15 19
(since โข
Proposition 31: Vindicating Newtonโs guess. The French Academyโs mideighteenth century conclusion was that ฮ๐ โ 17.3 miles. Proof. Recall that the expeditionโs results for the lengths of one degree along meridians at the arctic circle and equator were 69.52 and 68.76 miles, respectively. To use these two measurements to determine Earthโs shape, we take ๐1 , ๐2 , and ๐3 as the respective radian measures of 66โ , 67โ , and 0.5โ N. Let ๐1 = ๐(๐1 ), ๐2 = ๐(๐2 ), and ๐3 = ๐(๐3 ). The arc length of one degree along the meridian at the arctic circle is ๐2 2 2 2 2 โ๐ sin ๐ + ๐
cos ๐ ๐๐,
๐๐ (๐, ๐
) = โซ
(17)
๐1
where ๐ represents the arctic circle, and the arc length of one degree along the meridian at the equator is ๐3
๐๐ (๐, ๐
) = 2 โซ
2 2 2 2 โ๐ sin ๐ + ๐
cos ๐ ๐๐,
(18)
0
where ๐ represents the equator. To find the ๐ and ๐
values that best reflect the two given arc length values, we use least squares and minimize โณ = โ(๐๐ โ 69.52)2 + (๐๐ โ 68.76)2 ,
(19)
A ๏ฌnal riddle
295
A O
D
B = (b, 0)
2ฯฯt
Figure 29. Planets ๐ and โฌ about the Sun. where ๐๐ and ๐๐ are from Equations (17) and (18). Figure 28 is a contour plot15 of โณ. The region within the larger oval represents all values (๐, ๐
) for which โณ is no larger than 0.01 miles. Hence the two geodesic expeditions launched by Louis XV give ๐ โ 3974.2 and ๐
โ 3956.9 miles, for a difference of ฮ๐ โ 17.3 miles, uncannily close to Newtonโs original estimate of 17.1 miles. The result of Proposition 31 is uncanny in that in later years it was determined that Maupertuisโs arctic team overestimated by about 0.25 miles. With this new arc length value of 69.27 miles and the equatorial teamโs old value of 68.76 miles, we get ๐ โ 3962.8 miles and ๐
โ 3951.3 miles, so that ฮ๐ โ 11.5 miles, not too far afield from satellite measurements of ๐ โ 3964.1 miles, ๐
โ 3950.8 miles, and ฮ๐ โ 13.3 miles.
A ๏ฌnal riddle Puzzle 32: A planetary riddle. Which two planets are nearest Earth? This question was asked on a popular televised quiz show, as noted in [123]. From Table 1, the semi-major axial distances in astronomical units (AU) from the Sun of the first five planetsโMercury, Venus, Earth, Mars, and Jupiterโare 0.387, 0.723, 1, 1.524, and 5.203, respectively. The differences of these distances from unity are 0.613, 0.277, 0, 0.524, and 4.203. Thus the reader might be tempted to answer Venus and Mars. But rare is the time when all the planets are aligned as in a bus queue. Instead, if we project each planet onto the orbital plane of Earth, at any particular time these planetary projection points are scattered higgledy-piggledy about that plane with respect to Earthโs position. Thus a better criterion to use when answering the question might be average distance from Earth. For a first attempt at 15 See
Code 14 in Appendix III for how to generate this graphic image.
296
Chapter VIII: Classic Elliptical Fractions
solving the puzzle, we assume that Mercury, Venus, Earth, and Mars have circular orbits about the Sun and proceed in their orbits with simple harmonic motion. We also assume that the orbital planes of all of these planets are the same. As we did in the last section of Chapter VII, let ๐ and โฌ be two athletes or planets running around a circular track with center ๐ = (0, 0). However, suppose that ๐ runs with period ๐ด in an inner lane of radial distance ๐ units from ๐, and โฌ runs with period ๐ต in an outer lane of radial distance ๐ from ๐. The ratio of their periods (โฌ to ๐) about the track is ๐0 = ๐ต/๐ด. Assuming that ๐โs period is shorter, as she has less distance to run to complete a circuit of the track, gives ๐0 > 1. For simplicity, we imagine โฌ is stationary, running in place. Thus, with respect to โฌโs position fixed at (๐, 0), ๐โs position is ๐(cos 2๐๐๐ก, sin 2๐๐๐ก) where ๐ก is time and ๐ = ๐0 โ 1 > 0, which we refer to as the relative angular velocity of ๐ to โฌ. At ๐ก = 0, ๐ is at (๐, 0). At ๐ก = ๐ units, where ๐ is an integer, โฌ has run in place a distance equivalent to completing ๐ circuits of the track. As illustrated in Figure 29, the distance ๐ท(๐ก) between ๐ and โฌ is ๐ท(๐ก) = โ(๐ cos 2๐๐๐ก โ ๐)2 + ๐2 sin2 2๐๐๐ก = โ๐2 + ๐2 โ 2๐๐ cos 2๐๐๐ก.
(20)
Let ๐ be Mercury and โฌ be Earth. Let ๐ = 0.387 astronomical units (AU), Mercuryโs distance from the Sun. Let ๐ = 1 AU, Earthโs distance from the Sun. And let ๐ โ 365.26/87.96 โ 1 โ 3.153. From the harmonic algorithm of Chap22 41 ter VII, two good approximations for ๐ are โ 3.143 and โ 3.154. Choosing 7 13 the latter option means that in thirteen years, Mercury has lapped Earth fortyone times, and at thirteen years, the Sun, Mercury, and Earth, in that order, are almost collinear. To say it another way, in the time that Earth completes thirteen circuits, Mercury has completed fifty-four circuits. Let ๐ท1 (๐ก) be the distance between ๐ and โฌ, Equation (20). The average distance between Mercury and Earth over thirteen years is about 13
13
1 1 โซ ๐ท1 (๐ก) ๐๐ก = โซ โ๐2 + ๐2 โ 2๐๐ cos 2๐๐๐ก ๐๐ก โ 1.038, 13 0 13 0
(21)
where ๐ = 0.387, ๐ = 1, and ๐ = 3.153. Because the integrand of Equation (21) is periodic, its average value should also be 1 ๐
๐ โซ โ๐2 + ๐2 โ 2๐๐ cos 2๐๐๐ก ๐๐ก โ 1.038,
(22)
0
matching the result of Equation (21). With respect to Earth and Venus, let ๐ be Venus and โฌ be Earth. This time, let ๐ = 0.723 AU, Venusโs distance from the Sun. Let ๐ = 365.26/224.70 โ 1 โ 5 5 0.6255 โ , where ๐ is the relative angular velocity, and where is a good ap8 8 proximation to ๐ given by the harmonic algorithm of Chapter VII. Let ๐ท2 (๐ก) be
A ๏ฌnal riddle
297
the distance between ๐ and โฌ, Equation 20. Thus the average distance between Venus and Earth is 8
8
1 1 โซ ๐ท2 (๐ก) ๐๐ก = โซ โ๐2 + ๐2 โ 2๐๐ cos 2๐๐๐ก ๐๐ก โ 1.135, 8 0 8 0 since Venus laps Earth five times in eight years. With respect to Earth and Mars, let ๐ be Earth and โฌ be Mars. This time, 37 let ๐ = 1 AU, ๐ = 1.524 AU, ๐ = 686.98/365.26 โ 1 โ 0.8808 โ , and ๐ท3 (๐ก) be 42 the distances of Earth and Mars from the Sun, respectively, their relative angular 37 velocity, and the distance between them as given by Equation (20), where is a 42 good approximation to ๐ by the harmonic algorithm. Then the average distance between Earth and Mars is 42
42
1 1 โซ ๐ท3 (๐ก) ๐๐ก = โซ โ๐2 + ๐2 โ 2๐๐ cos 2๐๐๐ก ๐๐ก โ 1.693, 42 0 42 0 since Earth laps Mars thirty-seven times in forty-two Martian years. Therefore, the two planets nearest to Earth in general, in order, are Mercury and Venus. โข Puzzle 33: The final riddle revisited.โ Compared with simple harmonic motion, how does the average distance between planets change when assuming an inverse square law for gravity? Since the orbits of Mercury, Earth, Venus, and Mars are nearly circularโ having respective approximate eccentricities of 0.21, 0.0068, 0.017, and 0.0934โ the answers should be nearly the same as those already calculated. Since Mercuryโs eccentricity is greatest in this list, we focus on the average distance between Earth and Mercury. In solving this puzzle for Mercury and Earth, we use some equations not derived in this book. As before, we assume that the orbital planes of Mercury and Earth are the same. Furthermore, we assume that at time ๐ก = 0, the Sun, Mercury, and Earth are collinear, and that Mercury and Earth are at their perihelia, the points in their orbits nearest the Sun. We assume Keplerโs laws of motion. As Newton showed, the radial distance ๐ of a planet from the Sun is (1 โ ๐2 )๐ โ2 /๐ = , (23) 1 + ๐ cos ๐ 1 + ๐ cos ๐ where ๐ is the planetโs orbital eccentricity, ๐ is the semi-major axial length of the elliptical orbit, ๐ is the polar angle from the Sun between the positive ๐ฅ-axis and the planetโs present position, ๐ is a gravitational constant, and โ is a constant of angular momentum, namely, ๐๐ โ = ๐2 , (24) ๐๐ก where ๐ก is time. ๐=
298
Chapter VIII: Classic Elliptical Fractions
4
Sun 0.2
2 40
20
80
0.1
t, in days
a. Angular displacement versus time.
b. Mercuryโs orbit, ๐ โ 0.21.
Figure 30. Mercuryโs orbit over time. Integrating Equation (24) using Equation (23) gives16 โ3
๐ก(๐) =
๐2 (1 โ ๐2 )
3 2
(๐ โ 2 tanโ1 (
๐ sin ๐ 1 + โ1 โ ๐2 + ๐ cos ๐)
)โ
๐โ1 โ ๐2 sin ๐ ), 1 + ๐ cos ๐
where ๐ก(๐) gives the time at which the planetโs polar angle is ๐. To avoid dealing with values of โ and ๐, let ๐ sin ๐ ๐ ๐ก(๐) ๐ ๐โ1 โ ๐2 sin ๐ = (๐ โ 2 tanโ1 ( ), )โ 2๐ 1 + ๐ cos ๐ ๐ก(2๐) 1 + โ1 โ ๐2 + ๐ cos ๐) (25) where ๐ is a planetโs period, ๐ is the planetโs eccentricity, and ๐๐, ๐ (๐) gives the time at which the planetโs polar angle is ๐. From Equation (25) we can find ๐ in terms of time ๐ก, ๐ = ๐๐,โ1๐ (๐ก), which we denote by ๐๐ (๐ก), where ๐ refers to a planet such as Earth, ๐ธ, or Mercury, ๐. Figure 30a shows Mercuryโs orbital angle displacement ๐ versus time ๐ก in days. Figure 30b shows Mercuryโs orbit as a series of dots at noon on each of eighty-eight consecutive days; when Mercury is near the Sun the dots are relatively far apart (showing that Mercury is moving relatively quickly), whereas when Mercury is far from the Sun the dots are relatively close together (showing that Mercury is moving relatively slowly). As already noted, the Sun, Mercury, and Earth realign after thirteen years. From a table17 of angular displacements for both Mercury and Earth over each day for the next thirteen years, Mercury and Earth on day ๐ are ๐ท(๐) astronomical units apart: ๐๐, ๐ (๐) =
โ โ ๐ท(๐) = โ๐๐ธ (๐๐ธ (๐))(cos ๐๐ธ (๐), sin ๐๐ธ (๐)) โ ๐๐ (๐๐ (๐))(cos ๐๐ (๐), sin ๐๐ (๐))โ โ โ (26) 16 The 17 See
details of this derivation appear in [131, pp. 65, 124, 310]. Code 15 of Appendix III for an example of how to generate such a table with a CAS.
Exercises
299
where ๐๐ธ and ๐๐ are instances of Equation (23) for Earth ๐ธ and Mercury ๐, and โ๐โ = โ๐ โ
๐ represents18 the magnitude of vector ๐. To approximate the average value of ๐ท(๐ก) over the next thirteen years, we reason numerically; we sum Equation (26) over the days in this time period and then divide by thirteen years, yielding 13โ
365
1 โ ๐ท(๐) โ 1.039 AU, 13 โ
365 ๐=1 which is almost the same result as when we approximated planetary motion using simple harmonic motion, Equation (22). Repeating a similar set of calculations with respect to Earth and Venus yields almost the same result as before, namely, an average distance of 1.136 AU. โข As can be seen, when planetary orbits are nearly circular, simple harmonic motionโeven though it only approximates realityโoften gives extremely good approximations in predicting what will happen, a rule of thumb we exploit in the final three chapters of this book. Exercises 1. In Figure 8, each of the fifty-four city-states are represented by a castle bearing a binary coded number. The binary number on castle is the decimal number 43. What is the decimal number of the castle at the capital of Utopia? 2. (a) Derive Equation (6) starting with โ(๐ฅ + ๐)2 + ๐ฆ2 + โ(๐ฅ โ ๐)2 + ๐ฆ2 = 2๐. (b) Derive the formula for the area of an ellipse. (c) Derive the formula for the volume of an ellipsoid of equatorial radius ๐ and polar radius ๐
. (An outline appears in Appendix IV.) (d) Show that the parametric representations for ๐ฅ and ๐ฆ from Equation (16) satisfy
๐ฅ2 ๐2
+
๐ฆ2 ๐
2
= 1. (An outline appears in Appendix IV.)
3. (a) Recall that at Paris, the acceleration due to gravity is ๐ = โ2(2174) Paris lines per second per second. Newton estimated that the ratio of gravity at Paris and at the equator is 2 295 667 to 2 290 000. Recall also that there are about 2.54 centimeters in one English inch. Use this information to show that Newtonโs estimate for Earthโs equatorial gravity was ๐๐ โ 9.785 m/sec2 . (b) Newton assumed that ๐๐ /๐๐ is approximately 230/229, where ๐๐ is Earthโs gravity at the north pole. Approximate Newtonโs value for ๐๐ in the metric system. 18 The
dot product of two vectors ๐ = (๐ฅ1 , ๐ฅ2 ) and ๐ = (๐ฆ1 , ๐ฆ2 ) is ๐ โ
๐ = ๐ฅ1 ๐ฆ1 + ๐ฅ2 ๐ฆ2 .
300
Chapter VIII: Classic Elliptical Fractions
P Peg 3 Peg 1 Peg 2 Figure 31. A curve with three foci. (c) Replicate the calculations appearing in Puzzle 26 using Newtonโs values for ๐๐ and ๐๐ . 4. (a) Derive the orientation ๐ด gravity formula, Equation (10). (b) Derive the orientation ๐ต gravity formula, Equation (13). 5. (a) Estimate the length between the two poles in Weuleโs hut as described on p. 274. (b) Draw the curve with three foci as shown in Figure 31. That is, imagine a length of ropeโthe dotted line in the figureโmade into a loop of a given length. We want the curve of all points ๐ for which a hoe at ๐ holds the rope taut with all three pegs either on the path of the rope or within the loop of the rope. 6. (a) Show that the sum of constructible numbers is constructible. ๐๐ (b) Given any length ๐, show that is constructible where ๐ and ๐ are ๐ positive integers. (c) Given any length ๐, show that โ๐ is constructible. (d) List a dozen constructible angles. (e) Find the semi-major and semi-minor axial lengths ๐ and ๐ for each ellipse given in Equation (7). What are the centers of these two ellipses? 7. (a) For an ellipse with semi-major and semi-minor axes of ๐ = 5 feet and ๐ = 3 feet, respectively, what are its arc lengths for one degree of arc centered at 0โ and at 45โ ? (b) Find the lengths of the semi-major and semi-minor axes of an ellipse if the length of one degree of arc centered at zero degrees is 1 meter and the length of one degree of arc centered at 45โ is 1.5 meters. 8. In the Principia, Newton observed that one degree centered half-way between London and York at latitude 0.9203 radians is given as 69.41 miles (57 300 toises) and another degree centered half-way between Corbeil (just south of Paris) and Amiens at latitude 0.8593 radians is 69.12 miles (57 060 toises); see
Exercises
301
[110, p. 822] and [147, p. 67โ77]. For the corresponding analog of โณ in Equation (19), find the (๐, ๐
) values that minimize the square root of the sum of the squares of the error and the corresponding ฮ๐ value. 9. From 1792 to 1799, the French Academy sponsored an expedition19 to measure ten degrees of arc along a meridian through Paris from latitude 40 degrees to 50 degrees. Their idea was to define a meter to be one ten-millionth of the way from the equator to the north pole. However, an oblate earth (where the polar radius is less than the equatorial radius) fails to attain its average meridianal arc length value at 45โ . How much of an error ๐ธ is incurred in making such an assumption? Assume that the Earthโs equatorial radius is ๐ = 6400 km, and take Newtonโs estimate that Earthโs polar radius ๐
is shorter by 27.7 km (17.1 miles). With Earthโs profile as the parametric curve (๐ cos ๐, ๐
sin ๐), and with the parameter ๐ associated with latitude ๐ given by ๐ = tanโ1 (๐
tan(๐)/๐), show that ๐ธ minus nine times the arc length from 40โ to 50โ is about 174 meters, which means that Newtonโs assumption yields an error in determining the length of the meter of about 0.02 mm. 10. All other variables remaining the same, suppose that Earthโs eccentricity is 0.4 and Mercuryโs eccentricity is 0.6, and calculate afresh the average distance between them over time.
19 The collection and analysis of the massive amount of attendant data for this scientific expedition marked the transition from the era of savants to the era of scientists.
Strand IX: The Cantor Set Strange as it might seem, once we adopt the real number system โ, when we measure the characteristics of objects or phenomena, such as mass or volume or intensity, with respect to standard units, such as the kilogram or the meter or the decibel, we almost always obtain a number that appears to be irrational. For example, measure the dimensions of your favorite breakfast cereal box to as many decimal places as possible, perhaps surpassing electron-microscope precision. Almost always, the decimal progression generated displays no apparent cyclical repetition in its digits. Because we must truncate our measurement at some degree of accuracyโmaking the resultant measured number by default a ๐ rational number , perhaps one with a very large integer denominator ๐โwe ๐
more or less treat the number as having a degree of uncertainty. Oftentimes, we ๐ ๐ ๐ desire a rational number where approximates well, with integer ๐ much ๐
๐
๐
smaller than ๐. The next chapter is an introduction to the art of finding such approximations. In this strand we use a classic set of real numbers, the Cantor set1 , to illustrate the phenomenon discussed in the last paragraph, that rational numbers are rare numbers in the set of real numbers.
A lotus-๏ฌower introduction To introduce the Cantor set, we consider a stylized image of the lotus flower from ancient Egypt. The lotus is the flower of the lily pad, as shown in Figure 1. At sunrise, the lotus rises above the water and opens. At sunset, the lotus closes and submerges for the night. The Egyptians used this flower to symbolize the cycle of life, of birth and death, of eternal renewal. It appeared extensively in their art and adorned many columns in their temples.
1 The Cantor set was initially constructed in 1874 by Henry John Stephen Smith and reintroduced by Georg Cantor in 1883.
303
304
Strand IX: The Cantor Set
a. A lotus flower.
b. A stylized lotus flower.
Figure 1. The lotus flower. Sometimes the lotus symbol is highly stylized, as in Figure 1b and in Figure 2. This latter figure displays the lotus at multiple scalings.2 In Figure 2a, the top of the column is adorned with four large lotus petals ๐0 . Smaller lotus petals, ๐1 , about half the height of ๐0 , rise from the base of those petals. In turn, another generation of petals, ๐2 , about half the height of ๐1 , rise from the base of the petals ๐1 , and so on, at least two more times. As shown in Figure 2b [33, Vol. I, Plate 26, Figure 5], an intriguing variation of the lotus flower was carved on a temple column on Philae Island in the Nile. The lotus flower has been stylized as a line segment. Beneath the upper tier of the largest line segments is a tier of line segments scaled by a factor of about one-third. In fact, it seems as if the second tier is the first tier with the middle third removed from each segment. Similarly, the third tier is the second tier with the middle third removed from each segment. And the fourth tier is the third 2 The artists and scientists who accompanied Napoleon on his 1799 Egyptian campaign reproduced these crest designs in their report, Description de lโEgypte.
a. Somewhat stylized.
b. Highly stylized.
Figure 2. Lotus flower ornamentation atop ancient Egyptian columns.
Ternary notation
305
Figure 3. The Cantor set. tier with the middle third removed from each segment. Figure 3 reproduces this pattern to the sixth tier.
Ternary notation The Cantor set is an idealization of this recursive pattern. To make this idea precise, we use base three. Observe that when we extend the base notation for integers in Definition I.10 to all real numbers, some numbers fail to have unique representations. For example, in decimal notation the integer one can be written 1 as both 1 and 0.999 โฆ. Similarly, has two representations in base three. It can be 1
1
3
written as = (0.1)3 and = (0.0222 โฆ)3 , where the former representation ter3 3 minates and the latter representation does not. With this idea in mind we make the following definition. Definition 1: Ternary notation. Let ๐ฅ โ โ with 0 โค ๐ฅ โค 1. We say that ๐ฅ is in standard ternary form, or simply ternary form, if it is written in base three and uses the nonterminating representation when ๐ฅ can be represented in two different ways. Following the convention of Chapter I, we let (๐ฅ)3 be the ternary form of ๐ฅ. When the context is clear, we may simplify this notation to ๐ฅ3 . The ternary expansion of ๐ฅ is denoted by (๐ฅ)3 = (0.๐1 ๐2 ๐3 โฆ)3 where ๐๐ is either 0, 1, or 2, for all positive integers ๐. Thus โ
๐ฅ = (0.๐1 ๐2 ๐3 โฆ)3 =
๐ ๐1 ๐2 ๐3 + 2 + 3 + โฏ = โ ๐๐ . 3 3 3 3 ๐=1
Example 2: One-fourth in ternary. To find the ternary representation of onefourth, write four as (11)3 and divide (11)3 into (1)3 , knowing that the quotient at each step of the algorithm can only be 0, 1, or 2. As illustrated in Figure 4, โ
1 2 2 2 = (0.0202 โฆ)3 = 2 + 4 + โฏ = โ 2๐ . 4 3 3 3 ๐=1
โข
306
Strand IX: The Cantor Set 11
0.0202 1.0000 22 100 22 1
Figure 4. Long division in base three. Definition 3: Scaling and translating sets. Let ๐ด be a nonempty subset of โ. Let ๐ผ, ๐ฝ โ โ. We say that the set {๐ผ๐| ๐ โ ๐ด}, denoted by ๐ผ๐ด, is a scaling of ๐ด and that {๐ + ๐ฝ| ๐ โ ๐ด}, denoted by ๐ด + ๐ฝ, is a translation of ๐ด by ๐ฝ. Definition 4: The Cantor set. Let ๐ผ, ๐ฝ โ โ with ๐ผ โค ๐ฝ. We say that the set of all real numbers ๐ฅ such that ๐ผ โค ๐ฅ โค ๐ฝ is the closed interval from ๐ผ to ๐ฝ, denoted by 1 2 [๐ผ, ๐ฝ]. Let ๐ถ0 = [0, 1]. Let ๐ถ1 = [0, ] โช [ , 1], the union of two closed intervals, 3
1
3
each of length . Observe that ๐ถ1 is obtained from ๐ถ0 by removing its middle 3 third. Let 2 1 2 7 8 1 ๐ถ2 = [0, ] โช [ , ] โช [ , ] โช [ , 1]. 9 9 3 3 9 9 Observe that ๐ถ2 is obtained from ๐ถ1 by removing the middle third interval from each of the two intervals comprising ๐ถ1 . Another way to view the construction of ๐ถ1 from ๐ถ0 and of ๐ถ2 from ๐ถ1 is to scale and translate and form unions. That 1 1 2 1 1 2 is, ๐ถ1 = ๐ถ0 โช ( ๐ถ0 + ), and ๐ถ2 = ๐ถ1 โช ( ๐ถ1 + ). For each ๐ โ โ, let 1
3
1
3
2
3
3
3
3
๐ถ๐+1 = ๐ถ๐ โช ( ๐ถ๐ + ). The Cantor set, ๐ถ, is the intersection of all ๐ถ๐ , namely, 3
3
3
๐ถ=
โฉ
๐โฅ0
๐ถ๐ .
As a useful tool in analyzing the Cantor set, we define the digit operator on ๐ฅ, denoted by dig(๐ฅ, ๐), as the integer dig(๐ฅ, ๐) = ๐๐ , the ๐th ternary digit in ๐ฅ for positive integers ๐. Proposition 5: The Cantor set is nonempty. Let ๐ถ be the Cantor set. Let ๐ฅ = (0.๐1 ๐2 ๐3 โฆ)3 be a real number between 0 and 1. Then ๐ฅ โ ๐ถ if and only if ๐๐ is either 0 or 2 for every ๐ โ โค+ . Proof. Observe that ๐ถ0 = [0, 1]. By definition of ๐ถ1 , ๐ฅ โ ๐ถ1 if and only if ๐1 = 0 or ๐1 = 2. Let ๐ โ โ and assume that ๐ฅ โ ๐ถ๐ if and only if none of the first ๐ฆ ๐ ternary digits of ๐ฅ are 1. Let ๐ฅ โ ๐ถ๐+1 . There exists ๐ฆ โ ๐ถ๐ with ๐ฅ = or ๐ฆ
2
3
๐ฅ = + . In either case, dig(๐ฅ, ๐ + 1) = dig(๐ฆ, ๐) โ {0, 2} for all integers ๐ with 3 3 1 โค ๐ โค ๐. In the former case, dig(๐ฅ, 1) = 0, and in the latter case, dig(๐ฅ, 1) = 2. Conversely, let ๐ฅ โ [0, 1] with dig(๐ฅ, ๐) = ๐๐ โ {0, 2} for integers ๐, 1 โค ๐ โค ๐ + 1.
Ternary notation
307
If ๐1 = 0, then 3๐ฅ โ ๐ถ๐ and ๐ฅ = 1
2
1 3
(3๐ฅ). If ๐1 = 2, then 3๐ฅ โ 2 โ ๐ถ๐ and
๐ฅ = (3๐ฅ โ 2) + . So ๐ฅ โ ๐ถ๐+1 if and only if ๐ฅโs first ๐ + 1 ternary digits are 0 or 3 3 2. By mathematical induction we conclude that for each ๐ โ โ, ๐ฅ โ ๐ถ๐ if and only if ๐๐ is never 1 for all positive integers ๐ with ๐ โค ๐. Let ๐ฅ โ ๐ถ. Then ๐ฅ โ ๐ถ๐ for all ๐ โ โ so that none of the ternary digits of ๐ฅ are 1. The next proposition demonstrates an especially surprising property of ๐ถ. Exercise 1 outlines a few more Cantor set properties. Observe that ๐ถ0 consists of one closed interval of length 1. ๐ถ1 consists of two 1 2 disjoint closed intervals each of length for a combined length of . In general, 3
1
3
2
๐ถ๐ consists of 2๐ pairwise-disjoint intervals each of length ๐ . Since ( )๐ โ 0 as 3 3 ๐ increases, it would seem as if the Cantor set should be sparsely populated with real numbers. Proposition 5 shows that the Cantor set has an infinite number of elements. However, the next proposition shows that ๐ถ has as many elements as the closed interval [0, 1]. Proposition 6: The cardinality of the Cantor set. Let ๐ โถ ๐ถ โ [0, 1] be defined by ๐((0.๐1 ๐2 ๐3 โฆ)3 ) = (0.๐1 ๐2 ๐3 โฆ)2 , where ๐ฅ = (0.๐1 ๐2 ๐3 โฆ)3 and ๐๐ = ๐๐ /2 for all integers ๐ โฅ 1, for all ๐ฅ โ ๐ถ. Thus the cardinality of ๐ถ is the same as the cardinality of the set of real numbers between 0 and 1. Furthermore, this cardinality exceeds that of the set of rational numbers in the unit interval. Proof. Let ๐ฅ โ ๐ถ. Then, by Proposition 5, every digit in (๐ฅ)3 is divisible by two. The only difference between 0.๐1 ๐2 ๐3 โฆ and 0.๐1 ๐2 ๐3 โฆ as strings of digits is that every occurrence of the digit 2 in the former is the digit 1 in the latter, and vice versa. Since this function is an onto mapping from ๐ถ into the unit interval ๐ผ, ๐ถโs cardinality is at least as large as the set [0, 1]. Since ๐ถ โ [0, 1], these two cardinalities are the same. Showing the last statement of the proposition is Exercise 3a, using a famous Cantor diagonalization argument. The recursion present in the Cantor set gives rise to beautiful patterns when rendered in more than one dimension. Any Cantor-like recursive structureโin which we continually split an item into two itemsโdescribes what is called a binary tree, a graph discussed in Chapter IV. We illustrate this tree growth in Figure 5, where an upright stem gives rise to two branches of shorter length inclined away from a continuation of the stem by a given angle. Each of these sub-branches gives rise to two new branches,
308
Strand IX: The Cantor Set
a. Level 1.
b. Level 2.
c. Level 3.
d. Level 4.
Figure 5. Budding levels of a binary tree.
Figure 6. A level-ten binary tree. and so on. When we repeat this budding sequence ten times, the tree of Figure 6 appears.3
A reality checkโ Consider the mind experiment of throwing a dart at a unit interval ๐ผ dart board. When throwing any dart, suppose it lands at some random number in ๐ผ. In particular, for any subinterval ๐ฝ of ๐ผ, suppose that the probability of the dart landing in ๐ฝ is the length of ๐ฝ. By Definition 4, intuition suggests that the dart should land in the Cantor set with probability zero. By Proposition 6 and Exercise 3a, the cardinality of the Cantor set exceeds that of the set of rational numbers โ[0, 1] in ๐ผ. Furthermore, Exercise 3b shows that โ[0, 1] is a set of outer measure zero; that is, for any small positive number ๐ it is a subset of a countable4 collection of open intervals where the sum of the lengths of the intervals is less than ๐. That is, more formally, it appears that the dart should land in โ[0, 1] with probability zero. 3 See
Code 16 of Appendix III for an example of how to generate these fractal trees with a CAS. set is countably infinite if it has the same number of elements as โค+ . A set is countable if it either has a finite number of elements or is countably infinite. 4A
A reality checkโ
309
To echo the introduction to this strand, when reporting numerical information such as age, height, or weight, we tend to use integers or simple fractions. This habit might persuade the typical person in the street that simple fractions make up a goodly percentage of the set of all real numbers. But as the Cantor set shows us, simple fractions are rare. Yet the beauty of simple fractions is their simplicity. To that end, given an irrational number ๐ and any small positive number ๐, we would like to find the simplest fraction for which the distance between ๐ and that fraction is less than ๐. This next chapter explores several algorithms that solve this very natural problem.
Chapter IX: Continued Fractions The lore and literature of continued fractions is long and storied.5 โLifetimes could be devoted to their studyโ [40, p. 98]. This book is but an introduction. Given a positive irrational number ๐, we outline two different ways to obtain rational number approximations, called convergents, to ๐ using continued fractions. One way is to focus on a sequence of remainder terms ๐๐ (defined below) without explicitly involving the convergents, which we call a local approach. A second way is to focus on the convergents without explicitly involving a remainder, which we call a global approach. Although the former method is the approach to continued fractions taken in many introductory number theory texts, we pursue the latter approach at length to highlight applications of both the Euclidean algorithm for the greatest common divisor of Chapter III and the SternBrocot tree of Chapter IV. In particular we consider several specific convergentfocused algorithms, contrast them, demonstrate how the harmonic algorithm of Chapter VII relates to them, and then give some applications of continued fractions.
A local approach to continued fractions As we define a continued fraction, we first of all restrict our attention to continued fractions of irrational numbers. We do so for the sake of simplicity, even though continued fraction results for irrationals largely hold for rationals. As one author put it, โIt requires disproportionate circumstantiality to formulate the results [for rationals] since ambiguities arise thereโ [13]. Definition 7: Ordinary continued fractions. We say that the list of partial denominators [๐0 ; ๐1 ๐1 , ๐2 ๐2 , ๐3 ๐3 , โฆ] is an ordinary continued fraction where ๐0 is an integer and, for each positive integer ๐, ๐๐ is a positive integer and ๐๐ is either 1 or โ1. Each list of the first ๐ + 1 partial denominators, sometimes called 5 The term continued fraction was first coined by John Wallis in his 1653 Arithmetica Infinitorum.
311
312
Chapter IX: Continued Fractions
a section of the continued fraction, evaluates6 to convergent ๐, denoted by ๐ถ๐ , for all ๐ โฅ 0: ๐ ๐1 ๐1 , โฆ. ๐ถ0 = ๐0 , ๐ถ1 = ๐0 + 1 , ๐ถ2 = ๐0 + ๐2 ๐2 , ๐ถ3 = ๐0 + ๐1 ๐1 + ๐1 + ๐3 ๐2 +
๐2
๐3
When the sequence ๐ถ๐ converges to a number ๐, we write ๐ = [๐0 ; ๐1 ๐1 , ๐2 ๐2 , ๐3 ๐3 , . โฆ]. At each stage in this sequence of convergents there is a remainder term ๐๐ where ๐๐ is a real number satisfying the equations ๐1 ๐1 , ๐ = ๐0 + ๐ = ๐0 + ๐1 , ๐ = ๐0 + , โฆ. ๐ ๐1 + ๐2 ๐1 + 2 ๐2 +๐3
Sometimes we refer to the remainder ๐๐ as an error term. Finally, we say that the representation of a continued fraction is customary if at each stage, ๐๐ is chosen so that ๐๐+1 has magnitude less than 1. A convergent is customary if it is the convergent of a customary continued fraction representation. The next example explores a divergent continued fraction. Example 8: A wild continued fraction. Let ๐ด be the ordinary continued fraction ๐ด = [0; 2, โ1, โ2, 1, 2, โ1, โ2, 1, โฆ] = [0; 2, โ1, โ2, 1 ]. This innocent-looking continued fractionโs first three convergents are ๐ถ0 = 0, 1 1 ๐ถ1 = , and ๐ถ2 = โ1 = 1. But 2
2+
1
๐ถ3 = where we identify
1 0
1 2+
โ1 1+
โ1 2
=
1 2+
โ1 1 2
=
1 1 = = โณ, 2โ2 0
with the symbol โณ. The list of ๐ดโs convergents is a progres-
sion of half-steps to infinity interrupted every fourth time with a hiccup of โณ eradicating the (missing) terms 3 + 4๐: 1 5 9 13 0, , 1, โณ, 2, , 3, โณ, 4, , 5, โณ, 6, , 7, โฆ , 2 2 2 2 where ๐ โ โ. โข After considering Example 8, one might think that using positive and negative partial denominators is a poor idea. How can we guarantee convergence of a continued fraction with such ingredients? Yet we can salvage the idea by sometimes disallowing 1 and โ1 as partial denominators. Towards that end we make the following definition. 6 Note
that some convergents may be undefined due to division by 0.
A local approach to continued fractions
313
Definition 9: Tame continued fractions. We say that an ordinary continued fraction [๐0 ; ๐1 ๐1 , ๐2 ๐2 , ๐3 ๐3 , โฆ] is a tame continued fraction if either ๐๐ โ 1 for all integers ๐ โฅ 1 or ๐๐ = 1 for all ๐ โฅ 1. Unless specified otherwise, all continued fractions for the rest of this book are tame. Tame continued fractions have two great properties: All of their convergents are fractions, as shown in the next proposition, and each tame continued fraction converges to some real number, as shown in Proposition 20. Furthermore, in Definition 21, we characterize six continued fraction algorithms that generate (tame) continued fraction representations for any given irrational number. Proposition 10: Existence of convergents for tame continued fractions. Let ๐ถ๐ be convergent ๐ for some tame continued fraction, ๐ โ โ. Then ๐ถ๐ โ โ for all ๐. Proof. Note that ๐ถ0 and ๐ถ1 are in โ for any ordinary continued fraction. For any tame continued fraction [๐0 ; ๐1 ๐1 , ๐2 ๐2 , ๐3 ๐3 , โฆ], for each integer ๐ > 1 let ๐2 . ๐ท๐ = ๐1 + ๐3 ๐2 + ๐3 + ๐๐ โฑ๐ ) ๐โ1 + ( ๐๐ We will show that ๐ท๐ > 1 for all ๐ > 1, which will imply that ๐ถ๐ = ๐0 + ๐1 /๐ท๐ is in โ. Observe that ๐ท๐ > 1 for all tame continued fractions whose partial denominators are all positive, for all ๐ > 1. Next, consider any tame continued fraction whose partial denominators ๐๐ ๐๐ 1 1 1 ๐ have magnitude at least 2, ๐ โฅ 1. Since โค , we have ๐1 + 2 โฅ ๐1 โ โฅ 2โ
๐2
1
2
๐2
2
> 1. Thus ๐ท2 > 1 for all tame continued fractions. 2 Suppose that ๐ท๐ โค 1 for some ๐ > 2 for some tame continued fraction. Then among the tame continued fractions there is a continued fraction, call it [๐0 ; ๐1 ๐1 , ๐2 ๐2 , ๐3 ๐3 , โฆ], for which ๐ท๐ โค 1 where ๐ is as small as possible; call it ๐0 . We know that ๐0 > 2 and that ๐ท๐ > 1 for all tame continued fractions with 1 โค ๐ < ๐0 . By our inductive hypothesis, ๐3 > 1. ๐2 + ๐3 + ๐๐0 โฑ๐ ) ๐0 โ1 + ( ๐๐0 So ๐1 +
๐2 ๐2 +
๐3 +
๐3
๐๐0 โฑ๐ ) ๐0 โ1 + ( ๐๐0
> ๐1 โ 1 โฅ 1,
314
Chapter IX: Continued Fractions
a contradiction. Thus ๐ท๐ > 1 for all ๐. Puzzle 11: A repeating list. What number is represented by the continued fraction ๐ = [3; โ5, 3, โ5, 3, โ5, โฆ]? The first few convergents ๐ถ๐ and their decimal equivalents are
๐ถ0 = 3, ๐ถ1 = 3 โ
๐ถ4 = 3 โ
1 1 โ 2.8, ๐ถ2 = 3 โ 5 5+ 1
5+
โ 2.81328,
1 3โ
1
โ 2.8125, ๐ถ3 = 3 โ
3
๐ถ5 = 3 โ
1 5+
1 3
1 5+
1 5+
1 5+
1 1 5
3โ
If ๐ is a real number, then ๐ must satisfy the identity 3 โ
1 5+
1 ๐
this equation gives 5๐2 โ 13๐ โ 3 = 0, whose solution is ๐ = must be positive, ๐ =
13+โ229 10
โ 2.8133,
1 3โ 5
โ 2.81327.
1 3โ
1
= ๐. Simplifying 13ยฑโ229 10
. Since ๐ โข
โ 2.81327.
In Lemma 12 we discover that the successive remainder terms ๐๐ introduced in Definition 7 are recursively related. Further, sgn(๐๐ ) = ๐๐ for all ๐ โ โค+ . Lemma 12: A remainder algorithm. Let ๐ be a positive irrational number with partial denominator list ๐ = [๐0 ; ๐1 ๐1 , ๐2 ๐2 , โฆ], where ๐0 is either the floor or the ceiling of ๐ and ๐1 = ๐ โ ๐0 . For each ๐ โฅ 1, the remainder terms ๐๐ satisfy the recursive relation ๐ ๐๐+1 = ๐ โ ๐๐ . (1) ๐๐ Furthermore, if the list of partial denominators is customary, then ๐๐ is either the ๐ floor or the ceiling of ๐ and ๐๐ = sgn(๐๐ ). ๐๐
Proof. By Definition 7, ๐๐ =
๐๐ ๐๐ +๐๐+1
. Solving this equation for ๐๐+1 yields Equation
(1). If the list of partial denominators is customary, then ๐๐+1 has magnitude less ๐ than 1, and so ๐๐ must be either the floor or the ceiling of ๐ . Furthermore, for ๐๐
customary continued fractions, since ๐๐ + ๐๐+1 must be positive (and since ๐๐ is either 1 or โ1), ๐๐ = sgn(๐๐ ). Example 13: Puzzle 11 revisited. We show that the list of partial denominators for ๐ =
13+โ229 10
= [3; โ5, 3, โ5, โฆ] is customary.
A local approach to continued fractions
315 R
L
n=4
n=3 3
4
22 7 ฮตn = 15
ฮตn=16
333 106
ฮตn = โ1
ฮตn = 8
ฮตn = 7
25 8 ฮตn= โ1 ฮตn = โ2
355 113
47 15
22 7
ฮตn = โ2
3
ฮตn= โ1 ฮตn=7
ฮตn=6
25 8
22 7
7 2
ฮตn = โ2 10 3
3
Figure 7. A tree of the first few possible customary convergents for ๐, Example 14.
From the list of partial denominators, we know that ๐1 = โ1 = ๐3 and ๐2 = 1. By Lemma 12, ๐1 = ๐ โ 3 = ๐2 =
โ229โ17 10
โ โ0.186. Thus |๐1 | < 1. By the lemma again,
โ229 โ 13 ๐1 17 + โ229 โ5= โ5= โ 0.355. ๐1 6 6
So |๐2 | < 1. By the lemma again, ๐3 =
๐2 ๐2
โ3=
13+โ229 10
โ3=
โ229โ17
the remainders ๐๐ alternate, and all have magnitude less than 1.
10
= ๐1 . Thus โข
Example 14: Customary convergents to ๐. Within the realm of ordinary continued fractions, what are all the possible first few customary convergents for ๐? In working through this example, at each stage we have two choices for the ๐ next partial denominator ๐๐ corresponding to taking the floor or the ceiling of ๐ as described in Lemma 12.
๐๐
Step 0: By the lemma, we have two choices for ๐0 . Call them ๐(๐ฟ) = 3 and ๐(๐
) = 4 (๐ฟ for left and ๐
for right). These are also the ๐ถ0 convergents; call them ๐ถ(๐ฟ) = 3 and ๐ถ(๐
) = 4. The first remaindersโthe differences ๐๐ between ๐ and ๐0 โare ๐(๐ฟ) = ๐ โ 3 โ 0.14 and ๐(๐
) = ๐ โ 4 โ โ0.86. Call the sign of these ๐1 remainders ๐(๐ฟ) = 1 and ๐(๐
) = โ1.
316
Chapter IX: Continued Fractions
Step 1: The magnitudes of the reciprocals of the two ๐1 remainders are ๐(๐ฟ) 1 1 = โ โ 7.063 ๐ โ 3 0.14 ๐(๐ฟ)
๐(๐
) โ1 1 = โ = 1.165. ๐ โ 4 0.86 ๐(๐
)
and
We have four choices for ๐1 . Call them ๐(๐ฟ๐ฟ) = 7, ๐(๐ฟ๐
) = 8, ๐(๐
๐ฟ) = 1 and ๐(๐
๐
) = 2. Thus our four different first convergents ๐ถ1 for ๐ are ๐(๐ฟ)
โข ๐ถ(๐ฟ๐ฟ) = ๐(๐ฟ) +
๐(๐ฟ๐ฟ)
โข ๐ถ(๐ฟ๐
) = ๐(๐ฟ) + โข ๐ถ(๐
๐ฟ) = ๐(๐
) + โข ๐ถ(๐
๐
) = ๐(๐
) +
๐(๐ฟ) ๐(๐ฟ๐
) ๐(๐
) ๐(๐
๐ฟ) ๐(๐
) ๐(๐
๐
)
1
=3+ =3+ =4+
=4โ
22
=
7 1
7
=
8
โ1 1
8
= 3.125,
= 3,
1
=
2
25
โ 3.14286,
7 2
= 3.5.
Let ๐ข be a string of ๐ฟโs and ๐
โs, and let ๐ be either ๐ฟ or ๐
. In general, by Lemma 12, the remainder ๐(๐ข๐) is ๐(๐ข๐) =
๐(๐ข) โ ๐(๐ข๐). ๐(๐ข)
(2)
The next ๐2 remainders are ๐(๐ฟ๐ฟ) โ 0.0625, ๐(๐ฟ๐
) โ โ0.937, ๐(๐
๐ฟ) โ 0.165, and ๐(๐
๐
) โ โ0.835. So ๐(๐ฟ๐ฟ) = 1, ๐(๐ฟ๐
) = โ1, ๐(๐
๐ฟ) = 1, and ๐(๐
๐
) = โ1. Step 2: As in Step 1, we need the magnitudes of the reciprocals of the remainders. By Equation (2), we have ๐(๐ฟ๐ฟ) โ 15.997, ๐(๐ฟ๐ฟ)
๐(๐ฟ๐
) โ 1.067, ๐(๐ฟ๐
)
๐(๐
๐ฟ) โ 6.0625, ๐(๐
๐ฟ)
๐(๐
๐
) โ 1.198. ๐(๐
๐
)
Taking the floor or ceiling of each of these four remainders gives eight possible ๐2 partial denominators: ๐(๐ฟ๐ฟ๐ฟ) = 15, ๐(๐
๐ฟ๐ฟ) = 6,
๐(๐ฟ๐ฟ๐
) = 16, ๐(๐ฟ๐
๐ฟ) = 1, ๐(๐
๐ฟ๐
) = 7, ๐(๐
๐
๐ฟ) = 1,
๐(๐ฟ๐
๐
) = 2, ๐(๐
๐
๐
) = 2.
The first of these eight integers, ๐(๐ฟ๐ฟ๐ฟ), generates the ๐ถ2 convergent ๐(๐ฟ)
๐ถ(๐ฟ๐ฟ๐ฟ) = ๐(๐ฟ) +
๐(๐ฟ๐ฟ)
๐(๐ฟ๐ฟ) +
=3+
๐(๐ฟ๐ฟ๐ฟ)
1 7+
1
=
333 . 106
15
Similarly, the eight ๐ถ2 approximations are, respectively, ๐ถ(๐ฟ๐ฟ๐ฟ) = ๐ถ(๐
๐ฟ๐ฟ) =
333 106 22 7
, ๐ถ(๐ฟ๐ฟ๐
) =
,
๐ถ(๐
๐ฟ๐
) =
355 113 25 8
, ๐ถ(๐ฟ๐
๐ฟ) =
,
22
,
๐ถ(๐ฟ๐
๐
) =
๐ถ(๐
๐
๐ฟ) = 3,
๐ถ(๐
๐
๐
) =
7
47 15 10 3
, .
Finally, these first few convergents for ๐ are displayed in the tree of Figure 7.
โข
A local approach to continued fractions
317
How do we decide which way to proceed down the binary tree of convergents for any given positive irrational number ๐? The oldest, and perhaps simplest, method, which we refer to as the regular continued fraction,7 is to take the floor ๐ of ๐ . We illustrate this algorithm in the next example (the same algorithm as was ๐๐
used in Example II.4, p. 38, and Example VI.31, p. 195). The reader may contrast its results with those of Puzzle V.6, p. 152. Example 15: A local approach to a regular continued fraction.8 We illustrate the dynamics of generating partial denominators for Eulerโs constant, ๐พ โ 0.5772156649, a number introduced in Proposition V.4. At each stage in ๐
generating the next partial denominator, we let ๐๐ = โ ๐ โ as in Lemma 12. Ap๐๐
plying this decision rule gives ๐๐ = 1 for all positive integers ๐. At each step, we box the partial denominator. Step 0: In the context of the lemma, ๐ = ๐พ. Thus ๐0 = โ๐พโ = 0 . Then ๐1 = ๐พ โ ๐0 = ๐พ. So ๐ถ0 = 0. 1
Step 1: Intuition might suggest that ๐1 is 2 because is the unitary fraction 2 nearest ๐พ. Instead, we follow the rule of applying the floor function and let 1
1
๐1
๐1 1
๐1 = โ โ = โ1.732 โฆโ = 1 . Let ๐2 = convergent ๐ถ1 for ๐พ is therefore ๐ถ1 = 0 +
1
โ ๐1 โ 0.732. The first regular = 1.
1
1
๐2 1
๐2
Step 2: Let ๐2 = โ โ = โ1.365 โฆโ = 1 , so that ๐3 = ๐ถ2 = 0 +
1 1+
1 1
=
2
โ ๐2 โ 0.365. So
. At this point the user of this algorithm might be some-
what disappointedโbecause our intuition had already suggested this result, probably at step 0. But, patience! Also realize that speedier continued fraction algorithms exist (such as the algorithm introduced in Puzzle V.6). 1
1
๐3
๐3
Step 3: Let ๐3 = โ โ = โ2.73โ = 2 , so that ๐4 = 0+
3
1 1+
= .
1 1+
โ ๐3 โ 0.73. Thus ๐ถ3 =
1 2
5
Step 4+ : Continuing this process, we generate ๐พ = [0; 1, 1, 2, 1, 2, 1, 4, 3, 13, 5, 1, โฆ]๐
7 Richard Guy (b. 1916), in a talk at the Joint Mathematical Meetings on 9 January 2013 in San Diego, coined the terms reg and neg for the regular continued fraction and the negative continued fraction algorithms. 8 We treat ๐พ as an irrational number.
318
Chapter IX: Continued Fractions
where the subscript ๐
denotes the regular continued fraction which we recognize as a simple continued fraction. The first few regular convergents for ๐พ are 1 3 4 11 15 71 228 (3) 0, 1, , , , , , , , โฆ. 2 5 7 18 26 123 395 โข
A global approach to continued fractions In order to harness the power of the Stern-Brocot tree structure9 developed in Chapter IV and to apply our skill in using recursion as practiced in Chapter VI, we change our focus from local to global. In particular, to generate a positive irrational number ๐โs successive convergents, we will use a second-order recursion with respect to its convergents. As useful notation to begin this recursive process, the expressions ๐ถโ1 and ๐ถโ2 are referred to as the pre-initial convergents for ๐. To understand the notation of this next proposition, review the Chapter IV material on general mediants. Proposition 16: From a local to a global approach. Let ๐ be a positive irrational number whose customary and tame partial denominators are given by ๐ = [๐0 ; ๐1 ๐1 , ๐2 ๐2 , ๐3 ๐3 , โฆ], and let ๐โ2 = 0, ๐โ2 = 1, ๐โ1 = 1, ๐โ1 = 0, ๐๐ = ๐๐ ๐๐โ1 + ๐๐ ๐๐โ2 , ๐๐ = ๐๐ ๐๐โ1 + ๐๐ ๐๐โ2 ,
(4) when ๐ โฅ 0.
Then for all integers ๐, ๐ โฅ โ2, the convergents for ๐ are ๐ถ๐ =
๐๐ ๐๐
.
Proof. Observe that the preconvergent ๐ถโ1 is our place-holder โณ. Since the initial partial denominator is ๐0 , ๐ถ0 = ๐0 ๐ถโ1 โ ๐ถโ2 = ๐0 . By Definition 7, ๐ ๐ + ๐1 โ
1 ๐ ๐ ๐ + ๐1 ๐โ1 ๐ ๐ + ๐1 ๐ = 1 0 = 1. ๐ถ1 = ๐0 + 1 = 1 0 = 1 0 ๐1 ๐1 ๐1 โ
1 + ๐1 โ
0 ๐1 ๐0 + ๐1 ๐โ1 ๐1 Thus the proposition is true for ๐ = 1. In terms of the general mediant notation of Chapter IV, this equation is ๐ถ1 = ๐1 ๐ถ0 โ ๐1 ๐ถโ1 = ๐1 ๐1 ๐ถ0 โ ๐ถโ1 because
๐1 ๐1
=
โ๐1 โ๐1
.
Next, suppose that ๐ถ๐ = ๐๐ ๐ถ๐โ1 โ ๐๐ ๐ถ๐โ2 is true for ๐ โฅ 1. We must show that ๐ถ๐+1 = ๐๐+1 ๐ถ๐ โ ๐๐+1 ๐ถ๐โ1 . Observe that 9 Although we constructed the Stern-Brocot tree with respect to fractions between 0 and 1, a similar construction occurs for each interval [๐, ๐ + 1] for all ๐ โ โค. Alternatively, given a positive irrational number ๐, we can find continued fraction representations for ๐ โ โ๐โ and then add โ๐โ to those representations.
A global approach to continued fractions
319
๐ถ๐+1 = [๐0 ; ๐1 ๐1 , ๐2 ๐2 , โฆ , ๐๐+1 ๐๐+1 ] ๐1 = ๐0 + ๐2 ๐1 + ๐2 + โฑ๐ ๐โ1 + (
๐๐ ) ๐ ๐๐ + ๐+1 ๐๐+1 ๐ = [๐0 ; ๐1 ๐1 , ๐2 ๐2 , โฆ , ๐๐โ1 ๐๐โ1 , ๐๐ (๐๐ + ๐+1 )] ๐๐+1 ๐ = (๐๐ + ๐+1 )๐ถ๐โ1 โ ๐๐ ๐ถ๐โ2 ๐๐+1 ๐ (๐๐ + ๐+1 ) ๐๐โ1 + ๐๐ ๐๐โ2 ๐ (๐ ๐ + ๐๐ ๐๐โ2 ) + ๐๐+1 ๐๐โ1 ๐๐+1 = ๐+1 ๐ ๐โ1 = ๐๐+1 ๐ (๐ ๐ ๐+1 ๐ ๐โ1 + ๐๐ ๐๐โ2 ) + ๐๐+1 ๐๐โ1 ) ๐๐โ1 + ๐๐ ๐๐โ2 (๐๐ + ๐๐+1
=
๐๐+1 ๐๐ + ๐๐+1 ๐๐โ1 ๐ = ๐+1 . ๐๐+1 ๐๐ + ๐๐+1 ๐๐โ1 ๐๐+1
We refine Proposition 16 into an algorithm for generating successive convergents using the notation of the general mediant from Chapter IV. As ๐๐ ๐๐ ๐ถ๐โ1 โ ๐ถ๐โ2 = ๐๐ ๐ถ๐โ1 โ ๐๐ ๐ถ๐โ2 , we adopt the former representation for the next convergent ๐ถ๐ rather than the latter because it seems to be a simpler expression (although we must remember that a double negative is a positive). Next, we observe that Proposition 16 implies that successive convergents of tame continued fractions are adjacent Farey fractions. Lemma 17: A Euclidean relation between successive convergents. Let ๐ be a positive irrational number with a tame continued fraction representation. Let ๐ถ๐ be the convergents of ๐ for all ๐ โฅ โ2. ๐ถ0 is either โ๐โ or โ๐โ. For all ๐ ๐ ๐ โฅ โ1, with ๐ถ๐ = and ๐ถ๐โ1 = , then ๐
๐
๐๐ โ ๐๐ = ยฑ1. That is, ๐ถ๐โ1 and ๐ถ๐ are adjacent fractions in some Farey sequence for all ๐ โฅ 1. Proof. Solving ๐ = ๐ ๐ถโ1 โ ๐ถโ2 = ๐ means that ๐ถ0 is either either โ๐โ or โ๐โ. Observe that 1 โ
1 โ 0 โ
0 = 1 and ๐0 โ
0 โ 1 โ
1 = โ1. So the lemma is true when ๐ is โ1 and 0. ๐ Assume that the lemma is true for some integer ๐ โฅ 0. Let ๐ถ๐+1 = . We ๐
must show that ๐๐ โ ๐๐ = ยฑ1. We know that there exists a nonzero integer ๐ with ๐ถ๐+1 = ๐๐ถ๐ โ ๐ถ๐โ1 . Thus, ๐ = ๐๐ + ๐ and ๐ = ๐๐ + ๐. Observe that ๐๐ โ ๐๐ = (๐๐ + ๐)๐ โ (๐๐ + ๐)๐ = ๐๐๐ + ๐๐ โ ๐๐๐ โ ๐๐ = ๐๐ โ ๐๐ = ยฑ1. By Proposition IV.15, successive convergents are adjacent Farey fractions.
320
Chapter IX: Continued Fractions
For a given irrational number ๐, the next lemma recursively produces partial denominators and convergents rather than starting with a list of partial denominators and then finding the convergents. Lemma 18: The global algorithm. Let ๐ be a positive irrational number. Let ๐ > 1 and assume that partial denominators ๐๐ ๐๐ and convergents ๐ถ๐ for ๐ are ๐ ๐ known for โ1 โค ๐ < ๐. Let ๐ถ๐โ1 = and ๐ถ๐โ2 = . The next convergent ๐ถ๐ is ๐
๐
๐ถ๐ = ๐๐ ๐๐ ๐ถ๐โ1 โ ๐ถ๐โ2 , where ๐๐ is either the floor or the ceiling of ๐๐ ๐ ๐ and ๐๐ = sgn(๐ ๐ ) with ๐ ๐ =
๐ โ ๐๐ . ๐๐ โ ๐
(5)
Proof. Let ๐๐ be the remainder terms as in Lemma 12. Let ๐ ๐ be the reciprocal of ๐๐ . Once we extend the definition of partial denominators in Definition 7 to include real numbers, by Proposition 16 we have ๐ = [๐0 ; ๐1 ๐1 , ๐2 ๐2 , โฆ , ๐๐โ1 ๐๐โ1 ,
๐ ๐+๐ 1 1 , ] = ๐ถ๐โ1 โ ๐ถ๐โ2 = ๐ ๐ ๐ถ๐โ1 โ ๐ถ๐โ2 = ๐ ๐๐ ๐๐ ๐ ๐ ๐ + ๐
where ๐ ๐ = ๐ is the solution to ๐= which is ๐ =
๐โ๐๐ ๐๐โ๐
๐ ๐ + ๐ , ๐ ๐ + ๐
. By Lemmas 12 and 17, this lemma is true.
Now we rework Example 15 in terms of this lemma. Example 19: Revisiting Example 15โa global approach to a regular convergent. This time, to approximate ๐พ in accordance with the regular continued fraction algorithm, our partial denominators ๐๐ will be โ๐ ๐ โ, where ๐ ๐ is given by 1 0 Equation (5). By Proposition 16, ๐ถโ1 = and ๐ถ0 = โ๐พโ = 0 = . Let ๐ = 0, ๐ = 1, 0 1 ๐ = 1, ๐ = 0, and ๐ = 1, in the notation of the proposition. As in Example 15, ๐๐ = 1 for all positive integers ๐. At each step we box the partial denominator. Step 1: By Lemma 18, ๐ 1 = ๐1 = 1 and ๐ถ1 = Step 2: With ๐ถ1 = and ๐ถ2 =
๐2 ๐2
=
๐
๐1 ๐1
=
= 1
0+1โ
1
=
1โ๐พโ
0 ๐พโ
1โ0
=
1 ๐พ
โ 1.732. The floor of ๐ 1 is 1, so
1
= . So ๐1 = 1 and ๐1 = 1. 1
and ๐ถ0 =
๐ 1 0+1โ
1 1 1+1โ
1
๐โ๐พ๐
๐พ๐โ๐ 1+1โ
0
๐ ๐
0
โ๐พ
1
๐พโ1
= , we have ๐ 2 =
= . So ๐2 = 1 and ๐2 = 2. 2
โ 1.365, ๐2 = 1 ,
A global approach to continued fractions
321
B = C โ (โA) C= B โ (โA) B is a parent of A B= c C= vu d A=BโC B is the father of A โ B C is a parent of A A= a b AโB A is the mother of A โ B, Aโ2B
R
Aโ3B Aโ4B
A โ B = C โ (โ2A)
3Aโ5B 3Aโ4B
C โ (โ3A) C โ (โ4A)
2Bโ3A
2Aโ3B
2Aโ5B
Bโ2A
3Bโ4A
3Bโ5A
Bโ3A 2Bโ5A
C โ (โ5A) Bโ4A
Figure 8. General mediants on a subtree of the Stern-Brocot tree, same as Figure IV.9. Step 3: With ๐ถ2 = and ๐ถ3 =
๐3 ๐3
=
๐
=
1
and ๐ถ1 =
๐ 2 1+2โ
1 3
1+2โ
2
๐ ๐
1
1โ๐พโ
1
1
๐พโ
2โ1
= , we have ๐ 3 =
โ 2.73, ๐3 = 2 ,
= . So ๐3 = 3 and ๐3 = 5. 5
+
Step 4 : Continuing in this fashion gives the same list of convergents as in Example 15. โข Proposition 20: Convergence of tame continued fractions.โ The tame continued fraction [๐0 ; ๐1 ๐1 , ๐2 ๐2 , ๐3 ๐3 , โฆ] converges to some real number. Proof. By Proposition 10 and Lemmas 17 and 18, the convergents, ๐ถ0 , ๐ถ1 , ๐ถ2 , and so on, for this continued fraction exist, and successive convergents are neighbors in some Farey sequence. For each ๐ โฅ 1, let ๐ท๐ = ๐ถ๐+1 โ (โ๐ถ๐ ). Because the continued fraction is tame, the denominators of its successive convergents strictly increase, so by Proposition IV.38 we know that ๐ถ๐ and ๐ท๐ are the parents of ๐ถ๐+1 . Let ๐ผ๐ be the closed interval between ๐ถ๐ and ๐ท๐ for each ๐. Because ๐ถ๐ and ๐ท๐ are the parents of ๐ถ๐+1 , ๐ถ๐+1 โ ๐ผ๐ . See Figure 8. Identify ๐ถ๐+1 with node ๐ด, ๐ถ๐ with node ๐ต, and ๐ท๐ with node ๐ถ in the figure. Observe that ๐ถ๐+2 = ๐๐+2 ๐๐+2 ๐ถ๐+1 โ ๐ถ๐ โ ๐ผ๐ . For the same reason, ๐ถ๐ โ ๐ผ๐ for all ๐ โฅ ๐. That is, the convergents of any tame continued fraction go ever down the SternBrocot tree; they never double back on themselves. Note that ๐ผ๐+1 โ ๐ผ๐ for all ๐ โฅ 1. By Proposition IV.15, the length of ๐ผ๐ collapses to zero as ๐ gets large. Thus a standard analysis theorem guarantees that the intersection of all of these nested closed intervals is a set consisting of one real number, call it ๐. Therefore the convergents for this continued fraction converge to ๐. So now it makes sense to write ๐ = [๐0 ; ๐1 ๐1 , ๐2 ๐2 , ๐3 ๐3 , โฆ].
322
Chapter IX: Continued Fractions
A plethora of continued fractions Besides the regular continued fraction algorithm illustrated in Examples 15 and 19, other continued fraction algorithms are available. In Chapter VII, we developed the harmonic algorithm to approximate irrational numbers with rational numbers. We claimed that it is equivalent to a continued fraction algorithm. Which one? The first few harmonic convergents for ๐พ are 1 4 15 71 , , , . 2 7 26 123 Since this list does not exactly match the first few regular convergents for ๐พ as given by Equation (3), the harmonic and regular algorithms are not equivalent. To explore other options, we consider the following list. As we saw in Example 14 and Lemma 18, to define a continued fraction algorithm we simply adopt a decision rule on whether the magnitude of the next partial denominator is the floor or ceiling of |๐ ๐ | at each stage in our tree of all possible customary convergents. The following list10 is a showcase of various continued fraction algorithms within this general context as defined by their specific decision rules, each referenced by a capital letter. For any given positive irrational number ๐, all algorithms except Algorithm ๐ generate tame continued fraction representations for ๐. 1,
Definition 21: Common decision rules.11 Given a positive irrational number ๐ ๐ ๐โ๐๐ ๐, let ๐ถ๐ be convergent ๐ of ๐. With ๐ถ๐โ1 = and ๐ถ๐โ2 = , let ๐ ๐ = . The ๐ ๐ ๐๐โ๐ following list, each algorithm labeled with a capital letter, gives various ways of defining ๐๐ ๐๐ from ๐ ๐ . R: As we have seen, the regular continued fractionโs decision rule is ๐๐ = โ|๐ ๐ |โ. As will be shown in Corollary 23, ๐ ๐ > 0 for all ๐. Thus ๐๐ = 1 and ๐๐ = โ๐ ๐ โ. We also refer to this continued fraction as Algorithm ๐
. N: The negative continued fractionโs decision rule is ๐๐ = โ|๐ ๐ |โ. As will be shown in Corollary 23, ๐ ๐ < 0 for all integers ๐ โฅ 1. Thus ๐๐ = โ1. We refer to this continued fraction as Algorithm ๐. 10 The seven items in this list give an idea of the variety of ways in which the next partial fraction may be chosen. For subsequent chapters of this book, we primarily use only rules ๐
, ๐, and ๐บ. 11 Computer algebra system codes are given in Appendix III that will generate the continued fraction partial denominators and convergents for Algorithms ๐
, ๐, and ๐บ, in Codes 17, 18, and 19, respectively.
A plethora of continued fractions
323
Z: The nearest integer continued fractionโs decision rule is ๐๐ = [|๐ ๐ |] 1
or, equivalently, ๐๐ = โ|๐ ๐ | โ โ sometimes referred to as the arithmetic mean 2 rule.12 This nearest integer continued fraction, or NICF, was first studied by Adolf Hurwitz (1859โ1919) in the late nineteenth century [74]. We also refer to NICF as Algorithm ๐ because โค is used to denote the set of integers. S: Let ๐ = is
3โโ5 2
โ 0.382, sometimes called a silver mean. The silver mean rule ๐๐ = โ|๐ ๐ | โ ๐โ.
So if ๐ ๐ โ 4.31, then ๐๐ = 4. But if ๐ ๐ โ 4.39, then ๐๐ = 5. This singular continued fraction, or SCF, was also introduced by Hurwitz. He reasoned that, all other things being equal, if we must choose between two candidates for officeโsuch as the center of a basketball teamโwe often tend to favor the taller one. Thus the silver mean rule favors choosing โ|๐ ๐ |โ over โ|๐ ๐ |โ. Furthermore, as will be shown in Proposition 22, choosing โ|๐ ๐ |โ always results in ๐ถ๐+1 being closer to ๐ than is ๐ถ๐ . G: Let ๐ = ๐๐ โ|๐ ๐ |โ๐ถ๐โ1 โ ๐ถ๐โ2 and ๐ = ๐๐ โ|๐ ๐ |โ๐ถ๐โ1 โ ๐ถ๐โ2 . A greedy decision rule is to choose โ|๐ ๐ |โ if |๐ โ ๐| < |๐ โ ๐|, ๐๐ = { โ|๐ ๐ |โ otherwise. The algorithm is called greedy because we are choosing the option yielding the ๐ถ๐ convergent nearer to ๐. An elegant way to apply this greedy rule is given in Proposition 26. O: Let ๐ and ๐ be defined as in Algorithm ๐บ. As introduced in Definition 10, 1 ๐ ๐ a good rational approximation13 for ๐ is one where |||๐ โ ||| < 2 , where ๐ ๐
and ๐ are positive integers. The fraction ||๐ โ ๐ || < | ๐|
1 2๐
๐ ๐
๐
๐
is a really-good approximation if
. With this in mind, an optimal decision rule is to choose 2
๐๐ = {
โ|๐ ๐ |โ โ|๐ ๐ |โ
if ๐ is a really good approximation to ๐, otherwise.
This optimal continued fraction rule was introduced by Wieb Bosma in 1987 [14]. By slightly modifying the proof of Corollary 23, as the reader may show, 12 An alternate, yet equivalent, rule is ๐ ๐ 1
|๐ ๐ | = ๐ +
1
= โ|๐ ๐ |โ |โ. The beauty of this alternate rule is that when 2
1
for some integer ๐, the value of ๐๐ is ๐, whereas the value of [๐ + ] is ambiguous. 2 1 13 See Exercise VI.2 for fractions ๐ approximating the golden mean ๐ where ||๐ โ ๐ || < . | โ5๐2 ๐ ๐| 2
324
Chapter IX: Continued Fractions
y c
(0, d )
s= โ2
(โ1, cโa ) dโb
s= โ3 s = โ4
y=ฯ y=
s=1 s= 2
a b
(โ1, cโa ) dโb
s-axis
a. ฯ between ab and cd.
diants of
๐
c d
(0, )
s=1
a
y= b y=ฯ s= 2 s-axis
b. ab and cd on the same side of ฯ.
Figure 9. The hyperbola ๐ฆ = ๐
s = โ2
y
๐
๐+๐๐
adorned with general me-
๐+๐๐
and . ๐
at each stage ๐ in the continued fraction algorithm, at least one of ๐ and ๐ is a really-good approximation. Similarly to Proposition 26, Proposition 28 gives an elegant way to apply ๐โs decision rule.
M: This next rule is a variation on the regular ๐
continued fraction rule. It is called the Minkowski diagonal continued fraction and was introduced by Hermann Minkowski in 1901. Using a trick as given in Equation (8) below and ๐ as we demonstrate in Example 24, Algorithm ๐ discards any convergent ๐
1
generated by Algorithm ๐
if ๐|๐๐ โ ๐| > . 2
For the tameness of each of these continued fraction algorithms, note that ๐
generates tame continued fractions. By Proposition 25, an outline in Exercise 4d, and [13], so do ๐บ, ๐, ๐, ๐, and ๐. The next proposition outlines an option we can exercise when constructing a continued fraction for a given irrational number. Proposition 22: A closer convergent. Let ๐ be a positive irrational number. Suppose that convergents ๐ถ๐ for ๐ have been chosen for all nonnegative integers ๐ with ๐ < ๐, where ๐ is a positive integer. Then ๐ถ๐ can be chosen so that it is closer to ๐ than is ๐ถ๐โ1 .
A plethora of continued fractions
325
Proof. With respect to the terminology of Lemma 18, let ๐ถ๐โ1 = ๐ ๐ =
๐โ๐๐ ๐๐โ๐ 14
, and ๐๐ = sgn(๐ ๐ ). Let ๐(๐ ) =
๐๐ +๐ ๐๐ +๐
๐ ๐
, ๐ถ๐โ2 =
๐ ๐
,
. The graph of ๐ฆ = ๐(๐ ) is a hy-
perbola, as exemplified in Figure 9. If ๐ = 1, then the ๐ฆ-axis is an asymptote ๐ 1 of the hyperbola, and we identify = with โณ. Otherwise, the ๐ฆ intercept of the hyperbola is at (0, ๐
๐ ๐
๐
0
). As ๐ โ ยฑโ the graph of the hyperbola approaches ๐
๐
the asymptote ๐ฆ = . If ๐ is between and , as illustrated in Figure 9a, then ๐ ๐ ๐ the hyperbola and the line ๐ฆ = ๐ intersect at ๐ = ๐ ๐ where ๐ ๐ > 0. So ๐๐ = 1. ๐ ๐ Then the set { , ๐(โ๐ ๐ โ), ๐, ๐(โ๐ ๐ โ), } is in either increasing or decreasing order. ๐
๐
๐
Thus, ๐(โ๐ ๐ โ) is closer to ๐ than . So ๐ถ๐ (which must be either ๐(โ๐ ๐ โ) or ๐(โ๐ ๐ โ)) ๐ can be chosen to be closer to ๐ than ๐ถ๐โ1 . ๐ ๐ However, if and are on the same side of ๐, as illustrated in Figure 9b, the ๐ ๐ left-hand branch of the hyperbola intersects the line ๐ฆ = ๐ at ๐ = ๐ ๐ where ๐ ๐ < 0. ๐ So ๐๐ = โ1. As before, the set {๐(๐๐ โ|๐ ๐ |โ), ๐, ๐(๐๐ โ|๐ ๐ |โ), } is in either increasing ๐ ๐
or decreasing order. Thus ๐(๐๐ โ|๐ ๐ |โ) is closer to ๐ than . So ๐ถ๐ (which is either ๐ ๐(๐๐ โ|๐ ๐ |โ) or ๐(๐๐ โ|๐ ๐ |โ)) can be chosen to be closer to ๐ than ๐ถ๐โ1 . Hidden in the proof of Proposition 22 is an explanation of why ๐๐ = 1 for the regular continued fraction and ๐๐ = โ1 for the negative continued fraction for all positive integers ๐. By way of review and clarification, note that algorithms ๐
, ๐, ๐, ๐บ, and ๐ are customary by Definition 21; thus, the magnitude of all partial denominators ๐๐ ๐๐ generated by these algorithms are all at least 1 for integers ๐ > 0. Corollary 23: Regular and negative convergents, adapted from [83, Theorem 18]. Let ๐ be a positive irrational number. The convergents of Algorithm ๐
oscillate about ๐, whereas the convergents of Algorithm ๐ approach ๐ from ๐ ๐ above. Let ๐ถ๐ = and ๐ถ๐โ1 = be regular convergents of ๐ for all ๐ > 0. Then ๐ ๐ either 1 1 or |๐ โ ๐ถ๐ | < 2 . |๐ โ ๐ถ๐โ1 | < 2 2๐ 2๐ Proof. Consider Algorithm ๐
. By Definition 21, ๐ถ0 = โ๐โ < ๐. So ๐ 1 = and ๐1 = โ
1 ๐คโโ๐คโ
1 ๐คโโ๐คโ
>1
โ. Thus
๐ถ1 =
๐1 โ๐คโ + 1 1 = โ๐โ + > โ๐โ + ๐ โ โ๐โ = ๐. ๐1 ๐1
14 We have portrayed the case where the hyperbola is always decreasing (except at the point of discontinuity). The proof of the proposition is valid for the other caseโwhen the hyperbola is always increasing.
326
Chapter IX: Continued Fractions
Since ๐ is between ๐ถ0 and ๐ถ1 , ๐ 2 > 0 as in Proposition 22. Since ๐2 = โ๐ 2 โ, ๐ถ2 is on the same side of ๐ as ๐ถ0 . Thus ๐ถ2 < ๐, and so on. 1 Consider Algorithm ๐. ๐ถ0 = โ๐โ > ๐ and ๐ 1 = < โ1. So ๐1 = โ1, ๐โโ๐โ
๐1 = โ
1 โ๐โโ๐
โ, and
๐1 โ๐โ โ 1 1 = โ๐โ โ > โ๐โ โ (โ๐โ โ ๐) = ๐. ๐1 ๐1 Since both ๐ถ0 and ๐ถ1 are on the same side of ๐, ๐ 2 < 0 as in the proposition. Since ๐2 = โ|๐ 2 |โ, ๐ถ2 will be on the same side of ๐ as both ๐ถ0 and ๐ถ1 , and so on. To prove the last statement of the corollary, observe that, as already shown, ๐ lies between ๐ถ๐โ1 and ๐ถ๐ . Thus 1 1 1 < 2 + 2. |๐ โ ๐ถ๐ | + |๐ โ ๐ถ๐โ1 | = |๐ถ๐ โ ๐ถ๐+1 | = ๐๐ 2๐ 2๐ The second equality in the above expression is true by Lemma 17, and the inequality is true because the geometric mean of two different positive numbers 1 1 and 2 is less than their arithmetic mean; see Exercise III.5f. Since a con2 ๐ถ1 =
๐
๐
tradiction would result if |๐ โ ๐ถ๐โ1 | โฅ true.
1 2๐ 2
and |๐ โ ๐ถ๐ | โฅ
1 2๐2
, the corollary is
What is especially nice about regular convergentsโas presented in Exercise ๐ 1 ๐ 5โis that whenever |||๐ โ ||| < 2 , is a regular convergent, where ๐ is a positive ๐
2๐
๐
irrational number and ๐ and ๐ are positive integers. Example 24: Continued fractions for ๐. In this example we illustrate the various decision rules of Definition 21. To indicate which algorithm is being used in the text, we subscript each list of partial denominators with one of the letters ๐บ, ๐, ๐, ๐, ๐
, ๐, and ๐. R: The regular continued fraction for ๐ begins with ๐0 = โ๐โ = 2. With ๐ถโ1 = 2
and ๐ถ1 =
1
, we have ๐ 1 =
1 ๐โ2 15
Continuing in this fashion gives
โ
1 0.718
โ 1.39. So ๐1 = 1 and ๐1 = 1.
๐ = [2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, โฆ]๐
โ {2, 3,
8 11 19 87 106 , , , , , โฆ} . (6) 3 4 7 32 39
N: The negative continued fraction for ๐ begins with ๐0 = โ๐โ = 3. With ๐ถโ1 = 3
1
1
๐โ3
and ๐ถ1 = , ๐ 1 =
1 0
1 0
โ โ3.55. So ๐1 = โ1, ๐1 = 4, and so on, giving
๐ = [3; โ4, โ3, โ2, โ2, โ2, โ3, โ8, โ3, โ2, โฆ]๐ โ {3,
11 30 49 68 , , , , โฆ} . 4 11 18 25
15 For the moment, ignore the underline beneath various partial denominators in the list of Equation 6. Its significance is explained in the paragraph on M below.
A plethora of continued fractions
327
G, S, Z: For ๐, the greedy, singular, and nearest integer algorithms all yield the same result. We illustrate Algorithm ๐. Thus, ๐0 = [๐] = 3. As with Algorithm 1 ๐ above, ๐ 1 = โ โ3.55. So ๐1 = โ1, ๐1 = [3.55] = 4, and so on, giving ๐โ3
๐ = [3; โ4, โ2, 5, โ2, 7, โ2, 9, โ2, 11, โฆ]๐ โ {3,
11 19 106 193 , , , , โฆ} . 4 7 39 71
(For an example where Algorithms ๐บ and ๐ yield different results, see Example 27.) M, O: For ๐, the optimal algorithm and Minkowskiโs diagonal algorithm both yield the same result. We illustrate Algorithm ๐. From Chapter VII, a rational ๐ ๐ 1 approximation for ๐ is said to be good if |||๐ โ ||| < 2 . This inequality is the ๐
๐
๐
same as ๐|๐๐โ๐| < 1. The value ๐ = ๐|๐๐โ๐| is said to be the normalized error or simply the error ๐๐ in step ๐ of a continued fraction algorithm for ๐. The list of errors ๐๐ corresponding to the list of regular convergents in Equation (6) is {0.72, 0.28, 0.46, 0.51, 0.20, 0.48, 0.51, 0.14, 0.49, 0.503, 0.11, โฆ}.
(7)
For example, we recalculate the third error term ๐2 โ 0.46 in Equation 7. Since 8 ๐
โs third convergent is ๐ถ2 = , ๐2 = 3|3๐ โ 8| โ 0.46. Observe that in Equa3 tion (6) the underlined partial denominators ๐๐+1 (all of which are equal to 1) correspond to those errors ๐๐ less than 0.5 from Equation (7). Algorithm ๐ will discard these partial denominators using the pruning tool of the following identity: 1 1 ๐ผ+ (8) =๐ผ+1โ 1 ๐ฝ+1+๐ 1+ ๐ฝ+๐
where ๐ผ, ๐ฝ, and ๐ are algebraic expressions. Thus in any sequence of partial denominators we can replace [โฆ , ๐๐โ1 ๐๐โ1 , 1, ๐๐+1 , โฆ]
with
[โฆ , ๐๐โ1 (๐๐โ1 + 1), โ(๐๐+1 + 1), โฆ],
thereby shortening any finite expansion of partial denominators. In particular, 106 11 , and Algorithm ๐ will discard the convergents ๐ถ0 = 2, ๐ถ3 = , ๐ถ6 = 1457
4
39
๐ถ9 = . To do so, apply Equation (8) at each underlined 1 in Equation (6), 536 resulting in ๐ = [3; โ3, 2, โ5, 2, โ7, 2, โ9, โฆ]๐ โ {3,
8 19 87 193 1264 , , , , , โฆ} , 3 7 32 71 465 1
the convergents of which all have (normalized) error less than . (See Exam2 ple 29 for an application of algorithm ๐.) โข
328
Chapter IX: Continued Fractions
Why the ugly duckling ๐บ is really a swan Compared to Algorithms ๐
, ๐, ๐, and ๐, Algorithm ๐บ may seem to be a poor one because, computationally, it is the most complicated. Faced with the choice of choosing โ|๐ ๐ |โ or โ|๐ ๐ |โ as its next partial denominator in approximating the irrational number ๐, the regular algorithm chooses the former and the negative algorithm chooses the latter. The nearest integer algorithm selects the one nearer to |๐ ๐ |. The singular algorithm skews its decision according to a silver mean rather than the arithmetic mean. What does the greedy algorithm do? At step ๐, let its ๐ โ 1 and ๐ โ 2 convergents be ๐ถ๐โ1 and ๐ถ๐โ2 . From the two mediants ๐๐ โ|๐ ๐ |โ๐ถ๐โ1 โ ๐ถ๐โ2 and ๐๐ โ|๐ ๐ |โ๐ถ๐โ1 โ ๐ถ๐โ2 , ๐บ selects the one closer to ๐, so deciding between โ|๐ ๐ |โ and โ|๐ ๐ |โ. However, as we show, this cumbersome rule can be replaced with a dynamic decision rule based upon the denominators of ๐ถ๐โ1 and ๐ถ๐โ2 . First we show that Algorithm ๐บ produces tame continued fractions. Proposition 25: The greedy algorithm is tame. Let ๐ be a positive irrational number. Let ๐๐ ๐๐ and ๐ถ๐ be Algorithm ๐บโs partial denominators and convergents for ๐, for all positive integers ๐. Then ๐๐ โฅ 2 and ๐ถ๐ is closer to ๐ than any other simpler fraction. Proof. Without loss of generality we assume that 0 < ๐ < 1 (otherwise we would 1 1 analyze the irrational number ๐โโ๐โ). If ๐ < , then ๐0 = 0 = ๐ถ0 . If ๐ > , then 2 2 ๐0 = 1 = ๐ถ0 . In either case, no fraction simpler than ๐ถ0 is closer to ๐. Suppose 1 ๐ 0 1 1 ๐0 = 0. Since ๐ถโ1 = and ๐ถ1 = 0 = , Equation (5) yields ๐ = > 1 = 2. So 0
1
1
๐
( ) 2
๐1 โฅ 2 and ๐1 = 1. Observe that ๐ is between the Farey fraction neighbors 1 โ๐ โ
1 โ๐ โ
and
, and no fraction simpler than these is closer to ๐. Next, suppose that ๐0 = 1.
This time, ๐ถโ1 = 1
1 0
and ๐ถ1 =
๐0 1
=
1 1
๐ > , ๐ < โ2. Thus ๐1 โฅ 2 and ๐ถ1 = 2
neighboring Farey fractions 1 +
1 โโ๐ โ
, and Equation (5) yields ๐ = โ๐1 +1 โ๐1
and 1 +
= 1โ 1
โโ๐ โ
1 ๐1
1 ๐โ1
. Since
. Since ๐ is between the
(one of which is ๐ถ1 ), no fraction
simpler than ๐ถ1 is closer to ๐. Suppose that for some integer ๐ > 1, we know that ๐๐ โฅ 2, ๐ถ๐ is closer to ๐ than any simpler fraction, and ๐ถ๐ = ๐๐ ๐๐ ๐ถ๐โ1 โ ๐ถ๐โ2 for all integers 1 โค ๐ โค ๐. Let ๐ถ๐+1 = ๐๐+1 ๐๐+1 ๐ถ๐ โ ๐ถ๐โ1 . Since ๐ is between the Farey neighbors ๐๐+1 โ|๐ ๐+1 |โ๐ถ๐ โ๐ถ๐โ1 and ๐๐+1 โ|๐ ๐+1 |โ๐ถ๐ โ๐ถ๐โ1 , no fraction simpler than ๐ถ๐+1 is closer to ๐. If ๐๐+1 = 0, then ๐ถ๐+1 = ๐ถ๐โ1 , a contradiction since this would mean that ๐ถ๐โ1 , a fraction simpler than ๐ถ๐ , is closer to ๐ than ๐ถ๐ . If ๐๐+1 ๐๐+1 = โ1, then ๐ถ๐+1 = (โ๐ถ๐ )โ๐ถ๐โ1 = ๐ถ๐ โ(โ๐ถ๐โ1 ), a fraction simpler than ๐ถ๐ and closer to ๐ than ๐ถ๐ , a contradiction. If ๐๐+1 ๐๐+1 = 1, then ๐ถ๐+1 = ๐ถ๐ โ ๐ถ๐โ1 . But ๐ถ๐+1 = ๐ถ๐ โ ๐ถ๐โ1 = (๐๐ ๐๐ ๐ถ๐โ1 โ ๐ถ๐โ2 ) โ ๐ถ๐โ1 = (๐๐ ๐๐ + 1)๐ถ๐โ1 โ ๐ถ๐โ2 ,
Why the ugly duckling ๐บ is really a swan
329
a contradiction to the choice of ๐ถ๐ being convergent ๐, because ๐ถ๐+1 would have been preferred as convergent ๐ rather than ๐ถ๐ . Proposition 26: A mean-value rule for ๐บ. Let ๐ be a positive irrational num๐ ๐ ber. At step ๐ โฅ 1 with respect to Algorithm ๐บ, let ๐ถ๐โ1 = and ๐ถ๐โ2 = . Let ๐ ๐ =
๐โ๐๐ ๐๐โ๐
๐
๐
and ๐๐ = sgn(๐ ๐ ). If |๐ ๐ | โ โ|๐ ๐ |โ < ๐ฟ๐ where ๐ฟ๐ =
๐ + ๐๐ โ|๐ ๐ |โ ๐ , 2๐ + ๐๐ (2โ|๐ ๐ |โ + 1)๐
(9)
then ๐๐ = โ|๐ ๐ |โ; otherwise ๐๐ = โ|๐ ๐ |โ. Equivalently, ๐๐ = โ|๐ ๐ | โ ๐ฟ๐ โ. ๐๐+๐
Proof. Let ๐(๐) = . For the moment, think of ๐ as a positive integer. Since ๐๐+๐ ๐ is continuous and monotonic for all ๐ > 0, there exists a number ๐ฟ > 0 with ๐(๐) + ๐(๐ + 1) ๐(๐ + ๐ฟ) = . (10) 2 Although we can solve this equation with pencil and paper, it may take some time. Use of a computer algebra system16 almost immediately gives ๐ + ๐๐ ๐ฟ= , 2๐ + (2๐ + 1)๐ which is equivalent to Equation (9) when ๐ ๐ โฅ 1, ๐๐ = 1, ๐ = โ๐ ๐ โ, and ๐ฟ = ๐ฟ๐ . Now think of ๐ as a negative integer. The analog to Equation (10) is ๐(๐ โ ๐ฟ) =
๐(๐) + ๐(๐ โ 1) , 2
and its solution via a CAS is ๐ + ๐๐ , 2๐ + (2๐ โ 1)๐ which is equivalent to Equation (9) when ๐ ๐ โค โ1, ๐๐ = โ1, ๐ = ๐๐ โ|๐ ๐ |โ, and ๐ฟ = ๐ฟ๐ . Thus, if |๐ ๐ | โ โ|๐ ๐ |โ < ๐ฟ๐ , then ๐๐ = โ|๐ ๐ |โ because ๐(โ|๐ ๐ |โ) is closer to ๐ than is ๐(โ|๐ ๐ |โ). Otherwise, ๐๐ = โ|๐ ๐ |โ. ๐ฟ=
To illustrate the use of this mean-value decision rule, we contrast Algorithms ๐บ and ๐ with respect to the irrational number ๐. Example 27: Algorithms ๐บ and ๐ differ. Although the nearest integer and the greedy rules often agree, they sometimes differ. With respect to the irrational number ๐, we demonstrate that ๐บโs ninth convergent is not the same as ๐โs ninth convergent. The seventh and eighth ๐บ and ๐ convergents for ๐ are ๐ 80143857 ๐ 245850922 ๐ถ7 = = and ๐ถ8 = = . ๐ 25510582 ๐ 78256779 16 See
Code 20 in Appendix III.
330
Chapter IX: Continued Fractions ๐โ๐๐
โ โ2.41, the nearest integer algorithm chooses its ๐9 ๐9 term as Since ๐ 9 = ๐๐โ๐ โ2. Thus, ๐โs ninth convergent, denoted by ๐9 , is 411557987 ๐9 = โ2๐ถ8 โ ๐ถ7 = . 131002976 What about Algorithm ๐บ? We use Proposition 26 and calculate ๐ฟ9 : ๐ฟ9 =
๐ + ๐๐ โ|๐ ๐ |โ ๐ 25510582 โ 2 โ
78256779 = โ 0.385. 2๐ + ๐๐ (2โ|๐ ๐ |โ + 1)๐ 2 โ
25510582 โ (2 โ
2 + 1)78256779
Since |๐ 9 | โ โ|๐ 9 |โ โ 2.41 โ 2 = 0.41 > 0.385 โ ๐ฟ9 , the greedy algorithm chooses its ๐9 ๐9 term as โ3. Thus, ๐บโs ninth convergent, denoted by ๐บ9 , is 657408909 . ๐บ9 = โ3๐ถ8 โ ๐ถ7 = 209259755 Although ๐9 โs (normalized) error term ๐9 is about 0.33 and ๐บ9 โs (normalized) error term ๐9 is about 0.75, the reader may check that ๐บ9 is indeed closer to ๐ than is ๐9 . โข
An interlude delineating Algorithm ๐โ The optimal continued fractionโs decision rule for choosing the next convergent is remarkably similar the greedy continued fractionโs rule. Proposition 28: A mean-value rule for ๐. Let ๐ be a positive irrational num๐ ๐ ber. At step ๐ โฅ 0 with respect to Algorithm ๐, let ๐ถ๐โ1 = and ๐ถ๐โ2 = . Let ๐ ๐ =
๐โ๐๐ ๐๐โ๐
๐
๐
and ๐๐ = sgn(๐ ๐ ). If |๐ ๐ | โ โ|๐ ๐ |โ > ๐ฟ๐ where ๐ฟ๐ =
๐ + ๐๐ โ|๐ ๐ |โ ๐ 2๐ + ๐๐ (2๐โ|๐ ๐ |โ + 1)
(11)
then ๐๐ = โ|๐ ๐ |โ, otherwise ๐๐ = โ|๐ ๐ |โ. Equivalently, ๐๐ = โ|๐ ๐ | โ ๐ฟ๐ โ. Proof: By Exercise IV.6c, at least one of ๐๐ โ|๐ ๐ |โ๐ถ๐โ1 โ ๐ถ๐โ2 or ๐๐ โ|๐ ๐ |โ๐ถ๐โ1 โ ๐ถ๐โ2 is a really-good approximation to ๐. If both are really-good, then we choose the latter because otherwise the next partial denominator will be either ยฑ1, which may give a non-tame continued fraction expansion. Therefore we choose the latter if ๐๐ โ|๐ |โ + ๐ | 1 | |๐ โ ๐ ๐ |< , (12) | ๐๐๐ โ|๐ ๐ |โ + ๐ | 2(๐๐๐ โ|๐ ๐ |โ + ๐)2 otherwise we choose the former. As an algebra exercise we leave for the reader, Equation (12) becomes |๐ ๐ | โ โ|๐ ๐ |โ > ๐ฟ๐ , where ๐ฟ๐ is given in (11). Example 29: Eulerโs constant via ๐. Let ๐ = ๐พ โ 0.577216. By Proposition 28, 1
Step 0: ๐ 0 = ๐พ, ๐ฟ0 = . Since ๐พ โ โ๐พโ โ 0.5777 > ๐ฟ0 , then ๐0 = 1. 2
Dominance domains
331
Step 1: ๐ 1 โ โ2.365, ๐ฟ = ๐1 ๐1 = โ2. Step 2: ๐ 2 โ 2.738, ๐ฟ2 = ๐2 ๐2 = 3. Step 3: ๐ 3 โ โ3.81, ๐ฟ3 = ๐3 ๐3 = โ4.
3 7 7 16 26 59 149
Step 5: ๐ 4 โ โ5.35, ๐ฟ4 = ๐4 ๐4 = โ5.
324
โ 0.428, ๐1 = โ1, |๐ 1 | โ โ|๐ 1 |โ โ 0.365 < ๐ฟ1 . So โ 0.437, ๐2 = 1, |๐ 2 | โ โ|๐ 2 |โ โ 0.738 > ๐ฟ2 . So โ 0.441, ๐3 = โ1, |๐ 3 | โ โ|๐ 3 |โ โ 0.81 > ๐ฟ3 . So โ 0.460, ๐4 = โ1, |๐ 4 | โ โ|๐ 4 |โ โ 0.325 < ๐ฟ3 . So
Thus, ๐พ = [1; โ2, 3, โ4, โ5, 3, 13, โฆ]๐ which is the same expansion as given by the nearest integer continued fraction algorithm. However the reader may 15403 and ๐โs seventh convergent is check that ๐โs seventh convergent is ๐7 = 26695
18438
3035
๐7 = , while their common sixth convergent is . The reader may check 31943 5258 that ๐7 is a really-good approximation for ๐พ whereas ๐7 fails to be one. โข
Dominance domains We now answer in part a question that arose when exploring signatures of real numbers in Chapter VII. How does the graph of ๐ฎ๐ change as ๐ changes, where ๐ is a real number? More simply, on what interval ๐ฝ about the rational number ๐ ๐ does well-approximate every point in ๐ฝ? The next proposition is our partial ๐ ๐ answer. To understand the notation in this proposition, review the Chapter IV material on the father and mother fractions of any fraction between 0 and 1. ๐ห be respectively ๐ ๐ ๐ห ห ๐ +๐๐ ๐+๐๐ ๐ and ๐(๐ ) = ห . For ๐ โฅ 2, let the father and mother of . Let ๐(๐ ) = ๐ ๐+๐๐ ๐ +๐๐ ๐ ๐ the order-๐ dominance domain for , denoted by โฌ๐ ( ), be the interval whose ๐ ๐ endpoints are 1 ๐ 1 ๐ (13) (๐(๐ โ 1) + ) and (๐(๐ โ 1) + ). 2 ๐ 2 ๐ ๐ ๐ ๐ Then is nearer any point in โฌ๐ ( ) than any other fraction where ๐ < ๐ + ๐๐. ๐
Proposition 30: A dominance interval for . Let
๐
๐
Proof. Observe that ๐(๐) is the mediant of than ๐(๐) exists between 1
๐
๐ ๐
๐
and
๐
๐ ๐
and ๐(๐โ1), and no fraction simpler
and ๐(๐ โ 1). Furthermore, any point ๐ฅ between ๐
๐ ๐
and (๐(๐ โ 1) + ) is closer to than to ๐(๐ โ 1), giving the desired result. The 2 ๐ ๐ ห on the other side of ๐ is similar. argument involving ๐ and ๐ ๐
332
Chapter IX: Continued Fractions 1 1 19 1 15 17
1 13
1 4
3 4 11 15 2 7
5 18
5 17
1 7
1 9
6 19 4 13
6 17 1 3
3 5 10 16
3 17
1 6
1 8
1 1 1 1 16 1 12 10 18 14
5 19
3 2 19 13
1 2 2 2 11 19 17 15
5 13
5 14
2 5
7 8 17 19
7 18
3 8
3 4 13 17 2 9
1 5
3 16
7 19 4 11
4 19
2 11
5 12
1 4
3 14
8 5 6 11 13 7 17 9 15 19 4 9
3 7
1 2
7 16
๐
Figure 10. Dominance domains โฌ3 ( ) for all fractions ๐ with ๐ โค 19.
๐ ๐
โค
1 2
๐
To depict dominance domains โฌ๐ ( ) as figures, we render them as ellipses ๐
whose left and right endpoints correspond to Equation (13). Figure 10 displays17 about threescore dominance domains of order 3 for all fractions no larger than 1 7 1 1 1 and no simpler than (except that for the fractions and we display โฌ4 ( ) 2
1
19
3
2
1
3 5
and โฌ6 ( ) to avoid an image with overlapping ovals, although โฌ3 ( ) and โฌ3 ( ) 2 4 19 still overlap slightly).
The harmonic algorithm is a chameleon As currently defined, the harmonic algorithm ๐ป of Chapter VII and the nearest integer continued fraction algorithm ๐ turn out to be the same algorithm with respect to generating the same convergents for any given positive irrational number ๐. Slight modifications to the harmonic algorithm transform ๐ป into any of the other continued fraction algorithms we have discussed except ๐. 17 A
figure somewhat like Figure 10 appears in [103, p. 266].
The harmonic algorithm is a chameleon
333
Definition 31: A modified harmonic rule. Recall that the decision rule of Algorithm ๐ป from Chapter VII is the greatest integer function. We say that the harmonic algorithm ๐ป of Chapter VII is a modified version with respect to Algorithm โฑ (where โฑ is any of the algorithms ๐บ, ๐, ๐, ๐
, ๐, or ๐) if we replace the greatest integer decision rule with the decision rule for โฑ. Proposition 32: The harmonic chameleon ๐ป. Let ๐ be a positive irrational number. At step ๐ with respect to the continued fraction โฑ (where โฑ is any of ๐บ, ๐ ๐ ๐, ๐, ๐
, ๐, or ๐), let its ๐โ1 and ๐โ2 convergents be ๐ถ๐โ1 = and ๐ถ๐โ2 = . Let ๐ ๐ ๐ถ๐โ1 be a harmonic convergent for ๐ป. Let ๐ป๐ be the next harmonic convergent (starting from ๐ถ๐โ1 ) using ๐ปโs modified decision rule with respect to โฑ. Then ๐ถ๐ = ๐ป๐ . ๐๐ +๐
= Proof. Recall from Definition 21 that to find ๐ถ๐ , we let ๐ 0 be the solution to ๐๐ +๐ ๐ and apply โฑโs decision rule to ๐ 0 to obtain ๐๐ ๐๐ , so that ๐ถ๐ = ๐๐ ๐๐ ๐ถ๐โ1 โ ๐ถ๐โ2 . Recall from Proposition VII.21 that to find ๐ป๐ , let ๐ = sgn(๐๐ โ ๐). Let ๐ be the integer solution to ๐๐ โก โ๐ mod ๐, for 0 < ๐ < ๐. Let ห๐ 0 be the solution to ๐ , ๐๐ โ ๐
๐๐ + ๐ = 1
(14)
๐
namely, ห๐ 0 = ( โ ๐). Then apply ๐ปโs modified decision rule to ห๐ 0 , so pro๐ ๐๐โ๐ ducing integer ๐ where ๐ is either โห๐ 0 โ or โห๐ 0 โ. Thus, the denominator of ๐ป๐ is ๐๐ + ๐, and its numerator is the integer [๐(๐๐ + ๐)]. ๐๐ +๐ = ๐ is The proof of the proposition follows upon showing that solving ๐๐ +๐ essentially the same as solving Equation (14). We do so by analyzing four cases, corresponding to the number of ways that ๐ถ๐โ1 , ๐ถ๐โ2 , and ๐ can be ordered from least to greatest. Since the reasoning for each case is similar, we belabor Case 1 and leave the details of the other cases to the reader. Case 1: Suppose
๐ ๐
< ๐
2. (iv) Therefore ๐ถ๐+1 = ๐๐ถ๐ โ ๐ถ๐โ1 for some integer ๐ with |๐| โฅ 2. Adapt the argument of part (d) to show that Algorithm ๐ generates tame continued fractions. Adapt the argument of part (d) to show that Algorithm ๐ generates tame continued fractions. Provided ๐ฅ = [๐0 ; ๐1 ๐1 , ๐2 ๐2 , ๐3 ๐3 , โฆ] repeats and exists, use mathematical induction to prove that ๐ฅ = ๐ + ๐โ๐, where ๐ and ๐ are rational numbers and ๐ is a nonnegative integer. Recall Proposition VII.1: The simplest fraction. Let ๐ด and ๐ต be two irrational numbers whose simple continued fractions differ for the first time at partial fraction ๐. Let ๐๐ and ๐๐ be partial denominators ๐ for ๐ด and ๐ต, respectively. Then ๐ถ = [๐0 ; ๐1 , ๐2 , โฆ , ๐๐โ1 , ๐๐ ] is the simplest fraction between ๐ด and ๐ต, where ๐๐ is the common partial denominator ๐ of ๐ด and ๐ต for 0 โค ๐ โค ๐ โ 1, and ๐๐ = min{๐๐ , ๐๐ } + 1. Complete the outline below to prove this result. (i) Without loss of generality, assume that ๐๐ < ๐๐ . If ๐ = 0, then the simplest fraction between ๐ด and ๐ต is ๐0 + 1. (ii) Let ๐ถ๐โ2 = [๐๐ ; ๐1 , โฆ , ๐๐โ2 ] and ๐ถ๐โ1 = [๐๐ ; ๐1 , โฆ , ๐๐โ1 ]. Let ๐(๐ก) = ๐ก๐ถ๐โ1 โ ๐ถ๐โ2 . By Proposition 22, ๐(๐ก) is continuous and monotonic on the interval (0, โ). Observe that ๐(๐๐ ) fails to lie between ๐ด and ๐ต, but ๐(๐) lies between ๐ด and ๐ต for all integers ๐ with ๐๐ < ๐ โค ๐๐ . (iii) Observe that the denominators of ๐(๐) increase monotonically.
Exercises
349
5. Explain why each of the following statements are true in the proof of the following result: A sufficient regular condition. Let ๐ be a positive irrational num๐ ๐ 1 ๐ ber and be a reduced fraction with ||๐ โ || < 2 . Then is a reg๐ ๐ 2๐ ๐ ular convergent. (a) Suppose that vergents
๐๐
๐ ๐
is not a regular convergent. Then there exist regular con-
and
๐๐ ๐๐ |
(b) So ๐๐ |||๐ โ
(c) Then |||๐ โ
๐๐+1
such that ๐๐ โค ๐ < ๐๐+1 .
| โค ๐ |||๐ โ
๐๐ | ๐๐ |
|
1. (b) The signatures of some numbers such as โ2, โ3, the golden mean, and ๐ display no obvious suggestions for a specific number of branches, unโ229โ15
like, for example, ๐ฅ = [0; 15, 15, 15, โฆ] = and ๐, which have 2 respective obvious branch numbers 15 and 7. Can you guess why? (Hint: Consider a continued fraction list of partial denominators whose first few terms are relatively small integers, and contrast the associated signature with that of a list whose first few partial denominators are relatively large.) 10. Suppose surface gravity on a uniformly dense Earth is 12 m/sec2 . With respect to Table 1, how would Marieโs answers change?
Strand X: The Longevity of the 17-year Cicada The longevity of the cicada insect is a curious entomologic-mathematical mystery.1 Cicadas live underground in their nymph stage sipping sap from tree roots. Seventeen years later they emerge from the ground all at once as a brief-lived, bewinged, singing, mating horde.
Figure 1. Adult cicada, author sketch.
Various predator-prey dynamic schemes have been used to model why the cicada lives so long. One math-modeling group concluded that โno plausible ecological mechanisms [exist] that select for periods beingโ as large as seventeen years. Instead the explanation for such insect longevity probably โresides in physiological or genetic mechanismsโ [88]. More recently, Markus [60] presented a predator-prey โevolutionary gameโ where predator and prey jump to new life cycles according to a fitness heuristic in which the prey ultimately finds refuge in a
1 Unlike the cicada, most insect species live less than several years. Some termite queens and various beetles have life spans up to sixty years, but their longevity, like that of humans, is serendipitous.
351
352
Strand X: The Longevity of the 17-year Cicada
prime number.2 One reviewer called Markusโs game interesting, โhowever [the game] doesnโt really explain why periodical cicadas have 13-year or 17-year cyclesโ [114]. That is, currently there is no explanation. Although speculative, we offer a continued fraction suggestion. Here is our outline of conjectures and calculations. Conjecture 1: Cretaceous cicadas. Cicada species have been in existence on Earth for at least 100 million years. Furthermore, their similarly structured ancestors may have been in existence for at least 200 million years. Rationale. Archaeologists have found amber crystals into which cicadas had become entombed 100 million years agoโand a study โreveals a remarkable โข degree of morphological conservatism over 100 million yearsโ [118], [148]. Conjecture 2: Instinctive awareness of time of day and season of the year. The cicada can instinctively sense the seasons of the year and the time of day even though it lives underground. Rationale. The cicada feeds on the root ends of trees. Trees have a daily photosynthesis cycle. This cycle is a veritable clock for the cicada. Trees are induced into various stages of foliage, sap flow, and root development by changes in duration of daylight. This cycle is a yearly calendar for the cicada. โข Conjecture 3: Instinctive awareness of the Moonโs phases. The cicada may be able to sense the current phase of the Moon. Rationale. This assumption may seem audaciousโand is the science fiction in this discussion. However, various studies have concluded that honeybee hormone intensity varies according to the phases of the Moon [102]. Being diurnal, the honeybee is in its hive during the night at the only time when the Moon may appear as more than a cloud in the sky. Perhaps the bee can sense variation in gravity due to the relative positions of the Moon and Sun. In completely different studies, marine biologists have concluded that the adult coral, even though it has neither eyes nor brain, possesses a gene that โallows the coral to sense blue light and to work out what phase the Moon is inโ [66]. Once a year at spring during a full moon, presumably even when the night sky is overcast, over 400 different species of coral all spawn simultaneously. How does coral distinguish between a quarter moon and a full moon? How does coral know when spring occurs? Finally, if bees and coral have a knack for knowing the Moonโs phases, other creatures may as well. 2 Briefly, in this game, Markus allows the life cycle of cohorts of a creatureโs progeny to mutate by a year or two in each generation. However, in this game, Markus severely restricts predator cohorts never to mutate to a life cycle more than half the life cycle of its prey. Thus in due course, when the prey stumbles upon a prime as its life cycle, the predator is eventually thwarted in finding a life cycle for which its future generations could often feast on the prey.
Strand X: The Longevity of the 17-year Cicada
9 7 17 8 13 6 11 15 10 19
1 2
9 16
11 19
Figure 2. From 12 +
5 9
353
3 5
4 7
2 3
7 10 11 12 17 18 8 5 13 8 2 3
to 12 +
10 19
9 14 12 7 19 11
11 17
over the eons.
The acceleration due to Earthโs mass at Earthโs surface is ๐ โ โ9.8 m/sec2 . The Moonโs mass changes this value by about 0.000033 m/sec2 while the Sunโs mass changes this value by about 0.0057 m/sec2 . Since the former variation can be both positive and negative (positive when the point ๐ on Earthโs surface is facing the Moon and negative when ๐ is facing away from the Moon), this variation due to the Moon alone is about 0.00006 m/sec2 . The similar variation with respect to the Sun is about 0.011 m/sec2 . Perhaps these variations are enough for a bee or cicada to sense instinctively. Although these variations in gravity seem incredibly small, they are the quantities governing the tides. โข Conjecture 4: Leapfrogging timespans. The cicada leapfrogged over the eons from lesser lifespans to greater lifespans. From the model presented in Example IX.45, about two hundred million years ago, the Moonโs relative angular ve2 locity was in the dominance domain of 12 + moons/year. So about 200 million 3 years ago, perhaps the creature that became the cicada had a lifespan of three years. As the eons passed, the Moonโs relative angular velocity transitioned into 3 the dominance domain of 12 + . Likewise, perhaps the cicada transitioned to a 5 life span of five years, and so on, to an ever increasing life span, as the number of 2 9 moons per year decreased from about 12 + to 12 + approximately 75 million 3 17 years ago, following the progression of dominance domains indicated in Figure 2.
354
Strand X: The Longevity of the 17-year Cicada
Rationale. In particular, imagine that the Sun and Moon orientation ๐ is recorded in genes of the cicada ๐ as a time stamp, perhaps at the moment when laid as an egg. For simplicity, imagine that this time stamp was set in late spring at noon on 15 June in year ๐. To further simplify, suppose that ๐ is a full moon. Suppose that the next occurrence ๐ก years later of a full moon near noon on some day near 15 June serves as a trigger for ๐ to emerge from the ground. Suppose that this nearness with respect to noon is a matter of minutes and that the nearness with respect to 15 June is no more than two days. Table 1. A sequence of decreasing rational numbers corre๐ sponding to 12 + . ๐
๐
3
5
7
9
11
13
๐
2
3
4
5
6
7
๐
3
5
7
9
11
13
15
17
19
8
9
10
15
17
19
๐
Let the number of moons per year be 12 + , where ๐ and ๐ are relatively ๐ prime positive integers with ๐ < ๐. Let ๐ก be the integer number of years after year ๐, where 1 โค ๐ก โค ๐. In year ๐ก, let ๐ค(๐, ๐ก) be the time in days from noon on 15 June to the time of the full moon nearest 15 June. We call ๐ค(๐, ๐ก) the emergence window radius for the cicada. Table 2 shows the window radii ๐ค(๐, ๐ก) for all values of ๐ and ๐ก where 1 โค ๐ก โค ๐ and ๐ ranges over the odd integers from three through nineteen.3 For example, with ๐ = 3, corresponding to the lunar phase period of 2 12 + moons/year, the window radius at ๐ก = 1 and ๐ก = 2 years is about ๐ค(3, 1) โ 3 10 days โ ๐ค(3, 2), which means that no full moon occurs during 6 through 24 June in year ๐ + 1 and ๐ + 2. For the thousands of years when the Moonโs phases 2 were clearly within the dominance domain of 12 + , the cicadaโs genetic trigger 3 could fire without confusion after three years of underground living. However, as time went on and the Moonโs phases wandered outside the dominance domain 2 of , perhaps the cicadaโs genetic trigger for emerging morphed into some kind 3 of countdown. 3 But as the Moonโs phases wandered into the dominance domain of 12 + , 5 the old genetic trigger mechanism may have quickened. This time, during years ๐ก = 1 through 5 the window radii were 12, 6, 6, 12, and 0 days, respectively. Again, the window radii for ๐ก = 1 through ๐ก = 4 were perhaps sufficiently large for the cicadaโs genetic trigger to fire without confusion on year ๐ก = 5. 3 In
๐
particular, these window radii of Table 2 were calculated using the fractions from Table 1. ๐ For any window radii exceeding two days, we rounded the radius to the nearest integer. See Code 22 in Appendix III for an outline of how to generate such tables.
Strand X: The Longevity of the 17-year Cicada
355
Perhaps similar phenomena occurred when the Moonโs phases wandered 4 5 6 7 into the dominance domains of 12 + , 12 + , 12 + , and 12 + . 7 9 11 13 When the Moonโs phases eventually wandered into the dominance domain 8 of 12 + , the cicada may have had difficulty weathering year ๐ก = 13 without 15 its genetic trigger firing, because in that year the window radius was under two days. Again, perhaps when the Moonโs phases were in the dominance domains 10 9 of 12 + and 12 + , the cicadaโs genetic trigger may have fired in years fifteen 17 19 and seventeen, respectively. Table 2. Window radii about 15 June in days with respect to period ๐ years and year ๐ก. โง โช โช 3 โช 5 โช โช 7 9 ๐ โจ โช 11 โช 13 โช 15 โช โช 17 โฉ 19
1 10 12 13 13 13 13 14 14 14
2 10 6 4 3 3 2 1.9 1.7 1.5
3 0 6 8 10 11 11 12 12 12
4
5
6
7
8
12 8 6 5 5 4 3 3
0 4 13 6 10 8 8 9 7 10 6 10 5 11 5
0 3 5 7 8 9 10
13 11 9 8 7 6
๐ก in years 9 10 11
0 3 5 6 7 8
13 11 10 9 8
0 2 4 5 6
12
13
14
15
13 12 10 9
0 1.9 3 4
14 0 12 1.7 11 3
16
17
18
19
14 0 12 1.5 14
0
Suppose some species ๐ฎ of the cicada has a lesser sensitivity to the orientation of the Moon and Sun than the 17-year cicada. Perhaps species ๐ฎ might instinctively accept a full moon within, say, a window of four days about 15 June in some year beyond, say ๐ + 5, as being sufficiently near orientation ๐ that their genetic trigger to emerge from the ground might fire. Thus, as can be seen from the last row of Table 2, the ๐ฎ cicadas would emerge as a horde in year thirteen. In fact, some cicada species have lifespans of 13 years. 10 After passing through the domain of dominance of 12 + about one hun19 dred million years ago, what might the cicada have done? We imagine that the cicada may have developed a countdown algorithm to seventeen years, and has maintained that algorithm down through the eons. Furthermore, once the countdown reaches zero, the cicada horde waits until the ground eight inches deep is at least 64โ F (18โ C) and until a warm rain moistens the ground [26]. Finally, how can a species increase (or decrease) its lifespan by a significant leap? Once the cicada nymph matures, it is more or less dormant. It naps as a veritable Rip van Winkle4 โand awaits a signal to awake and fly. โข 4 In 1819 Washington Irving wrote a story about a man named Rip van Winkle who drank moonshine atop a Catskill mountain in New York, fell asleep, and awakened twenty years later.
356
Strand X: The Longevity of the 17-year Cicada
To emphasize again, the above conjectures are speculation. Yet the sequence of dominance domains through which the Moon has transitioned from about 200 million through 75 million years ago, 3 4 5 6 7 8 9 2 โ 12+ โ 12+ โ 12+ , 12+ โ 12+ โ 12+ โ 12+ โ 12+ 3 5 7 9 11 13 15 17 may very well be a continued fraction key to solving the mystery of why the cicada lives so long, a rarity among insects. For at the same time that the Moon was transitioning from natural cycles of new moons with periods 3, 5, 7, 9, 11, 13, 15, 17 years the cicada may also have been transitioning to those same periods. Pure coincidence? Maybe not. In this next chapter, we use continued fractions to help predict the occurrence of a very rare astronomical event in our solar system
Chapter X: Transits of Venus At least once each year, Venus passes between Earth and the Sun. Because the orbital planes of Earth and Venus intersect one another at an angle, only rarely does Venus come directly between Earth and the Sun. On these occasions, the profile of Venusโa transit of Venus across the Sunโcan be viewed from Earth. The last transit was in June 2012, as depicted in Figure 3. The next transit will occur in December 2117. Ascertaining the periodicity of the transits is a delicate problem and is a good application of continued fractions, the focus of this chapter. In particular, the periods of Earth and Venus are ๐๐ โ 365.26 days and ๐๐ฃ โ 224.70 days, respectively. By Keplerโs third law of planetary motion, with time ๐ก in years and distance in astronomical units (AU), ๐3 = ๐2 , where ๐ is the semimajor axis of a planetโs elliptical orbit and ๐ is its period. Thus, Venus is ๐ โ 0.723 AU from the Sun ๐. Relative to Earthโs angular frequency of one rotation per year, Venus makes ๐0 โ 1.62555 rotations per year. From this value how can we deduce the 105-year transit lapse between, say, 2012 and 2117? In general, as we allow the angular velocity ๐ to vary, how does the time lapse between transits change? The answer is surprisingly chaotic.
Figure 3. A Venus transit as might have been viewed (with heavy sunglasses) against a finial atop the Taj Mahalโs dome, June 2012, author sketch. 357
358
Chapter X: Transits of Venus
Figure 4. William Crabtree observing a transit; mural at the Town Hall in Manchester, England, by Ford Madox Brown (1821โ1893). Source: Wikimedia Commons. In 1629, Johannes Kepler predicted a 1631 transit of Venus and estimated the period between transits as 120 years. The first recorded transit observation was in 1639 by Jeremiah Horox and William Crabtree, as shown in the mural of Figure 4. The standard reference for transit dates is Jean Meeusโs tables spanning 6000 years [99]. Espenak [43], who compiled NASAโs website on transits, call Meeusโs work โan indispensable reference for anyone wishing to do transit calculations.โ Danloux-Dumesnils [32] calls Meeusโs original tables [100] โune belle รฉtude.โ Much of Meeusโs number crunching is based on โthe modern planetary theory VSOP87 of the Bureau des Longitudes of Parisโ [99, p. 1]. Against this standard, we contrast our results as obtained by using simple harmonic motion. But first we review why the worldโs first international scientific project involved two Venus transits during the eighteenth century.
A historical interlude We begin with a puzzle that was finally resolved, more or less, due to approximately seven hours of intense observation each on 6 June 1761 and 3 June 1769, two dates when transits of Venus were predicted to occur. Puzzle 1: A natural question. How far is the Sun from Earth? When and how did we discover the result correct to within a reasonable margin of error? โข Definition 2: Astronomical unit. Let ๐ธ, ๐, and ๐ represent Earth, Venus, and the Sun. We say that one astronomical unit, denoted by 1 AU, is the distance ๐ between ๐ธ and ๐.
A historical interlude
359
R
ฮธ a
E
S
Figure 5. Viewing ๐ from ๐ธ.
S
screen of the Sun
d
V
D 0.723 AU
T1 E
ฮธ1
C
T2 R ฮธ2
1 AU
a. Lines of sight from ๐ธ through ๐.
b. Two transits of ๐ across ๐.
Figure 6. Projection of Venus onto the Sun with respect to Earth.
Perhaps the first recorded guess (when converted into kilometers) for the value of ๐ = 1 AU is due to Aristarchus of the third century BC: about 8 million km. This value was also championed much later by Ptolemy and Copernicus. Some of the reasoning behind obtaining this value involves solar eclipses and the geometry depicted in Figure 5, where ๐
= ๐ sin ๐, ๐
is the radius of ๐, and 2๐ is the angle subtended by ๐ as viewed from ๐ธ. Johannes Keplerโafter studying the geocentric parallax of Mars (half of the angle subtended by Mars as viewed from Earth)โbumped the value of ๐ up to at least 24 million km. With the advent of the telescope, the guesses improved. In 1716, after reflecting upon observations he had taken forty years earlier of Mercury transiting the Sun, Edmund Halley realized that similar observations of Venus transiting the Sun could be used to quantify ๐
, and thus ๐, an idea which James Gregory had advanced earlier in 1663. Halley then predicted that ๐ was โ14 000 semi-diameters of the Earthโ or about 90 million km, and outlined a plan to test the theory [65]. To simplify his argument, imagine that the orbits of both ๐ and ๐ธ and the equator of ๐ lie on a plane ๐ through the centers of ๐ธ, ๐, and ๐. Imagine further that ๐ธโs rotation period about its axis is one year, so that ๐ธ always shows the same face toward ๐, just as the Moon always shows the same face to ๐ธ. Assume that
360
Chapter X: Transits of Venus
the disk of the Sun ๐ is a circle.5 As illustrated in Figure 6a, allow two observers on ๐ธ, ๐ units apart with respect to ๐ (one close to the north pole and the other close to the south pole), to observe ๐ as it passes between ๐ and ๐ธ. Recall from the introduction to this chapter that distance ๐๐ is approximately 0.723 AU. By similar triangles, ๐ ๐ท = , 1 โ 0.723 0.723 where ๐ท is the distance between the two lines of sight onto the screen of the Sun, illustrated in Figure 6a. So ๐ท โ 2.61๐. As shown in Figure 6b, the transits of ๐ as seen by the two observers will appear as two parallel chords ๐1 and ๐2 that are ๐ท units apart and are positioned at respective latitudes ๐1 and ๐2 , where ๐ถ is the center of the Sun. The distance between two chords at latitudes ๐1 and ๐2 on the unit circle is sin ๐1 โ sin ๐2 . By similar triangles we know that sin ๐1 โ sin ๐2 ๐ท = . 1 ๐
Thus ๐
= ๐ท/(sin ๐1 โ sin ๐2 ), which in turnโsince ๐
= ๐ sin ๐ from p. 359โ yields the value for ๐ in miles. Furthermore, to accommodate the phenomenon of Earthโs rotation, as Halley calculated, if the observers measure the time lapse for ๐1 and ๐2 to be traced across the face of ๐ to the nearest second, then ๐ โcan be determined to within one part of 500โ [65]. But for Halley, the next transit of Venus was forty-five years in the future. Therefore he charged astronomers of two generations hence to do what he could not. โ โEven on his death-bedโ whilst holding a glass of wine in his hand, Halley said, โI wish that many observations of this phenomenon might be taken by different persons at separate placesโ โ [163]. Helen of Troy, Christopher Marlowe (1564โ1593) wrote, was a face that launched a thousand ships. For Halley, too, his idea launched quite a fewโfor the best places to view the transit were the far north and the southern seas. The astronomers who answered Halleyโs challenge had two windows of opportunity to observe a transit of Venus, eight years apart. Hundreds of eyes focused on the Sun. Of course, some of the observers encountered cloudy skies or faulty equipment. The first window was 1761, in the midst of the Seven Yearsโ War (the French and Indian War in the American Colonies). One scientific expedition aboard the HMS Seahorse returned shortly after setting sail, having experienced serious damageโeleven dead and thirty-seven woundedโin a dogfight with a French frigate. Nevertheless, after appropriate repairs, the ship set sail again. Two of its
5 The
difference between the Sunโs polar and equatorial radii is about 10 kilometers.
A historical interlude
361
passengers, Jeremiah Dixon (1733โ1779) and Charles Mason (1728โ1786), eventually obtained excellent data from Cape Town, South Africa.6 The French astronomer Jean-Baptiste Chappe dโAuteroche (1722โ1769) obtained very good data during both windows in 1761 and 1769, the first in Siberia working together with the Russian Academy and the second time along the Gulf of California with Spanish colleagues. Unfortunately, Chappe and most of his team lost their lives shortly after their California observations due to a typhoid epidemic in the community. Another astronomer, Jesuit Maximilian Hell (1720โ 1792), was commissioned by the Danes to observe at an island off the northern Norwegian coast; most of his transit day was overcastโexcept for two brief moments of clarity: both the ingress and the egress of Venus within the Sun. The unlucky yet resourceful Guillaume Le Gentil (1725โ1792) of France experienced overcast skies throughout both days in the regions of the Indian Ocean. Perhaps the most famous of the observers was Captain James Cook (1728โ 1779) and the crew of the HMS Endeavour. Although their mission was originally commissioned in anticipation of the 1769 Venus transit, they discovered much about life down under.7 As reviewed recently in detail by Teets [154], James Short (1710โ1768) analyzed transit data from sites as far afield as South Africa and northern Finland, and published his conclusions in the December 1761 issue of the Philosophical Transactions of the Royal Society that ๐ was 93 726 000 miles. Once the data from all of these eighteenth-century observations were consolidated in London and Paris, the scientific world concluded that ๐ โ 153 ยฑ 1 million km, almost achieving Halleyโs hoped-for precision. Years later, after the Venus transits of the nineteenth century, Simon Newcomb (1835โ1909) refined the result to ๐ โ 149.59ยฑ0.31 million km. Today, by way of radar echolocation and spacecraft Doppler-telemetry techniques, this value has been refined down to withinโas a website of the Ohio State University astronomy department saysโthe length of a football or soccer field.
6 Because of their fame with the Venus transit, these two astronomers later were engaged to determine the disputed boundary between the Pennsylvania and Maryland Colonies and so established the eponymous Mason-Dixon line, the line that separates the โNorthโ and โSouthโ in the United States. 7 While sailing to the South Pacific via the Horn, they stopped in Rio de Janeiro for supplies. Due to Portuguese/British tensions, no one but the captain was allowed ashore. Greatly vexed, the British botanist (and future president of the Royal Society) Joseph Banksโwho could see new and exciting flora on either side of the shipโwrote that he felt โlike a Frenchman laying swaddled in linen between two of his Mistresses, both naked and using every possible means to excite desire.โ Months later on Tahiti where the team observed the transit, Banks cataloged many new plants and โsampled the pleasures of free loveโ [163].
362
Chapter X: Transits of Venus
A Venus-Earth-Sun model We assume8 that the orbits of Earth ๐ธ and Venus ๐ are circles, where ๐ธโs orbit is the unit circle (with radius 1 AU) and ๐โs orbit is a circle with radius ๐ โ 0.723 AU. Furthermore, we assume that ๐ธโs orbit lies in the ๐ฅ๐ฆ plane with ๐ at the origin ๐ and that ๐โs orbit lies in a plane containing ๐ inclined at angle ๐ โ 3.39โ to the ๐ฅ๐ฆ plane. We call the line where these orbital planes intersect the nexus line or, according to Meeus [99], the line of nodes. The nexus line in Figure 7 is labeled ๐ต๐ถ. A nexus point or node for Venusโ๐น and ๐บ in the figureโor for Earthโ ๐ต and ๐ถ in the figureโis where the orbit of ๐ or ๐ธ intersects the orbital plane of ๐ธ or ๐, respectively. Transits only occur when ๐ธ and ๐ are both near ๐ต and ๐น, respectively, or both near ๐ถ and ๐บ. The former transit is called a fall transit because in modern times ๐ธ is at ๐ต in early December; it is also called, according to Meeus, an ascending transit, because as ๐โs profile moves across ๐ from left to right its trajectory rises. The latter transit is called a spring transit because ๐ธ is at ๐ถ in early June; it is also called a descending transit, because the corresponding trajectory decreases. ๐ธโs and ๐โs positions at any time are given respectively by: cos(2๐๐ก) 1 0 0 cos(2๐๐๐ก) cos ๐ sin ๐ ] [ sin(2๐๐๐ก) ] , (1) ๐ธ(๐ก) = [ sin(2๐๐ก) ] and ๐(๐ก) = ๐ [ 0 0 0 โ sin ๐ cos ๐ 0 where ๐ is the relative angular velocity of ๐ with respect to ๐ธ. For simplicity, we initially position ๐ and ๐ธ at their spring nexus points. Thus, in our model, spring transits can only occur near integer years, ๐, and, by symmetry, fall transits 1 can only occur near half-years, ๐ + . The value of ๐ for the actual ๐ and ๐ธ is 2 ๐0 = ๐๐ /๐๐ฃ โ 1.62555. The 3ร3 matrix in Equation (1) corresponds to a clockwise rotation by ๐ about the ๐ฅ-axis, so as to be consistent with a descending (spring) transit occurring near nodes (nexus points) ๐ถ and ๐บ, where ๐ถ = (1, 0, 0). A line parametrized by ๐ข from ๐ธ through ๐ at time ๐ก is ๐(๐ข, ๐ก) = (๐(๐ก) โ ๐ธ(๐ก))๐ข + ๐ธ(๐ก).
(2)
To find ๐โs projection onto ๐ as viewed from ๐ธ(๐ก)โan ideal geocentric point in space at ๐ธโs centerโwe imagine that ๐ resides within a rotating plane or screen ๐(๐ก) ever perpendicular to ๐ธ(๐ก). Figure 7 shows the two orbital planes and ๐โs projection onto the screen as viewed from ๐ธ.9 The plane ๐(๐ก) of ๐ can be written as ๐ โ
๐ธ(๐ก) = 0 (3) 8 A reader unfamiliar with vectors and matrices may wish to read through Appendix II before reading these next two sections. 9 In this chapter and in Chapter XII, we will identify points in โ3 with their corresponding position vectors. That is, we will treat them as identical.
A Venus-Earth-Sun model
363 een scr
Eโs orbit
C G
Vโs
j pro
ect
ion
Vโs orbit V(t)
Sun O F
nexus point for V nexus point for E
E(t)
B axis between the orbital planes
Figure 7. The screen of the Sun through the Sunโs center.
where ๐ is a general point (๐ฅ, ๐ฆ, ๐ง) on the screen. When ๐ธ and ๐ are on opposite sides of the screen at time ๐กโwhich happens if and only if ๐ธ(๐ก) โ
๐(๐ก) < 0โwe take the projection point of ๐ onto the screen as that screen point between the planets. We combine Equations (2) and (3) to find the point ๐(๐ก) where the line intersects the plane. That is, equation ๐(๐ข, ๐ก) = ๐ and Equation (3) yield the following system of four equations with four unknowns ๐ฅ, ๐ฆ, ๐ง, and ๐ข, as well as the time variable ๐ก: ๐ฅ = (๐ cos(2๐๐๐ก) โ cos(2๐๐ก))๐ข + cos(2๐๐ก), โง โช ๐ฆ = (๐ cos ๐ sin(2๐๐๐ก) โ sin(2๐๐ก))๐ข + sin(2๐๐ก), โจ ๐ง = โ๐ sin ๐ sin(2๐๐๐ก)๐ข, โช โฉ 0 = ๐ฅ cos(2๐๐ก) + ๐ฆ sin(2๐๐ก).
(4)
ห (๐ก) = ๐ธ ห (๐ก) where Writing Equation (4) as a matrix equation gives ๐ด๐ 1 0 โก 0 1 โข ๐ด=โข 0 0 โข โฃ cos(2๐๐ก) sin(2๐๐ก)
0 cos(2๐๐ก) โ ๐ cos(2๐๐๐ก) 0 sin(2๐๐ก) โ ๐ cos ๐ sin(2๐๐๐ก) 1 ๐ sin ๐ sin(2๐๐๐ก) 0 0
โค โฅ โฅ โฅ โฆ
(5)
ห (๐ก) and ๐ธ ห (๐ก) are the vectors (๐ฅ, ๐ฆ, ๐ง, ๐ข) and (cos(2๐๐ก), sin(2๐๐ก), 0, 0), reand ๐ spectively. Expanding the determinant along the last row of the matrix and using a definition of the determinant and the identities cos(๐ผ ยฑ ๐ฝ) = cos ๐ผ cos ๐ฝ โ
364
Chapter X: Transits of Venus
T113.5 โ1
1 distances in AU a. A wide screen.
T117.5
T121.5
b. Zooming in near the Sun.
Figure 8. Trajectories of ๐โs shadow on the screen of ๐. sin ๐ผ sin ๐ฝ gives det(๐ด) = โ1 + ๐(cos(2๐๐๐ก) cos(2๐๐ก) + cos ๐ sin(2๐๐๐ก) sin(2๐๐ก)) ๐
= โ1 + ((1 + cos ๐) cos(2๐(๐ โ 1)๐ก) + (1 โ cos ๐) cos(2๐(๐ + 1)๐ก)) 2
๐
โค โ1 + (|1 + cos ๐| + |1 โ cos ๐|) = โ1 + ๐ < 0. 2
ห (๐ก) = ๐ดโ1 ๐ธ ห (๐ก). Since it would be Because the determinant of ๐ด is never zero, ๐ convenient to see these points of intersection on a stationary screen rather than ห (๐ก) clockwise the dynamic plane ๐(๐ก), we rotate the first two components of ๐ about the ๐ง-axis by 2๐๐ก radians. The result of such a transformation is a set of points whose first three components trace ๐โs projection onto the screen of ๐. Finally, since the first component of such points will always be 0 and we are uninterested in ๐ข, we project this set of points to obtain their second and third components as ordered pairs, which we index as ๐(๐ก) = (๐1 (๐ก), ๐2 (๐ก)): 0 ๐(๐ก) = [ 0
1 0 0 1
cos(2๐๐ก) sin(2๐๐ก) โก 0 โข โ sin(2๐๐ก) cos(2๐๐ก) ] 0 โข 0 0 โข 0 0 โฃ
0 0 โค 0 0 โฅ โ1 ห ๐ด ๐ธ(๐ก). 1 0 โฅ โฅ 0 1 โฆ
(6)
Figure 8a shows the path of ๐โs projection onto the screen over 1.5 years. Figure 8b is a close-up of the screen near ๐ over a period of about ten years, displaying three arcs of ๐โs projection. The arc labeled ๐ฏ113.5 corresponds to a fall transit near ๐ก = 113.5 years. The arc ๐ฏ117.5 corresponds to ๐ and ๐ธ being on opposite sides of ๐ near ๐ก = 117.5; as such, we display the disk of ๐ in front of this arc. The arc ๐ฏ121.5 misses the disk of ๐.
Conditions for a transit to occur The next proposition gives a necessary condition for a transit of Venus to occur.
Conditions for a transit to occur
365
base of truncated cone
C V
D
S
disk of the Sun
B
Eโs orbit
Figure 9. Maximum separation from the nexus for a transit: a cone of possible shadows. Proposition 3: A litmus test.10 Let ๐(๐ก) be the projection point of ๐ onto the screen of ๐ with respect to ๐ธ at time ๐ก, as given by Equation (6). In order for a 1 transit of Venus to occur at time ๐ก = ๐ or ๐ก = ๐ + , ๐ธ and ๐ must be on the same 2 side of ๐ and 1 โ๐(๐)โ < 0.05 or โโ๐(๐ + )โโ < 0.05. (7) 2 Derivation/Proof. In order to find how far from its nexus ๐ may wander and still be part of a transit across ๐, we project the disk of ๐ through ๐ out to ๐ธโs orbit, forming a cone as illustrated in Figure 9, which displays the situation where the base of the truncated cone is tangent to ๐ธโs orbit. Let ๐ be the radius of this base with center point ๐ท. To approximate where this extreme position for ๐ occurs, we linearize the orbits of ๐ and ๐ธ, and imagine that they proceed along lines perpendicular to the nexus line ๐ต๐ถ, as illustrated in Figure 10. That is, we imagine that ๐ and ๐ธ proceed along tangent lines to their orbits once they pass the nexus point; such tangent lines are approximately perpendicular to the nexus line. In this figure, we take the distance ๐๐ต as 1 AU. The distances ๐๐ and ๐๐ท are ๐๐ and ๐, where ๐ is a marginally larger-than-1 deformation factor due to linearization. With ๐ โ 0.00465 AU as the radius of ๐, from similar triangles we see that ๐ ๐ , = (8) ๐๐ ๐(1 โ ๐) 10 Code
23 of Appendix III shows how to implement this litmus test with a CAS.
366
Chapter X: Transits of Venus
plan
C
rbit โs o V f eo
V
kฮป S
it or b Vโs k(1โฮป) h
ฮณ
D ฯ
ฮพ
ฮป 1โฮป
Eโs orbit
B
Figure 10. Maximum separation from the nexus for a transit: a linear approximation of orbits. which gives ๐ โ 0.0178 AU. Furthermore, sin ๐ =
๐ โ
and
tan ๐พ = โ,
(9)
where ๐ is the angle between the two orbital planes, ๐พ is the angle between the nexus line and the line between ๐ and ๐, and โ is distance ๐ต๐ท. By Equations (8) and (9), ๐ (1 โ ๐ ๐ (1 โ ๐) ๐พ = tanโ1 ( โ 0.0301, (10) )โ ๐ sin ๐ ๐๐ since the arguments of the inverse tangent and sine are so small. Thus, in order to be part of a transit, ๐ may wander no further than about ๐๐พ โ 0.0218 AU from the nexus. By Equation (10), the lapse of time ๐ฟ๐ฃ for ๐ to travel this far from its nexus is ๐ (1 โ ๐) (11) ๐ฟ๐ฃ โ โ 1.08 days. 2๐๐๐0 ๐ The corresponding maximal time ๐ฟ๐ that ๐ธ may stray from its nexus points and still take part in a transit is ๐ฟ๐ =
๐พ โ 42 hours < 2 days. 2๐
(12)
Since the speed at which a transit is traced across ๐ is bounded by 10.34 AU/year as indicated by the graph of โ๐ โฒ (๐ก)โ in Figure 11, โ๐ โฒ (๐ก)โ < 10.34 AU/year โ 0.0284 AU/day
(13)
for all ๐ก. Let ๐ก0 be a medial transit time, a time of a spring transit near integer time 1 ๐ or of a fall transit near half-year time ๐ + where ๐1 (๐ก0 ) = 0. Since the time 1
2
between ๐ก0 and either ๐ or ๐+ must be at most about 42 hours by Equation (12), 2
Conditions for a transit to occur
367
speed in AU/yr transit occurs here V and E on opposite sides of S 4 2 0.0
1.0 time t, in years
2.0
Figure 11. Speed, โ๐ โฒ (๐ก)โ, of ๐โs shadow across the screen of ๐. Table 3. Years and half-years at which the spring and fall transits occur; twin transits are paired with the dominant twin underlined. {0, 113.5, 227, (340.5, 348.5), (454, 462), 575.5, 689. 802.5, 916, 1029.5, (1143, 1151), (1256.5, 1264.5), 1378, 1491.5, 1605, 1718.5, 1832, (1945.5, 1953.5) } 1
the most that โ๐(๐)โ or โ๐(๐ + )โ can differ from โ๐(๐ก0 )โ is approximately 2
(0.0280 AU/day)(42 hours) โ 0.0496 AU by Equation (13). Since |๐2 (๐ก0 )| < ๐ , 0.05 AU is about the most that โ๐(๐)โ or 1 โ๐(๐ + )โ can be. Therefore, our litmus test to determine if integer year ๐ or 2
1
half-year ๐ + is a promising one for a transit is for ๐ and ๐ธ to be on the same 2 side of ๐ and for 1 โ โ โ๐(๐)โ < 0.05 or โ๐(๐ + )โ < 0.05. โข 2 Applying Equation (7) to the integers 0 to 2000 with ๐ = ๐0 , we find the promising years of Table 3.11 We may consider the half-year dates to be fall transits and the whole-year dates to be spring transits. Double-checking the dates in Table 3 by graphing the arc ๐(๐ก) against the disk of ๐ verifies that each of the years or half-years corresponds to a spring or fall transit, respectively, and are the only transits during this 2000-year period in our 11 In
Code 23 of Appendix III, we show how to implement the litmus test of Proposition 3.
368
Chapter X: Transits of Venus
dominant tw
in T462
T454 Figure 12. A twin pair of descending spring transits.
model. As can be seen, the familiar differences 8, 105.5, and 113.5 between successive transit times appearโgood news for our model. The entries in the table eight years apart have been grouped as ordered pairs; their associated transits are called twins or doubles. For example, spring transits occur in our model in both year 454 and year 462. For a twin transit, we say that the transit member whose path across ๐ comes closer to ๐โs center is the dominant transit of the two. In Tables 3, 4, and 5 dominant twins are underlined. As can be seen in Figure 12, and as indicated in Tables 3 and 4, ๐ฏ462 is the dominant member of the twin transit (๐ฏ454 , ๐ฏ462 ). If a transit has no twin, it is a singleton transit. ๐ฏ227 is a singleton. In due course, we show how to modify our model to simulate actual transit dates.
Recognizing the pattern To find a natural transit period, we focus on spring transits for a season. From Table 1 we drop the fall transit dates and are left with Table 2. When we refer to the spring transit year ๐๐ from the table, where ๐ โฅ 0, we mean term ๐ in row 2 or the dominant transit year if the term is a twin. For example, ๐2 = 462 as evidenced by Figure 12. Observe that the first eight spring transits constitute a complete residue set modulo 8. Furthermore, ๐๐ mod 8 just happens to be 3๐ mod 8, which suggests that the relative motion of the planets induces a shuffling of the transit year residues modulo eight. We thus refer to 3 as a shuffling factor. Table 4. Spring transits. ๐ transit year ๐๐ ๐๐ mod 8 3๐ mod 8
0 1 2 0 227 (454, 462) 0 3 6 0 3 6
3 4 5 689 916 (1143, 1151) 1 4 7 1 4 7
6 7 1378 1605 2 5 2 5
8 1832 0 0
Recognizing the pattern
369
Sun โ16
โ8
0
8
16
Figure 13. ๐โs projection given by ๐(๐ก) near ๐ก = โ16, โ8, 0, 8, 16. To help understand this eight-fold dynamic, observe that every eight years ๐ธ and ๐ pass each other not far from where they had passed each other eight years before, with ๐ a bit further ahead of ๐ธ each time. We say that the arc given by ๐(๐ years ยฑ 1 week) is rung ๐ in a ladder of arcs. As the years go by, these rungs step monotonically upwards (or downwards) to a climax before reversing their progression, with rung 8๐ being slightly above or below rung 8(๐ + 1) for all integers ๐. Near the spring transit years, neighboring rungs are separated by a distance somewhat more than the radius of ๐, as illustrated in Figures 8b, 12, and 13; the dots in Figure 13 represent ๐โs projection at ๐ก = โ16, โ8, 0, 8, 16 years. With ๐ = 8, the approximate distance ๐(๐) between neighboring rungs near transit years is the distance between ๐(๐) and its projection onto ๐(0+ ), where we take 0+ as one hour: ๐(๐) โ
๐(0+ ) โ โ ๐(0+ )โ โ 0.00672 AU. ๐(๐) = โ๐(๐) โ โ โ ๐(0+ ) โ
๐(0+ )
(14)
Since ๐ < ๐(๐) < 2๐ , a sequence of at most two successive rungs may cross the face of ๐, whereas if a rung crosses near the center of ๐, then only one rung in that succession of rungs can correspond to a transit. When we extend the data given in Table 2 to all integers, the data points seem to sort themselves. Plotting {(๐, ๐1 (๐))}๐โฅ0 corresponding to the times when ๐ธ is at its spring nexus point shows a hodge-podge of dots across one hundred years in Figure 14a. Yet, when we look at a longer period of time, the trend is clear. Figure 14b displays the data across 2000 years. It appears as if ๐โs projection when sampled at ๐ธโs spring nexus point lies on one of eight branches through the data, which all appear to be uniformly spaced translates of one another. By Equations (5) and (6), finding the periodicity within {(๐, ๐1 (๐))}๐โฅ0 is equivalent to finding the periodicity present within ๐ฎ๐ = {(๐, sin(2๐๐๐))}๐โฅ0 โ which is our familiar signature of ๐ from Chapter VIIโas ๐ ranges over integer values. Figure 15 shows that when restricted to the years 8๐ where ๐ is an integerโand when adjacent points are connected by line segmentsโthe two curves display the same periodicity for ๐ = ๐0 . The curves appear to have a root near ๐ก โ 917, but no spring transit occurs at either 912 = 8(114) or 920 = 8(115) years because in our model ๐ and ๐ธ are on opposite sides of ๐ at both times. However, near the next root ๐ก โ 1834, a transit occurs at ๐ = 1832 = 8(229) years but not at 1840 years, because ๐โs projection falls just outside ๐โs disk in that year.
370
Chapter X: Transits of Venus
1.0
AU
AU 1.0
20
years
years
60
โ1.0
โ1.0
a. A hodge-podge of dots.
1000 1500
500
b. A better perspective.
Figure 14. Horizontal component of ๐โs projection at ๐ธโs spring nexus over time.
AU 1.0
(8n, W1(8n)) (8n, sin(2ฯฯ(8n))
500
years
1500
โ1.0 Figure 15. Paths through ๐1 (๐ก) and sin(2๐๐๐ก) when ๐ก = 8๐ years and ๐ = ๐0 . The nearest integer continued fraction algorithm ๐ for ๐ โ 1.62555 gives ๐ โ 1.62555 โ [2; โ3, โ3, 28, 29]๐ โถ {2, From Chapter VII, using the second convergent of ๐1 is approximately ๐=
2๐ ๐โ
13
13 8
5 13 369 , , }. 3 8 227
(15)
, we know that the period
โ 1834.29 years
8
and that branch 1 is a ๐ฝ = ๐/8 โ 229.29 year translate of branch 0. To verify the fourth row of Table 4, that 3 is the shuffling factor, observe by Proposition VII.21 that the points on branch 1 correspond to integers of the form 8๐ + ๐ where 0 < ๐ < 8. Since 13/8 < ๐, to find ๐ we solve Equation (VII.6),
Recognizing the pattern
371
T6655
T6647 Figure 16. Spring transit near 3๐ + 5๐ฝ. namely 13๐ = โ1 mod 8, giving ๐ = 3. Thus the points on branch 2 correspond to integers of the form 8๐ + 2๐, or 8๐ + 6, and so on, replicating the fourth row. As ๐ varies within 13 1169 1119 , โฌ6 ( ) = ( (16) ) โ (1.62264, 1.62645), 8 720 688 an order-six dominance domain as defined in Chapter IX, the shuffling factor ๐ 13 13 for ๐ฎ๐ is ๐ = 3 when ๐ > and is ๐ = โ3 mod 8 = 5 when ๐ < . Outside this 8 8 domain, ๐ฎ๐ may not display an eight-fold branch structure. ๐ For a given ๐ฎ๐ , knowing the branch number ๐, the fraction approximating ๐
๐, the period ๐, the translate distance ๐ฝ of its first branch, and the shuffling factor ๐, we can predict when transits occur. Before reading the proof of this next proposition, the reader may wish to review the material from Chapter VII. Proposition 4: The transit rule. Let ๐, ๐, and ๐ be integers, 0 โค ๐ < ๐. If time ๐ก = 0 is a spring transit, then another spring transit occurs at integer year ๐ near time ๐|๐| + |๐ฝ|๐ if and only if ๐ = ๐๐ + (๐๐ mod ๐) and ๐ is no further from ๐|๐| + |๐ฝ|๐ than from either ๐ โ ๐ or ๐ + ๐. If either ๐ โ ๐ or ๐ + ๐ is a transit year as well, then ๐ is the dominant member of the twin. To ascertain whether ๐ ยฑ ๐ is also a spring transit, utilize the decision rule of Equation (7). Proof. From Proposition VII.14, an integer ๐ in โ is on branch 1 of ๐ branches if and only if ๐ = ๐๐ + ๐ where ๐, ๐ โ โ, ๐ satisfies the equation ๐๐ โก โ๐ mod ๐, ๐ is the fraction approximating ๐, ๐ = sgn(๐๐ โ ๐), and 0 < ๐ < ๐. Thus ๐ is on ๐
branch ๐ if and only if ๐ = ๐๐ + (๐๐ mod ๐). Thus ๐|๐| + |๐ฝ|๐ lies either between ๐ and ๐ + ๐ or between ๐ and ๐ โ ๐. In either case ๐ is at least as close to ๐|๐| + |๐ฝ|๐ as is either of ๐ ยฑ ๐. Example 5: An application of the transit rule. We illustrate the transit rule for ๐ โ 1.62555. Let ๐ = 3 and ๐ = 5. Since 3๐ mod 8 = 7, we want to find
372
Chapter X: Transits of Venus
1.0
โ1.0
T7028 T7019 T7010 T7001 T6992 T6983 T6974
8000
2000
a. Sฯ, ฯ = 11โ2 .
b. A transit family of septuplets, ฯ = 11โ2 .
10
10
Figure 17. A transit with ๐ other than ๐0 . the transit year ๐ = 8๐ + 7 which is closest to ๐|๐| + ๐|๐ฝ| โ 6649.3. Then ๐ = 8(830) + 7 = 6647 while ๐ + 8 = 8(831) + 7 = 6655. So year 6647 is a singleton transit, while year 6655 is a near-miss as shown in Figure 16. โข As for fall transits, a similar rule applies, except that the eight branches through 1 the data corresponding to time ๐ + are 2
1 ๐ฆ๐ = sin(๐ผ(๐ก โ ๐ฝ(๐ + ))). 2 11โ2
Example 6: Another application of the transit rule. Let ๐ = โ 1.55563. 10 The graph of the signature ๐ฎ๐ of ๐ shows that it has ๐ = 9 branches; see Figure 17a. The nearest integer continued fraction algorithm ๐ gives ๐=
11โ2 3 14 2181 โ [2; โ2, 4, โ156]๐ โ {2, , , }. 10 2 9 1402
The second convergent
14 9
of ๐ shows that ๐ = 14, and the third convergent
shows that ๐ฝ should be near 1402. The period of ๐ฎ๐ is ๐ =
1 ๐โ
14 9
2181 1402
โ 12600.3
years, so ๐ฝ = ๐/9 โ 1400.03. And ๐ = sgn(๐) = 1. Solving ๐๐ = โ๐ mod ๐, namely 14๐ = โ1 mod 9, gives ๐ = 7, the shuffling factor. Now let ๐ = 0 and ๐ = 5, which means we are looking for a transit year with residue ๐๐ mod 9 โก 8 near time 5๐ฝ = 5๐/9 โ 7000.17. Thus, ๐ = (777)(9) + 8 = 7001 is a transit year. With this new value of ๐, ๐ has receded from ๐, so the distance ๐(9) between the rungs has changed to ๐(9) โ 0.0014 by Equation (14), which means that we have more than twin transits; in fact we have septuplets, as shown in Figure 17b. โข
A reality check
373
Y linear model Z approximation of the June 2012 transit actual June 2012 transit path
Figure 18. Hunting for a phase angle ๐ฟ.
A reality check How does our model compare to reality? A phenomenon omitted thus far from our transit model is the tendency for objects to rotateโincluding the orbital planes of ๐ and ๐ธ, a feature called precession. The values ๐๐ and ๐๐ฃ used to define ๐0 are the periods of the two planets with respect to the background of the fixed stars. To adapt our model appropriately, we must incorporate slightly different periods, namely, the time it takes for a planet to return to its aphelion, a point in the planetโs orbit furthest from the Sun. Since ๐ธ precesses faster than ๐, as time goes on the nexus line rotates and hence spring and fall transits occur later in the year. Because precession rates are tiny compared to ๐0 , we arbitrarily take ๐0 โ 1.625550000 as computed on page 362. Meeus [99, p. 13] predicts that โan almost exactly central transit will take place on 11 July 5900โโa transit through ๐โs center. Thus from 2012 to 5900, the spring transit has now become a summer transit, having slipped forward by about 35 days over a lapse of 3888 years, which implies that the change in the relative orbital speeds of ๐ and ๐ธ with respect to the nexus line 35๐0 is ฮ๐ โ โ 0.0000397559; this means that we might try the new angular 3888๐๐
velocity ๐1 = ๐0 โ ฮ๐ โ 1.625510244. Next, we need a phase shift ๐ฟ to start our model. From [99, p. 48], the transit of 6 June 2012 crossed ๐โs boundary at ๐ โ 39.45โ and at ๐ โ 291.4โ measured counterclockwise from the top of ๐, shown as a dashed line in Figure 18. Adjusting Equations (1) and (5) so that the trigonometric arguments 2๐๐๐ก are replaced by 2๐๐(๐ก+๐ฟ), where ๐ฟ is an indeterminate phase shift, and using a search method to find ๐ฟ by dynamically plotting ๐(๐ก โ 2012) near ๐ก = 2012 yields the solid-line transit in Figure 18, suggesting that ๐ฟ โ 0.00102 is a good match. The reason that the two transit lines are non-parallel is because ๐ธโs and ๐โs actual orbits have
374
Chapter X: Transits of Venus
positive eccentricity. When we apply Equation (7) in this adjusted model for the years from 700 to 3000 ad, we find the promising spring transit Gregorian year possibilities shown in Table 5. The underlined years indicate a match between our results and Meeusโs. Not bad for a linear model. But can we do better? Table 5. The linear model versus Meeusโs model. Linear model
{
(781, 789) (2004, 2012)
Meeusโs model
{
(789, 797) (2004, 2012)
(1024, 1032) 2255) (1032, 1040) (2247, 2255)
1275 2498 (1275, 1283) (2490, 2498)
1518 2741
(1761, 1769) (2984, 2992)
(1518, 1526) (2733, 2741)
(1761, 1769) (2976, 2984)
To do so, we work backwards through the transit rule and find a magic an13 gular velocity. Since ๐1 is within the dominance domain of and is less than 8
13
as evidenced by (16), the corresponding shuffling factor is ๐ = 3. We make 8 use of a second unusual spring transit year: 183 bc, whose corresponding transit Meeus describes as โalmost central.โ The difference between 5900 ad and 183 bc is 6083 years. Identify ๐ก = 0 with year 5900. Thus, year 183 bc is referenced by ๐ก = โ6083 = 8(โ761) + 5, which means that 5 โก 3๐ mod 8, whose solution 1 is ๐ = 7. Using the angular velocity ๐1 gives the associated period ๐1 = 13 โ ๐1 โ
1959.85. We then solve ๐๐1 + 7
7๐1 8
๐ = โ4 and solve (๐ + )๐2 = โ6083, obtaining ๐2 = 8
angular velocity ๐2 satisfies ๐2 =
8
= โ6083, getting ๐ โ โ3.98. Next, reset ๐ as 1 ๐2 โ
13 8
48664 25
. Since our adjusted
,
13 25 13 9888 1 + = + = โ 1.6255137267795495644. ๐2 8 48664 8 6083 When we generate transits by the transit rule using angular velocity ๐2 across the years 2000 bc to 4000 ad, we get an exact match with actual spring transits from Meeusโs results, as shown in Table 6. As can be seen, the difference between successive entries in Table 6 is 243 years except when passing from 2733 to 2984, the year marked with an asterisk. The match between the results of these two approaches with respect to the recessive partner in twin transits is less spectacular. ๐2 =
Table 6. Spring transit years, generated by the transit rule. 1884 bc 546 2984โ
1641 bc 789 3227
1398 bc 1032 3470
1155 bc 1275 3713
912 bc 1518 3956
669 bc 1761 4199
426 bc 2004 4442
183 bc 2247 4685
60 2490 4928
303 2733 5171
A ๏ฌnal thought
375
An easier way to determine when transits occur The denominator of ๐โs third convergent for ๐0 , Venusโs relative angular velocity, is 227, as given by Equation (15). The data of Table 6 clearly shows that 227 years is not the time lapse between successive Venus spring transits. To account for the precession of planetary orbits so as to adjust appropriately the guess of 227 years, we must nudge ๐0 slightly. Rather than interpolate using ideal central transit data as we did above, an alternate way to find the time lapse between Venus spring transits is to take advantage of the recursive nature of continued 5 ๐ 13 ๐ fractions. The first and second convergents for ๐0 are = and = . As we ๐ 3 ๐ 8 saw in Chapter IX, in general the third convergent must be of the form 5 + 13๐ , ๐(๐) = 3 + 8๐ where ๐ is some integer. Observe that ๐(28) = 227. To account for the modest impact of precession on ๐0 , a better third convergent for a more accurate angular velocity should be ๐(๐) for some integer ๐ near 28. Table 7. Possible time lapses between spring transits. ๐ ๐(๐) lapse
27
28
29
30
356
369
382
395
219
227
235
243
219 227
235 243
From Table 7, we see that the time lapse should be one of 219, 235, or 243 years. Checking NASAโs tables to confirm if any of these are correct, we find the denominator of ๐(30) to be ๐ = 243 years. And indeed, the next June transit of Venus is 243 years from 2004, namely the year 2247. Furthermore, ๐โs third 395 convergent for ๐2 is . By symmetry, the time lapse between successive transits 243 of Venus, spring to fall, or fall to spring, should be half of this period, namely 121.5 years. Of course, because the relative angular velocity of Venus lies within the 13 periodicity domain of and twin transits often occur, we sometimes must adjust 8 121.5 years by eight years more or less. In particular, the last Venus transit was a twin transit in June of 2004 and 2012; the next fall transit will occur in December of 2117. The time lapse between June 2004 and December 2117 is 113.5 years, which is eight years less than 121.5 years.
A ๏ฌnal thought What we have shown is that the cycle of transits is the way it is because ๐โs angu13 lar velocity ๐0 is enmeshed within the dominance domain of . This dominance 8
376
Chapter X: Transits of Venus
in turn induces a modulo-eight shuffling of successive transit years by a factor of three, a phenomenon reflected in the 6000-year standard tables of transits generated by Meeus [99]โprovided we partition transits into two families, spring transits and fall transits, and discard one of the years from each twin transit. With respect to permanence, in the life cycle of ๐, ๐ slowly loses mass and swells to giant status and so the orbits of the planets recede from ๐, which means that the transit cycle for ๐ may change dramatically. The rational numbers with 13 small integer denominators near in increasing order are 8
3 11 8 29 21 13 31 18 23 28 33 5 7 , , , , , , , , , , , }, { , 2 7 5 18 13 8 19 11 14 17 20 3 4 a portion of the Farey series โฑ20 from Chapter IV. Eons from now, the natural periodicity of the Venus transit may change from 8 to 13 or 19. Hopefully people will still be here to see. Exercises 1. Assume that the masses of Earth, the Moon, and the Sun will remain the same indefinitely, and that the Moon recedes from Earth at 3.5 cm/year, while Earth recedes from the Sun at 15 cm/year. Estimate the time, if it exists, when twelve moons is exactly one year. 7
7
2. Generate a table much like Table 2 for 12 + and 12 + moons per year. De17 19 scribe any qualitative differences in the distribution of window radii between the two tables. 3. (a) Imagine that two observers view a transit of Venus at Earthโs two poles. Assume they are ๐ = 8000 miles apart. How far apart, ๐ท miles, do the transits across the Sun appear to be? (b) Estimate the number of widths of length ๐ท needed to form a radius of the Sun. (The Sunโs approximate radius is 432 000 miles.) (c) Now estimate the length of an astronomical unit. Assume that the Sun subtends an angle of 0.5โ as viewed from Earth. 4. (a) Use the transit rule to find the date of the transit when ๐ = 3 and ๐ = 6 for ๐0 . (b) Repeat the calculation for ๐2 , where ๐2 is defined on p. 374. (c) Repeat the calculation for ๐ = 1.5277121212 โฆ . 5. (a) Find a number ๐ for which ๐ฎ๐ has five branches and for which the shuffling factor is three. (b) Find a number ๐ such that ๐ฎ๐ has thirteen branches each of which has period ๐ with โ|๐|โ โ 3000.
Exercises
377 ๐
6. (a) Experiment with dominance domains โฌ๐ ( ), and determine, if possible, ๐
a rule of thumb to use to find the least integer ๐ for a given fraction
๐ ๐
such that ๐ฎ๐ appears to have ๐ branches for every ๐ in the domain. For ๐ 13 example, as in (16), for = , the answer appears to be ๐ = 6. ๐
8
(b) In order to recognize the number of branches ๐ for the signature ๐ฎ๐ for a given irrational number ๐, one period ๐ of any of its branches must contain a sufficient number of data points. Estimate in general how many data points on a branch are needed to recognize the connected sequence of these data points as a sine curve. For example, four points is too few, and one hundred points is more than enough. 7. (a) In Equation (5) for the matrix ๐ด, replace each occurrence of 2๐๐๐ก with 2๐๐(๐ก + ๐ฟ) where ๐ฟ = 0.1 years. When will the next spring transit of Venus occur? (b) Generalize part (a) for any such phase shift ๐ฟ. 8. (a) Using the ideas of this chapter, generate a table analogous to Table 6 for Venusโs fall transits. (b) Determine the periodicity of Mercury transits. 9. (a) How often would a Martian colony experience an Earth transit? A Martian year is about 668.98 Earth days, and Marsโs orbital inclination with respect to Earthโs orbital plane is 1.850โ . (b) On the screen of the Sun, how far apart do Earthโs successive transit rungs appear to be? (c) Determine the analog of Equation (7) for Earth transits with respect to Mars. 10. With respect to an Earth transit as viewed from Mars, the relative angular velocity of Earth is ๐ โ 668.98/365.26 โ 1.83152. (a) Generate the first few convergents for ๐. (b) How many branches does ๐ฎ๐ appear to have? (c) Estimate the period of these branches. (d) As with Earth and Venus, the relative angular velocity of Earth and Mars is affected by precession. Produce a table analogous to Table 7 listing some possible time lapses between successive Earth transits of the same family as viewed from Mars. By family, we mean a set of transits occurring in approximately the same part of the year; for example Venus has two families of transits: spring transits and fall transits.
378
Chapter X: Transits of Venus
(e) Mars has two Moons, Phobos and Deimos, whose respective distances from Mars and orbital periods about Mars are 9377 km, 23436 km, 0.31891 Martian days, and 1.26244 Martian days. The polar radius of Mars is 3376.2 km. How often does Phobos lap Deimos? How often will an observer on Deimos see Phobos move across the face of Mars? With respect to the orbital plane of Mars, Phobosโs orbital plane has an inclination of 1.08โ and Deimosโs orbital plane has an inclination of 1.79โ .
Strand XI: Meton of Athens Meton, an Athenian astronomer, championed the adoption of a nineteen-year calendar in about 432 bc. He is considered to be the first โscientific Greek astronomerโ because he was the first Greek to use instruments when observing. Apparently he was the first to set up a sundial in Athens. He also was skilled in devising water-supply to various city-states. Metonโs observatory was located atop the steps adjacent to the old Athenian Assembly meeting place called the Pnyx, as shown in Figure 1.
Figure 1. A long eastern ridgeline from Metonโs observatory, above the old steps on the lower right, with the Acropolis in the upper left, author sketch. From his observatory, Meton tracked the position of each sunrise against a long ridgeline. After several years of gathering data, he determined that the aver5 age length of a year was about 365 days, although this value is about ๐ฟ โ 30.2 19 minutes longer than a tropical yearโthe length of time between successive summer solstices.1 Even though such an error grows to 19๐ฟ โ 9.56 hours in nineteen 1 The tropical year is about 20.45 minutes shorter than a sidereal yearโthe length of time for Earth to return to where it had been before with respect to the fixed stars.
379
380
Strand XI: Meton of Athens
years, Meton loved this result because the Moonโs phases cycle with approximate period 29.5 days, a length known as a moon, a lunar month, or a lunation, and nineteen years of lunar months is almost exactly 235 moons. In nineteen years, the lunar and solar methods of tracking time nearly coincide. Why not adopt such a calendar? he proposed. In his day, each city-state had their own peculiar way of tracking time, such as so many moons or years after the last olympic games, or so many moons or years after a ruler gained power. To be sure, the Greek world somewhat acquiesced to Metonโs idea, but apparently no city-state ever officially adopted this calendar. As the years slipped by, about one hundred years after Meton, Callippus (circa 370โ300 bc) proposed a modified calendar of four Metonic cycles one of which is lessened by a day, making a calendar of 76 years. Astronomers continued using this cycle at least until 46 bc when Julius Caesar approved the Julian Calendar, a modification of the Egyptian calendar, for the Roman Empire. What else is known about Meton? The Roman historian Plutarch mentions Meton in passing in one of his Parallel Lives contrasting Greek and Roman heroes. In his Life of Nicias, an Athenian leader, Plutarch takes us to the year 412 bc. Should the Athenian fleet attack Sicily? Gods and oracles are consulted. Omens are read. For several days, ravens peck at a statue of Pallas-Athena atop a bronze palm tree, so felling its fruits of gold to the groundโa bad sign. Then it was either because he feared such signs as these, or because, from mere human calculation, he was alarmed about the expedition, that the astrologer Meton, who had been given a certain station of command, pretended to be mad and set his house on fire. Some, however, tell the story in this way: Meton made no pretence of madness, but burned his house down in the night, and then came forward publicly in great dejection and begged his fellow citizens, in view of the great calamity which had befallen him, to release from the expedition his son, who was about to sail for Sicily in command of a trireme. Meton also appears in a more light-hearted role in Aristophanesโ comedy The Birds, which debuted two years earlier, in 414 bc. Briefly, the birds decide to build themselves a city, midway in the air between the land below and the gods above, called Cloud Cuckoo Land. A succession of men volunteer to help, yet all of them are soundly thrashed and driven from the domain. The first is a poet hoping to be hired to dispense fine-sounding words. The second is a prophet with omens for sale. The third is Meton, a civil engineer, who offers to design their city. The fourth is a government official with lists of regulations. The fifth is a lawyer with a bunch of laws. Then the gods volunteer to help, but they too are outwitted and banished. And so the birds establish a utopia by and for themselves along with anyone who chooses to become a bird-brain.
Strand XI: Meton of Athens
381
Figure 2. Meton on his way to Cloud Cuckoo Land, sketch by author. The mast and spar also serve as a large wooden compass and straight-edge. When the play first opened Meton was probably in the audience. He is the only Athenian singled out for laughter by name. Perhaps the following translated excerpt from The Birds is but a simple roast of a celebrity in their midst. This passage is the entirety of Metonโs dialogue with Pithetaerus, an eminent Cloud Cuckoo Land official whose name means Trusted Friend. Meton: I have come in person โฆ Pithetaerus: (to himself ) Hereโs another pest. Meton: I propose to subject the atmosphere to geometrical measure, and divide it in acre lots. Pithetaerus: In Godโs name, who are you? Meton: Who am I? Sir, I am Meton, known throughout Greece. Pithetaerus: Tell me, thoughโpointing to Metonโs instrumentsโwhat are those things? Meton: Aerial measuring rods. To demonstrateโsince the atmosphere in shape is like a domed pot cover, I place this curvilinear ruler above, insert a compass ... You follow? Pithetaerus: Not a bit!
382
Strand XI: Meton of Athens
Meton: Applying a straight-edge ruler, I take successive measurements until your circle becomes a square whose center is a market-place, and towards that centerโjust as a star which, although circular, radiates rays of lightโ run roads from all directions. Meton hands Pithetaerus the large wooden compass. Pithetaerus: What a Thales2 you are! โฆ pause โฆ Meton! Meton: Yes? Pithetaerus: Let me give you some advice. Step off the road a little. Meton: Why, whatโs wrong? Pithetaerus: Among us rages an epidemic of xenophobia, a harmony of hearts for exiling all humbugs. Pithetaerus proceeds to beat Meton with the compass. Meton: Oh, mercy! Help! Pithetaerus: Ah, well, what did I say? Now, please, geometrize yourself away.
2 Thales (circa 624โ546 bc) was one of the Seven Sages of Greece. Aristotle regarded him as the first true Greek philosopher. His mathematical discoveries included the use of geometrical reasoning to estimate how far ships were from shore. He is reputed to be the first to try to explain physical phenomena without reference to the gods.
Chapter XI: Lunar Rhythms Hooray! Itโs Hanukkah!3 Itโs Easter!4 Itโs Ramadan!5 Itโs Diwali!6 Itโs Durinโs Day!7 Itโs Tรฉt!8 When next will such lunar holidays arrive on the same date with respect to the seasons and, specifically, the Gregorian calendar? From Puzzle VII.27, we saw that the phases of the Moon cycle with period nineteen years. Is this the best period? As an application of continued fractions, this chapter attempts to give an answer. One difficulty with characterizing the Moonโs motion is that it involves the three-body problem. After Isaac Newton derived Keplerโs laws from first principles assuming an inverse square law of gravitation, he focused on Earth, the Moon, and the Sun, so as to determine where the Moon would be at any time and ultimately gave up, saying to Edmund Halley that the three-body problem had โmade his head ache, and kept him awake so often, that he would think of it no more.โ [153, p. 160] Although the mean time it takes the Moon to complete one circuit of Earth with respect to the Sun is about 29.53 days (the synodic period), the exact time varies up to about 7 hours from this mean. Long ago in 1178, Moses Maimonides, a renowned medieval Jewish scholar who among many other things had been a physician to Saladin, said, โThe Sun knows its way, the Moon does not.โ Indeed, in 1887, Henri Poincarรฉ showed the futility of searching for an analytic lunar cycle formula, that the very pattern is one of chaos. Of course, we can extend our predictions of Earthโs and the Moonโs positions to a reasonable degree of accuracy arbitrarily far into the future and past using dynamical simulations. In [44], Fred 3 A Jewish holiday starting on the 25th day of the lunar month Kislev, where the beginning of each month is a new moon. 4 A Christian holiday on the first Sunday after the full moon following the spring equinox. 5 A month-long Muslim fasting holiday starting with the new moon that initiates the lunar month of Ramadan. 6 A Hindu holiday whose zenith is the new moon between mid-October and mid-November. 7 A holiday of the fictional realm of Middle Earth starting on the first day of the last moon of autumn [156, p. 96]. 8 Also known as the Chinese New Year, which is usually the second new moon after the winter solstice.
383
384
Chapter XI: Lunar Rhythms
Figure 3. Phases of the Moon, courtesy of NASA. Espenak, a NASA astronomer who specialized in predicting eclipse dates, logged the dates of the four quarters of the Moon over a 6000-year period. Keeping in mind Poincarรฉโs observation, we proceed with caution and use the simple harmonic motion Earth-Moon-Sun model of Equation (VII.14). In this model, the Moon at time ๐ก, with respect to a fixed Earth at the origin and a fixed Sun along the positive ๐ฅ-axis, is at (cos 2๐๐๐ก, sin 2๐๐๐ก) where ๐ is the relative angular velocity, ๐ โ 12.368747 cycles per year, and ๐ก is in years. Let ๐ค(๐ก) = sin 2๐๐๐ก, the second component of the Moonโs position in our system, a measure of how far the Moon is from being new or full at time ๐ก.
Predicting the time lapse between successive new moons A plot of ๐โs signature, ๐ฎ๐ , displays nineteen branches, corresponding to ๐โs har235 . From Chapter VII, the shift between successive branches monic convergent 19 should be the denominator of ๐โs next harmonic convergent. Figure 4 is a graph of ๐ฎ๐ along with a zoomed-in window near the root of branch 1 (of nineteen branches). As can be seen, this shift distance is 160. Applying the harmonic algorithm ๐ป or the nearest integer continued fraction algorithm ๐ to ๐ generates the convergents
Predicting the time lapse between successive new moons
385
1
500
2000
t
inset 158
160
162
โ1
Figure 4. A connected branch and inset graph of the Moonโs signature, ๐ฎ๐ .
136 235 1979 37 โ โ โ . 3 11 19 160 This information suggests that the phases of the Moon should approximately repeat themselves according to the Earth-Moon-Sun model every nineteen years, just as Meton observed, and also every 160 years. Which one is better? As a clue, the roots of sin 2๐๐๐ก nearest 19 years and 160 years are, respectively, 4.38 hours less than 19 years and 0.34 hours more than 160 years. On this basis, 160 appears to be a better time lapse than 19 when minimizing the average time lapse between new moons modulo the nearest integer in years of the lapseโs length. But is it really? Before we consult actual data, we adapt our simple model appropriately to predict actual averages for these two time lapses. One glaring weakness of our simple model is that it ignores the precession of Earth, a phenomenon noted by Hipparchus9 in about 130 bc. Earthโs solstices and equinoxes rotate against the Zodiac, the background of stars along Earthโs equatorial plane, with a period of 25 800 years. As one of the significant blockbuster punchlines in Isaac Newtonโs Principia of 1687, Newton predicted that Earth must be flattened at its poles (outlined in Chapter VIII). He showed that the combined gravitational force exerted by the Moon and the Sun on the mass in Earthโs bulging equatorial region was enough to explain Earthโs precession rate. Although its orbital eccentricity is highly exaggerated, Figure 5 shows Earthโs orbit precessing with time, where ๐น represents a fixed star, ๐ is the Sun, ๐ธ is Earth, and ๐ is the perihelion10 of Earthโs orbit. Figure 5a displays Earth at time 12 โ
9 Hipparchus is credited with making the first star charts and trigonometric tables, gathering together all that was known up to his day in astronomy. 10 The perihelion of a planet is the point along its orbit nearest the Sun.
386 E
Chapter XI: Lunar Rhythms S
F P
a. At time ๐ก = 0 years.
E
F
S
F
S
E
P
P
b. Once around, not quite one year.
c. At ๐ก = 1 year.
Figure 5. Earthโs orbit precessing with time. 0 when ๐ธ, ๐, ๐, and ๐น are aligned. Figure 5b displays Earth after it completes 1 one complete orbit, at time ๐ก โ (1 โ ) years. Note that Earthโs orbit has 25800 precessed clockwise by a small amount. Because of precession, the line through ๐ธ and ๐ fails to pass through ๐น. At time ๐ก = 1 (sidereal) year, ๐ธ, ๐, and ๐น are once more aligned, but ๐ fails to be on this line. In our simple Earth-Moon-Sun model, in one year Earth completes one lap in its orbit. Yet in one year, Earth actually travels slightly more than one lap in its orbit, which means that each year the 1 simple model loses year with respect to how time is actually measured. In 25800
(365.25)โ
(19)
nineteen years this precession loss in our simple model is 25800 days โ 6.46 hours, and, similarly, in 160 years this loss is 2.265 days.
โ 0.2690
Definition 1: Spans of years. We say that a short span of years is an ordered pair of new moon dates approximately 19 years apart and a long span of years is an ordered pair of new moon dates approximately 160 years apart, with the first components being less than the second components and where the new moon dates lie between 8 October and 7 November, an arbitrary range of 31 days chosen because they more or less encompass the time of autumn.11 Should the dates fail to be unique for a particular year, the October dates are preferred over the November dates. As a specific instance of a standard short span, here is ๐1996 : ๐1996 = (12 Oct 1996 @ 23:07, 13 Oct 2015 @ 00:06).
(1)
Definition 2: Deficient centuries and lapse spans. In the Gregorian calendar every year divisible by 4 is a leap year except for century years nondivisible by 400. Such century years as 1900 are said to be deficient. Because of the artificial nature of this leap year assignment, three kinds of short spans exist: those that contain 3, 4, or 5 leap years. We say that a short span ๐๐ is standard if no year from ๐ + 1 to ๐ + 19 is a deficient century year. The lapse of a short span ๐๐ = (๐ผ, ๐ฝ) is (๐ฝ โ ๐ผ) โ 19 years. As with the short spans, we have three cases of long spans. 11 In my part of the world, the days before early October still feel like summer, and the days following early November feel like winter.
Predicting the time lapse between successive new moons
387
Table 1. A sample of new moon dates 19 years apart. ๐ผ 2 Nov 1480 @ 8:48 22 Oct 1500 @ 23:23 11 Oct 1520 @ 15:54 29 Oct 1540 @ 20:50 19 Oct 1560 @ 6:49 5 Nov 1600* @ 22:53 25 Oct 1620 @ 13:55 15 Oct 1640 @ 4:10 3 Nov 1660 @ 1:06 22 Oct 1680 @ 11:55 12 Oct 1700 @ 10:16 31 Oct 1720 @ 11:42 20 Oct 1740 @ 16:35 9 Oct 1760 @ 1:36 27 Oct 1780 @ 17:10 18 Oct 1800 @ 8:58 6 Nov 1820 @ 0:08 25 Oct 1840 @ 8:59 14 Oct 1860 @ 14:38 2 Nov 1880 @ 15:55 23 Oct 1900 @ 13:27 12 Oct 1920 @ 0:50 30 Oct 1940 @ 22:03 20 Oct 1960 @ 12:02 9 Oct 1980 @ 2:50 27 Oct 2000 @ 7:58 16 Oct 2020 @ 19:31 4 Nov 2040 @ 18:56 24 Oct 2060 @ 9:25 13 Oct 2080 @ 2:44 average lapse:
hour lapse 24.633 15.683 8.1167 18.667 24.000 8.1500 21.983 22.183 11.300 11.317 24.017 21.883 8.1500 โ8.6000 24.167 18.717 8.0667 15.567 24.517 18.533 7.2000 19.667 24.633 14.350 8.7333 19.667 23.633 14.250 8.9000 22.800 16.16
๐ผ + 19 years 3 Nov 1499 @ 9:26 23 Oct 1519 @ 15:04 12 Oct 1539 @ 0:01 30 Oct 1559 @ 15:30 20 Oct 1579 @ 6:49 6 Nov 1619 @ 7:02 26 Oct 1639 @ 11:54 16 Oct 1659 @ 2:21 3 Nov 1679 @ 12:24 22 Oct 1699 @ 23:14 13 Oct 1719 @ 10:17 1 Nov 1739 @ 9:35 21 Oct 1759 @ 0:44 8 Oct 1779 @ 17:00 28 Oct 1799 @ 17:20 19 Oct 1819 @ 3:41 6 Nov 1839 @ 8:12 26 Oct 1859 @ 0:33 15 Oct 1879 @ 15:09 3 Nov 1899 @ 10:27 23 Oct 1919 @ 20:39 12 Oct 1939 @ 20:30 31 Oct 1959 @ 22:41 21 Oct 1979 @ 2:23 9 Oct 1999 @ 11:34 28 Oct 2019 @ 3:38 17 Oct 2039 @ 19:09 5 Nov 2059 @ 9:11 24 Oct 2079 @ 18:19 14 Oct 2099 @ 1:32 st.dev: 7.79
We say that a long span ๐ฟ๐ contains the year ๐ if ๐ < ๐ โค ๐ + 160. Long spans, such as ๐ฟ2015 , containing one deficient century are said to be standard. Similarly, the lapse of a long span ๐ฟ๐ = (๐ผ, ๐ฝ) is (๐ฝ โ ๐ผ) โ 160 years. The units for ๐๐ and ๐ฟ๐ are in (fractions of) hours. For example, ๐1899 is nonstandard, whereas ๐1900 is standard. From Equation (1), the lapse of the short span ๐1996 is 0.96 hours. With respect to Definitions 1 and 2, we can find the theoretical average length of both short spans and long spans.
388
Chapter XI: Lunar Rhythms
Proposition 3: The short-span rule. The expected time lapses between new moons 19 years apart are about โ7.34 hours, 16.66 hours, and 40.66 hours, respectively, for the corresponding short spans containing 5, 4, and 3 leap years. Proof. Among the standard short spans, if ๐ โก 0 mod 4, ๐๐ contains the leap years ๐ + 4, ๐ + 8, ๐ + 12, and ๐ + 16, that is, 4 leap years; observe that ๐๐ fails to include 29 February in year ๐ because ๐๐ starts at some date between 8 October and 7 November. If ๐ โก 2 mod 4, ๐๐ contains the leap years ๐ + 2, ๐ + 6, ๐ + 10, ๐ + 14, and ๐ + 18, that is, 5 leap years. Similarly, if ๐ โก ยฑ1 mod 4, then ๐๐ contains 5 leap years. Thus, among the nonstandard short spans, if ๐ โก 0 mod 4, then ๐๐ contains 3 leap years; otherwise ๐๐ contains 4 leap years. Denote by ๐ฟ the average lapse of short spans in hours that contain 5 leap years. Then the average lapse of short spans containing exactly 4 or 3 leap years is respectively ๐ฟ + 24 or ๐ฟ + 48 because the spans of years respectively lack 1 or 2 occurences of 29 February compared to the short spans containing 5 leap years. In order to deduce ๐ฟ, recall that the root of sin(2๐๐๐ก) nearest ๐ก = 19 years is 4.38 hours shy of 19 years, and in 19 years Earth precesses by 6.46 hours, which means that the average lapse of short spans should be โ4.38 + 6.46 โ 2.08 hours. Since the pattern of leap days cycles in 400 years, let us consider the years 1800โ2199. The years 1800โ1880, 1900โ2080, and 2100โ2180 yield standard short spans, for a total of 343. Of these, 88 start with a multiple of 4. Of the 57 nonstandard short spans corresponding to 1881โ1899, 2081โ2099, and 2181โ2199, 45 contain 4 leap years while the remaining 12 contain 3 leap years. Since the average lapse of a short span should be 2.08 hours, 255 (88 + 45) 12 ๐ฟ+ (๐ฟ + 24) + (๐ฟ + 48) โ 2.08, 400 400 400 which means that ๐ฟ โ โ7.34 hours. Proposition 4: The long-span rule. The expected time lapses between new moons 160 years apart are about 2 hours more than 2 days, 3 days, and 1 day, respectively, for the corresponding long spans containing 1, 2, and 0 deficient centuries. Proof. As ๐ ranges over the 400 years 1800 to 2199, the standard long spans are ๐ฟ1800 through ๐ฟ1899 , ๐ฟ1940 through ๐ฟ2039 , and ๐ฟ2100 through ๐ฟ2139 , giving 240 standard spans. Long spans containing no deficient centuries range from ๐ฟ1900 through ๐ฟ1939 , giving 40 spans; and long spans containing two deficient centuries are ๐ฟ2040 through ๐ฟ2099 and ๐ฟ2140 through ๐ฟ2199 , giving 120 spans. Thus standard long spans occur 60% of the time, long spans with no deficiencies occur 10% of the time, and long spans with two deficiencies occur 30% of the time. Let ฮ be the average day lapse between new moons 160 years apart for standard long spans;
Checking the expected length of short and long spans
389
for 30% of the remaining long spans this lapse will be ฮ + 1, and for the last 10% of long spans this lapse will be ฮ โ 1. Solving ๐ค(๐ก) = 0 near ๐ก = 160 years gives a root that is 0.014 days beyond 160 years. Altogether, the average lapse for new moons 160 years apart is 2.265 + 0.014 = 2.279 since in 160 years Earth precesses by about 2.265 days. So 0.60ฮ + 0.30(ฮ + 1) + 0.10(ฮ โ 1) โ 2.279, which means that ฮ โ 2.08 days โ 49.9 hours.
Checking the expected length of short and long spans Table 1 is a listing of thirty non-overlapping short spans ranging from 1480 to 2099 wherein each span contains precisely four leap years (four occurrences of 29 February). The asterisk marking the year 1600 in the tableโs first column serves to alert the reader of the 1582 calendar change from the Julian Calendarโin which every fourth year is a leap yearโto the Gregorian Calendarโin which every fourth year is a leap year except at century years nondivisible by 400. The central column of this table gives the time difference in hours, modulo 19 years, between short span dates: second component minus first component. Thus, for example, in the first row of the table, the difference between 3 November 1499 and 2 November 1480 is 24.63 hours. The mean and standard deviation of these thirty short span differences are ๐ฅ1 โ 16.16 and ๐ 1 โ 7.79 hours. With ๐ฟ โ โ7.34 hours (the average short span lapse containing five leap years), observe that the difference between the expected mean ๐ฟ + 24 โ 16.34 and the observed mean ๐ฅ1 โ 16.16 is |16.34 โ 16.16| = 0.18 hours โ 11 minutesโnot bad for our simple model. Table 2 is a listing of thirty non-overlapping long spans ranging from year 2000 bc through year 2881 ad. Most of these spans contain no deficient centuries, but not the years in the first column marked by asterisks, such as 1601* and 1761**. The notation ๐* means that the long span (๐, ๐ + 160) contains exactly one deficient century. For example, between 1601 and 1761, the year 1700 is deficient. The notation ๐** means that the corresponding long span contains exactly two deficient centuries. For example, between 1761 and 1921, both 1800 and 1900 are deficient. Thus, the time differential within a single-asterisk long span must be reduced by 24 hours, and within a double-asterisk long span by 48 hours. The central column of this table reflects this adjustment. Note also that no long span in the table contains the year 1582, the year the Gregorian Calendar supplanted the Julian Calendar in our time reckoning and a year in which our calendar lost eleven days. The mean and standard deviation of these long span differences are ๐ฅ2 โ 25.62 hours and ๐ 2 โ 3.31 hours. Observe that the difference between the expected mean (ฮ โ 25.9 hours) and the observed mean is about 0.3 hours โ 18
390
Chapter XI: Lunar Rhythms
minutes. The ratio of ๐ 1 to ๐ 2 is about 2.35; equivalently, the ratio of their variations is over 5.5. In various trials of thirty short and long spans, this ratio waxed higher at times. Does our simple model anticipate a variation ratio this high, or is this ratio inflated due to chaos?
Table 2. A sample of new moon dates 160 years apart. ๐ผ 5 Nov 2000 bc @17:15 8 Oct 1840 bc @6:34 9 Oct 1680 bc @12:17 10 Oct 1520 bc @18:21 11 Oct 1360 bc @23:41 13 Oct 1200 bc @3:42 14 Oct 1040 bc @6:00 15 Oct 880 bc @5:54 16 Oct 720 bc @3:11 16 Oct 560 bc @22:58 17 Oct 400 bc @19:07 18 Oct 240 bc @17:21 19 Oct 80 bc @18:12 20 Oct 81 @ 21:07 22 Oct 241 @ 1:24 23 Oct 401 @ 6:38 24 Oct 561 @ 12:18 25 Oct 721 @ 17:09 26 Oct 881 @ 19:52 27 Oct 1041 @ 20:02 28 Oct 1201 @ 17:51 29 Oct 1361 @ 14:12 25 Oct 1601* @ 23:11 27 Oct 1761** @ 22:04 30 Oct 1921 @ 23:38 1 Nov 2081** @ 3:04 4 Nov 2241* @ 7:23 8 Oct 2401* @ 3:10 10 Oct 2561** @ 6:52 13 Oct 2721 @ 9:09 average lapse:
hourly lapse 26.117 29.717 30.067 29.333 28.017 26.300 23.900 21.283 19.783 20.150 22.233 24.850 26.917 28.283 29.233 29.667 28.850 26.717 24.167 21.817 20.350 19.917 22.883 25.567 27.433 28.317 28.917 27.700 26.283 23.967 25.62
๐ผ + 160 years 6 Nov 1840 bc @19:22 9 Oct 1680 bc @12:17 10 Oct 1520 bc @18:21 11 Oct 1360 bc @23:41 13 Oct 1200 bc @3:42 14 Oct 1040 bc @6:00 15 Oct 880 bc @5:54 16 Oct 720 bc @3:11 16 Oct 560 bc @22:58 17 Oct 400 bc @19:07 18 Oct 240 bc @17:21 19 Oct 80 bc @18:12 20 Oct 81 @ 21:07 22 Oct 241 @ 1:24 23 Oct 401 @ 6:38 24 Oct 561 @ 12:18 25 Oct 721 @ 17:09 26 Oct 881 @ 19:52 27 Oct 1041 @ 20:02 28 Oct 1201 @ 17:51 29 Oct 1361 @ 14:12 30 Oct 1521 @ 10:07 27 Oct 1761 @ 22:04 30 Oct 1921 @ 23:38 1 Nov 2081 @ 3:04 4 Nov 2241 @ 7:23 6 Nov 2401 @ 12:18 10 Oct 2561 @ 6:52 13 Oct 2721 @ 9:09 14 Oct 2881 @ 9:07 st.dev. 3.31 hours
Expected value of the variation in spans of yearsโ
391
Expected value of the variation in spans of yearsโ Recall that ๐ค(๐ก) = sin(2๐๐๐ก). If a new moon should occur every ๐ years, then the difference ๐ค(๐ก + ๐) โ ๐ค(๐ก) should be small and the variation of this difference should be small as well. Definition 5: Variance of a function. The average value, denoted by ๐๐ , of a continuous function ๐(๐ฅ) over the interval [0, ๐] for some positive number ๐ is ๐
๐๐ =
1 โซ ๐(๐ฅ) ๐๐ฅ. ๐ 0
The variance, denoted by var(๐) = ๐๐2 , of ๐(๐ฅ) over the interval [0, ๐] is ๐
var(๐) = ๐๐2 =
1 โซ (๐(๐ฅ) โ ๐๐ )2 ๐๐ฅ. ๐ 0
The standard deviation, denoted by ๐๐ , of ๐(๐ฅ) is the square root of the variance of ๐(๐ฅ) over the interval. Lemma 6: Moon variance with respect to spans. Let ๐ be a fixed positive 1 integer. The variance of sin(2๐๐(๐ก + ๐)) โ sin(2๐๐๐ก) over [0, ] is ๐
๐ (๐) = โ1 โ cos 2๐๐๐. Proof. Let ๐(๐ก, ๐) = ๐ค(๐ก + ๐) โ ๐ค(๐ก) = sin(2๐๐(๐ก + ๐)) โ sin(2๐๐๐ก). Since the 1 1 period of ๐ค(๐ก) is ๐ = , the average value of ๐(๐ก, ๐) over the interval [0, ] with ๐ ๐ respect to ๐ก is 0. By definition of the variance of ๐ค(๐ก + ๐) โ ๐ค(๐ก), the variation ๐ฃ(๐) is 1 ๐
2
๐ฃ(๐) = ๐ โซ (sin(2๐๐(๐ก + ๐)) โ sin(2๐๐๐ก)) ๐๐ก = 1 โ cos(2๐๐๐).
(2)
0
The square root of Equation (2) is the desired standard deviation, ๐ (๐). Figure 6 is a graph of the standard deviation ๐ (๐) of lapses of ๐ years between new moons, as ๐ ranges from 1 to 500. In particular, the standard deviation is lowest at ๐ = 160, and is not quite so low at twice and thrice this value. Indeed, since ๐ (19) ๐ (19) โ 0.0275 and ๐ (160) โ 0.0021, โ 12.90. If we make the reasonable ๐ (160)
assumption of a positive correlation between Moon displacement as determined by our model and as determined by NASA data, then our simple Earth-MoonSun model has indeed anticipated the standard deviation at ๐ = 160 years being significantly less than at ๐ = 19 years in NASAโs data. The fact that it does so is somewhat remarkable when considering that the Moonโs position in time is chaotic. That is, our humble Earth-Moon-Sun model is fairly powerful.
392
Chapter XI: Lunar Rhythms
standard deviation
0.10
q = 19 0.02
q = 160, low point 300
100
q years
Figure 6. Standard deviation, ๐ (๐) = โ1 โ cos(2๐๐๐). Yet it is conceivable that the actual pattern of the phases of the Moon has a ๐ value, call it ห ๐ , other than 19 and 160 for which the corresponding standard deviation is even lower. One reason for thinking so comes from Chapter X on the transit of Venus. The relative angular velocity ๐ of Venus with respect to Earth is ๐ โ 1.62555, and the nearest integer continued fraction algorithm yields the following convergents for ๐: 3 8 13 369 10714 (3) 2โ โ โ โ โ . 2 5 8 227 6591 As we saw in Figure X.14, ๐ฎ๐ clearly displays ๐ = 8 branches. In fact, Venus 369
transits often occur as a twin transit, eight years apart. From the convergent 227 in Equation (3), one might conjecture that the time lapse between Venus transits should be ๐ = 227 years. But as we saw, capitalizing on two nearly central transits of Venus separated by over 6000 years led us to reduce ๐ by 0.00004, which 13 395 changes the convergent following in Equation (3) to . Indeed, the correct 8 243 time lapse between June transits of Venus is 243 years. The next one should occur in year 2247. Table 3. Some possible values for ห ๐. ๐ ห ๐ = 19 โ
๐ + 8
6 7 8 9 10 122 141 160 179 198
Since we cannot duplicate this approach to predicting the time lapse ห ๐ between new moons, we capitalize on knowing that the time lapse ห ๐ must correspond to a first component of a point on branch 1 of the nineteen branches of 235 ๐ฎ๐ ห is very near ๐ and where is a convergent of ๐ ห . As follows from ห where ๐ 19
Final thoughts
393
Equation (VII.21)12 , these first components are of the form 19๐ + 8 and must be near 19 โ
8 + 8. So some reasonable candidates for ห ๐ are those in Table 3. Consulting Espenakโs data for spans of length 122, 141, 179, and 198 from Table 3, we find that 141 years is the more agreeable result. Table 4 gives thirty spans of 141 years. Each of these spans contains either 34 or 35 leap days. In the central column, an asterisk means that the corresponding span contains 34 leap days, and the span length was therefore decreased by 24 hours. For example, the span 1601โ1742 contains 34 leap days for a span length of 50.82 hours, but we reduce it by 24 hours to 35.82. For a cycle length of 141 years, the table gives the mean as about 33.72 hours with a standard deviation of ๐ 3 โ 3.13 hours. Since ๐ 3 < ๐ 2 , 141 bests a cycle of 160 years with respect to standard deviation.
Final thoughts The observed standard deviations for the time lapse between new moon dates 19, 141, and 160 years apart are counterintuitive. Since the Earth-Moon-Sun system is chaotic, one might think a priori that the chaos should be cumulativeโthat the standard deviations of time lapses between new moons should increase as the time lapses increase. Our simple Earth-Moon-Sun model suggests that the contrary is true for specific lapses, and the data support and emphasize this result. In Tables 1, 2, and 4, we purposely selected a regular sequence of non-overlapping spans to allow, if possible, the data to be that of independent events. However, even when we selected overlapping spans, the resultant standard deviations gave comparable values. Such results are in keeping with a rule of Hofstadter [72, p. 299] about chaos: An eerie type of chaos can lurk just behind a faรงade of orderโand yet, deep inside the chaos lurks an even eerier type of order. Within the faรงade of regularity of the successive phases of the Moon from month to month is a troublesome irregularity of up to about seven hoursโyet a closer examination, as we have seen, reveals an eerie regularity at specific lapses between the phases. Finally, with respect to this chapterโs introductory question, how do the various lunar holidays fare in terms of spans of nineteen years? Table 5 shows that lapses (in days) between Hanukkah dates nineteen years apart are close to zero. However, Table 6 shows that lapses between Easter dates nineteen years apart have a greater variation. But Easter must fall on a Sunday. So instead of expecting an error of zero days, we expect an error of about half a week, or three or 12 With ๐ ๐
=
235 19
, we have ๐ = sgn(๐๐ โ ๐) = 1. Solving ๐๐ โก โ๐๐ for ๐ gives ๐ = 8.
394
Chapter XI: Lunar Rhythms Table 4. A sample of new moon dates 141 years apart. ๐ผ 28 Oct 598 bc @ 11:35 2 Nov 452 bc @ 9:10 11 Oct 298 bc @ 19:50 16 Oct 152 bc @ 23:38 4 Nov 1 @ 1:39 2 Nov 145 @ 13:37 18 Oct 301 @ 12:41 16 Oct 445 @ 21:28 31 Oct 601 @ 18:51 29 Oct 745 @ 16:02 15 Oct 901 @ 9:09 13 Oct 1045 @ 1:24 28 Oct 1201 @ 17:51 26 Oct 1345 @ 2:29 25 Oct 1601 @ 23:11 25 Oct 1745 @ 1:54 12 Oct 1901 @ 13:11 10 Oct 2045 @ 10:37 27 Oct 2201 @ 22:25 26 Oct 2345 @ 8:13 13 Oct 2501 @ 12:55 11 Oct 2645 @ 20:25 28 Oct 2801 @ 15:44 1 Nov 3045 @ 4:55 15 Oct 3101 @ 2:15 12 Oct 3245 @ 18:37 29 Oct 3401 @ 21:07 29 Oct 3545 @ 0:45 15 Oct 3701 @ 4:59 14 Oct 3845 @ 13:05 average lapse:
hour lapse 28.82 37.02 28.62 36.77 32.87 28.57 34.40 28.60 36.58 30.50 36.68 31.72 35.22 34.68 35.82* 29.37* 36.87 30.12* 35.97* 33.45 34.48* 35.17* 31.18* 31.02* 29.97 36.12* 28.20* 33.20 27.90* 31.72* 32.72
๐ผ + 141 years 29 Oct 457 bc @ 16:24 3 Nov 311 bc @ 22:11 13 Oct 157 bc @ 0:27 18 Oct 11 bc @ 12:24 5 Nov 142 @ 10:31 3 Nov 286 @ 18:11 19 Oct 442 @ 23:05 18 Oct 586 @ 2:04 2 Nov 742 @ 7:26 30 Oct 886 @ 22:32 16 Oct 1042 @ 21:50 14 Oct 1186 @ 9:07 30 Oct 1342 @ 5:04 27 Oct 1486 @ 13:10 28 Oct 1742 @ 11:00 27 Oct 1886 @ 7:16 14 Oct 2042 @ 2:03 12 Oct 2186 @ 16:44 30 Oct 2342 @ 10:23 27 Oct 2486 @ 17:40 15 Oct 2642 @ 23:24 14 Oct 2786 @ 7:35 30 Oct 2942 @ 22:55 3 Nov 3186 @ 11:56 16 Oct 3242 @ 8:13 15 Oct 3386 @ 6:44 1 Nov 3542 @ 1:19 30 Oct 3686 @ 9:57 17 Oct 3842 @ 8:53 16 Oct 3986 @ 20:48 st.dev: 3.13 hours
four days, which agrees more or less with the central row of the table. Subject to a few assumptions, Stephen Woodcock at the University of Technology, Sydney, Australia, speculates that this somewhat chaotic integer sequence in the middle row of Table 6 repeats about every 5.7 million years [94]. Ramadan is a true lunar holiday in that its start date is twelve moons after the last start. Since a year minus twelve moons is about eleven days, we see in Table 7 that the next Ramadan starts twelve moons (one year lessened by eleven days) after the start of the last Ramadan. Because a month is about a moon, we choose to let the lapses in the central row be the differences between the days
Exercises
395 Table 5. Hanukkah dates nineteen years apart.
year day lapse day year
2001 10 Dec 1 11 Dec 2020
2002 2003 30 Nov 20 Dec โ1 โ1 Nov 29 19 Dec 2021 2022
2004 2005 2006 8 Dec 26 Dec 16 Dec 0 0 โ1 8 Dec 26 Dec 15 Dec 2023 2024 2025
2007 5 Dec 0 5 Dec 2026
2008 22 Dec 3 25 Dec 2027
2009 12 Dec 1 13 Dec 2028
2010 2 Dec 0 2 Dec 2029
2009 12 Apr 4 16 Apr 2028
2010 4 Apr 1 1 Apr 2029
Table 6. Easter dates nineteen years apart. year day lapse day year
2001 15 Apr โ3 12 Apr 2020
2002 2003 2004 31 Mar 20 Apr 11 Apr 4 โ3 โ2 4 Apr 17 Apr 9 Apr 2021 2022 2023
2005 2006 27 Mar 16 Apr 4 โ4 31 Mar 20 Apr 2024 2025
2007 8 Apr โ3 5 Apr 2026
2008 23 Mar 5 28 Mar 2027
of the months of Ramadan starts that are nineteen years apart. For example, the lapse between 24 April 2020 and 16 November 2001 we take as (24โ16) = 8 days. When day ๐ in year ๐ + 19 is less than day ๐ in year ๐, we add ๐ to the number of days in ๐โs month and from it subtract ๐. For example, the lapse between 3 April 2022 and 27 October 2003 is (31 + 3) โ 27 = 7 days. Since a month is about three to four days longer than a moon, we might expect this lapse to be about that long. But instead it is about eleven days minus about three to four days. Table 7. Ramadan dates nineteen years apart. year day lapse day year
2001 2002 2003 2004 16 Nov 5 Nov 27 Oct 15 Oct 8 8 7 8 24 Apr 13 Apr 3 Apr 23 Mar 2020 2021 2022 2023
2005 4 Oct 7 11 Mar 2024
2006 2007 2008 2009 2010 23 Sep 12 Sep 1 Sep 21 Aug 10 Aug 8 6 7 7 6 1 Mar 18 Feb 8 Feb 28 Jan 16 Jan 2025 2026 2027 2028 2029
We leave as exercises for the reader the generation of similar tables for Diwali and Tรฉt. Exercises 1. If the period of the Moon had been incidental to Metonโs argument for adopting a nineteen-year calendar, what somewhat small integer ๐ > 19 would have been a better choice for a calendar of ๐ sidereal years? (Hint: Recall that one year is about 365.256 days.)
396
Chapter XI: Lunar Rhythms
Io Jupiter
Ganymede Europa
Callisto
Figure 7. The four moons of Jupiter. 2. Estimate how long ago the nineteen-year cycle of the Moon began. See Assumptions 2 and 3 of the final section of Chapter VII. Estimate how long a 160-year cycle should last. 3. Devise a medium-span rule applicable to the lapse between new moons 141 years apart similar to the short-span rule for 19 years and the long-span rule for 160 years. 4. Table 1 was compiled using disjoint short spans. Instead, generate a similar table using overlapping short spans. In particular, as left-hand endpoints of the thirty short spans, use NASAโs data for the leap years 1904, 1908, โฆ , 2200. Contrast your results with Table 1. 5. Generate a table much like Table 1 using a short span of twenty years rather than nineteen years. 6. What time lapseโother than 19, 141, or 160โgives a lesser variation in the difference between new moons? Intuitively, one might conjecture that the inherent chaos of the Earth-Moon-Sun system might destroy any hope of finding a lapse longer than 141 which has less variation. Yet the fact that 141 bests 19 may give a little hope. One difficulty in continuing with analysis similar to what we have done is that we have lost a precise value of ๐. That is, to arrive at 1 ห ๐ = 141, we increased ๐ by 0.0000387597 โ , giving a modified value of ๐ 5800 which we will call ๐ ห โ 12.368786, which means that ๐ ห = round(ห ๐๐ ห ) = 1744. So ห๐ = 122, which means that the next convergent for the value into which ๐ has morphed should have denominator ๐ = 865 by the harmonic algorithm. Does 865 yield a lesser variation? (Since 865 is large, rather than using disjoint spans of years, try using spans of years shifted in time by, say, ten years.) 7. The largest moon of Jupiter is Io. With respect to Io, design a Metonic-yearlike calendar for Jovians (people who live on Jupiter) as so many Jovian years. 8. The four most-visible moons of Jupiter are Io, Europa, Ganymede, and Callisto. Suppose the centers of Jupiter, Io, Europa, Ganymede, and Callisto are collinear at time ๐ก = 0. How many years will it be before they achieve this state again? See Figure 7.
Exercises
397
9. The mean length of a tropical year13 ๐ฟ is 365 days, 5 hours, 48 minutes, and 45.14 seconds. The nearest integer continued fraction algorithm ๐ applied to ๐ฟ gives ๐ฟ โ [365; 4, 8, โ4]๐ โถ {365,
1461 12053 46751 , , }. 4 33 128
The Gregorian calendar is based upon the first convergent 12053
1461 4
. Devise an-
other calendar based upon the second convergent . Will we need leap 33 years or drop years? Describe the analog of the Gregorian calendar deficientcentury rule (see p. 386). 10. Produce tables for the holidays Tรฉt and Diwali similar to Tables 5 through 7.
13 A
tropical year is the time from summer solstice to summer solstice.
Strand XII: Eclipse Lore and Legends A solar eclipse occurs when the Moon passes between Earth and the Sun, obscuring some part of the Sun as viewed from somewhere on Earth, and a lunar eclipse occurs when the Moon passes into the shadow of Earth. Observing an eclipse on Earth within the main shadow cast by the Moon is dramatic. For example, here is a fragment from the Greek poet Archilochus describing a solar eclipse that may have occurred on 6 April 648 bc [150]: Nothing can be surprising any more or impossible or miraculous, now that Zeus, father of the Olympians has made night out of noonday, hiding the light of the gleaming sun, and...fear has come upon mankind. After this, men can believe anything, expect anything. Donโt any of you be surprised in the future if land beasts change places with dolphins and go to live in their salty pastures, and get to like the sounding waves of the sea more than the land, while the dolphins prefer the mountains. Figure 1 is a satellite photo capturing the Moonโs main shadow over Mexico during a solar eclipse. Figure 2 is an image of the Moon entering Earthโs shadow during a lunar eclipse. The reason that some of the left-hand side of the Moon remains visible is because the light refracted through Earthโs atmosphere affords some illumination. Ancient Chinese mythology explains a solar eclipse as an invisible celestial dragon swallowing the Sun, an ill omen for all, including the leaders of the state. As such, astronomers or wise men were engaged by many courts to study the skies, track the planets, the Moon, and the Sun against the background of the fixed stars, and interpret their portent for the populace, especially the royal family. Failure to anticipate momentous events such as eclipses or to glimpse the coming of a comet often resulted in compounded fear and confusion. For example, as legend has it, when given sufficient advance warning of a solar eclipse, the Chinese emperor would decree that teams of drummers and 399
400
Strand XII: Eclipse Lore and Legends
Figure 1. A complete solar eclipse near Mexico City, courtesy of NASA.
Figure 2. A lunar eclipse, courtesy of NASA. archers be ready to both raise a rhythmic cacophony and launch cascades of arrows to frighten away the dragon. In Babylon, so goes the legend, the kingโs advisors would appoint a substitute king for the duration of an eclipse, whereafter the poor man would be summarily executed, so fulfilling the expected inescapable calamity accompanying such astronomical events. The first recorded solar eclipse was probably the one that was visible from China on 22 October 2134 bc. Unfortunately, the royal astronomer Hi Xi failed to anticipate the event because of, says a legend, having had too much to drink.
Strand XII: Eclipse Lore and Legends
401
Figure 3. The Antikithera device, on display at the National Archeological Museum in Athens, author sketch. For such a crime Hi Xi was hanged, and thus arose the adage, โNo astronomer is ever drunk during an eclipse.โ1 Against such traditions of doom, ancient astronomers were under enormous pressure to get it right. The Babylonians kept years of careful records, with some of their lunar eclipse data dates gathered from places far from Babylon. Once they had amassed a sufficient base of recorded phenomena, they spotted a pattern. Lunar eclipses tend to recur every 223 moonsโwhere a moon is about 29.5 days, the mean length of time between new moons. Thus, knowing history meant knowing the future, at least in as far as eclipses were concerned. To help bring such data patterns alive, for both students and kings, astronomers devised mechanical gadgets to simulate the heavens. As some evidence of this technology, Cicero (106โ43 bc), a Roman orator and politician who studied with the astronomer Posidonius on the island of Rhodes, described an instrument recently constructed by our friend Posidonius, which at each revolution reproduces the same motions of the Sun, the Moon and the five planets that take place in the heavens each day and night [96, p. 274]. In 1900, sponge divers off the coast of the Greek island Antikithera discovered a wreck sixty meters deep dating back to at least the first century bc. One of the artifacts retrieved from the wreck was a strange blob of melded copper, as shown in Figure 3. Careful inspection of this object revealed it to be an assemblage of over thirty interlocking gear wheels, one of which has nineteen teeth and 1 The extant source for this story is the Shangshu, the Book of Documents, whose compilation, according to one tradition, was overseen by Confucius (551โ479 bc). Other versions of the story, perhaps mistranslations, say that two astronomers, rather than one, were decapitated.
402
Strand XII: Eclipse Lore and Legends
Figure 4. A gear with 19 teeth within a gear of 223 teeth in the Antikithera device, not to scale. another of which has 223 teeth, the very numbers making up a Metonic cycle and making up the cycle governing eclipse recurrence. To appreciate how skilled these craftsmen of old were, Figure 4 shows two gears, one with nineteen teeth and the other with 223 teeth. Making the former one seems a reasonable task; making the latter one seems incredible. After over a century of reverse engineering in studying this artifact, researchers and artisans have built working models. In accordance with their discoveries, some of the gears are mounted off center in a peg-and-slot arrangement much like the trammel of Archimedes presented in Chapter VIII. Turning a manual crank to rotate the gears results in toy planets moving in non-simple-harmonic-motion orbits. As a closing episode in the lore of eclipses, we feature the lunar eclipse of 1 March 1504, as commemorated by the minted coin of Figure 5. A few months before that event, in his fourth and final voyage to the Caribbean, Christopher Columbus beached his last two caravels on the north coast of Jamaica for repairs. For months the local people had kindly provisioned the crew, but then grew weary of the task. Alarmed, and knowing of an impending lunar eclipse, Columbus threatened to have his god extinguish the Moon and rain wrath upon them. Luckily for the admiral, the eclipse occurred on schedule. The locals pleaded for mercy. Columbus staged a pardon towards the end of the forty-eight-minute event. And local provisions continued until the crew was rescued by a ship out of Haiti [105, pp. 653โ655].
Strand XII: Eclipse Lore and Legends
Figure 5. Columbus delivering a lunar eclipse, 1950 silver coin, British Virgin Islands.
403
Chapter XII: Diophantine Eclipses In this chapter we develop two algorithms to generate the dates of successive solar eclipses. Both algorithms start by assuming simple harmonic motion of the Moon about Earth. The first method is an algebraic vector approach, and the second method is a continued fraction and Diophantine equation approach. Though quite different, the two algorithms yield the same conclusions.
Adapting the Earth-Moon-Sun model To determine when eclipses recur, we proceed similarly to how we analyzed the lapses between transits of Venus in Chapter X. Again, we fix Earth and the Sun
Figure 6. Final stages of an annular solar eclipse on 20 May 2012 viewed from Sundown, Texas; courtesy of Jimmy Westlake, Colorado Mountain College. 405
406
Chapter XII: Diophantine Eclipses Moon orbit Moon ฮพ
ascending node
above (north)
as
t
2ฯฯt
e
Earth
we st
descending node eclipti c plan e
projection of Moon orbit onto the ecliptic plane
Sun
below (south)
locus of node positions in the ecliptic plane
Figure 7. The Moon along its draconic orbit intersecting the ecliptic plane. in the ecliptic plane, the plane of Earthโs orbit. The Moonโs orbital plane and the ecliptic plane meet at a mean angle of ๐ โ 5.145โ . The Moonโs orbit intersects the ecliptic plane at two points, called the ascending node and the descending nodeโwhere the orbit goes from below the ecliptic plane to above and from above to below, respectively, as illustrated in Figure 7, where the Moon is nearing the descending node. From observation, these nodes rotate clockwise with period 18.6 years in the ecliptic plane, displayed as a dashed circle in the figure. The mean time lapse for the Moon to return to an ascending node, the draconic month ๐๐ , is ๐๐ โ 27.212221 days. Exercises 1 and 2 show how to deduce this draconic month when one knows the sidereal month ๐๐ , the mean time lapse for the Moon to return to the same point with respect to the fixed background of the stars. Meanwhile, with respect to the Sun, the Moonโs periodicity is ๐๐ โ 29.530589 days, the mean synodic period of the Moon about Earth, which is the mean length of time between new moons. A time lapse of ๐ synodic months is ๐ lunations. When the Moon is near a node, an eclipse may occur: a solar eclipse at new moon, or a lunar eclipse at full moon. ๐ Let ๐ be the ratio of the synodic and draconic periods, ๐ = ๐ โ 1.085196. ๐๐
So, in one lunation, the Moon has completed about 1.085 draconic circuits. Definition 1: Mosun and gesun. As terminology to help analyze this model, we define the mosun as the line through the centers of the Moon and Sun. Similarly, we define the gesun as the line through the centers of Earth and the Sun. We say that a solar eclipse is central if at some point during the eclipse the Sun, the Moon, and Earth are collinear so that the mosun and gesun are the same. For simplicity, we say that a solar eclipse is total if at some moment during the
Adapting the Earth-Moon-Sun model
(0, H)
407
secondary shadow primary shadow Moon center at m(cos ฯ, sin ฯ)
(0, L) x-axis
mosun
ฯ Earth center at (0, 0) y-axis
gesun
Sun center at (s, 0)
Figure 8. The Moonโs shadow along the ๐ฆ-axis at new moon. eclipse the mosun intersects Earth, and a we say that a solar eclipse is partial if the mosun never intersects Earth but some part of Earth is within the Moonโs shadow. Let the radii of Earth, the Moon, and the Sun be ๐ธ = 6400 km, ๐ = 1738 km, and ๐ โ 6.96 ร 105 km, respectively, and let the mean distances of the Moon and Sun from Earth be ๐ โ 384000 km and ๐ โ 149.6 ร 106 km, respectively. We assume that the Moonโs orbit about Earth is simple harmonic motion. In particular, let (๐ข, ๐ฃ) = ๐(cos 2๐๐๐ก, sin 2๐๐๐ก) (1) be the position of the Moon in its orbital plane, where 2๐๐๐ก is the counterclockwise angle from the Moonโs ascending node and ๐ก is time, as illustrated in Figures 7 and 10. At ๐ก = ๐ lunations, let ๐ be the central angle at Earth between the Moon and Sun. Since ๐ is the angle between the orbital planes of Earth and the Moon, the most that ๐ can be is ๐. The shadow of the Moon cast by the Sun projected onto the ๐ฆ-axis, as illustrated in Figure 8, consists of a primary shadow and a secondary shadow. Since ๐ is so small, the boundary of the primary shadow is approximately obtained by following a ray from the top of the disk of the Sun through the top of the disk of the Moon onto the ๐ฆ-axis, and by following a ray from the bottom of the disk of the Sun through the bottom of the disk of the Moon onto the ๐ฆ-axis. The boundary of the secondary shadow is approximately obtained by following a ray from the top of the disk of the Sun through the bottom of the disk of the Moon, and by following a ray from the bottom of the disk of the Sun through the top of the disk of the Moon. An astronaut positioned along the ๐ฆ-axis inside the the primary shadow will be mostly in the dark, and inside the secondary shadow will see some portion of the Sun obscured by the Moon.
408
Chapter XII: Diophantine Eclipses
up
dary of per boun
shadow
S
M
r E
primary
m
x-axis
s
Figure 9. Finding the maximum radius ๐ of the primary shadow.
Eclipse duration How long does a solar eclipse last? Lemma 2: Solar eclipse length. The maximum length of a solar eclipse observed globally from Earth is about three hours and fifty minutes. Derivation. The maximum duration โณ of a solar eclipse occurs when the eclipse is central, which means that the path of the mosun across the disk of Earth should trace an Earth diameter. Since the speed of the Moon about Earth is 2๐๐/๐๐ , we have 2๐๐โณ/๐๐ = 2๐ธ. Therefore 2๐ ๐ธ days โณโ ๐ โ 3.84 hours โ 3 hours 50 minutes. โข 2๐๐ For example, the eclipse of 15 January 2010 was first visible near eastern Cameroon at 5:14 London time and ended in western South Korea at 8:59 London time, for a total duration of 3 hours 45 minutes. However, the maximum duration of an eclipse with respect to a specific location is much shorter. For example, the maximum duration of this particular eclipse with respect to a specific geographic location was 11 minutes 8 seconds near the Maldive Islands in the Indian Ocean. Subject to actual distance fluctuations of the Moon from Earth, Exercise 4b asks the reader to explore these global and local maximal solar eclipse durations.
A suf๏ฌcient condition for eclipses In this section, we find the approximate radius of the primary shadow when the mosun and gesun coincide, and find how far the mosun can be from Earth during a solar eclipse. Lemma 3: Radius of primary shadow. The radius of the largest primary lunar shadow during a solar eclipse is about fifty kilometers. Derivation. Sometimes when viewing a total eclipse of the Sun near where the mosun strikes Earthโs surface, the eclipse is annularโthe apparent disk of the Moon is a little smaller than the apparent disk of the Sunโwhich means there is no primary shadow. So to find the largest possible primary shadow radius, we
A suf๏ฌcient condition for eclipses
409
consider the case where the Moon is at perigee and Earth is at perihelion. That is, assume that the Moon is ๐ = 363000 km from Earth and Earth is ๐ โ 147.1 ร 106 km from the Sun. Consider Figure 9 depicting the radii of the primary shadow ๐, the Moon, and the Sun, along with their distances from Earth. The slope of the upper boundary of the primary shadow computed two different ways is ๐โ๐ ๐โ๐ = , ๐โ๐ธ ๐ โ๐ธ whose solution is ๐ โ 48.9 km, giving our modelโs best guess as to the maximum radius of the primary shadow during an eclipse. โข Proposition 4: Maximum Mosun distance from Earthโs center during a solar eclipse. Let (0, ๐ป) be the point where the mosun crosses the vertical axis, as shown in Figure 8, during a solar eclipse. The most that ๐ป can be is about 9900 kilometers. Derivation. With the Moon at ๐(cos ๐, sin ๐), 0 โค ๐ โค ๐, the slope of the mosun can be written in two ways as ๐ sin ๐ ๐ป = , ๐ โ ๐ cos ๐ ๐ which means that ๐ป=
๐ ๐ sin ๐ . ๐ โ ๐ cos ๐
(2)
Thus, by Equation (2) with ๐ป = ๐ธ, the angle ๐ for which the mosun merely grazes Earth is about ๐ โ 0.95โ . Let (0, ๐ฟ) be the lower boundary point of the Moonโs secondary shadow on the ๐ฆ-axis. The slope of the lower bounding line for the secondary shadow can be written in two ways as ๐ โ (๐ sin ๐ โ ๐) ๐โ๐ฟ = , ๐ ๐ โ ๐ cos ๐ which gives ๐ฟ=๐โ
๐ (๐ + ๐ โ ๐ sin ๐) . ๐ โ ๐ cos ๐
(3)
When ๐ฟ = ๐ธ, Equation (3) gives ๐ โ 0.0258 โ 1.48โ . Then by Equation (2), ๐ป โ 9932 km, which we round down to 9900 km for simplicity. A solar eclipse will occur during a new moon if the mosun is at most about 9900 km above or below Earthโs center, a rule we call Condition 1:2 Condition 1 for a new moon to be an eclipse: |๐ป| โค 9900 km. 2 Condition
2 appears in Exercise 5c.
(4) โข
410
Chapter XII: Diophantine Eclipses orbit Moon
ฮพ 2ฯฯn
descending node
E (0, 0, 0) u =m cos2 ฯฯ n
m n ฯ n2ฯฯ si ฮพ m v=
M
new moon at (X, 0, Z) S
(X, 0, 0) ascending node
(s, 0, 0)
ecliptic plane
Figure 10. Characterizing ecliptic coordinates, (๐, 0, ๐), for a new moon at ๐ lunations.
Finding ๐ป at any lunation For this section the reader may wish to review lines and planes in โ3 as summarized in Appendix II. Proposition 5: Mosun distance during a solar eclipse. Let (0, ๐ป) be the point where the mosun crosses the vertical axis at lunation ๐. Then ๐ป=
๐ ๐ sin ๐ sin(2๐๐๐) ๐ โ ๐โ1 โ (sin ๐ sin(2๐๐๐))2
.
Derivation. To determine where the Moon is after ๐ lunations with respect to the ecliptic plane, recall that at each successive lunation the Moon is new, and at lunation ๐ the Moon is at (๐ข, ๐ฃ) = ๐(cos 2๐๐๐, sin 2๐๐๐) with respect to the ascending node at (๐, 0) in the Moonโs orbital reference scheme in Equation (1). Meanwhile, with respect to the ecliptic plane, the Moon is at (๐, 0, ๐) where ๐ is close to ๐. In fact ๐ = ๐ cos ๐, and ๐โs magnitude is bounded by ๐ sin ๐. See Figure 10. Therefore ๐ = ๐ sin ๐ sin(2๐๐๐), which along with the Pythagorean theorem yields ๐ = โ๐2 โ ๐ 2 = ๐โ1 โ (sin ๐ sin(2๐๐๐)2 . Let ๐ฌ be the plane through Earthโs center normal to the gesun; we call ๐ฌ the screen of Earth, illustrated in Figure 10. The mosun line parametrized by ๐พ is (๐ , 0, 0) + ๐พ(๐ โ ๐ , 0, ๐).
(5)
The projection point (0, 0, ๐ป) of the new moon at (๐, 0, ๐) with respect to the Sun onto the screen of Earth ๐ฌ is obtained by solving (๐ , 0, 0) + ๐พ(๐ โ ๐ , 0, ๐) = (0, 0, ๐ป)
Finding ๐ป at any lunation
411
(0, 0, H)
ascending node (X, 0, Z) mosun
(0, 0, 0) Moon descending node
gesun
Earth
(s, 0, 0)
Sun
Q , the screen of Earth, normal to the gesun
Figure 11. Projecting the Moon onto the screen of Earth at new moon. n = 24
n = 47 n=0 n=6
Figure 12. A few tracks of the mosun sweeping across Earth. for ๐พ, yielding ๐พ=
โ๐ , ๐ โ๐
which means that ๐ป = ๐พ๐ =
๐ ๐ sin ๐ sin(2๐๐๐) ๐ . ๐= ๐ โ๐ ๐ โ ๐โ1 โ (sin ๐ sin(2๐๐๐))2
(6) โข
Figure 12 displays a few of the tracks or transits of the mosun sweeping across ๐ฌ at lunations near an ascending node. For each track, the dot along the vertical midline of the disk represents the point at which an observer would experience maximum eclipse duration. Observe that for ๐ = 24 lunations, the corresponding eclipse is partial because the mosun is above the north pole but less than 9900 km above Earthโs center. When the Moon is approaching a descending node, the paths angle downward rather than upward as the mosun sweeps from west to east across the face of Earth.
412
Chapter XII: Diophantine Eclipses
Using Condition 1 to ๏ฌnd the lapse between successive eclipses With Equation (6), selecting those lunations ๐ for which |๐ป| โค 9900 km and 0 โค ๐ โค 250 gives the list3 0, 6, 12, 18, 23, 24, 29, 35, 41, 47, 53, 59, 65, 70, 76, 82, 88, 94, 100, 106, 111, 112, 117, 123, 129, 135, 141, 147, 153, 158, 159, 164, 170, 176, 182, 188, 194, 199, 200, 205, 211, 217, 223, 229, 235, 241, 246, 247. (7) The successive time lapses between the terms of (7) are 6, 6, 6, 5, 1, 5, 6, 6, 6, 6, and so on. Thus, it appears as if the only possible time lapses between successive solar eclipses are 1, 5, or 6 synodic months apart. Furthermore, Table 1 catalogs each of these solar eclipses as being either total (T), when |๐ป| โค 6400 km, or partial (P), when 6400 < |๐ป| โค 9900. Table 1. Predicting solar eclipses, partial (P) and total (T), starting at an exact eclipse. 0: T 65 : P 129 : T 194 : T
6: T 70 : P 135 : T 199 : P
12 : T 76 : T 141 : T 200 : P
18 : P 82 : T 147 : T 205 : P
23 : P 88 : T 153 : P 211 : T
24 : P 94 : T 158 : P 217 : T
29 : T 100 : T 159 : P 223 : T
35 : T 106 : P 164 : T 229 : T
41 : T 111 : P 170 : T 235 : T
47 : T 112 : P 176 : T 241 : P
53 : T 117 : P 182 : T 246 : P
59 : T 123 : T 188 : T 247 : P
When we find the first thousand eclipses starting from an exact eclipse at ๐ = 0, the last eclipse occurs at ๐ = 5347 lunations. Among these one thousand eclipses, lapses between successive eclipses of 1, 5, and 6 days occur with proportions 8.9%, 20.8%, and 70.3%, respectively, which agree fairly well with the actual values from NASAโs website: 11.4%, 23.1%, and 65.5%โnot bad for our simple model.
Continued fraction insight Rather than using the vector calculus of Proposition 5 as we did in generating Table 1, we can obtain the same results using continued fractions. Applying the nearest integer continued fraction algorithm ๐ to ๐ โ 1.085196, the ratio of the synodic and draconic periods of the Moon, yields 1 13 51 242 777 3350 , , , , ๐ โ [1; 12, โ4, โ5, 3, 4]๐ โ { , }. 1 12 47 223 716 3087 The denominators of this sequence of convergents, 1, 12, 47, 223, 716, 3 See
Code 24 of Appendix III for how to generate this list with a CAS.
(8)
Continued fraction insight
413
suggest that the lapses between solar eclipses could be 1, 12, 47, 223, and 716 lunations apart because, for example, the ratio 242/223 means that 223 lunations is almost the same time lapse as 242 draconic cycles. Furthermore, if ๐ = 0 lunations corresponds with a central eclipse at an ascending node, then at ๐ = 12 lunations and ๐ = 716 lunations, an eclipse will occur near an ascending node. By symmetry, at half these lunations, namely, at ๐ = 6 lunations and ๐ = 358 lunations, an eclipse will also occur at a descending node. When consulting NASAโs tables of solar eclipses, we can find many instances of pairs of eclipse dates whose time differences are indeed about 1, 12, 47, 223, and 358 lunations apart. For example, with all dates given in London time, on 1 June 2011 at 21:17:18 and on 1 July 2011 at 8:39:30 partial solar eclipses were visible near the north pole and south pole, respectively, about 29 days, 9 hours, and 22 minutes apartโalmost one synodic month. The partial eclipse of 25 November 2011 and the total eclipse of 13 November 2012 are about 12 lunations apart. Both 21 June 2001 at 11:58 and 8 April 2005 at 20:32 are total eclipse dates and are about 47 lunations apart, with the former being maximally visible around noon on St. Helena and the latter being maximally visible at 10:30 am on Tahiti. To produce a table from Equation (8) similar to Table 1, we focus on 223 and 358 lunations. Exercise 9b asks the reader to explore what results can be gleaned by focusing on 6 and 47 lunations. Definition 6: Saros and inex cycles. A sequence of successive eclipses 223 lunations apart is referred to as a saros cycle, a term coined by Edmund Halley, who adapted the Babylonian term sar. The eclipses in any particular saros cycle all occur near an ascending node or all occur near a descending node. A succession of solar eclipses 358 moons apart is called an inex cycle, which is an abbreviation of going into a cycle and exiting a cycle. The successive eclipses in any particular saros cycle alternate in occurring at ascending and descending nodes. Proposition 7: A Continued fraction solar eclipse rule. Let ๐ and ๐ be integers with |๐| โค 33 and |๐| โค 21. If lunation 0 is a central eclipse, then lunation 223๐ + 358๐ might be a solar eclipse. Derivation. If we have a central eclipse at lunation 0, then at 223๐ lunations we should have another eclipse, provided the integer ๐ is not too large. From observation, suppose we determine that the mosun transits of these successive eclipses in this saros sequence are separated by 280 km.4 Dividing 9900 kmโour bound on ๐ป in Condition 1โby 280 gives about 35.4, which we round down to ๐0 = 35. That is, beyond ๐0 lapses of 223 lunations, we exceed the bound of Condition 1 and no longer experience an eclipse. Since this factor can range from โ๐0 to ๐0 , a saros cycle contains about 2๐0 + 1 = 71 eclipses. 4 Checking this result with Equation (6) gives ๐ป โ โ280.1 km at 223 lunations and about twice that distance at twice 223 lunations, and so on.
414
Chapter XII: Diophantine Eclipses
north
vertical axis L
k = โ7(223) k=0 k = 1(223) k = 7(223)
k = 21(223) south Figure 13. A cascade of moson tracks on the disk of Earth with respect to the ascending node. Figure 13 shows mosun transits across the disk of Earth at various multiples of 223 lunations. In general, for eclipses in a saros cycle associated with an ascending node, as the cycle begins, the Moonโs shadow barely touches the north pole in a partial eclipse. As the months go by, the Moonโs shadow sweeps ever southward to produce partial eclipses, until waxing into total eclipses, and then waning again to partial eclipses. As the cycle ends, the Moonโs shadow barely touches the south pole. For eclipses with respect to a descending node, the cycle starts with the Moonโs shadow south of Earth and ends with it north of Earth. In particular, if ๐ = 0 lunations corresponds to a central eclipse occurring at an ascending node, then we use this approximate rule of thumb: At 223๐ lunations the mosun is โ280๐ km along โ,
(9)
where โ is a vertical axis through Earthโs center, with 0 km corresponding to Earthโs center and |๐| โค ๐0 . Similar to the saros cycle, for an inex cycle, at 358๐ lunations we should have another eclipse, provided ๐ is not too large. Let ๐1 be an upper bound on ๐โs magnitude, where ๐ is not too large. Our rule of thumb to determine ๐1 is to balance it against the bounding value ๐0 = 35 of the Saros cycle. That is, we want 358๐1 = 223๐0 , which means that ๐1 โ 21.8. Rounding down, let ๐1 = 21. However, we balance this result again to refine our guess for ๐0 , calling it ๐2 . Solving 358๐1 = 223๐2 gives ๐2 โ 33.7, which we round down to ๐2 = 33. This balancing criterion between the saros and inex cycles means that a practical range for eclipses along a typical saros cycle is ยฑ๐2 for a total of 67 eclipses, and the
Some Diophantine magic
415
range along a typical inex cycle is ยฑ๐1 for a total of 43 eclipses. Again, from observation, suppose we determine that the distance between mosun transits at 358๐ and 358(๐ + 2) is 72 km.5 As with the saros cycle, we use this approximate rule of thumb: At 358๐ lunations the mosun is (โ1)๐ 36๐ km along โ,
(10)
where |๐| โค ๐1 . Because 280๐1 = 9240 โค 9900 km = ๐ป and 223๐2 = 7359 โ 7539 โ 358๐1 , we stop our guesswork for finding appropriate bounds for integer values of |๐| and |๐|. Again, suppose we have a central eclipse at an ascending node at lunation 0. Then at integral linear combinations of 223 and 358, 223๐ + 358๐, we might also have eclipses, provided |๐| โค 33 and |๐| โค 21, an idea used by the Dutch astronomer G. van den Bergh, who painstakingly cataloged the complete panorama โข of solar and lunar eclipses, [158] [159]. With Proposition 7, we try generating a table of eclipse dates between ๐ = 0 lunations and ๐ = 265 lunations, where 265 was chosen after some experimentation so that our table contains a total of fifty eclipses. For example, we could go backwards in time thirteen lapses of 358 lunations and then forwards in time twenty-one lapses of 223 lunations to arrive at an eclipse date of twenty-nine lunations.
Some Diophantine magic An easy way to sift through all of these linear combinations is to solve a family of Diophantine equations. Lemma 8: A Diophantine solar eclipse algorithm. Let ๐ = 33 and ๐ = 21, and let ๐ be an integer between 1 and 265. Suppose that lunation 0 corresponds to a central solar eclipse. Then lunation ๐ could be the date of a solar eclipse whenever there exists a solution to the Diophantine equation 223๐ + 358๐ = ๐ where |๐| โค ๐, |๐| โค ๐, ๐ = โ61๐ + 358๐ก, ๐ = 38๐ โ 223๐ก, and ๐ก is an integer satisfying the inequalities {
โ โ
โ๐+61๐ 358 โ๐+38๐ 223
โโค๐กโคโ โโค๐กโคโ
๐+61๐ 358 ๐+38๐ 223
โ,
(11)
โ.
5 Using Equation (6) the reader may check that at 358 lunations, ๐ป โ โ36.44 km, and at 716 lunations, ๐ป โ 72.89 km.
416
Chapter XII: Diophantine Eclipses Table 2. Eclipses at lunation ๐ where ๐ = 223๐ + 358๐, 1 โค ๐ โค 265. month ๐ ๐ month ๐ ๐ month ๐ ๐ month ๐ ๐ month ๐ ๐
6 12 18 23 24 29 35 โ8 โ16 โ24 29 โ32 21 13 5 10 15 โ18 20 โ13 โ8 59 65 70 76 82 88 94 โ19 โ27 26 18 10 2 โ6 12 17 โ16 โ11 โ6 โ1 4 112 117 123 129 135 141 147 โ30 23 15 7 โ1 โ9 โ17 19 โ14 โ9 โ4 1 6 11 164 170 176 182 188 194 199 20 12 4 โ4 โ12 โ20 33 โ12 โ7 โ2 3 8 13 โ20 217 223 229 235 241 246 247 9 1 โ7 โ15 โ23 30 โ31 โ5 0 5 10 15 โ18 20
41 47 5 โ3 โ3 2 100 106 โ14 โ22 9 14 153 158 โ25 28 16 โ17 200 205 โ28 25 18 โ15 252 258 22 14 โ13 โ8
53 โ11 7 111 31 โ19 159 โ33 21 211 17 โ10 264 6 โ3
Derivation. Since 358 and 223 are relatively prime, Euclidโs greatest common divisor algorithm gives โ61 โ
223 + 38 โ
358 = 1. By Proposition III.25, the solutions for these Diophantine equations (as ๐ ranges from 1 through 265) occur when ๐ = โ61๐ + 358๐ก
and
๐ = 38๐ โ 223๐ก
for all integers ๐ก. Since |๐| โค ๐ and |๐| โค ๐, {
โ๐ โค โ61๐ + 358๐ก โค ๐, โ๐ โค 38๐ โ 223๐ก โค ๐,
which is equivalent to Equation (11).
โข
Observe that the integer ๐ก in Equation (11) is governed by a tight bound. For most values of ๐, ๐กโs lower bound exceeds its upper bound. For example, with ๐ = 3, Equation (11) collapses to the vacuous string of inequalities 1 โค ๐ก โค 0. In other words, three lunations after ๐ = 0 fails to give a solar eclipse. When we test6 the integers 1 โค ๐ โค 265 for which the two left-hand and the two right-hand bounds for ๐ก in Equation (11) are all the same, we generate Table 2. 6 See
Code 25 of Appendix III for how to do this in a CAS.
Some Diophantine magic
417
Table 3. NASA dates following a central eclipse. eclipse 16 July 2186 9 January 2187 6 July 2187 29 December 2187 26 May 2188 24 June 2188
lapse with preceding eclipse date โ 6 lunations 6 lunations 6 lunations 5 lunations 1 lunation
To interpret Table 2, consider six lunations. In order to generate the value ๐ = 6 lunations as a linear combination of 223 and 358, think of going backwards in time eight steps of 223 lunations and then going forward five inex steps of 358 lunations. So 6 = โ8 โ
223 + 5 โ
358. Observe that the data in Table 1 and Table 2 are consistent. Also observe that the (๐, ๐) values of Table 2 suggest whether the associated lunations correspond to total or partial eclipses. By (9) and (10), our rule of thumb to determine where the mosun strikes โ at 223๐ + 358๐ lunations is โ280๐ + (โ1)๐ (36๐) km.
(12)
For example, with ๐ = 47 lunations, (๐, ๐) = (โ3, 2). For these values of ๐ and ๐, applying Equation (12) yields 912 km, whereas Equation (6) yields 913.6 km. Thus we conclude that at 47 lunations, a total eclipse occurs. For ๐ = 159 lunations, applying Equation (12) to (๐, ๐) = (โ33, 21) yields โ9996 km, whereas Equation (6) yields โ9874. Since these values are less than โ6400 km, we conclude that at 159 lunations, a partial eclipse occurs. To check these results against NASAโs data, we need an exact solar eclipse. NASA predicts that on 16 July 2186, the eclipse at maximum local duration will last 7 minutes 29 seconds, almost reaching NASAโs theoretical maximum duration of 7 minutes 31 seconds. When we look for the next few successive solar eclipses following this special eclipse we find that they match Table 2, as shown in Table 3. The next two examples show how we can extend the results beyond 264 lunations from a central solar eclipse. Example 9: A longer-range forecast. As we saw from the list in (7), at least one solar eclipse should occur in any span of six lunations. With this idea in mind, we find a solar eclipse that occurs somewhere between 1000 and 1006 lunations after the central eclipse on 16 July 2186.
418
Chapter XII: Diophantine Eclipses
Solution. Applying the formula of Equation (6) to lunations 1000 to 1006 gives the kilometer distances 32556, 33863, 25696, 10340, โ7908, โ23945, โ33282. The only one with magnitude less than the Equation (4) critical value of 9900 km corresponds to lunation 1004. Now 1004 lunations is about 81 years, two months, and 1.2 days. And in 81 years, precession accounts for a loss of 1.1 days. So 81 years, two months and 2.3 days from 16 July 2186 is approximately 18โ19 September 2267. NASAโs data bank indicates that a total7 eclipse of the Sun will occur at 5:23 am on 19 September 2267 (and no other solar eclipse occurs during lunations 1000 to 1006). Furthermore, solving the Diophantine equation 233๐ + 358๐ = 1004 gives ๐ = โ61 โ
1004 + 358๐ก and ๐ = 38 โ
1004 โ 223๐ก, where ๐ก is any integer. Observe that ๐ and ๐ are nearest 0 when ๐ก = 171. In particular, at ๐ก = 171, we have ๐ = โ26 and ๐ = 19 and 1004 = โ26 โ
223 + 19 โ
358. So the solar eclipse on 19 September 2267 is a recurrence of the solar eclipse that occurred 26 โ
223 lunations before the central solar eclipse of 16 July 2186. โข Example 10: A more distant eclipse projection. Recall that ๐ is the ratio of the synodic and draconic periods. In Example 9 we used the third and fourth ๐ 777 242 and for ๐ โ 1.085196 to find the occurrence of solar eclipses convergents 223 716 between 1000 and 1006 lunations after the central eclipse of 16 July 2186. In this 3350 example we use the fifth convergent to forecast a solar eclipse 3087 lunations 3087 after 16 July 2186. Solution. The span of 3087 lunations is about one day short of 249 years and seven months. In this span of time, about 3.5 days are lost to precession. Thus 3087 lunations from 16 July 2186 is about 18โ19 February 2436. Since 2436 is a leap year, a better estimate might be 17โ18 February 2436. Checking NASAโs tables confirms that an annular solar eclipse is slated to occur at 9:48 on 17 February 2436. โข
Lunar eclipses The ideas governing lunar eclipses are the same as for solar eclipses. From a global perspective, lunar eclipses last about as long as solar eclipses. Lemma 11: Length of a lunar eclipse. The maximum length of a lunar eclipse is a little less than four hours. 7 Even though Equation (6) applied to lunation 1004 gives โ7908 (which suggests that lunation 1004 should be a partial eclipse), Equation (12) applied to 1004 = โ26 โ
233 + 19 โ
358 gives about โ6600 km, very close to our bound of 6400 km for being a total eclipse.
A reality check
419
(0, b) (0, 0)
(s+m, S)
(m, E) gesun
Moon orbit
Earth
Sun
Figure 14. Earthโs shadow at the Moonโs orbit. Derivation. Consider Figure 14. The origin is where the gesun intersects the Moonโs orbit left of the Sun and Earth. The line through the north pole of Earth at approximate point (๐, ๐ธ) and the north pole of the Sun at approximate point (๐ + ๐, ๐) has slope ๐โ๐ธ ๐ and vertical intercept ๐ (๐ โ ๐)๐ธ + ๐๐ โ 4630 km, ๐ which means that the cone of Earthโs shadow at the Moonโs orbit has diameter 9260 km. Adding 2๐ to this diameter to account for the radius of the Moon, and dividing this augmented diameter by the speed at which the Moon traverses its circular orbit namely 2๐๐/๐๐ where ๐๐ is the synodic period, gives about 3 hours and 44 minutes, the approximate maximal length of time the Moon lies partially or totally within Earthโs shadow. โข ๐=
To compare Lemma 11 with actual NASA data, the lunar eclipse of 16 July 2000 lasted 3 hours 56 minutes, during which time the Moon was completely invisible for 107 minutes. We leave the compilation of lunar eclipse tables as an exercise.
A reality check All the results in this chapter were derived by assuming simple harmonic motion of the Moon about Earth. In so doing, we have ignored a host of variables governing the behavior of this system. For example, the Moon fails to rotate about Earthโs center. Instead, Earth and the Moon rotate about their barycenter, a point about 4671 km along the line segment from Earthโs center to the Moonโs center. All the planets, especially Jupiter, influence the motion of Earth and the Moon. The eccentricities of Earth and the Moon are greater than zero. Moreover, at present Earthโs eccentricity is cyclical with a period of about 100 000 years [9]. The Moon is currently receding from Earth by about 3โ4 cm/year, whereas Earth may be receding from the Sun by as much as 15 cm/year [87].
420
Chapter XII: Diophantine Eclipses
Figure 15. A solar eclipse predicted for 8 April 2024, courtesy of NASA. Accommodating these and other factors within a solar system model is complex, the analysis of which is far beyond the scope of this text. Nevertheless, our simple model is resilient enough to generate reliable predictions of solar eclipses, albeit with up to about six hours in error. For the time and venue of the next eclipse visit NASAโs impressive data bank of both solar and lunar eclipses over six millennia. For example, Figure 15 shows some of the detail of a solar eclipse predicted to occur on 8 April 2024. The path of the mosun across Earthโdisplayed as a narrow bandโcrosses the Rio Grande near the moment of greatest local eclipse duration at approximately noon local time. The arcs sweeping across this band indicate the region on Earth from which a viewer will see only a portion of the Sun obscured by the Moon. Since the time lapses between successive solar eclipses are either one, five, or six lunations, at least two solar eclipses occur each yearโperhaps in a venue near you.
A ๏ฌnal note As we have seen, the vector calculus approach of testing whether Equation (6) at lunation ๐ is bounded by 9900 km is an efficient way to find eclipse dates. Solving the Diophantine equation 233๐ + 358๐ = ๐ using the criterion in Equation (11) exposes some insightful structure that is omitted by the vector approach. For
Exercises
421
example, if ๐ is positive and ๐ is negative for a solution of ๐ lunations, then we know that the eclipse at ๐ lunations is a recurrence 223๐ moons into the future of an eclipse 358|๐| moons ago (with respect to time 0 of lunation 0). In summary, the solution to linear Diophantine equations and the algorithms of continued fractions are clever applications of the Euclidean algorithm for finding the greatest common divisor of two positive, relatively prime integers. That the motion of heavenly bodiesโand in particular the age-old mystery of finding the pattern of eclipse phenomenaโcan be characterized using these simple ideas is almost magical. Exercises 1. The mean anomalistic period ๐๐ of the Moon is ๐ โ 27.554550 days, the time lapse of the Moon at successive perigees in its orbit with respect to the background of fixed stars. Assume that the major axis of the Moonโs orbit rotates ๐ โ 40.7โ counterclockwise (same direction as the Moonโs orbit) each year. From this information, estimate the mean sidereal period ๐๐ of the Moon, the lapse between the Moon returning to the same point with respect to the fixed background of the stars. 2. Just as Earthโs sidereal orbit precesses with period about 25 800 years, so too does the Moonโs sidereal orbit precess with period about 18.6 years. With the sidereal period from Exercise 1, use this information to approximate the draconic period ๐๐ of the Moonโthe time lapse between the Moon returning to the same point with respect to the ecliptic plane. 3. In tandem with an atlas, use Figure 16 to estimate the radius of the Moonโs primary shadow in this 1715 sketch by Edmund Halley. 4. (a) The value of the Moonโs perigeeโthe mean nearest distance of the Moon to Earthโand the Moonโs apogeeโthe mean furthest distance of the Moon to Earthโare, respectively, 363 396 km and 405 504 km. Use this information to approximate the extreme numbers of solar eclipses in a Saros cycle. (b) Using the information of Exercise 4a, estimate the maximal durations of solar eclipses both globally and locally. From NASAโs website on eclipses, find eclipses that closely realize these extremes. (c) With the information from Exercise 4a, estimate the longest time for the Moon to be totally within Earthโs shadow. 5. (a) Explain why the succession of paths of solar eclipses across the disk of Earth proceed from north to south for a saros cycle associated with an ascending node, and why the opposite is true for the cycle associated with a descending node.
422
Chapter XII: Diophantine Eclipses
Figure 16. Halleyโs sketch of a solar eclipse over London, 1715. (b) What is the maximum number of solar eclipses that can occur in a oneyear interval? (c) An alternate algebraic condition to generate solar eclipses. Let ๐(๐ก) = min{2๐๐๐ก mod ๐, ๐ โ (2๐๐๐ก mod ๐)}, where 2๐๐๐ก is the central angle at Earthโs center measured counterclockwise from the ascending node to the Moon at time ๐ก in lunations. Use Equation (6) to show that Condition 1 (Equation (4)) is approximately equivalent to Condition 2: Condition 2 for lunation ๐ to be an eclipse: ๐(๐) โค 16.7โ . Generate Table 1 afresh by using Condition 2. 6. (a) With its mass held constant, what would Earthโs radius need to be in order for the only time lapses between solar eclipses to be a multiple of 6 lunations? (b) Suppose Earth had radius 10 000 km (and the same mass). Generate a list of possible solar eclipses analogous to Equation (7). 7. Let lunation 0 be the occurrence of a central eclipse. Let ๐ be an integer between 0 and 265. Show that the only values of ๐ for which the Diophantine equation 223๐ + 358๐ โ 3087 = ๐,
Exercises
423
where |๐| โค 30 and |๐| โค 20, holds are those months occurring in Table 2. That is, the denominator of the fifth convergent yields no more information about solar eclipses than is already given by the third and fourth convergents. 8. Select an arbitary non-exact total solar eclipse โฐ from NASAโs data banks. Estimate the ๐ป value corresponding to โฐ. Use this information to estimate the date of the central solar eclipse nearest to โฐ. 9. (a) Use the bounds ๐ = 35 and ๐ = 21 to generate a table much like Table 2. What entries occur in this table that fail to occur in Table 2? (b) Use the cycles of six and forty-seven (rather than 223 and 358) to generate a table much like Table 2. Contrast your results with Table 2. 10. With respect to lunar eclipses, derive a formula analogous to Equation (6). Generate a list of lunar eclipse months analogous to the list (7). Compare your results with NASAโs data banks for lunar eclipses.
Appendix I: List of Symbols Used in the Text The symbols in the list below are arranged roughly in the order in which they first appear in the text. [๐0 ; ๐1 , ๐2 , ๐3 , โฆ , ๐๐ ] A finite simple continued fraction (p. xiii). [๐0 ; ๐1 , ๐2 , ๐3 , โฆ] An infinite simple continued fraction (p. xiv). ๐ถ๐ From context, either convergent ๐ (p. xiii) or a set indexed by ๐. |๐ฅ| From context, the absolute value of the number ๐ฅ (p. xv), or the cardinality of the set ๐ฅ (p. 112). ๐บ From context, the constant of universal gravitation (p. xv). CAS An acronym for Computer Algebra System (p. xviii). โข The end of an example, derivation, puzzle (p. 4). โค The set of integers (p. 6). [๐ฅ] The nearest integer function (p. 6). ๐ฎ๐ The signature of ๐ (pp. 6, 243). ๐ซ๐ The phyllotaxis of the irrational number ๐ (p. 7). ๐|๐ The integer ๐ divides the integer ๐ (p. 10).
โฝ โฝ (a string of digits)๐
The cuneiform symbol for the integer one (p. 14). The cuneiform symbol for ten (p. 14). The representation of a number in base ๐ (p. 16).
๐
โ ๐๐
The sum ๐1 + ๐2 + โฏ + ๐๐ (p. 16).
๐=1
๐(๐)
The end of a proof (p. 19). The Euler phi function of integer ๐ (p. 20); in context ๐ may be the golden mean (p. 194).
๐
ฮ ๐๐
๐=1
The product (๐1 )(๐2 ) โฏ (๐๐ ) (p. 20). 425
426
Appendix I: List of Symbols Used in the Text The Mayan symbol for zero (p. 24). ๐ โ โ โค+ ๐โ๐ด ยฑ๐ ๐ดโ๐ต {๐ฅ| ๐ฅ has property ๐} โ
๐! ๐โ๐ต ๐๐
๐ ๐โก๐ ๐ดโผ๐ต ๐ดโฉ๐ต ๐ดโช๐ต mex(๐ด) ๐ด๐ โ ๐+๐ ๐ gcd(๐, ๐) ๐ โก ๐ mod ๐ โ โ
From context, the imaginary number โโ1 (p. 26). Infinity (p. 33). The set of natural numbers, {0, 1, 2, โฆ} (p. 37). The set of positive integers (p. 37). The element ๐ belongs to set ๐ด (p. 37). Plus or minus the integer ๐ (p. 37). Set ๐ด is a subset of set ๐ต (p. 37). The set of all ๐ฅ satisfying property ๐ (p. 37). The empty set, also known as the null set (p. 40). The factorial of the nonnegative integer ๐ (p. 41). Element ๐ does not belong to set ๐ต (p. 42). Element ๐ is related to element ๐ by rule ๐
(p. 45). Element ๐ is equivalent to element ๐ (p. 45). Object ๐ด is similar to object ๐ต (p. 46). The intersection of sets ๐ด and ๐ต (p. 46); โฉ is also the hieroglyphic ten (p. 109). The union of sets ๐ด and ๐ต (p. 49). The minimal excluded value from the set ๐ด (p. 50). The complement of the set ๐ด (p. 50). The nim sum of the integers ๐ and ๐ (p. 53). From context, ๐ is the number ๐ โ 2.718 (p. 65), or the eccentricity of an ellipse (p. 279). The greatest common divisor of ๐ and ๐ (p. 74). ๐|(๐ โ ๐), where mod is short for modulo (p. 89). The set of real numbers (p. 97). The set of rational numbers (p. 107). The hieroglyphic symbol for one-half (p. 109). A hieroglyphic symbol denoting a fraction; 1
โฑ๐ ๐ ๐ โ ๐ ๐ โ๐ฅโ โ๐ฅโ [๐ฅ] max(๐ด) โ ๐โ๐ด โ ๐ต
thus, โฉ is (p. 109). 10 A Farey series of fractions (p. 112). ๐ ๐ The mediant of the fractions and (p. 111). ๐ ๐ The floor of the real number ๐ฅ (p. 114). The ceiling of the real number ๐ฅ (p. 114); the nearest integer function [๐ฅ] is defined on p. 6. The maximum element in set ๐ด (p. 114). The set of complex numbers (p. 117). ๐ ๐ The general mediant of ๐ด = and ๐ต = , namely,
๐๐+๐ ๐๐+๐
๐
(p. 124).
๐
Appendix I: List of Symbols Used in the Text ๐๐ด โ ๐ต {๐ด||๐ต}
427
Simpler notation for the general mediant (p. 124). A representation of the simplest quantity between quantity sets ๐ด and ๐ต (p. 137).
โจ๐0 ; ๐1 , ๐2 , โฆโฉ
Quarter note, eighth note, and dotted quarter note (p. 143). The sign of the number ๐ , ยฑ1 (p. 152). From context, Eulerโs constant, ๐พ โ 0.5772 (p. 150). Format representing a Babylonian fraction (p. 170).
(๐)
The binomial coefficient, ๐ choose ๐ (p. 186).
โ ๐ฅ๐ ๐ฅ๐
The sum of all terms ๐ฅ๐ ๐ฅ๐ where ๐ < ๐ (p. 202).
โข|
โข
โข|โข
sgn(๐ ) ๐พ
๐
๐ 1. We say that the (๐, ๐) minor of ๐, denoted by minor(๐, ๐), is the (๐ โ 1) ร (๐ โ 1) matrix obtained from ๐ by deleting row ๐ and column ๐ from ๐, where ๐ and ๐ are integers with 1 โค ๐ โค ๐ and 1 โค ๐ โค ๐. We say that the determinant of a 1 ร 1 matrixโwhich has just one entryโis equal to that lone entry. The determinant of ๐, denoted by det(๐), is recursively computed by expanding across any row of ๐. In particular, when expanding across row ๐, ๐
det(๐) = โ (โ1)๐+๐ ๐๐๐ det(minor(๐, ๐)). ๐=1
For example, let ๐ = [
๐ ๐ ] . The determinant of ๐, when expanding across ๐ ๐
row 1, is det(๐) = (โ1)1+1 ๐11 det(minor(๐1, 1 )) + (โ1)1+2 ๐12 det(minor(๐1, 2 )) = ๐๐ โ ๐๐. ๐ ๐ Let ๐ = [ ๐ ๐ก ๐ฃ ๐ค
๐ ๐ข ] . Expanding across row 2 of ๐ gives ๐ฅ
det(๐) = โ๐ det [ ๐ โก 11 ๐21 โข Similarly, det โข โข ๐31 โฃ ๐41
๐ ๐ค
๐ ๐ ๐ ๐ ๐ ] + ๐ก det [ ] โ ๐ข det [ ]. ๐ฅ ๐ฃ ๐ฅ ๐ฃ ๐ค
๐12 ๐22 ๐32 ๐42
๐13 ๐23 ๐33 ๐43
๐14 ๐24 ๐34 ๐44
๐12 โ๐41 det [ ๐12 ๐32
๐13 ๐13 ๐33
๐11 ๐14 ๐14 ] + ๐42 det [ ๐21 ๐31 ๐34
๐11 โ๐43 det [ ๐21 ๐31
โค โฅ, when expanding across the last row, is โฅ โฅ โฆ
๐12 ๐22 ๐32
๐13 ๐23 ๐33
๐14 ๐24 ] ๐34
๐14 ๐11 ๐24 ] + ๐44 det [ ๐21 ๐34 ๐31
๐12 ๐22 ๐32
๐13 ๐23 ] . ๐33
Definition 21: The inverse of a square matrix. Let ๐ด be an ๐ ร ๐ matrix. We say that ๐ดโ1 is the inverse matrix for ๐ด if ๐ด๐ดโ1 = ๐ผ = ๐ดโ1 ๐ด where ๐ผ is the identity matrix, an ๐ ร ๐ matrix whose diagonal terms are 1 and whose other entries are 0. Proposition 22: Inverse existence. Let ๐ด be an ๐ ร ๐ matrix with nonzero determinant. Then ๐ดโ1 exists.
Appendix II: An Introduction to Vectors and Matrices
435
Proof. For a proof in general, see any linear algebra text. We show that the propo๐ ๐ sition is true when ๐ = 2. Let ๐ด = [ ]. Given that ๐๐ โ ๐๐ โ 0, the inverse ๐ ๐ matrix is 1 ๐ โ๐ ๐ดโ1 = [ ]. ๐๐ โ ๐๐ โ๐ ๐ The reader may show that ๐ด๐ดโ1 = ๐ผ = ๐ดโ1 ๐ด where ๐ผ = [
1 0 ]. 0 1
Appendix III: Computer Algebra System Codes The lines of Mathematica code in this appendix implement various algorithms presented in the text. If you use a different computer algebra system (CAS), many of these code modules can be adapted to your system. Code 0: Mathematica syntax. In this section we alert the user to frequently used Mathematica syntax that may be different in other CASs. Comments. Surround comments with (* ... *). Lists. Use L[[i]] to refer to element i in list L. If a list has an element that itself is a list, two indices are needed. For example, if L1 is {{2, 3}, {5, 3}}, then L1[[2]] refers to the list {5, 3}, whereas L1[[2, 1]] refers to the element 5. ๐ ๐ Matrices. The 2 ร 2 matrix [ ] is stored as a list of lists: mat = ๐ ๐ {{a, b}, {c, d}}. To multiply matrices, use the operation Dot (.), as in mat.mat. If V is a vector, V.V gives the dot product. If V has length 2, Mathematica automatically uses the column vector for V in the calculation of the matrix product mat.V. Logical operators. Use && for โandโ and || for โorโ. Conditional statements. The phrase If[ expr, stmt ] executes statement stmt if the expression expr is true. Furthermore, If[ expr, stmt1, stmt2 ] is interpreted as, If expr then stmt1 else stmt2. In statement construction, any stmt may be a single statement or a sequence of statements separated with semicolons. Do loop. The expression Do[ stmt, {i, imin, imax} ] executes stmt for integer i values imin to imax. Block. A helpful trick in function construction is to use local variables so that calls to the function avoid unintended consequences. One way to implement this trick is to place the code for a function within a Block, whose syntax is Block[ { varlist }, stmt ]. The variables in varlist are local to the 437
438
Appendix III: Computer Algebra System Codes
block and are separated with commas. These variables may be initialized within the list, such as Block[ { a, b, c = 5 }, ... ]. Functions. Define functions using funcname[ inputvariablelist ] := body;. By custom, user-defined function names usually start with a lowercase letter so as to avoid conflicts with standard Mathematica commands and functions. The input variable list determines the variables to be given in a call to the function. Each variable name must end in an underscoreโfor example, pattern[ L_, R_ ] := Block[ body ];. In the body of the function, variables L and R are used without the underscore. โข Code 1: Built-in functions. Many of the Mathematica commands we use in the codes of this appendix are standard functions or routines that may have similar counterparts in the CAS of your choice. Here are a few examples. โข To find the decomposition of any given integer ๐ into a product of powers of its prime divisors, use FactorInteger. L1 = FactorInteger[n] (*L1 is the output of this list*) When n = 1000, FactorInteger returns L1 as {{2, 3}, {5, 3}}, which is interpreted as 23 โ 53 . โข To find ๐(๐), the Euler phi function or the totient of Chapter I, use EulerPhi[n]. For example, EulerPhi[10] returns the integer 4. โข Prime[n] returns the ๐th prime. For example, Prime[4] returns 7. โข PrimeQ[n] tests whether ๐ is prime, returning True if it is prime and False otherwise. โข BaseForm[m, n] writes the integer ๐ in base ๐. Thus BaseForm[45, 2] returns (101101)2 . โข FromDigits[string, m] accepts a string of alpha-numeric symbols in base m and returns the value as a decimal integer. For example, FromDigits["1AB", 16] returns the decimal number 427. โข Code 2: Nim addition. The following functions perform nim addition. The function nimAdd outputs the nim sum of two nonnegative integers. nimAdd[m_,n_]:= Block[{k = 1,y = Min[{m,n}], z=Max[{m,n}], sum=0}, While[k < z, k = 2*k]; (*obtain power of 2 at least z*) While[k >= 1, (*loop *) If[(y