Great Theoretical Ideas in Computer Science

Size: px
Start display at page:

Download "Great Theoretical Ideas in Computer Science"

Transcription

1 Great Theoretical Ideas in Computer Science

2 Recurrences, Fibonacci Numbers and Continued Fractions Lecture 9, September 23, 2008

3 Happy Autumnal Equinox

4 Leonardo Fibonacci

5 Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the growth of rabbit populations

6 Rabbit Reproduction

7 Rabbit Reproduction A rabbit lives forever

8 Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair

9 Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old

10 Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old F n = # of rabbit pairs at the beginning of the n th month

11 month rabbits Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old F n = # of rabbit pairs at the beginning of the n th month

12 month rabbits Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old F n = # of rabbit pairs at the beginning of the n th month 1

13 month rabbits Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old F n = # of rabbit pairs at the beginning of the n th month 1 1

14 month rabbits Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old F n = # of rabbit pairs at the beginning of the n th month 1 1 2

15 month rabbits Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old F n = # of rabbit pairs at the beginning of the n th month

16 month rabbits Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old F n = # of rabbit pairs at the beginning of the n th month

17 month rabbits Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old F n = # of rabbit pairs at the beginning of the n th month

18 month rabbits Rabbit Reproduction A rabbit lives forever The population starts as single newborn pair Every month, each productive pair begets a new pair which will become productive after 2 months old F n = # of rabbit pairs at the beginning of the n th month

19 Fibonacci Numbers month rabbits

20 Fibonacci Numbers month rabbits Stage 0, Initial Condition, or Base Case: Fib(1) = 1; Fib (2) = 1

21 Fibonacci Numbers month rabbits Stage 0, Initial Condition, or Base Case: Fib(1) = 1; Fib (2) = 1 Inductive Rule: For n>3, Fib(n) =

22 Fibonacci Numbers month rabbits Stage 0, Initial Condition, or Base Case: Fib(1) = 1; Fib (2) = 1 Inductive Rule: For n>3, Fib(n) = Fib(n-1) + Fib(n-2)

23 Sequences That Sum To n

24 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n.

25 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. f 1 = 1

26 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. f 1 = 1 0 = the empty sum

27 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. f 1 = 1 0 = the empty sum f 2 = 1

28 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. f 1 = 1 0 = the empty sum f 2 = 1 1 = 1

29 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. f 1 = 1 0 = the empty sum f 2 = 1 1 = 1 f 3 = 2

30 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. f 1 = 1 0 = the empty sum f 2 = 1 1 = 1 f 3 = 2 2 =

31 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. 4 =

32 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. 4 =

33 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n.

34 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. f n+1 = f n + f n-1

35 Sequences That Sum To n Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. f n+1 = f n + f n-1 # of sequences beginning with a 1 # of sequences beginning with a 2

36 Fibonacci Numbers Again Let f n+1 be the number of different sequences of 1 s and 2 s that sum to n. f n+1 = f n + f n-1 f 1 = 1 f 2 = 1

37 Visual Representation: Tiling Let f n+1 be the number of different ways to tile a 1 n strip with squares and dominoes.

38 Visual Representation: Tiling 1 way to tile a strip of length 0 1 way to tile a strip of length 1: 2 ways to tile a strip of length 2:

39 f n+1 = f n + f n-1 f n+1 is number of ways to tile length n. f n tilings that start with a square. f n-1 tilings that start with a domino.

40 Fibonacci Identities

41 Fibonacci Identities Some examples:

42 Fibonacci Identities Some examples:

43 Fibonacci Identities Some examples: F 2n = F 1 + F 3 + F F 2n-1

44 Fibonacci Identities Some examples: F 2n = F 1 + F 3 + F F 2n-1

45 Fibonacci Identities Some examples: F 2n = F 1 + F 3 + F F 2n-1 F m+n+1 = F m+1 F n+1 + F m F n

46 Fibonacci Identities Some examples: F 2n = F 1 + F 3 + F F 2n-1 F m+n+1 = F m+1 F n+1 + F m F n

47 Fibonacci Identities Some examples: F 2n = F 1 + F 3 + F F 2n-1 F m+n+1 = F m+1 F n+1 + F m F n (F n ) 2 = F n-1 F n+1 + (-1) n

48 Fm+n+1 = Fm+1 Fn+1 + F m Fn

49 F m+n+1 = F m+1 F n+1 + F m F n m n

50 F m+n+1 = F m+1 F n+1 + F m F n m n m-1 n-1

51 (Fn)2 = Fn-1 Fn+1 + (-1)n

52 (F n ) 2 = F n-1 F n+1 + (-1) n n-1 F n tilings of a strip of length n-1

53 (F n ) 2 = F n-1 F n+1 + (-1) n n (F n ) 2 tilings of two strips of size n-1

54 (F n ) 2 = F n-1 F n+1 + (-1) n n Draw a vertical fault line at the rightmost position (<n) possible without cutting any dominoes

55 (F n ) 2 = F n-1 F n+1 + (-1) n n Swap the tails at the fault line to map to a tiling of 2 (n-1) s to a tiling of an n-2 and an n.

56 (F n ) 2 = F n-1 F n+1 + (-1) n-1 n even n odd

57 Sneezwort (Achilleaptarmica) Each time the plant starts a new shoot it takes two months before it is strong enough to support branching.

58 Counting Petals

59 Counting Petals 5 petals: buttercup, wild rose, larkspur, columbine (aquilegia) 8 petals: delphiniums 13 petals: ragwort, corn marigold, cineraria, some daisies 21 petals: aster, black-eyed susan, chicory 34 petals: plantain, pyrethrum 55, 89 petals: michaelmas daisies, the asteraceae family.

60 The Fibonacci Quarterly

