Undergraduate Seminar in Discrete Mathematics — 18.304 Prof. Olivier Bernardi QUIZ 1

advertisement
Undergraduate Seminar in Discrete Mathematics — 18.304
Prof. Olivier Bernardi
March 7, 2011
QUIZ 1
NAME: .....................................................
Question 1 (Alex’s talk).
a) Draw all the spanning trees of the following graph G.
b) Deduce the value of TG (1, 1) (the Tutte polynomial of G evaluated at x = y = 1).
Question 2 (Samantha’s talk).
a) What are the quadratic residues in Z7 ?
q
p
b) Let p, q be odd primes such that
= −1 and p = 1 (mod 4). What is the value of
?
p
q
2
Question 3 (Nan’s talk).
a) Draw the 5 binary trees with 3 nodes (the nodes are the vertices with two children).
b) How many binary trees are there with 5 nodes?
Question 4 (Drew’s talk).
a) What is the definition of R(k, l)?
b) Give a coloring of the complete graph K5 below showing that R(3, 3) > 5.
3
Question 5 (Adriana’s talk).
Consider the following schemes for the alphabet A = {a, b, c, d} where the letters have respective
probability P (a) = 1/10, P (b) = 2/10 P (c) = 3/10 P (d) = 4/10:
Scheme 1: a → 011, b → 010, c → 00, d → 1.
Scheme 2: a → 00, b → 01, c → 10, d → 11.
Which one is more efficient (that is, gives the most compact codes on average)? Scheme 1 or
scheme 2?
Question 6 (Karen’s talk).
a) Let an be the number of ways of filling a bag with n apples and oranges, where the number
of oranges is even. For instance a2 = 2. Find a closed form (no summations) of the generating
X
function A(x) =
an xn .
n≥0
b) Let bn be the number of ways of filling two bags with a total of n apples and oranges, where the
number of oranges is even in each bag. For instance, b2 = 5. Find a closed form (no summations)
X
of the generating function B(x) =
bn xn .
n≥0
4
Question 7 (William’s talk).
a) Let L be an infinite lattice with an marked vertex v. What is the definition of the percolation
probability Pc (L) of the lattice L?
b) Suppose that the lattice L′ is obtained from L by adding some edges. Which inequality is true:
Pc (L) ≤ Pc (L′ ) or Pc (L) ≥ Pc (L′ )? Why?
Question 8 (Yifan’s talk).
Suppose you have 3 males, Liam, Mark, and Ned, and 3 females, Lindsey, Mandy and Nora, with
the following preferences:
Liam: Mandy > Lindsey > Nora
Mark: Lindsey > Mandy > Nora
Ned: Lindsey > Nora > Mandy
Lindsey: Ned > Liam > Mark
Mandy: Mark > Ned > Liam
Nora: Mark > Ned > Liam
What will be the pairing under the Gale-Shapley algorithm if the men are the proposers. What
if the women are the proposers?
5
Question 9 (Andrew’s talk).
Suppose that you are playing a combinatorial game with 2 piles containing a1 and a2 coins respectively. Each player, on his or her turn, can either remove one coin from one pile or one coin from
both piles. The winner is the person to remove the last coin.
a) What is the set W of winning positions for this game? Explain briefly why your answer is
correct.
Hint: consider the set of positions A = {(a1 , a2 ) such that a1 and a2 are both even}.
b) Do you want to go first or second from the position (20, 11)? What will be your first move when
it is your turn?
Question 10 (Michael’s talk).
a) What is the worst-case time complexity of the merge-sort algorithm for sorting a list of size n?
(give your answer in the form O(f (n))).
b) Is there an algorithm with a better worst-case time complexity? Explain briefly.
6
Question 11 (Robert’s talk).
We consider the following weighted graph. We want to compute the distance δv from the vertex v for
the other vertices a, b, c, d, e, f (for instance δv (c) = 3). Complete the following array representing
10
a
1
b
2
v
c
5
3
3
7
d
3
1
4
9
9
e
f
the value of δv at different steps of the Dijkstra algorithm.
δv (v) δv (a) δv (b) δv (c) δv (d) δv (e) δv (f )
Initialization 0
∞
∞
∞
∞
∞
∞
Step 1
0
1
∞
5
∞
9
∞
Step 2
0
1
11
3
∞
9
∞
Step 3
Step 4
Step 5
Step 6
Question 12 (Haitao’s talk).
a) How many 4-tuples (x, y, z, w) of positive integers are there such that x + y + z + w = 9?
b) How many 4-tuples (x, y, z, w) of nonnegative integers are there such that x + y + z + w = 5?
Download