Exploring Continued Fractions: From the Integers to Solar Eclipses [1 ed.] 1470461285, 9781470461287

There is a nineteen\-year recurrence in the apparent position of the sun and moon against the background of the stars, a

173 4 68MB

English Pages 480 [503] Year 2021

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Cover
Title page
Copyright
Contents
Introduction
Strand I: Patterns
Tips on problem-solving and spotting patterns
A look ahead at three patterns
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
Strand II: Leibniz and the Binary Revolution
A continued fraction connection
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
Strand III: Al-Maghribรฎ meets Sudoku
Chapter III: GCDs and Diophantine Equations
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
Strand IV: Fractions in the Pythagorean Scale
A note-naming interlude
How Pythagoras generated his scale
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
Strand V: Bach and The Well-Tempered Clavier
A well-tempered innovation
A musical interlude
An equal-tempered revolution
A continued fraction connection
Chapter V: The Harmonic Series
Case Study: Jeeps in the Desert
A look behind and a look ahead
A generating function finale*
Exercises
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
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
Strand VII: Planetary Conjunctions
A few conjunction stories
A rough guess
A numerical approach
A continued fraction approach
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
Strand VIII: The Size and Shape of Utopia Island
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
Strand IX: The Cantor Set
A lotus-flower introduction
Ternary notation
A reality check*
Chapter IX: Continued Fractions
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
Strand X: The Longevity of the 17-year Cicada
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
Strand XI: Meton of Athens
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
Strand XII: Eclipse Lore and Legends
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
Some Diophantine magic
Lunar eclipses
A reality check
A final note
Exercises
Appendix I: List of Symbols Used in the Text
Appendix II: An Introduction to Vectors and Matrices
Appendix III: Computer Algebra System Codes
Appendix IV: Comments on Selected Exercises
Bibliography
Index
Back Cover
Recommend Papers

Exploring Continued Fractions: From the Integers to Solar Eclipses [1 ed.]
 1470461285, 9781470461287

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

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