61 Definition of φ (Euclid)

62 Definition of φ (Euclid) Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller.

63 Definition of φ (Euclid) Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller. A B C

64 Definition of φ (Euclid) Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller. φ = AC AB = AB BC A B C

65 Definition of φ (Euclid) Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller. φ = AC AB = AB BC A B C φ 2 =

66 Definition of φ (Euclid) Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller. φ = AC AB = AB BC A B C φ 2 = AC BC

67 Definition of φ (Euclid) Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller. φ = AC AB = AB BC A B C φ 2 = AC BC φ 2 - φ =

68 Definition of φ (Euclid) Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller. φ = AC AB φ 2 = AC BC = φ 2 - φ = AC BC AB BC AB - = BC A B C

69 Definition of φ (Euclid) Ratio obtained when you divide a line segment into two unequal parts such that the ratio of the whole to the larger part is the same as the ratio of the larger to the smaller. φ = AC AB φ 2 = AC BC = φ 2 - φ = AC BC AB BC A B C - AB BC = BC BC = 1

70 φ 2 φ 1 = 0

71 φ 2 φ 1 = 0 φ =

72

73 Golden ratio supposed to arise in Parthenon, Athens (400 B.C.) a b The great pyramid at Gizeh Ratio of a person s height to the height of his/her navel

74 Golden ratio supposed to arise in Parthenon, Athens (400 B.C.) a b The great pyramid at Gizeh Ratio of a person s height to the height of his/her navel Mostly circumstantial evidence

75 Expanding Recursively

76 Expanding Recursively

77 Continued Fraction Representation

78 A (Simple) Continued Fraction Is Any Expression Of The Form: where a, b, c, are whole numbers.

79 A Continued Fraction can have a finite or infinite number of terms. We also denote this fraction by [a,b,c,d,e,f, ]

80 A Finite Continued Fraction Denoted by [2,3,4,2,0,0,0, ]

81 An Infinite Continued Fraction Denoted by [1,2,2,2, ]

82 Recursively Defined Form For CF

83 Continued fraction representation of a standard fraction

84 e.g., 67/29 = 2 with remainder 9/29 = 2 + 1/ (29/9)

85 Ancient Greek Representation: Continued Fraction Representation

86 Ancient Greek Representation: Continued Fraction Representation = [1,1,1,1,0,0,0, ]

87 Ancient Greek Representation: Continued Fraction Representation

88 Ancient Greek Representation: Continued Fraction Representation = [1,1,1,1,1,0,0,0, ]

89 Ancient Greek Representation: Continued Fraction Representation = [1,1,1,1,1,1,0,0,0, ]

90 A Pattern? Let r 1 = [1,0,0,0, ] = 1 r 2 = [1,1,0,0,0, ] = 2/1 r 3 = [1,1,1,0,0,0 ] = 3/2 r 4 = [1,1,1,1,0,0,0 ] = 5/3 and so on. Theorem: r n = Fib(n+1)/Fib(n)

91 1,1,2,3,5,8,13,21,34,55,.

92 1,1,2,3,5,8,13,21,34,55,. 2/1 = 2

93 1,1,2,3,5,8,13,21,34,55,. 2/1 = 2 3/2 = 1.5

94 1,1,2,3,5,8,13,21,34,55,. 2/1 = 2 3/2 = 1.5 5/3 = 1.666

95 1,1,2,3,5,8,13,21,34,55,. 2/1 = 2 3/2 = 1.5 5/3 = /5 = 1.6

96 1,1,2,3,5,8,13,21,34,55,. 2/1 = 2 3/2 = 1.5 5/3 = /5 = /8 = 1.625

97 1,1,2,3,5,8,13,21,34,55,. 2/1 = 2 3/2 = 1.5 5/3 = /5 = /8 = /13 =

98 1,1,2,3,5,8,13,21,34,55,. 2/1 = 2 3/2 = 1.5 5/3 = /5 = /8 = /13 = /21 =

99 1,1,2,3,5,8,13,21,34,55,. 2/1 = 2 3/2 = 1.5 5/3 = /5 = /8 = /13 = /21 = φ =

100 Pineapple whorls Church and Turing were both interested in the number of whorls in each ring of the spiral. The ratio of consecutive ring lengths approaches the Golden Ratio.

101

102 Proposition: Any finite continued fraction evaluates to a rational. Theorem Any rational has a finite continued fraction representation.

103 Hmm. Finite CFs = Rationals. Then what do infinite continued fractions represent?

104 An infinite continued fraction

105 Quadratic Equations X 2 3x 1 = 0 X 2 = 3X + 1 X = 3 + 1/X X = 3 + 1/X = 3 + 1/[3 + 1/X] =

106 A Periodic CF

107 Theorem: Any solution to a quadratic equation has a periodic continued fraction. Converse: Any periodic continued fraction is the solution of a quadratic equation. (try to prove this!)

108 So they express more than just the rationals What about those non-recurring infinite continued fractions?

109 Non-periodic CFs

110 What is the pattern?

111 No one knows! What is the pattern?

112 What a cool representation! Finite CF: Rationals Periodic CF: Quadratic roots And some numbers reveal hidden regularity.

113 More good news: Convergents Let α = [a 1, a 2, a 3,...] be a CF. Define: C 1 = [a 1,0,0,0,0..] C 2 = [a 1,a 2,0,0,0,...] C 3 = [a 1,a 2,a 3,0,0,...] and so on. C k is called the k-th convergent of α α is the limit of the sequence C 1, C 2, C 3,

114 Best Approximator Theorem A rational p/q is the best approximator to a real α if no rational number of denominator smaller than q comes closer to α.

