Undergraduate Seminar in Discrete Mathematics — 18.304 QUIZ 1 — SOLUTIONS

advertisement
Undergraduate Seminar in Discrete Mathematics — 18.304
QUIZ 1 — SOLUTIONS
Question 1. a)
b) TG (1, 1) = 8 is the number of spanning trees.
Question 2.
a) The quadratic residues in Z5 are 1, 2, 4 (since 12 = 1, 22 = 4 32 = 2, 42 = 2,
52 = 4, 62 = 1).
b) By the law of quadratic reciprocity,
p
q = (−1).
p
q
q
p
= (−1)
p−1 q−1
2
2
. Moreover,
p−1 q−1
2
2
is even. Thus
Question 3. a)
b) This is the Catalan number Cat(5) =
1 10
6 5
= 42.
Question 4. a) R(k, l) is the least integer n such that the edges of the complete graph Kn cannot
be colored in blue and red such that the blue subgraph does not contain Kk and the red subgraph
does not contain Kl .
b) The following coloring does not contain a blue K3 nor a red K3 .
1
2
Question 5. Scheme 1 is more efficient: the average length of the code of a letter is 1.9 bit (since
1
10
×3+
2
10
×3+
3
10
×2+
Question 6. a) A(x) =
4
10
1
1−x
× 1.
1
× 1−x
2 (since
1
1−x
is the generating function for the apples and
1
1−x2
is the generating function for the oranges).
b) B(x) = A(x)2 by the product rule.
Question 7.
a) The percolation probability Pp (L) is the probability that the percolation with
edge-probability p has an infinite cluster containing the vertex v.
I actually screwed up the writing of the question because I wanted to ask about the percolation
threshold Pc (L) which is the minimum of the values p for which there is a positive probability
that the percolation with edge-probability p has an infinite cluster containing the vertex v. Consequently the answers taking Pc as either percolation probability or percolation threshold have been
considered correct.
b) Pc (L′ ) ≤ Pc (L). Indeed, for any p, if the percolation with edge-probability p has an infinite cluster containing v on the lattice L, then it also has an infinite cluster containing v on the lattice L′ .
Here again two answers are considered correct depending on what definition you took.
Question 8. One gets the same answer in both cases: (Liam, Nora), (Mark, Mandy) and (Ned,
Lindsey).
Question 9.
a) Let B be the complement of A. The set of winning position is W = B. Indeed
from a position in B, it is always possible to move to a position in A, while from a position in A
one either lose (if there is no more coin) or is forced to move to a position in B.
b) One wants to go first and move to (20, 10).
Question 10. a) Complexity O(n log(n)).
b) No, it is impossible to do better than O(n log(n)) in the worst case. Indeed, if an algorithm
always performs less than n log(n) comparisons, then it can distinguish between at most 2n log(n)
order of the input sequence. This is not enough since there are n! > 2n log(n) possible orders for the
3
input sequence.
Question 11.
δ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
0
1
11
3
10
6
∞
Step 4
0
1
11
3
9
6
15
Step 5
0
1
11
3
9
6
13
0
1
11
3
9
6
13
Step 6
Question 12. a) 83 = 56.
b) Same answer: 56. Indeed (x, y, z, w) is solution of (b) if and only if (x + 1, y + 1, z + 1, w + 1)
is solution of (a).
Download