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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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.

Page1 / 2

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online