18.314 Fall 2007 Problem Set 5. Due Tuesday, November 20. 1. Prove that in any tree T, any two longest paths cross each other. 2. Find the number of spanning trees for the following graph: o-------o / \ / \ / o---o \ / / \ \ o---o o---o \ \ / / \ o---o / \ / \ / o-------o 3. Find the probability p_n(d) that a random vertex in a random labeled tree on n vertices has degree d. In other words, p_n(d) equals the number of trees on [n] where, say, the vertex 1 has degree d divided by the number of all trees on [n]. For fixed d, find the limit p(d) of p_n(d) as n goes to the infinity. 4. Find an explicit formula for the number of trees on n labeled nodes with exactly 4 leaves. (Hint: Stirling numbers might help here.) 5. Let A be the adjacency matrix of a tree T on n nodes. Show that the characteristic polynomial of A equals det(A - tI) = (-1)^n (t^n - m_1 t^{n-2} + m_2 t^{n-4} - m_3 t^{n-6} + ...), where m_i equals the number of matchings in T with i edges. (A matching is a subgraph whose edges have no common vertices.) 6. Let S_1, S_2,...,S_k be some subsets in [n]. Let us say that a subset I = {i_1, i_2,...,i_r} in [n] is a system of distinct representatives (SDR) if all i_1,...,i_r are different from each other and there exist indices j_1,...,j_r (also different from each other) such that i_1 belongs to S_{j_1}, ..., i_r belongs to S_{j_r}. Let us associate the cost c(i) > 0 for each i = 1,...,n. We would like to find an SDR I = {i_1,...,i_r} such that the total cost c(i_1) + ...+ c(i_r) is as big as possible. Let us use the greedy algorithm to find I. First, pick i_1 such that {i_1} is an SDR with maximal c(i_1), then pick i_2 such that {i_1,i_2} is an SDR and c(i_2) is as big as possible, etc. Will this algorithm always produce an SDR with the maximal total cost? Prove that the greedy algorithm always works or find a counterexample. 7. Prove Abel's binomial theorem: n ___ \ / {n choose k} (x + n - k)^{n-k-1} (y+k)^k = x^{-1} (x+y+n)^n. /___ k=0 8. Let P be a Dyck path of length 2n. Let us put a permutation w of the numbers 1,...,n on the up steps in P so that the entries w_i increase along any sequence of consecutive up steps in P. We say that such Dyck path P and permutation w are compatible. Find the number of compatible pairs (P,w) of Dyck paths P and permutations w. For example, for n = 3, we have the following 16 compatible pairs: /\ / \ / \ compatible with 1<2<3. /\/\ / \ compatible with 1<2 3 , 2<3 1 , 1<3 2 /\ / \/\ compatible with 1<2 3 , 2<3 1 , 1<3 2 /\ /\/ \ compatible with 1 2<3 , 2 1<3 , 3 1<2 /\/\/\ compatible with all 6 permutations on 1,2,3. (Hint: Find a bijection between such pairs (P,w) and trees.) 9* (bonus problem). Let W_n be the graph with 2n vertices v_1,...,v_n,w_1,...,w_n and the edges (v_1,v_2),(v_2,v_3),...,(v_{n-1},v_n),(v_n,v_1) (w_1,w_2),(w_2,w_3),...,(w_{n-1},w_n),(w_n,w_1) (v_1,w_1),(v_2,w_2),...,(v_n,w_n). In other words, W_n consists of two n-cycles with corresponding vertices joined by edges. (The graph W_6 is exactly the graph from problem 2 above.) Find an explicit formula for the number of spanning trees in W_n. 10* (bonus problem). Find a bijective proof of the claim that the number of spanning trees in the complete bipartite graph K_{m,n} equals m^{n-1} n^{m-1}. 11* (bonus problem). Let T be an unlabeled tree on n nodes with a chosen root r. Let us say that a labeling of the nodes of T by the numbers 1,...,n is *increasing* if, for any path from the root r to another vertex v, the labels increase. Prove that the number of increasing labelings of T equals n! _____________ ___ | | | | h(v) where the product over all nodes v of T, and h(v) equals the number of descendants of v (including the vertex v itself), that is nodes w such that v belongs to the path from w to r. For example, for the graph * (* is the root) / \ o o / \ o o we have 5!/(5*1*3*1*1) = 8 increasing labelings: 1 1 1 1 1 1 1 1 / \ / \ / \ / \ / \ / \ / \ / \ 2 3 2 3 3 2 3 2 4 2 4 2 5 2 5 2 / \ / \ / \ / \ / \ / \ / \ / \ 4 5 5 4 4 5 5 4 3 5 l 3 3 4 4 3