- Answer the problems on the exam pages.
- There are six problems (most with multiple parts) for 120 total points plus 10 extra credit. Actual scale was A = 105, C = 67.5.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.
- Numerical answers may be given as expressions involving arithmetic operations (including exponentiation and factorial) or the functions P(n, k) and C(n, k). In general a summation is a complete answer to a counting problem, but a recurrence or a generating function is not.

Q1: 20 points Q2: 20+10 points Q3: 40 points Q4: 20 points Q5: 20 points Total: 120+10 points

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)}

**Question 1 (20):**Identify each of these statements as true or false. The first five deal with the graph H defined in Question 5. No explanation is needed or wanted, and there is no partial credit or penalty for guessing (2 points each).- (a) G is a planar graph and can be drawn in the plane with five regions (counting the exterior region).
- (b) The graph G has no Euler path, and it is not possible to add one edge to it to make an undirected graph with an Euler path.
- (c) There does not exist a spanning tree of G in which vertex c has degree 1.
- (d) Let A be the adjacency matrix of G, viewed as an
integer matrix. Then the matrix I + A + A
^{2}has at least one zero entry. - (e) The chromatic polynomial of G is divisible by the linear polynomial r - 4.
- (f) Let f(x) and g(x) be the exponential
generating functions for the sequences
{a
_{n}} and {b_{n}} respectively. Define the sequence {c_{n}} so that f(x)g(x) is the exponential generating function of {c_{n}}. Then for any r, c_{r}is the sum for k from 0 to r of C(r, k)a_{k}b_{r-k}. - (g) Every solution to the recurrence a
_{n}= 3a_{n-a}- 3a_{n-2}+ a_{n-3}is a polynomial in n. - (h) The rook polynomial of a 2 by 2 square is
1 + 4r + 2r
^{2}, and the number of permutations of {1, 2, 3, 4} that do not contain any of the pairs (2, 2), (2, 3), (3, 2), or (3, 3) is given by 1(0!) + 4(1!) + 2(2!) = 9. - (i) Every one-stalk game of Red-Blue Hackenbush has a value that is a "number" in Conway's terminology.
- (j) It is not the case that every one-stalk game of Red-Blue Hackenbush has a value that is a real number.

**Question 2 (20):**In this question we will determine the number of ways to color each vertex of G (the undirected graph defined above) black or white, where two colorings are considered tot be the same if there is an automorphism of G taking one to another. (Recall that an**automorphism**is a bijection of the vertices that takes edges to edges and non-edges to non-edges.) Note also that we are considering all two-colorings here, not just "proper colorings" as in the definition of chromatic number of the chromatic polynomial.- (a, 5) How many ways are there to color each vertex black or
white if we
*do not*consider the automorshisms? (This is a very easy question.) - (b, 5) There are exacctly twelve automorphisms of G -- describe them and argue that there aren't any others.
- (c, 10) Determine the number of two-colorings of G up to
symmetry. One way to do this is to find and apply the
**cycle index polynomial**of the action of the automorphism group of G. (If you do this, keep in mind that if an automorphism fixes a vertex, it creates a cycle of size one.) It's also posible to determine the number of colorings by an*ad hoc*argument -- this is fine if your reasoning is clear. - (d, 10 XC) Determine the
**pattern inventory**of the colorings counted in part (c). This is a polynomial in b and w that tells how many of the colorings have each number of black and white vertices. This can be done easily from the cycle index polynomial, but there is also an*ad hoc*argument you could make if you explain it clearly. For full credit, your answer should be expressed as a sum of monomials.

