MC 0 GRAPH THEORY 0// Solutions to HW # 0 points + XC points ) [CH] p.,..7. This problem introduces an important class of graphs called the hypercubes or k-cubes, Q, Q, Q, etc. I suggest that before you attempt to answer the questions that you familiarize yourself with the k-cubes by writing down the vertices of Q,..., Q, and make sure you understand the conditions for two vertices to be adjacent. Of course the problem asks about Q k for general k. Note that part (a) asks three questions. Be sure to answer each question separately. Hint for the second proof in part (a): You may find the Degree-Sum Theorem useful here. Note for the third proof in part (a): So far we have two ways to prove a graph is bipartite. You can either describe a way to partition the vertex set and show that it gives a bipartite graph or you can show that the graph has no odd cycles. Note for part (b): They are asking here for a drawing of the graph with the vertices in two horizontal rows, one row for each of the two bipartite sets, and with edges going from one row to the other. Be sure that you clearly label the vertices in your drawing. SOLUTION TO #: (7 pts: a-; a-; a-; b-) a). has k vertices: Each vertex is a -tuple of 0s and s. Since there are two possible values for each of possible positions in the -tuple, there are... = possible -tuples, i.e., vertices.. has edges: Each vertex has degree, since each of its neighbors is produced by changing one of the positions from 0 to or vice versa. By the Degree-Sum Theorem, =, and so =.. is bipartite: Here are two proofs, the first using the definition, and the second using the theorem that a graph is bipartite if and only if it has no odd cycles. o Proof. Let be the set of vertices of in which there are an even number of 0s, and let be the set of vertices in which there are an odd number of 0s. Clearly {, } is a partition of ( ), since every vertex has either an even or and odd number of 0s, but not both. Since adjacent vertices differ in exactly one position, their number of zeros differs by exactly ; hence one is in and the other is in. Therefore, by definition of bipartiteness, is bipartite. o Proof. Suppose = is a cycle of length. We show that is even. Each edge corresponds to flipping one coordinate of from 0 to or vice versa. As we travel along the cycle beginning and ending at, we can count how many times each coordinate is flipped, and that number must be even, since an even number of flips is needed to change the coordinate back to its original value. The length of the cycle is the sum of the number of flips at each coordinate
and, since each of these numbers is even, their sum is even too. Hence every cycle in has even length, and so by a previous theorem, is bipartite. b) The following drawing of uses the bipartition described in Proof above: the vertices in the top row have an even number of 0s, while the vertices in the bottom row have an odd number of 0s. Note that every vertex has degree. 0000 00 00 00 00 00 00 000 000 000 000 0 0 0 0 ) [CH], p., #... Hint: You must show that there is a walk between any two vertices u and v of. If G is not connected, then it has at least two components. Do your proof in two cases, depending on whether u and v are in different components of G or in the same component of G. SOLUTION TO #: (8 pts) Let be a graph that is not connected. Then has at least two components, and by definition each component is non-empty and connected. To show that is connected, we let and be two vertices of and consider two cases. o Case : and are in the same component of : Since is not connected, we can find a vertex that is in a different component of than the one containing and, so that there is no path in from to or from to. In particular, neither nor can be adjacent to in, since that would mean there is a path of length from or to. Therefore, both and are adjacent to in, so is a path of length in. o Case : and are in different components of : Then and cannot be adjacent in, since then there would be a path of length from to. Therefore and are adjacent in, which means that the edge is a path of length in. Thus we have shown not only that is connected, but that the distance between any two vertices is either or! ) [CH], p. 7, #... Note that this problem requires two proofs since it is an "if and only if" claim. SOLUTION TO #: ( pts) o Necessity (î): We assume that the connected graph is unicyclic and prove that =. So suppose is connected and has a unique cycle. Choose any edge = on, and delete the edge ; since was the unique cycle in, the new graph, \, is acyclic.
Furthermore the remaining section of is a path from to, so it can replace in any walk in the original graph from one vertex to another, forming a walk in \. Thus \ is both acyclic and connected. Therefore G\f is a tree, so by a theorem it has = edges. Therefore, which has one more edge than \, has = edges, proving necessity. o Sufficiency (í):assume is connected with = edges. Then cannot be a tree, by the theorem that says a tree has edges. So, since is connected, it must have a cycle. We must show that is unique, i.e., if and are both cycles in, then =. So suppose and are both cycles in, and let be any edge of. Then \ is still connected, and it has edges, so by a theorem \ is a tree. Thus, removing must have disconnected as well, so the edge is in both cycles. Since was arbitrary, this shows that every edge of is in ; by a symmetric argument every edge of is in, i.e., the two cycles have precisely the same set of edges, and therefore =. ) An important class of graphs that generalizes trees are the -trees, where is a positive integer. They are defined recursively as follows: The smallest -tree is the complete graph, the complete graph with = vertices. If G is a -tree with vertices, we obtain a -tree with + vertices from by choosing any subgraph of that is isomorphic to and adding a new vertex that is adjacent to every vertex of. Examples of k-trees: =: The smallest -tree is, which is just a single vertex; given a -tree G with n vertices, we create a new -tree by adding a new vertex v and making v adjacent to any (i.e., to any single vertex) in G. It's easy to see that -trees are just trees. =: The smallest -tree is, which is two adjacent vertices ; given a -tree G with n vertices, we create a new -tree by adding a new vertex v and making v adjacent to any (i.e., to pair of adjacent vertices) in G. An example of building a -tree with vertices is shown below. We start with a (the edge -), and then we repeatedly choose a from the current -tree (the red edge), and add a new (yellow) vertex adjacent to both vertices of that. In fact, all five graphs shown are -trees.
a) Draw another -tree with vertices that is not isomorphic to this one, and explain why they are not isomorphic. For this drawing and the next, show the steps of "growing" the k-tree as I did above (using colors as I did is OK, but not necessary). b) Now draw a -tree with 7 vertices. You start with a (a triangle), and you build it up by choosing any in the current graph and adding a new vertex adjacent to all of its vertices. c) We know (and will prove next week) that a -tree with n vertices has n- edges. Find (by looking at examples) a formula in terms of for the number of edges in a -tree with vertices; prove that your formula is correct for any -tree. d) (Extra credit #) Find a formula in terms of and for the number of edges in a -tree with vertices, and prove your formula is correct for all k and n. SOLUTION TO #: ( pts + XC pts: a-; b-; c-; d- XC) a) Below I show how to construct two more -trees with vertices; neither of the two is isomorphic to the one shown above, and neither is isomorphic to each other. This is easily seen to be true, since the degree sequences of all three are different; in particular, they all have different numbers of degree- vertices. b) Below I construct a -tree with 7 vertices. The red triangles are the 's to which each new yellow vertex is made adjacent. This is just one of several correct answers. 7 c) By looking at the examples of -trees shown above, it is clear that the smallest one, with vertices, has one edge, and for each additional vertex we add, we add two more edges. In other words, if a -tree has vertices, then it has +( )= edges. This
explanation is sufficient as a proof, or we can prove formally, by induction on, that a - tree with vertices has edges. The base case is clearly true, since the unique -tree on vertices has = () edge. For the inductive case, assume, and assume the claim is true for all -trees with vertices. We must show it is true for any k-tree with + vertices, so let G be a -tree with + vertices. Since +, it follows that G was constructed by adding a vertex to a -tree with vertices, and making it adjacent to the vertices of a in. Hence G has two more edges than does. By the inductive hypothesis, has edges, and so G has +=( +) edges, proving the inductive case. By the Principal of Mathematical Induction, we conclude that the claim is true for all. d) (Extra credit #) This is actually an easy generalization of the previous argument. For and, let G be a -tree. If =, then we have the smallest -tree, which is the complete graph. We know that this graph has ( )/ edges. For each additional vertex we add to construct a larger -tree, we add edges, to make adjacent to all the vertices of some within the previous graph. Hence, for, a -tree with vertices has ( ) + ( )= ( ) edges. We could also give a formal proof of this by induction, where is fixed, and the induction is on. Extra credit #: We denote the minimum value among all the vertex degrees of a graph G by d(g) (read delta of G ). So for example, for the complete bipartite graph =,,d( ) =. Let G be a simple graph, and let k = d(g). Prove that G has a path of length at least k (remember that this means a path with k edges and k+ vertices). SOLUTION TO EXTRA CREDIT #: ( XC pts) I give two proofs of this: one a direct proof, and the other a proof by contradiction (I thought it would be helpful for you to see both types of proof). (a) Direct proof: Let P be any path in G, P = v 0 -v -v - -v m. We show that P can be extended, if necessary, to a path P with length k or more. If m k, then we ve satisfied the claim, so suppose m < k, and consider the vertex v m. By assumption this vertex has at least k neighbors, so not all of them can be among the m vertices, v 0, v, v,, v m-, since m < k. By choosing a neighbor of v m that is not on P, and calling it v m+, we create a new path with length m +. If this path still has length less than k, we repeat the process, appending another new vertex to its last vertex. We are guaranteed to have such a new vertex to append to the last one, provided the path has length < k. So we have proved that any path can be extended to a new path of length at least k. Proof by contradiction: Suppose k = d(g), but G has no path of length k or more. Let P = v 0 -v -v - -v m be a path of longest possible length in G. By assumption, m < k. Since the path is as long as possible, the vertex v 0 must have all its neighbors on the path, among the vertices v,, v m. Hence deg(v 0 ) m < k, contradicting the assumption that d(g) = k.