hw1soln - CME 305: Discrete Mathematics and Algorithms...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CME 305: Discrete Mathematics and Algorithms Instructor: Professor Amin Saberi (saberi@stanford.edu) HW#1 Solutions 1. (Lovasz, Pelikan, and Vesztergombi 7.3.9) Prove that at least one of G and G is connected. Here, G is a graph on the vertices of G such that two vertices are adjacent in G if and only if they are not adjacent in G . Solution: Let G be a disconnected graph in which case we can decompose it into k connected components C 1 ,C 2 ,...,C k . We want to show that G is connected i.e. there is a path between any u and v in G . In the case that u and v are in different components we know that there exist an edge (a path of length one) between them in G . In the case that u and v are in the same component, say C i , we can construct a path of two edges between them in G as follows. Pick any vertex w from some other component C j for j 6 = i and note that edges { u,w } and { w,v } are in G . Thus u,w,v is a path in G and hence G is connected. 2. (Lovasz, Pelikan, and Vesztergombi 8.5.6) A double star is a tree that has exactly two nodes that are not leaves. How many unlabeled double stars are there on n nodes? Solution: We can represent each unlabeled double star by an unordered pair { a,b } where a is the number of leaves adjacent to one of the two non-leaf nodes and b is the number of leaves adjacent to the other. Therefore, to compute the number of double stars we need to find the number of sets { a,b } (note that { a,b } = { b,a } ) such that a,b > 0 and a + b + 2 = n . The first condition comes from the fact that the non-leaf nodes must be adjacent to at least one leaf and the second condition is simply the statement that, taken together, the leaves and the two non-leaf nodes make up the entire node set. First, assume n is even. Then a can take on values in A = { 1 , 2 ,..., ( n- 2) / 2 } . A smaller value contradicts a > 0 and a larger one implies that b n/ 2- 2 so b A and we have counted { a,b } twice. Now, assume n is odd. Then a can take on values A = { 1 , 2 ,..., ( n- 3) / 2 } . A smaller value again contradicts a > 0 and a larger one implies b ( n- 3) / 2 so again b A resulting in double counting. Thus the number of unlabeled double stars is given by ( n- 2) / 2 whenever n is even and ( n- 3) / 2 whenever n is odd. 3. (Lovasz, Pelikan, and Vesztergombi 8.5.10) If C is a cycle, and e is an edge connecting two nonadjacent nodes of C , then we call e a chord of C . Prove that if every node of a graph G has degree at least 3, then G contains a cycle with a chord. Solution: Suppose u u 1 ...u k is the longest path in G ( V,E ). Since d ( u ) 3, there exist two neighbors w,v of u not equal to u 1 . Since u u 1 ...u k is the longest path, we must have that w,v { u 2 ,u 3 ,...,u k } . Suppose w = u i ,v = u j with i j . Then u u 1 ...u j u is a circle with chord u u i . 4. (Kleinberg and Tardos 4.33) Suppose you are given a directed graph G = ( V,E ) in which each edge has a cost of either 0 or 1. Also suppose thatin which each edge has a cost of either 0 or 1....
View Full Document

Page1 / 5

hw1soln - CME 305: Discrete Mathematics and Algorithms...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online