115 Best Approximator Theorem A rational p/q is the best approximator to a real α if no rational number of denominator smaller than q comes closer to α. BEST APPROXIMATOR THEOREM: Given any CF representation of α, each convergent of the CF is a best approximator for α!

116 Best Approximators of π C 1 = 3 C 2 = 22/7 C 3 = 333/106 C 4 = 355/113 C 5 = /33102 C 6 =104348/33215

117 Continued Fraction Representation

118 Continued Fraction Representation

119 Remember? We already saw the convergents of this CF [1,1,1,1,1,1,1,1,1,1,1, ] are of the form Fib(n+1)/Fib(n) Hence:

120 1,1,2,3,5,8,13,21,34,55,. 2/1 = 2 3/2 = 1.5 5/3 = /5 = /8 = /13 = /21 = φ =

121 As we ve seen...

122 Going the Other Way

123 What is the Power Series Expansion of z/(1-z-z 2 )? What does this look like when we expand it as an infinite sum?

124 Since the bottom is quadratic we can factor it:

125 Write as a sum of two terms where Solving:

126 Now use the geometric series

127

128 Leonhard Euler (1765) J. P. M. Binet (1843) A de Moivre (1730) The n th Fibonacci number is:

129

130

131 Recurrences and generating functions Golden ratio Continued fractions Convergents Here s What You Need to Know Closed form for Fibonaccis 74

132

Great Theoretical Ideas in Computer Science

Great Theoretical Ideas in Computer Science 15-251 Great Theoretical Ideas in Computer Science Recurrences, Fibonacci Numbers and Continued Fractions Lecture 9, September 24, 2009 Leonardo Fibonacci In 1202, Fibonacci proposed a problem about the

More information

Ancient Wisdom: Primes, Continued Fractions, The Golden Ratio, and Euclid s GCD

Ancient Wisdom: Primes, Continued Fractions, The Golden Ratio, and Euclid s GCD Great Theoretical Ideas In Computer Science John Lafferty CS 5-25 Fall 2006 Lecture 2 Oct 5, 2005 Carnegie Mellon University Ancient Wisdom: Primes, Continued Fractions, The Golden Ratio, and Euclid s

More information

Ratio by Using Coefficients of Fibonacci Sequence

Ratio by Using Coefficients of Fibonacci Sequence International J.Math. Combin. Vol.3(2013), 96-103 Ratio by Using Coefficients of Fibonacci Sequence Megha Garg and Pertik Garg (Punjab Technical University, Jalanahar, Punjab) Ravinder Kumar (Bhai Gurdas

More information

Homework Gots to be Typeset. We Are Here to help! Dominoes. Inductive Reasoning Lecture 2 (January 19, 2006)

Homework Gots to be Typeset. We Are Here to help! Dominoes. Inductive Reasoning Lecture 2 (January 19, 2006) Homework Gots to be Typeset You may use any typesetting program you wish, but we strongly encourage you to use LaTeX We Are Here to help! There are many office hours throughout the week If you have problems

More information

Great Theoretical Ideas in Computer Science

Great Theoretical Ideas in Computer Science 15-251 Great Theoretical Ideas in Computer Science 15-251 Proof Techniques for Computer Scientists Induction Inductive Reasoning Lecture 2 (August 28, 2008) This is the primary way we ll 1. prove theorems

More information

Magic of numbers and Fibonacci Sequence. March 10, 2018 Mathematics Circle

Magic of numbers and Fibonacci Sequence. March 10, 2018 Mathematics Circle Magic of numbers and Fibonacci Sequence March 10, 2018 Mathematics Circle Natural Numbers Kronecker, the German Mathematician said the following: GOD CREATED THE NATURAL NUMBERS, THE REST ARE MAN S HANDIWORK

More information

Counting on Continued Fractions

Counting on Continued Fractions appeared in: Mathematics Magazine 73(2000), pp. 98-04. Copyright the Mathematical Association of America 999. All rights reserved. Counting on Continued Fractions Arthur T. Benjamin Francis Edward Su Harvey

More information

Every subset of {1, 2,...,n 1} can be extended to a subset of {1, 2, 3,...,n} by either adding or not adding the element n.

Every subset of {1, 2,...,n 1} can be extended to a subset of {1, 2, 3,...,n} by either adding or not adding the element n. 11 Recurrences A recurrence equation or recurrence counts things using recursion. 11.1 Recurrence Equations We start with an example. Example 11.1. Find a recurrence for S(n), the number of subsets of

More information

The Fibonacci Numbers

The Fibonacci Numbers The Fibonacci Numbers A sequence of numbers (actually, positive integers) that occur many times in nature, art, music, geometry, mathematics, economics, and more... The Fibonacci Numbers The numbers are:

More information

12 Sequences and Recurrences

12 Sequences and Recurrences 12 Sequences and Recurrences A sequence is just what you think it is. It is often given by a formula known as a recurrence equation. 12.1 Arithmetic and Geometric Progressions An arithmetic progression

More information

The Fibonacci Sequence

The Fibonacci Sequence The Fibonacci Sequence January 17, 2016 Rules: 1. Start with a pair of new rabbits born in December. 2. When the rabbits are one month old, they are considered teenagers. Teenagers cannot have children.

More information

Notes on Continued Fractions for Math 4400

Notes on Continued Fractions for Math 4400 . Continued fractions. Notes on Continued Fractions for Math 4400 The continued fraction expansion converts a positive real number α into a sequence of natural numbers. Conversely, a sequence of natural

More information

Fibonacci numbers. Chapter The Fibonacci sequence. The Fibonacci numbers F n are defined recursively by

Fibonacci numbers. Chapter The Fibonacci sequence. The Fibonacci numbers F n are defined recursively by Chapter Fibonacci numbers The Fibonacci sequence The Fibonacci numbers F n are defined recursively by F n+ = F n + F n, F 0 = 0, F = The first few Fibonacci numbers are n 0 5 6 7 8 9 0 F n 0 5 8 55 89

More information

Fibonacci (Leonardo Pisano) ? Statue in Pisa Italy FIBONACCI NUMBERS GOLDEN RATIO, RECURRENCES

Fibonacci (Leonardo Pisano) ? Statue in Pisa Italy FIBONACCI NUMBERS GOLDEN RATIO, RECURRENCES Fibonacci (Leonardo Pisano) 1170-1240? Statue in Pisa Italy FIBONACCI NUMBERS GOLDEN RATIO, RECURRENCES Lecture 23 CS2110 Fall 2016 Prelim tonight 2 You know already whether you are taking it at 5:30 or

More information

Fibonacci Sequence. January 19, 2014

Fibonacci Sequence. January 19, 2014 Fibonacci Sequence January 19, 2014 Today we will learn about the Fibonacci sequence, one of the most famous sequences of numbers in mathematics. To construct it, we will look at the pattern of growth

More information

SEVENTH EDITION and EXPANDED SEVENTH EDITION

SEVENTH EDITION and EXPANDED SEVENTH EDITION SEVENTH EDITION and EXPANDED SEVENTH EDITION Slide 5-1 Chapter 5 Number Theory and the Real Number System 5.1 Number Theory Number Theory The study of numbers and their properties. The numbers we use to

More information

Fibonacci Numbers. November 7, Fibonacci's Task: Figure out how many pairs of rabbits there will be at the end of one year, following rules.

Fibonacci Numbers. November 7, Fibonacci's Task: Figure out how many pairs of rabbits there will be at the end of one year, following rules. Fibonacci Numbers November 7, 2010 Fibonacci's Task: Figure out how many pairs of rabbits there will be at the end of one year, following rules. Rules: 1. Start with a pair of new rabbits, born in December.

More information

MATH 402 : 2017 page 1 of 6

MATH 402 : 2017 page 1 of 6 ADMINISTRATION What? Math 40: Enumerative Combinatorics Who? Me: Professor Greg Smith You: students interested in combinatorics When and Where? lectures: slot 00 office hours: Tuesdays at :30 6:30 and

More information

The Golden Ratio. The Divine Proportion

The Golden Ratio. The Divine Proportion The Golden Ratio The Divine Proportion The Problem There is a population of rabbits for which it is assumed: 1) In the first month there is just one newborn pair 2) New-born pairs become fertile from their

