Computer Science 340
Reasoning about Computation
Homework 1
Due at the beginning of class on Wed, September 26, 2007
Problem 1
Prove that if
x
≥ 
1, then for any integer
n
≥
0, (1 +
x
)
n
> nx
.
Solution:
We will strengthen the inductive hypothesis: we will prove that for any integer
n
≥
0,
(1+
x
)
n
≥
nx
+1. The problem statement follows directly. (Note: induction on the problem
statement directly does not work)
•
Base case:
n
= 0, then (1 +
x
)
n
= (1 +
x
)
0
= 1 = 0
x
+ 1 =
nx
+ 1 — OK
•
Inductive hypothesis:
Suppose for some integer
n
=
n
0
≥
0, (1 +
x
)
n
≥
nx
+ 1.
•
Inductive step:
Consider
n
=
n
0
+ 1. Using the inductive hypothesis
(1+
x
)
n
= (1+
x
)
n
0
(1+
x
)
≥
(
n
0
x
+1)(1+
x
) =
n
0
x
+
n
0
x
2
+1+
x
≥
(
n
0
+1)
x
+1 =
nx
+1
and we are done.
Problem 2
Show that at a party of
n
people, there are two people who have the same number of
friends in the party. (Friendship is symmetric)
Solution:
Bin the people at the party by the number of friends each person has. Each person can
be friends with between 0 and
n

1 people (inclusively). This is
n
bins and does not yet
solve the problem. However, since friendship is symmetric, if a person has 0 friends, there
is no person with
n

1 friends (who would be friends with everyone). So, there are at most
n

1 nonempty bins, with
n
people in them. By the pigeonhole principle, there is some
bin that contains at least two people, and the people in that bin have the same number of
friends in the party.
Problem 3
There are two children sitting on a (very long) bench. The child on the left is a boy, the
child on the right is a girl. Every minute, either two children arrive and sit down next to
each other on the bench (possibly squeezing between two children who are already sitting),
or two children who had been sitting next to each other get up off the bench and leave.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '07
 CharikarandChazelle
 lim, Natural logarithm, Logarithm

Click to edit the document details