Q1: 20 points Q2: 20+10 points Q3: 40 points Q4: 20 points Q5: 20 points Total: 120+10 points
Exam text is in black, solutions in blue.
The undirected graph G has node set {a, b, c, d, e, f| and the following set of nine edges:
{(a, b), (a, c), (b, c), (c, d), (c, e), (c, f), (d, e), (d, f), (e, f)}
TRUE. Since there are six nodes and nine edges, Euler's Formula gives E - V + 2 = five regions. We can draw the graph by having a-b-c and c-d-e as triangles sharing the vertex c, then putting f in the middle of the c-d-e triangle connected to each of its vertices, giving five regions.
TRUE. G has four vertices of odd degree and could only have an Euler path if it had zero or two. By adding an edge, we could change the parity of two of the vertices. But to give the graph an Euler path we would have to change two of the odd-degree vertices to even degree. This is impossible by adding an edge because all the possible edges among the odd-degree vertices already exist, and an undirected graph cannot have more than one edge with the same endpoints.
TRUE. In a spanning tree, c must have simple paths to both a and d, for example, and these paths must leave c on different edges.
FALSE. The entry of this matrix in the (i, j) position gives exactly the total number of paths of length 0, 1, or 2 from vertex i to vertex j. Since no two vertices of G are more than two edges apart, this is always true.
FALSE. If this were true, substituting r = 4 into the chromatic polynomial would give 0. But this would also give the number of proper four-colorings of G, which is clearly positive because some proper four-colorings exist.
TRUE. The xr term of f(x)g(x) is the sum for k from 0 to r of the xk term of f(x) times the xr-k term of g(x). By the definition of f(x) and g(x), this is the sum for k from 0 to n of (ak/k!) times (bn-k/(r-k)!). To get cr, we multiply this sum by r!, getting the sum for k from 0 to r of (r!/(k!(n-k)!)(akbr-k, as desired.
TRUE. The characteristic polynomial of this recurrence is (1-A)3, so that 1 is a root of muliplicity 3. By our general solution for linear recurrences, any solution is of the form (Xn2 + Yn + Z)1n, which is a polynomial in n.
FALSE. The rook polynomial is correct, but the correct formula for those permutations is 1(4!) - 4(3!) + 2(2!) = 4, not 9. Any such permutation maps {1, 4} into {2, 3} and vice versa, offering two binary choices and thus four total choices.
TRUE. Any move by Left or Right leads to another such game, which by by the inductive hypothesis has a number value. And every Left move leads to a game with smaller value than the game resulting from any Right move, as we could show by adding the two games and showing the result to be a win for Right. The base case of the induction is the empty stack, which is a zero game and by definition has a number value.
TRUE. Every finite stalk has a value that is a dyadic integer, but infinite stacks can have values that are infinite, or that differ from a dyadic integer by an infinitesimal.
There are two possible colors for each of the six vertices, so 26 = 64 total colorings.
Any automorphism must preserve the degrees of vertices. So vertex c,
the only one with degree 5, must be fixed. Vertices a and b,
with degree 2, may be either fixed or exchanged, and vertices d,
e, and f, with degree 3, must be permuted among themselves.
This means that the only candidates for automorphisms are the
twelve pairs (x, y) where x is a permutation of {a, b} and y is a
permutation of {d, e, f}. In fact all twelve of these are easily
seen to be automorphisms, since a and b have edges only to one
another and to c, and d, e, and f also each have edges exactly to
one another and to c.
First the cycle index polynomial: For each of the twelve permutations
we need to find the sizes of the orbits. The two permutations
of {a, b} contribute two one-cycles and one two-cycle
respectively, Since c is fixed, we always have a one-cycle from
it. Of the six permutations of {d, e, f}, one gives three
one-cycles, two give a three-cycle, and three give a two-cycle
and a one-cycle. This makes the overall cycle index polynomial
(1/12)(x16 +
4x2x14/sup> +
3x22x12 +
2x3x13 +
2x3x2x1). Note that as
the action of the group on the set is the direct product of three
actions on disjoint subsets, we could obtain this polynomial by
multiplying together the three polynomials for the individual actions.
We find the number of two-colorings up to symmetry by substituting
2 for each of the variables xi, getting
(1/12)(64 + 128 + 48 + 32 + 16) = 288/12 = 24.
The ad hoc method I had in mind was to note that any
coloring is characterized up to symmetry by the number of black
vertices among {a, b} (0, 1, or 2), among {c} (0 or 1), and among {d,
e, f} (0, 1, 2, or 3). And any combination of these numbers is
possible, for a total of 3 times 2 times 4 = 24 total colorings.
We can obtain this from the cycle index polynomial above by
substituting
bi + wi for each variable xi. Using
the
factorization of the polynomial from the direct product decomposition,
this becomes (b + w)(1/2)(b2 + w2 +
(b+w)2)
(1/6)((b+w)3 + 3(b+w)(b2 + w2) +
2(b3 + w3)) = (b+w)(b2 + bw +
w2)(b3 + b2w + bw2 +
w3) = b6 + 3b5w +
5b4w2 + 6b3w3 +
5b2w4 + 3bw5 + w6.
The ad hoc method looks at the 24 permutations found above
and notes that there are one each all-black and all-white, three
with one white (with the white vertex either among {a, b}, {c}, or
{d, e, f}), five with two whites (three with the two whites in
different sets, one with both a and b white, and one with two of
{d, e, f} white), six with three whites (distributed 2-1-0, 2-0-1,
1-1-1, 1-0-2, 0-1-2, or 0-0-3), five with four whites, and three
with five.
An ad hoc way to determine χ(G) is to color the vertices
one by one. If we choose one of r colors for a, there are r-1
remaining colors for b, then r-2 remaining for c. Then there
are r-1 for d (every color except c's), r-2 for e, and r-3 for
f, giving a total of r(r-1)2(r-2)2(r-3)
total
choices.
We could also reason that there are P(r, 3) ways to color a,
b, and c by themselves, and P(n, 4) ways to color c, d, e, and f
by themselves, using the result of part (c). Of these pairs of
colorings, exactly a 1/r fraction have the same color for c and
can thus be combined into a single proper coloring of all of G.
The polynomial P(n, 3)P(n, 4)/r is exactly that calculated
above.
To apply Tucker's method, we could look at the edge (a, b),
letting G' be the graph obtained by deleting it from G and G''
be the graph obtained by merging its endpoints. Then χ(G) =
χ(G') - χ(G''). Using the edge (a, c) simlarly, we find
that χ(G'') = rχ(K4/) - χ(K4)
and that χ(G') = rχ(G'') - χ(G''). Since
χ(K) = P(n, 4) by part (c), this gives us
that χ(G'') = (r-1)P(n, 4), χ(G') =
(r-1)2P(n, 4), and finally χ(G) = P(n,
r)((r-1)2 - (r-1)) = P(n, r)(r-1)(r-2), equalling the
other results above.
If we could compute the chromatic polynomial of a graph in
polynomial time, we could then substitute r = 3 into this polynomial
and compute the number of proper 3-colorings. This number is
positive if and only if the graph is 3-colorable. So we have
a polynomial time algorithm for 3-colorability, implying P =
NP, as long as the substitution and evaluation can be carried
out itself in polynomial time. To prove that it can actually
has some subtleties. In what form are we given the chromatic
polynomial by the hypothesized algorithm? It's reasonable to
say that it is as a sum of monomials. We know that the
degree of the polynomial is no greater than n, the number of
nodes in the graph. We can raise 3 to each power up to n,
certainly, and then get the result of the evaluation as a sum
of products, as long as the coefficients of the polynomial
have a polynomial number of bits. This has to be so if the
coefficients are the output of a pulynomial-time algorithm,
as we are assuming, but we could also prove by induction on n
that the chromatic polynomial of any n-vertex graph has
coefficients bounded by 2p(n) for some polynomial
p.
That said, I gave full credit if you explained how you would
determine 3-colorability given the chromatic polynomial. It was not
enough to just assert that you could, and it was certainly wrong to
make assumptions about how the hypothesized algorithm got its results.
Given any n-node tree, we can take one of its leaves (any tree has at least one leaf, in fact at least two), remove it, color the remaining tree in one of tn-1(r) ways, then color the leaf in one of r-1 ways. This proves that tn(r) = (r-1)tn-1(r), with base case t1(r) = r because a single node may have any of the r colors. This is a linear recurrence that solves to tn(r) = r(r-1)n-1. Given a graph Kn, my solution was to color one of the nodes with one of the r colors, then color the rest of the graph using r-1 colors, giving a recurrence of kn(r) = rkn-1(r-1). Most of you followed the reasoning for trees above: remove a node, color the remaining graph with kn-1(r) colors, then use one of the remaining r-n+1 colors for the removed node. This gives kn(r) = (r-n+1)kn-1(r). Either way we have a base case of k1(r) = r. We might perhaps worry about the case where r < n and there are no colorings at all, as the reasoning behind the inductive step does not hold in this case. But each recurrence solves to Kn(r) = P(r, n), and P(r, n) always evaluates to zero if r < n. Our standard methods for solving recurrences do not work when the coefficient of the linear recurrence varies with n, so we really should do the easy induction proof to solve this recurrence.
The number of colorings in Ce is rn-1, because
once we have colored the two endpoints of e with one color, we choose
a separate color for each of the other n-1 vertices. If we have a set
of k edges among the n vertices, we know that they form an undirected
graph with exactly n-k connected components. A coloring of the
vertices that is improper among all k edges must use a single color
for each connected component, so there are exactly rn-k
such colorings.
By inclusion-exclusion, the number of proper colorings is the
number of all colorings, rn, minus the size of each
Ce, plus the sum of the sizes of each intersection of
two Ce's, plus the sizes of three-way intersections, and
so forth. This is the sum for k from 0 to n-1 of
(-1)kC(n-1, k)rn-k, which by the Binomial
Theorem is exactly the r(r-1)n-1 calculated above.
With seven treats, Cardie can get at most five because Duncan and
Guinness need one each. 5-1-1 is the only way she can get
exactly five. If she gets four, we could have 4-1-2 or 4-2-1.
If she gets three, we must have 3-2-2 in order that Cardie gets
the most. And she cannot get fewer than 7/3 and have the
most. So we have a total of four possible distributions.
With eight treats, by similar reasoning, the possible
distributions are 6-1-1, 5-1-2. 5-2-1, 4-1-3, 4-2-2, and 4-3-1. If
Cardie gets only three, dividing the remaining five would cause one
of the other two dogs to tie or exceed Cardie's treats. There are
six total distributions meeting the conditions.
The generating function to give one or more treats to a single dog is
x/(1-x), or equivalently 1/(1-x) - 1, and so the generating
function for t is just the cube of this polynomial. Similarly,
the number of ways to give an equal positive number of treats
to each dog has a generating function of
x33), or equivalently
1/(1-x3) = 1.
If Cardie and Duncan tie for the most treats, then Guinness
gets some positive number g and the other two eachget some non-negative
number a in addition to g. The total number of treats awarded is then
g+a for Cardie and Duncan, and g for Guinness, or 3g + 2a in all. The
generating function for u is thus x3/(1-x3)
times
1/(1-x2).
There are three ways that a distribution could be counted by t
without having a single dog getting more treats than the other
two -- Cardie and Duncan could tie for the lead, Cardie and Guinness
could tie, or Duncan and Guinness could tie. Each of these scenarios
occurs in ur ways with r total treats.
To count the single-lead distibutions, we take tr,
subtract the three copies of ur, and then correct for
overcounting by inclusion-exclusion. But to do this is subtle and
hardly anyone got it right. We add back in for the three ways in
which two of the tied-lead conditions apply, and then
subtract for the one way in which all three apply. But two
of the conditions cannot apply without the third applying as well,
so each of these number of ways is just vr. Thus
from our tr - 3ur, we add in three copies of
vr and then take one away, for a total of tr
- 3ur + 2vr. This counts all the
distribution with no tie for the most treats, and sr is
exactly one-third of this.
I did a calculation which came out as (x4 +
x6)/(1-x)(1-x2)(1-x3), which
actually can be interpreted combinatorially. Let's call this
(x4 + x6)/d(x).
1/d(x) is the generating function for
the number of ways to give a treats to each dog, then b to Cardie
and Duncan, then c to Cardie, where a, b, and c are all
non-negative. If we give three to Cardie, two to Duncan, and one
to Guinness before doing this, we get the number of ways to give
Cardie strictly more than Duncan and Duncan strictly more than
Guinness, and the generating function for this is
x6/d(x).
We can interpret x4/d(x) as the number of ways to give two
to Cardie, one each to Duncan and Guinness, and then a, b, and c as
before.
So we have counted every distribution with C > D = G once and every
distibution with C > D > G twice. If we reinterpret one copy of
the latter as the number of ways to have C > G > D, we have
counted all the distributions where Cardie gets strictly more than
each of the others.
Clearly (0, 0) is in the kernel and (0, 1), (1, 0), and (1, 1) are not, because they have direct moves to (0, 0). We can then see that (0, 2), (2, 0), and (2, 2) have moves only to non-kernel positions and must be in the kernel. In this way we can see that the kernal positions are exactly (x, y) where both x and y are even. To prove this, we observe that no move from an even-even position goes to another even-even position, and that every other position has a move to an even-even position. Thus from (7, 7), the first player has a winning move to (6, 6) because this position is in the kernel.
We can compute the Grundy number of a position (x, y) once we know the numbers of every position we can move to from (x, y) -- it is the smallest natural number that one cannot move to from (x, y) . The 0 row at the top thus has Grundy numbers 0, 1, 0, 1, 0, 1, 0, 1. The 1 row has 1, 2, 3, 2, 3, 2, 3, 2, 3. The 2 row has 0, 3, 0, 1, 0, 1, 0, 1. The 3 row has 1, 2, 1, 2, 3, 2, 3, 2. The 4 row has 0, 3, 0, 3, 0, 1, 0, 1. The 5 row has 1, 2, 1, 2, 1, 2, 3, 2. The 6 row has 0, 3, 0, 3, 0, 3, 0, 3 and the 7 row has 1, 2, 1, 2, 1, 2, 1, 2. Thus the number of (7, 7) is 2.
Last modified 6 January 2019