More information

Section 11.1: Sequences

Section 11.1: Sequences Section 11.1: Sequences In this section, we shall study something of which is conceptually simple mathematically, but has far reaching results in so many different areas of mathematics - sequences. 1.

More information

Computing Recursive Functions

Computing Recursive Functions Computing Recursive Functions cs4: Computer Science Bootcamp Çetin Kaya Koç cetinkoc@ucsb.edu Çetin Kaya Koç http://koclab.org Winter 2019 1 / 19 Recursively Defined Sequences Fibonacci numbers are defined

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers. MATH 4 Summer 011 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

4. Who first proved that the golden ratio is the limit of the ratio of consecutive Fibonacci numbers? ): ( ) n - ( 1-5 ) n

4. Who first proved that the golden ratio is the limit of the ratio of consecutive Fibonacci numbers? ): ( ) n - ( 1-5 ) n For the purposes of this test, let f represent the golden ratio, and the first two terms of the Fibonacci sequence are F 0 = 0 and F 1 = 1. Remember f 2 = f +1. May the golden odds be ever in your favor!

More information

Algorithms: Background

Algorithms: Background Algorithms: Background Amotz Bar-Noy CUNY Amotz Bar-Noy (CUNY) Algorithms: Background 1 / 66 What is a Proof? Definition I: The cogency of evidence that compels acceptance by the mind of a truth or a fact.

More information

{ 0! = 1 n! = n(n 1)!, n 1. n! =

{ 0! = 1 n! = n(n 1)!, n 1. n! = Summations Question? What is the sum of the first 100 positive integers? Counting Question? In how many ways may the first three horses in a 10 horse race finish? Multiplication Principle: If an event

More information

Sequences and Summations ICS 6D. Prof. Sandy Irani

Sequences and Summations ICS 6D. Prof. Sandy Irani Sequences and Summations ICS 6D Prof. Sandy Irani Test Poll What is your favorite flavor of ice cream? A) Vanilla B) Chocolate C) Moose Tracks D) Mint Chocolate Chip E) None of the above Sequences A sequence

More information

Fibonacci Numbers. By: Sara Miller Advisor: Dr. Mihai Caragiu

Fibonacci Numbers. By: Sara Miller Advisor: Dr. Mihai Caragiu Fibonacci Numbers By: Sara Miller Advisor: Dr. Mihai Caragiu Abstract We will investigate various ways of proving identities involving Fibonacci Numbers, such as, induction, linear algebra (matrices),

More information

1 Continued Fractions

1 Continued Fractions Continued Fractions To start off the course, we consider a generalization of the Euclidean Algorithm which has ancient historical roots and yet still has relevance and applications today.. Continued Fraction

More information

1 A first example: detailed calculations

1 A first example: detailed calculations MA4 Handout # Linear recurrence relations Robert Harron Wednesday, Nov 8, 009 This handout covers the material on solving linear recurrence relations It starts off with an example that goes through detailed

More information

Rectangle is actually a spiraling

Rectangle is actually a spiraling The Golden Mean is the ideal moderate position between two extremes. It plays a huge role in the universal cosmetic language called Sacred Geometry. The Golden Mean can be found anywhere from art and architecture

