{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

practice midterm 2 soln

# practice midterm 2 soln - CME305 Sample Midterm II 1...

This preview shows pages 1–2. Sign up to view the full content.

CME305 Sample Midterm II 1. Matchings and Vertex Covers (a) Define what a matching in G is. (b) Define what a vertex cover of G is. (c) Let M be a maximum matching and C a minimum vertex cover. Show that | M | ≤ | C | ≤ 2 | M | . Solution: 1. A matching M is a subset of E such that no two edges share an end- point. 2. A vertex cover C is a subset of V such that all edges are incident to at least one element of C . 3. Let M be a maximum matching and C a minimum vertex cover. It is easy to see that we need at least | M | nodes to cover all the edges of M . Hence | M | ≤ | C | . Now let us prove that V ( M ), the vertices in the matching M , is a vertex cover. Assume it isn’t, then there is at least one edge e that is not covered by V ( M ). It is easy to see that this implies that M ∪ { e } is a matching so M is not maximum. Contradiction. Furthermore, we know that | V ( M ) | = 2 | M | , hence | C | ≤ 2 | M | . 2. Traveling Salesman Problem Assume that deciding whether a graph has a Hamiltonian cycle is NP- Complete. Prove that the Traveling Salesman Problem is NP-Hard.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

practice midterm 2 soln - CME305 Sample Midterm II 1...

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

View Full Document
Ask a homework question - tutors are online