18.314 Solutions To Practice Final Exam
18.314 Solutions To Practice Final Exam
+
.
=
1 (2 + 2)x 1 (2 2)x
F (x) =
Thus
(2 + 2)n = f (n) 1.
Now f (1) is even and f (n + 2) = 2(2f(n + 1) f (n)) for n 0,
so f (n) is even for n
1. Thus (2 + 2)n is odd for n 1. We
can also see that (2 + 2)0 = 1, which is also odd.
2. This is a situation for the exponential formula. Partition the set [n]
into blocks. On each block of odd size k place a cycle in (k 1)! ways.
In each of even size place a cycle and then color red or blue in 2(k 1)!
ways. By the exponential formula,
!
k
k
X
X
x
x
F (x) = exp
(k 1)! + 2
(k 1)!
k!
k!
k odd
! k even
X xk X x2k
= exp
+
k
2k
k1
k1
1
2
= exp log(1 x) log(1 x )
2
1
=
.
(1 x) 1 x2
3. (a) Each tiling is a sequence of the following primes: a 2 1 rectangle divided into two 1 1 squares, and a 2 k rectangle for k 1.
There are two primes of length one, and one prime of each length
k 2. Hence
F (x) =
x2
1 (2x +
1
=
x
1 x 1x
1x
=
.
1 3x + x2
1
+ x3 + x4 + )
Note, One can easily deduce from this generating function that
f (n) = F2n+1 (a Fibonacci number), but this was not part of the
problem.
(b) First consider those tilings that consist only of 2k rectangles, k
1. The sequence of lengths of these rectangles form a composition
of n. Thus the number a(n) of such tilings a(n) of a 2 n rectangle
is 2n1 (n 1), the number of compositions of n. Therefore
X
A(x) :=
a(n)xn
n1
2n1 xn
n1
x
.
1 2x
(2n1 )2 xn
n1
x
.
1 4x
empty at this first step), then those counted by b(n), then by a(n),
etc., some finite number of times. Therefore
G(x) = (1 + A(x))(B(x) + B(x)A(x) + B(x)A(x)B(x) + )
X
= (1 + A(x))
(B(x)A(x))j (1 + B(x))
j0
(1 + A(x))(1 + B(x))
=
.
1 A(x)B(x)
Substituting A(x) = x/(1 2x), B(x) = x/(1 4x), and simplifying gives
(1 x)(1 3x)
G(x) =
.
1 6x + 7x2
4. If a spanning tree T does not contain the identified edge e, then there
are m+ n2 choices, i.e., remove any of the m+ n2 remaining edges.
If T does contain e, then we can remove any of the remaining m 1
edges of the m-cycle and any of the n 1 remaining n 1 edges of the
n-cycle, so (m 1)(n 1) choices in all. Hence
(G) = m + n 2 + (m 1)(n 1) = mn 1.
A somewhat more direct argument is to remove any edge of the mcycle and any edge of the n-cycle in mn ways. This gives a spanning
tree except when we choose the identified edge e both times, so we get
mn 1 trees in all.
5. We know (Exercise 11.12 on page 266, done in class) that G has a
complete matching M. When we remove M from G we still have a
regular bipartite graph (of degree d 1 1), so we have another
matching M disjoint from M. The union of M and M is a disjoint
union of cycles [why?].
6. The chromatic polynomial of a 4-cycle C4 was computed in class and
is easy to do in several different ways. We get
C4 (n) = n4 4n3 + 6n2 3n.
For each of the other four vertices we have n2 choices of colors. Hence
G (n) = (n4 4n3 + 6n2 3n)(n 2)4 .
7. (a) If a planar eP
mbedding without isthmuses has fi faces with i sides,
then 2E = ifi . (See equation (12.2) on page 280.) Hence
2E = 3 + 4 + 5 + 6 + 7 + 8 = 33,
4
5
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.