More information

Fibonacci (Leonardo Pisano) ? Statue in Pisa Italy FIBONACCI NUMBERS AND RECURRENCES

Fibonacci (Leonardo Pisano) ? Statue in Pisa Italy FIBONACCI NUMBERS AND RECURRENCES Fibonacci (Leonardo Pisano) 1170-1240? Statue in Pisa Italy FIBONACCI NUMBERS AND RECURRENCES Lecture 23 CS2110 Fall 2015 Prelim 2 Thursday at 5:30 and 7:30 2 5:30. Statler Auditorium. Last name M..Z 7:30.

More information

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws Index absolute value, 135 141 additive identity, 254 additive inverse, 254 aleph, 465 algebra of sets, 245, 278 antisymmetric relation, 387 arcsine function, 349 arithmetic sequence, 208 arrow diagram,

More information

Introduction: Pythagorean Triplets

Introduction: Pythagorean Triplets Introduction: Pythagorean Triplets On this first day I want to give you an idea of what sorts of things we talk about in number theory. In number theory we want to study the natural numbers, and in particular

More information

The solutions to the two examples above are the same.

The solutions to the two examples above are the same. One-to-one correspondences A function f : A B is one-to-one if f(x) = f(y) implies that x = y. A function f : A B is onto if for any element b in B there is an element a in A such that f(a) = b. A function

More information

Objectives. Materials

Objectives. Materials . Objectives Activity 2 To use technology to find ratios To use technology to find measures of central tendency To use technology to plot a box-and-whisker plot Materials TI-73 graphing device Follow the

More information

3 Finite continued fractions

3 Finite continued fractions MTH628 Number Theory Notes 3 Spring 209 3 Finite continued fractions 3. Introduction Let us return to the calculation of gcd(225, 57) from the preceding chapter. 225 = 57 + 68 57 = 68 2 + 2 68 = 2 3 +

More information

Written Assignment 2 Fibonacci Sequence

Written Assignment 2 Fibonacci Sequence Written Assignment Fibonacci Sequence Banana Slug (Put Your Name here) University of California at Santa Cruz Santa Cruz, CA 9064 USA September, 018 (Write your own abstract.) Abstract 1 Introduction.

More information

Question 1: Is zero a rational number? Can you write it in the form p, where p and q are integers and q 0?

Question 1: Is zero a rational number? Can you write it in the form p, where p and q are integers and q 0? Class IX - NCERT Maths Exercise (.) Question : Is zero a rational number? Can you write it in the form p, where p and q are integers and q 0? q Solution : Consider the definition of a rational number.

More information

Algoritmi di Bioinformatica. Computational efficiency I

Algoritmi di Bioinformatica. Computational efficiency I Algoritmi di Bioinformatica Zsuzsanna Lipták Laurea Magistrale Bioinformatica e Biotechnologie Mediche (LM9) a.a. 2014/15, spring term Computational efficiency I 2 / 18 Computational Efficiency As we will

More information

Question of the Day. Key Concepts. Vocabulary. Mathematical Ideas. QuestionofDay

Question of the Day. Key Concepts. Vocabulary. Mathematical Ideas. QuestionofDay QuestionofDay Question of the Day Using 1 1 square tiles and 1 2 dominoes, one can tile a 1 3 strip of squares three different ways. (Find them!) In how many different ways can one tile a 1 4 strip of

More information

Mathematical Induction

Mathematical Induction Chapter 1 Mathematical Induction Mathematical Induction is one simple yet powerful and handy tool to tackle mathematical problems. There are a lot of mathematical theorems that you rely on in your everyday

More information

With Question/Answer Animations

With Question/Answer Animations Chapter 5 With Question/Answer Animations Copyright McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. Chapter Summary

More information

