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
(
0
) =
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
(
0
) =
1
=
2
0
. If
k
=
1, then
f
(
1
) =
2
=
2
1
. Thus the base cases
P
(
0
)
and
P
(
1
)
are correct.
Inductive hypothesis:
Assume that for some
k
∈
N
satisfying
k
≥
1,
P
(
0
)
∧
P
(
1
)
∧ ··· ∧
P
(
k
)
is true, i.e.,
f
(
j
) =
2
j
for
j
=
0
,
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
(
0
)
∧
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 goldcolored
marbles, silvercolored marbles, and bronzecolored 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
0
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
0

n.
CS 70, Fall 2010, Soln 4
1