



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Advanced Counting, Recurrence Relations, Terms of Sequence, Initial Conditions, Unique Recursive Definition, Modelling, Tower of Hanoi, Hanoi Puzzle, Sums of Geometric Series, Bit-Strings of Length
Typology: Slides
1 / 6
This page cannot be seen from the preview
Don't miss anything!
Definition: An equation that expresses the element an of the sequence {an} in terms of one or more previous terms of the sequence a0,...,an-1. A sequence is a solution of the recurrence relation if its terms satisfy the recurrence relation. Example: Consider the recurrence relation an = 2a(n-1) –a(n-2), n in N Consider the sequence: an=3n. Is it a solution? 2x3x(n-1)-3x(n-2) =3n YES! (a0 = 0, a1 = 3, a2 = 6,...) Consider the sequence an=5. Is it a solution? 2x5 – 5 = 5 YES! (a0 = 5, a1 = 5, ...) we see that to sequences can be a solution of the same recurrence relation since the initial conditions are also very important. The initial conditions plus the recurrence relation provide a unique recursive definition of a sequence. Docsity.com
How many moves does it take to solve the Hanoi puzzle? Let Hn be the number of moves to solve a problem with n disks. -We first move the top n-1 disks to peg 2 in H(n-1) moves. -We then move the largest disk to peg 3 in 1 move. -We then move the n-1 disks on top of the largest disk in another H(n-1) moves: Total: Hn = 2xH(n-1)+ -Basis Step: 1 disk = 1 move: H(1)=1. -Hn = 2(2H(n-2)+1)+1 = 2^2H(n-2)+2^1 + 1 .... =2^(n-1)H1 + 2^(n-2) + 2^(n-3)+...+2+ =2^n-1 (by sums of geometric series 3.1).
How many bit-strings of length n with no consecutive 0’2? an is number of bit-strings with no 2 consecutive 0’s in it. How can we generate a bit-string of length n from bit-strings of length n-1? Valid bit-strings fall into 2 classes, ones that end with a “0” and ones that end with a “1”. Ones that end in a “1” could be generated by adding a one to a valid bit-string of any kind: a(n-1) ways. Ones that end with a “0” came about by appending a smaller bit-string of length n-1 that ended with a “1” (otherwise 2 zeros appear), which must have come about in turn by appending a “1” to any valid bit-string of length n-2: a(n-2) ways. Total: an = a(n-1) + a(n-2) n>2. a1 = 2, a2 = 3. Recognize it? 2,3,5,8,13.....?