HW4 - CSE21 FA11 Homework#4 4.1 Prove by induction that n...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE21 FA11 Homework #4 (10/17/11) 4.1. Prove by induction that n k =1 k 3 = ( n k =1 k ) 2 . (Hint: First get an explicit form form the second sum. Then use induction.) 4.2. ( Note: This problem is fairly tough! I’ll be impressed by anyone who can get this one!). You have the standard Tower of Hanoi situation (3 pegs and n discs of sizes 1 , 2 , 3 , . . . , n ). As usual, you can move one disc at a time from one peg to another one provided you don’t place a larger disc on top of a smaller one. In this variation, the pegs are labeled A , B and C . and you are restricted in how you can transfer the discs. Namely, you can only move discs from A to B , B to C , or C to A (so that you cannot move a disc from B to A , for example). Let D ( n ) denote the minimum number of moves needed to move a stack of n discs from A to B . For example, D (1) = 1 and D (2) = 5. Find a recurrence for D ( n ) and then solve the recurrence to get an explicit expression for D ( n ). What is the value of D (6)? 4.3. Find explicit solutions to the recurrences: (a) f ( n + 2) = 6 f ( n + 1) - 8 f ( n ) , n 0, with f (0) = 0 , f (1) = 1; (b) g ( n + 2) = 6 g ( n + 1) - 9 g ( n ) , n 0, with g (0) = 0 , g (1) = 1. 4.4 How many sequences of 0’s, 1’s and 2’s of length n are there which don’t have the string 00 in them? For example, for
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern