Docsity

Midterm II Exam Solutions for MATH 61: Combinatorics and Graph Theory, Exams of Discrete Structures and Graph Theory

Toggle sidebar
bg1
Student name:
Student ID:
MATH 61 (Butler)
Midterm II, 12 November 2008
This test is closed book and closed notes, with the exception that you are allowed
one 81
2
00×1100 page of handwritten notes. No calculator is allowed for this test. For
full credit show all of your work (legibly!), unless otherwise specified. Each problem
is worth 10 points.
1. There is a huge bin filled with many balls of many different colors. What is the
smallest number nof balls you need to take from the bin so that among the nballs
you must have either seven balls of one color or seven balls with no two the same
color.
(Your answer needs two parts, first show that with nballs you must satisfy the
condition, second show that with n−1 balls you might not satisfy the condition.)
We can draw out 36 balls and not have what we need by drawing six balls in
each of six colors. So 36 balls cannot guarantee a solution.
If we draw out 37 balls then we group them by colors. If there are seven
or more colors then we must have seven balls no two of which are the same
color. If there are six or fewer then by the pigeon hole principle some color
grouping must have at least seven balls. Either way we have an acceptable
situation and so 37 is enough to guarantee a solution.
1
2
3
4
5
Σ
pf3
pf4
pf5

Partial preview of the text

Download Midterm II Exam Solutions for MATH 61: Combinatorics and Graph Theory and more Exams Discrete Structures and Graph Theory in PDF only on Docsity!

Student name: Student ID:

MATH 61 (Butler) Midterm II, 12 November 2008

This test is closed book and closed notes, with the exception that you are allowed one 812 ′′× 11 ′′^ page of handwritten notes. No calculator is allowed for this test. For full credit show all of your work (legibly!), unless otherwise specified. Each problem is worth 10 points.

  1. There is a huge bin filled with many balls of many different colors. What is the smallest number n of balls you need to take from the bin so that among the n balls you must have either seven balls of one color or seven balls with no two the same color. (Your answer needs two parts, first show that with n balls you must satisfy the condition, second show that with n − 1 balls you might not satisfy the condition.)

We can draw out 36 balls and not have what we need by drawing six balls in each of six colors. So 36 balls cannot guarantee a solution.

If we draw out 37 balls then we group them by colors. If there are seven or more colors then we must have seven balls no two of which are the same color. If there are six or fewer then by the pigeon hole principle some color grouping must have at least seven balls. Either way we have an acceptable situation and so 37 is enough to guarantee a solution.

  1. Consider a variation of the tower of Hanoi problem where we have three poles A, B and C and start with a stack of n different sized discs on pole A arranged going from the bottom to the top by largest to smallest. We again consider the problem of moving the discs from pole A to pole C. There are three rules:

(i) We can only move one disc at a time.

(ii) We can never put a larger disc over a smaller disc.

(iii) We can not move a disc directly from A to C or from C to A.

So for example, if n = 1 we now need two moves to transfer from pole A to pole C, first move from A to B and second move from B to C.

(a) Let Rn be the minimal number of moves needed to move all n discs from pole A to pole C. Set up a recurrence for Rn, explain your reasoning behind the recurrence.

Proceeding as in the tower of Hanoi problem we think about how to move a stack of n discs. We can break it into the following five steps:

  1. Move the top n − 1 discs from A to C (using Rn− 1 moves).
  2. Move the bottom disc from A to B (one move).
  3. Move the top n − 1 discs from C to A (using Rn− 1 moves).
  4. Move the bottom disc from B to C (one move).
  5. Move the top n − 1 discs from A to C (using Rn− 1 moves).

Adding it up we have

Rn = Rn− 1 + 1 + Rn− 1 + 1 + Rn− 1 = 3Rn− 1 + 2.

(b) Solve the recurrence in part (a).

This is a constant coefficient linear nonhomogeneous recurrence relation. Substituting Rn = an + B we get that

an+1 + B = 3(an + B) + 2 = 3ab + (3B + 2).

Choosing B = −1 this will reduce it to an+1 = 3an which has solutions of the form an = C 3 n. So we have that Rn = C 3 n^ − 1. Since R 1 = 2 = 3C − 1 we see that C = 1 and so Rn = 3n^ − 1.

  1. Solve the recurrence relation

an = 2

√ (an− 1 + an− 2 )(an− 1 − an− 2 ) for n ≥ 2 ,

with initial conditions a 0 = 1, a 1 = 2.

We first square both sides to get

a^2 n = 4(an− 1 + an− 2 )(an− 1 − an− 2 ) = 4a^2 n− 1 − 4 a^2 n− 2.

Substitute bn = a^2 n to turn this into the linear homogeneous recursion

bn = 4bn− 1 − 4 bn− 2.

This becomes r^2 − 4 r + 4 = 0 or (r − 2)^2 = 0 so that we have repeated roots 2 , 2. So we have that

a^2 n = bn = A 2 n^ + Bn 2 n^ or an =

A 2 n^ + Bn 2 n.

Initial conditions give us 1 =

A so that A = 1 and 2 =

2 + 2B so that B = 2. Thus our final solution is

an =

√ (n + 1)2n.

  1. A graph has an Eulerian cycle if there is a closed walk which uses each edge exactly once. A related problem is to find the shortest closed walk (i.e., using the fewest number of edges) which uses each edge at least once. (This is known as the “Chinese Postman” problem and comes up frequently in applications for optimal routing.) Consider the following graph on six vertices.

(a) Find a walk that starts and ends at vertex 1 of length 11 so that each edge in the graph is used at least once.

One such path is (1, 5 , 5 , 1 , 2 , 6 , 3 , 4 , 1 , 3 , 2 , 1).

(b) Explain why 11 is the smallest number of edges needed to find a walk that starts and ends at vertex 1 and uses each edge at least once.

There are 9 edges. So we only need to show that two of the edges must be used twice. Since we must go to 5 and return from 5 the edge connecting 1 and 5 must be used twice. Consider the vertex 2, this has degree 3 and so we must visit it more than once (a first visit can only use two of the three edges). After a second visit we will have used four edges incident to 2 but there are only three edges so one edge must be used twice.