sol4 - CS 70 Discrete Mathematics and Probability Theory...

Info iconThis preview shows pages 1–3. 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: CS 70 Discrete Mathematics and Probability Theory Fall 2010 Tse/Wagner Soln 4 1. (10 pts.) Recurrence relations Let f ( n ) be defined by the recurrence relation f ( n ) = 7 f ( n- 1 )- 10 f ( n- 2 ) (for all n ≥ 2) and f ( ) = 1, f ( 1 ) = 2. Prove that f ( n ) = 2 n for every n ∈ N . Answer: Proof : The proof is by strong induction over n . Let P ( k ) be the proposition that f ( k ) = 2 k . Base cases: If k = 0, then f ( ) = 1 = 2 . If k = 1, then f ( 1 ) = 2 = 2 1 . Thus the base cases P ( ) and P ( 1 ) are correct. Inductive hypothesis: Assume that for some k ∈ N satisfying k ≥ 1, P ( ) ∧ P ( 1 ) ∧···∧ P ( k ) is true, i.e., f ( j ) = 2 j for j = , 1 , 2 ,..., k . Inductive step: By the problem statement, we know that f ( k + 1 ) = 7 f ( k )- 10 f ( k- 1 ) . Since k ≤ k and k- 1 ≤ k , and both k and k- 1 are positive, the inductive hypothesis tells us that f ( k + 1 ) = 7 · ( 2 k )- 10 · ( 2 k- 1 ) = 7 · ( 2 k )- 5 · ( 2 k ) = ( 7- 5 ) · ( 2 k ) = 2 k + 1 . Thus, ( ∀ k ∈ N ) (( P ( ) ∧ P ( 1 ) ∧···∧ P ( k )) ⇒ P ( k + 1 )) , and we are done. 2 2. (20 pts.) Marbles In a game that’s about to sweep the nation, there is a bucket that contains some number of gold-colored marbles, silver-colored marbles, and bronze-colored marbles. When it is a player’s turn, the player may either: (i) remove one gold marble from the bucket, and add up to 3 silver marbles into the bucket; (ii) remove two silver marbles from the bucket, and add up to 7 bronze marbles into the bucket; or, (iii) remove a bronze marble from the bucket. These are the only legal moves. The last player that can make a legal move wins. Prove by induction that, if the bucket initially contains a finite number of marbles at the start of the game, then the game will end after a finite number of moves. Answer 1: An easy way to prove this is to think of the marbles as having values. For example, say that a gold marble is worth 100 dollars, a silver marble is worth 10 dollars, and a bronze marble is worth 1 dollar. This implicitly assigns a value to every possible bucket of marbles. Moreover, with this choice of values, every legal move will decrease the value by at least 1 dollar. Since the bucket can never have a negative value (and it starts with a finite value), the game cannot go forever. This intuition is formalized in the following proof. Lemma 1 : Let v be the value of the initial configuration and v n be the value of the configuration after n moves where n is a natural number. Then v n ≤ v- n. CS 70, Fall 2010, Soln 4 1 Proof : Proof by simple induction over n , the number of moves. Let P ( k ) be the proposition that the value after k moves is at most v- k ....
View Full Document

This note was uploaded on 12/08/2010 for the course CS 70 taught by Professor Papadimitrou during the Fall '08 term at Berkeley.

Page1 / 9

sol4 - CS 70 Discrete Mathematics and Probability Theory...

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

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