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
CME 305: Discrete Mathematics and Algorithms Instructor: Professor Amin Saberi ([email protected]) HW#1 Solutions 1. Prove that at least one of G and G is connected. Here G is the complement of G i.e. a graph on the same vertex set such that two vertices in G are adjacent 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. Recall the definition of a bipartite graph. Let G ( V,E ) be a graph and ( A,B ) be a partition of V . We say that G is bipartite if all edges in E have one end-point in A and the other in B . More precisely, for all ( u,v ) E either u A,v B or u B,v A . (a) Prove that a graph is bipartite if and only if it doesn’t have an odd cycle. (b) A graph is called k -regular if all vertices have degree k . Prove that if a bipartite G is also k -regular with k 1 then | A | = | B | . Solution: (a) The following is for a connected bipartite graph. The extension is trivial after the statement holds for each connected component. ” Assume G is bipartite and pick a cycle v 1 ,v 2 ,...,v k ,v 1 with v 1 A . Then v i A for i odd and v i B for i even. An odd cycle has and odd number of vertices, thus k is odd and so v k A . But we have { v k ,v 1 } ∈ E which contradicts the fact that G is bipartite since both vertices are in A . Therefore a bipartite G has no odd cycles. ” Let G be a graph with no odd cycles. Define d ( u,v ) as the shortest distance between the two vertices. Pick an arbitrary vertex u V and define A = { u }∪{ w | d ( u,w ) is even } . Let B = V - A to create a partition ( A,B ). We can show by contradiction that G ( A,B,E ) is a bipartite graph. Assume there is an edge { w,v } with w,v A ( B ). Then by construction d ( u,w ) and d ( u,v ) are even (odd). Thus, edge { w,v } creates an odd cycle, a contradiction. The above uses the fact that the sum of two even (odd) numbers is always even. (b) The number of edges leaving A is computed as k | A | . The number of edges leaving B is computed as k | B | . For a bipartite graph both quantities have to be equal to the total number of edges. Thus | E | = k | A | = k | B | , implies | A | = | B | .
Background image of page 1

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

View Full DocumentRight Arrow Icon
3. The stable roommate problem is similar to the stable marriage problem, except pairings are made within a single pool rather than between two genders. As in stable marriage, a rogue pair is a pair ( a,b ) such that
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 06/17/2010.

Page1 / 7

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