MIT Python Assignments3
MIT Python Assignments3
Problem Set 2
Due: September 26
Problem 1. Use induction to prove that the following inequality holds for all integers
n ≥ 1.
1 · 3 · 5 · · · (2n + 1) 1
≥
2 · 4 · 6 · · · (2n + 2) 2n + 2
Problem 2. This term in 6.042, we’re constantly trying to divide a class of n students into
groups of either 4 or 5 students.
(a) Let’s try to use strong induction prove that a class with n ≥ 8 students can be divided
into groups of 4 or 5.
Proof. The proof is by strong induction. Let P (n) be the proposition that a recitation with
First, we prove that P (n) is true for n = 8, 9, or 10 by showing how to break classes of
8 = 4+4
9 = 4+5
10 = 5 + 5
Next, we must show that P (8), . . . , P (n) imply P (n + 1) for all n ≥ 10. Thus, we assume
that P (8), . . . , P (n) are all true and show how to divide up a class of n + 1 students into
groups of 4 or 5. We first form one group of 4 students. Then we can divide the remaining
n − 3 students into groups of 4 or 5 by the assumption P (n − 3). This proves P (n + 1), and
so the claim holds by induction.
Copyright © 2005, Prof. Albert R. Meyer and Prof. Ronitt Rubinfeld.
Problem Set 2 2
This proof contains a critical logical error. (In fact, the claim is false!) Identify the first
sentence in the proof that does not follow and explain what went wrong.
(b) Provide a correct strong induction proof that a class with n ≥ 12 students can be
divided into groups of 4 or 5.
Problem 3. The game of Mininim is defined as follows: Some positive number of sticks
are placed on the ground. Two players take turns removing one, two, or three sticks. The
player to remove the last one loses.
Use strong induction to show that:
The second player has a winning strategy if the number of sticks, equals 4k + 1 for some k ∈ N;
otherwise, the first player has a winning strategy.
Problem 4. Consider the following equivalent way of viewing the subset takeaway game
from the inclass problem on Friday, Week 2: for a fixed, finite set, A, let S initially be all
the proper subsets of A. Players alternately choose a set B ∈ S and remove B and all
sets that contain B from S; they then continue playing on the updated S. The player that
chooses the last set in S wins.
(a) Use the wellordering property to show that, in any game, one of the players must
have a winning strategy. Hint: Consider games whose initial set, S, is an arbitrary collec
tion of subsets of, A, not necessarily all the proper subsets of A. Reach a contradiction by
considering a minimum size game with no winning strategy for either player. What is a
useful measure of size of a game?
(b) If the whole set A is a possible move in a game, explain why the 1st player must have
a winning strategy.
Massachusetts Institute of Technology Solutions cover sheet
6.042J/18.062J, Fall ’05: Mathematics for Computer Science September 21
Prof. Albert R. Meyer and Prof. Ronitt Rubinfeld
Your name:
Submission date:
Collaboration statement: Circle one of the two choices and provide all pertinent info.
Problem Score
1
2
3
4
Total