- (a, 5) How many ways are there to color each vertex black or
white if we
**Question 3 (40):**This problem concerns the**chromatic polynomial**of an undirected graph, which is a polynomial in r that gives the number of**proper colorings**of the vertices of the graph using r colors. (A proper coloring is one where no edge connects two vertices of the same color.)- (a, 10) Determine the chromatic polynomial of G. You may use any method, but explain your reasoning. (The general algorithm given in Tucker may not be the fastest way to get the polynomial for this particular graph.) You may find the results of parts (c) and/or (d) useful.
- (b, 10)
We stated in lecture that the
**3-colorability**problem, of deciding whether a given undirected graph has a proper coloring with three colors, is**NP-complete**. Assuming this fact, prove that if there is a polynomial-time algorithm that takes an undirected graph as input and computes its chromatic polynomial, then P = NP. - (c, 10) Let t
_{n}(r) be the chromatic polynomial of a tree with n nodes and let k_{n}(r) be the chromatic polynomial of the complete graph K_{n}. Find and justify two recurrences (each with a base case for n = 1) that compute t_{n}in terms of t_{n-1}(r) and k_{r}in terms of k_{n-1}(r). Solve these recurrences to get closed forms for t_{n}(r) and k_{n}(r). (A*consequence*of the correct argument here is that all n-node trees have the same chromatic polynomial.) - (d, 10). In this part we will compute t
_{n}(r) in another way, using inclusion-exclusion. Consider an arbitrary n-node tree T. For each edge e of the tree, let C_{e}be the set of colorings that are*not*proper because the two endpoints of e have the same color. Determine the size of C_{e}and, for each k from 1 to the number of edges in T, determine the size of any intersection of any k of the C_{e}'s. (You should argue that all of the intersections for a given k have the same size.) Using inclusion-exclusion, determine the number of colorings of T that are proper,*i.e.*, that are*not*members of the union of the C_{e}'s. Argue that this number is the same polynomial that you computed in part (c).

**Question 4 (20):**In this problem we will yet again distribute r identical treats to three distinguished dogs, this time Cardie, Duncan, and Guinness. Our goal will be to find a generating function for the number s_{n}of distributions in which Cardie gets strictly more treats than Duncan, Cardie gets strictly more than Guinness, and each dog gets at least one treat.- (a, 5) Find the explicit values of s
_{7}and s_{8}, by any method. (Listing the solutions without justification is fine if you are correct.) - (b, 10) We also define t
_{r}to be the total number of distibutions of r treats to the three dogs, with only the condition that each dog gets at least one treat. We define u_{r}to be the number where each dog gets at least one treat, and Cardie and Duncan tie for the largest number of treats (possibly as part of a three-way tie), and v_{r}to be the number where all three dogs get the same (positive) number of treats. Determine generating functions for t_{r}, u_{r}, and v_{r}, each as ratios of polynomials. - (c, 5) Use Inclusion/Exclusion to express the
generating function for s
_{r}in terms of those for t_{r}, u_{r}, and v_{r}, and thus compute the generating function of s_{r}as a ratio of polynomials. You need not simplify. (Hint: Cardie gets strictly the most treats in exactly one-third of the distributions in which there is no tie for the most treats.)

- (a, 5) Find the explicit values of s
**Question 5 (20):**In this problem we have a two-player game played with a single chess king on an eight-by-eight chessboard. We will call the top left (northwest) square (0, 0), the top right (northeast) square (0, 7), the southwwst square (7, 0), and the southeast square (7, 7). The king starts on (7, 7) and the game ends when one player wins by moving it to (0, 0). On each turn a player may move the king one square north, west, or northwest. (A chess king could normally move one square in any of the eight directions, but we disallow this.)- (a, 10) Recall that the
**kernel**of such a game is the set of positions from which the second player wins under optimal play. (Thus (0, 0) is in the kernel, since if the game starts there the first player has no more and immediately loses.) Determine the kernel of this game and hence which player (first or second) wins from each possible starting position. - (b, 10) Recall that the
**Grundy number**of a position in such a game is the size of a one-pile Nim game that is**equal**(in Conway's terminology) to the game starting at that position. Find the Grundy number of (7, 7) in this game. (This will probably involve finding the Grundy numbers of most or all of the other positions.)

- (a, 10) Recall that the

Last modified 4 January 2019