This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 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! Ill 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 dont 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...
View Full Document
This note was uploaded on 02/02/2012 for the course CSE 21 taught by Professor Graham during the Fall '07 term at UCSD.
- Fall '07