-Fibonacci Sequence and The (-;olden Ratio

-Fibonacci Sequence and The (-;olden Ratio Collection \If -Fibonacci Sequence and The (-;olden Ratio Pamela Cohen and Cheryl Zerafa Fibonacci, or more correctly Leonardo da Pisa, was born in Pisa in I 175AD. He was the son of a Pisan merchant who

More information

CLASS-IX MATHEMATICS. For. Pre-Foundation Course CAREER POINT

CLASS-IX MATHEMATICS. For. Pre-Foundation Course CAREER POINT CLASS-IX MATHEMATICS For Pre-Foundation Course CAREER POINT CONTENTS S. No. CHAPTERS PAGE NO. 0. Number System... 0 3 0. Polynomials... 39 53 03. Co-ordinate Geometry... 54 04. Introduction to Euclid's

More information

Sequences and Series. Copyright Cengage Learning. All rights reserved.

Sequences and Series. Copyright Cengage Learning. All rights reserved. Sequences and Series Copyright Cengage Learning. All rights reserved. 12.1 Sequences and Summation Notation Copyright Cengage Learning. All rights reserved. Objectives Sequences Recursively Defined Sequences

More information

Mathematical Induction. Part Two

Mathematical Induction. Part Two Mathematical Induction Part Two Announcements Problem Set due Friday, January 8 at the start of class. Problem Set checkpoints graded, will be returned at end of lecture. Afterwards, will be available

More information

Chapter12. Relations, Functions, and Induction

Chapter12. Relations, Functions, and Induction . Relations. Functions. Seuences.4 Mathematical Induction.5 Recurrence Relations Chapter Review Chapter Relations, Functions, and Induction In this chapter we introduce the concepts of a relation and a

More information

All numbered readings are from Beck and Geoghegan s The art of proof.

All numbered readings are from Beck and Geoghegan s The art of proof. MATH 301. Assigned readings and homework All numbered readings are from Beck and Geoghegan s The art of proof. Reading Jan 30, Feb 1: Chapters 1.1 1.2 Feb 6, 8: Chapters 1.3 2.1 Feb 13, 15: Chapters 2.2

More information

Golden Ratio, Fibonacci Numbers, and the Golden Spiral

Golden Ratio, Fibonacci Numbers, and the Golden Spiral Golden Ratio, Fibonacci Numbers, and the Golden Spiral by University of Mobile Creation Reveals God The heavens are telling of the glory of God; and their expanse is declaring the work of His hands. Day

More information

Grade 8 Chapter 7: Rational and Irrational Numbers

Grade 8 Chapter 7: Rational and Irrational Numbers Grade 8 Chapter 7: Rational and Irrational Numbers In this chapter we first review the real line model for numbers, as discussed in Chapter 2 of seventh grade, by recalling how the integers and then the

More information

TILING PROOFS OF SOME FIBONACCI-LUCAS RELATIONS. Mark Shattuck Department of Mathematics, University of Tennessee, Knoxville, TN , USA

TILING PROOFS OF SOME FIBONACCI-LUCAS RELATIONS. Mark Shattuck Department of Mathematics, University of Tennessee, Knoxville, TN , USA INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY 8 (008), #A18 TILING PROOFS OF SOME FIBONACCI-LUCAS RELATIONS Mark Shattuck Department of Mathematics, University of Tennessee, Knoxville, TN

More information

Advanced Counting Techniques. Chapter 8

Advanced Counting Techniques. Chapter 8 Advanced Counting Techniques Chapter 8 Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence Relations Nonhomogeneous Recurrence Relations Divide-and-Conquer

More information

Optimization Part 1 P. Agius L2.1, Spring 2008

Optimization Part 1 P. Agius L2.1, Spring 2008 Optimization Part 1 Contents Terms and definitions, formulating the problem Unconstrained optimization conditions FONC, SONC, SOSC Searching for the solution Which direction? What step size? Constrained

More information

Fall 2017 Test II review problems

Fall 2017 Test II review problems Fall 2017 Test II review problems Dr. Holmes October 18, 2017 This is a quite miscellaneous grab bag of relevant problems from old tests. Some are certainly repeated. 1. Give the complete addition and

More information

Europe Starts to Wake up: Leonardo of Pisa

Europe Starts to Wake up: Leonardo of Pisa Europe Starts to Wake up: Leonardo of Pisa Leonardo of Pisa, also known as Fibbonaci (from filius Bonaccia, son of Bonnaccio ) was the greatest mathematician of the middle ages. He lived from 75 to 50,

More information

Section 4.1: Sequences and Series

Section 4.1: Sequences and Series Section 4.1: Sequences and Series In this section, we shall introduce the idea of sequences and series as a necessary tool to develop the proof technique called mathematical induction. Most of the material

More information

Lecture 8 : Structural Induction DRAFT

Lecture 8 : Structural Induction DRAFT CS/Math 240: Introduction to Discrete Mathematics 2/15/2011 Lecture 8 : Structural Induction Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last week we discussed proofs by induction. We

More information

Data Structure Lecture#4: Mathematical Preliminaries U Kang Seoul National University

Data Structure Lecture#4: Mathematical Preliminaries U Kang Seoul National University Data Structure Lecture#4: Mathematical Preliminaries U Kang Seoul National University U Kang 1 In This Lecture Set concepts and notation Logarithms Summations Recurrence Relations Recursion Induction Proofs

More information

CHAPTER 1 NUMBER SYSTEMS. 1.1 Introduction

CHAPTER 1 NUMBER SYSTEMS. 1.1 Introduction N UMBER S YSTEMS NUMBER SYSTEMS CHAPTER. Introduction In your earlier classes, you have learnt about the number line and how to represent various types of numbers on it (see Fig..). Fig.. : The number

More information

Mathematical Induction. Part Two

Mathematical Induction. Part Two Mathematical Induction Part Two The principle of mathematical induction states that if for some property P(n), we have that If it starts P(0) is true and and it keeps going For any n N, we have P(n) P(n

More information

Lecture 8: Phyllotaxis, the golden ratio and the Fibonacci sequence

Lecture 8: Phyllotaxis, the golden ratio and the Fibonacci sequence The 77 th Compton lecture series Frustrating geometry: Geometry and incompatibility shaping the physical world Lecture 8: Phyllotaxis, the golden ratio and the Fibonacci sequence Efi Efrati Simons postdoctoral

More information

CSI2101-W08- Recurrence Relations

CSI2101-W08- Recurrence Relations Motivation CSI2101-W08- Recurrence Relations where do they come from modeling program analysis Solving Recurrence Relations by iteration arithmetic/geometric sequences linear homogenous recurrence relations

More information

Homework 3 Solutions, Math 55

Homework 3 Solutions, Math 55 Homework 3 Solutions, Math 55 1.8.4. There are three cases: that a is minimal, that b is minimal, and that c is minimal. If a is minimal, then a b and a c, so a min{b, c}, so then Also a b, so min{a, b}

More information

Introduction to and History of the Fibonacci Sequence

Introduction to and History of the Fibonacci Sequence JWBK027-C0[0-08].qxd 3/3/05 6:52 PM Page QUARK04 27A:JWBL027:Chapters:Chapter-0: Introduction to and History of the Fibonacci Sequence A brief look at mathematical proportion calculations and some interesting

More information

Chapter 8: Recursion. March 10, 2008

Chapter 8: Recursion. March 10, 2008 Chapter 8: Recursion March 10, 2008 Outline 1 8.1 Recursively Defined Sequences 2 8.2 Solving Recurrence Relations by Iteration 3 8.4 General Recursive Definitions Recursively Defined Sequences As mentioned

More information

The Fibonacci Sequence

The Fibonacci Sequence Elvis Numbers Elvis the Elf skips up a flight of numbered stairs, starting at step 1 and going up one or two steps with each leap Along with an illustrious name, Elvis parents have endowed him with an

More information

When is a number Fibonacci?

When is a number Fibonacci? When is a number Fibonacci? Phillip James Department of Computer Science, Swansea University March 6, 009 Abstract This article looks into the importance of the Fibonacci numbers within Computer Science,

More information

1 Sequences and Summation

1 Sequences and Summation 1 Sequences and Summation A sequence is a function whose domain is either all the integers between two given integers or all the integers greater than or equal to a given integer. For example, a m, a m+1,...,

More information

Unit 5: Sequences, Series, and Patterns

Unit 5: Sequences, Series, and Patterns Unit 5: Sequences, Series, and Patterns Section 1: Sequences and Series 1. Sequence: an ordered list of numerical terms 2. Finite Sequence: has a first term (a beginning) and a last term (an end) 3. Infinite

More information

ALGEBRA+NUMBER THEORY +COMBINATORICS

ALGEBRA+NUMBER THEORY +COMBINATORICS ALGEBRA+NUMBER THEORY +COMBINATORICS COMP 321 McGill University These slides are mainly compiled from the following resources. - Professor Jaehyun Park slides CS 97SI - Top-coder tutorials. - Programming

More information

4 Linear Recurrence Relations & the Fibonacci Sequence

4 Linear Recurrence Relations & the Fibonacci Sequence 4 Linear Recurrence Relations & the Fibonacci Sequence Recall the classic example of the Fibonacci sequence (F n ) n=1 the relations: F n+ = F n+1 + F n F 1 = F = 1 = (1, 1,, 3, 5, 8, 13, 1,...), defined

More information

Notes on generating functions in automata theory

Notes on generating functions in automata theory Notes on generating functions in automata theory Benjamin Steinberg December 5, 2009 Contents Introduction: Calculus can count 2 Formal power series 5 3 Rational power series 9 3. Rational power series

More information

To manipulate sequences, it is useful to be able to represent them algebraically as a power series known as a generating function.

To manipulate sequences, it is useful to be able to represent them algebraically as a power series known as a generating function. Sequences In this chapter, we are concerned with infinite sequences of either integers or, more generally, real numbers. Although it is no longer one of the main phyla of questions in the IMO (combinatorics,

More information

Advanced Counting Techniques. 7.1 Recurrence Relations

Advanced Counting Techniques. 7.1 Recurrence Relations Chapter 7 Advanced Counting Techniques 71 Recurrence Relations We have seen that a recursive definition of a sequence specifies one or more initial terms and a rule for determining subsequent terms from

More information

FIFTH ROOTS OF FIBONACCI FRACTIONS. Christopher P. French Grinnell College, Grinnell, IA (Submitted June 2004-Final Revision September 2004)

FIFTH ROOTS OF FIBONACCI FRACTIONS. Christopher P. French Grinnell College, Grinnell, IA (Submitted June 2004-Final Revision September 2004) Christopher P. French Grinnell College, Grinnell, IA 0112 (Submitted June 2004-Final Revision September 2004) ABSTRACT We prove that when n is odd, the continued fraction expansion of Fn+ begins with a

More information

Solving Recurrence Relations 1. Guess and Math Induction Example: Find the solution for a n = 2a n 1 + 1, a 0 = 0 We can try finding each a n : a 0 =

Solving Recurrence Relations 1. Guess and Math Induction Example: Find the solution for a n = 2a n 1 + 1, a 0 = 0 We can try finding each a n : a 0 = Solving Recurrence Relations 1. Guess and Math Induction Example: Find the solution for a n = 2a n 1 + 1, a 0 = 0 We can try finding each a n : a 0 = 0 a 1 = 2 0 + 1 = 1 a 2 = 2 1 + 1 = 3 a 3 = 2 3 + 1

More information

COMP 555 Bioalgorithms. Fall Lecture 3: Algorithms and Complexity

COMP 555 Bioalgorithms. Fall Lecture 3: Algorithms and Complexity COMP 555 Bioalgorithms Fall 2014 Lecture 3: Algorithms and Complexity Study Chapter 2.1-2.8 Topics Algorithms Correctness Complexity Some algorithm design strategies Exhaustive Greedy Recursion Asymptotic

More information

Induction and Recursion

Induction and Recursion . All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Induction and Recursion

More information

6.042/18.062J Mathematics for Computer Science March 17, 2005 Srini Devadas and Eric Lehman. Recurrences

6.042/18.062J Mathematics for Computer Science March 17, 2005 Srini Devadas and Eric Lehman. Recurrences 6.04/8.06J Mathematics for Computer Science March 7, 00 Srini Devadas and Eric Lehman Lecture Notes Recurrences Recursion breaking an object down into smaller objects of the same type is a major theme

More information

Ma/CS 6a Class 24: More Generating Functions

Ma/CS 6a Class 24: More Generating Functions Ma/CS 6a Class 24: More Generating Functions Road signs from http://www.math.ucla.edu/~pak/ By Adam Sheffer Reminder: Generating Functions Given an infinite sequence of numbers a 0, a 1, a 2, the generating

More information

Mathematical Background. Unsigned binary numbers. Powers of 2. Logs and exponents. Mathematical Background. Today, we will review:

Mathematical Background. Unsigned binary numbers. Powers of 2. Logs and exponents. Mathematical Background. Today, we will review: Mathematical Background Mathematical Background CSE 373 Data Structures Today, we will review: Logs and eponents Series Recursion Motivation for Algorithm Analysis 5 January 007 CSE 373 - Math Background

More information

Administrivia. COMP9020 Lecture 7 Session 2, 2017 Induction and Recursion. Lecture 6 recap. Lecture 6 recap

Administrivia. COMP9020 Lecture 7 Session 2, 2017 Induction and Recursion. Lecture 6 recap. Lecture 6 recap Administrivia COMP9020 Lecture 7 Session 2, 2017 Induction and Recursion Guidelines for good mathematical writing Assignment 1 Solutions now available; marks available soon Assignment 2 available on Saturday,

More information

The Negs and Regs of Continued Fractions

The Negs and Regs of Continued Fractions The Negs and Regs of Continued Fractions Alex Eustis Arthur T. Benjamin, Advisor Sanjai Gupta, Reader May, 2006 Department of Mathematics Copyright 2006 Alex Eustis. The author grants Harvey Mudd College

More information

Finding the Median. 1 The problem of finding the median. 2 A good strategy? lecture notes September 2, Lecturer: Michel Goemans

Finding the Median. 1 The problem of finding the median. 2 A good strategy? lecture notes September 2, Lecturer: Michel Goemans 18.310 lecture notes September 2, 2013 Finding the Median Lecturer: Michel Goemans 1 The problem of finding the median Suppose we have a list of n keys that are completely unsorted. If we want to find

More information

Chapter 2: Time Series Modelling. Chapter 3: Discrete Models. Notes. Notes. Intro to the Topic Time Series Discrete Models Growth and Decay

Chapter 2: Time Series Modelling. Chapter 3: Discrete Models. Notes. Notes. Intro to the Topic Time Series Discrete Models Growth and Decay Chapter 2: Modelling 6 / 71 Chapter 3: 7 / 71 Glossary of Terms Here are some of the types of symbols you will see in this section: Name Symbol Face Examples Vector Lower-case bold u, v, p Matrix Upper-case

More information

#A91 INTEGERS 18 (2018) A GENERALIZED BINET FORMULA THAT COUNTS THE TILINGS OF A (2 N)-BOARD

#A91 INTEGERS 18 (2018) A GENERALIZED BINET FORMULA THAT COUNTS THE TILINGS OF A (2 N)-BOARD #A91 INTEGERS 18 (2018) A GENERALIZED BINET FORMULA THAT COUNTS THE TILINGS OF A (2 N)-BOARD Reza Kahkeshani 1 Department of Pure Mathematics, Faculty of Mathematical Sciences, University of Kashan, Kashan,

More information

CONTENTS NUMBER SYSTEMS. Number Systems

CONTENTS NUMBER SYSTEMS. Number Systems NUMBER SYSTEMS CONTENTS Introduction Classification of Numbers Natural Numbers Whole Numbers Integers Rational Numbers Decimal expansion of rational numbers Terminating decimal Terminating and recurring

More information

Infinite Continued Fractions

Infinite Continued Fractions Infinite Continued Fractions 8-5-200 The value of an infinite continued fraction [a 0 ; a, a 2, ] is lim c k, where c k is the k-th convergent k If [a 0 ; a, a 2, ] is an infinite continued fraction with

More information

3.1 Induction: An informal introduction

3.1 Induction: An informal introduction Chapter 3 Induction and Recursion 3.1 Induction: An informal introduction This section is intended as a somewhat informal introduction to The Principle of Mathematical Induction (PMI): a theorem that establishes

More information

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8 Lecture 7 Feb 4, 14 Sections 1.7 and 1.8 Some problems from Sec 1.8 Section Summary Proof by Cases Existence Proofs Constructive Nonconstructive Disproof by Counterexample Nonexistence Proofs Uniqueness

More information

Advanced Counting Techniques

Advanced Counting Techniques . All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Advanced Counting

More information

Some applications of Number Theory. Number Theory in Science and Communication

Some applications of Number Theory. Number Theory in Science and Communication December 13, 2005 Nehru Science Center, Mumbai Mathematics in the real life: The Fibonacci Sequence and the Golden Number Michel Waldschmidt Université P. et M. Curie (Paris VI) Alliance Française http://www.math.jussieu.fr/~miw/

More information

Math Circle: Recursion and Induction

Math Circle: Recursion and Induction Math Circle: Recursion and Induction Prof. Wickerhauser 1 Recursion What can we compute, using only simple formulas and rules that everyone can understand? 1. Let us use N to denote the set of counting

More information

CSE 311: Foundations of Computing. Lecture 26: Cardinality

CSE 311: Foundations of Computing. Lecture 26: Cardinality CSE 311: Foundations of Computing Lecture 26: Cardinality Cardinality and Computability Computers as we know them grew out of a desire to avoid bugs in mathematical reasoning A brief history of reasoning

More information

Sequences of Real Numbers

Sequences of Real Numbers Chapter 8 Sequences of Real Numbers In this chapter, we assume the existence of the ordered field of real numbers, though we do not yet discuss or use the completeness of the real numbers. In the next

More information

Chapter 2: Discrete Models

Chapter 2: Discrete Models Mathematical Modelling Computational Science Data Analytics Examples of Deep Analytics Chapter 2: 30/226 Glossary of Terms Here are some of the types of symbols you will see in the Module: Name Symbol

More information

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms

Chapter Summary. Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 1 Chapter Summary Mathematical Induction Strong Induction Well-Ordering Recursive Definitions Structural Induction Recursive Algorithms 2 Section 5.1 3 Section Summary Mathematical Induction Examples of

More information

Egyptian Fraction. Massoud Malek

Egyptian Fraction. Massoud Malek Egyptian Fraction Massoud Malek Throughout history, different civilizations have had different ways of representing numbers. Some of these systems seem strange or complicated from our perspective. The

More information