# t11ans - CS3230 Tutorial 11 1 Show that the question of...

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

CS3230 Tutorial 11 1. Show that the question of determining whether a graph G = ( V, E ) has a simple cycle of size at least k is NP-complete. Ans: (a) Certificate would be a cycle of size at least k . Verifier just checks whether the cycle is indeed simple (that is, it does not repeat a vertex), and all the edges in the cycle are indeed in the graph. This clearly can be done in polynomial time. (b) Hamiltonian circuit problem can be reduced to the above problem by using the same graph and taking k = n (the number of nodes in the graph). 2. Consider the following problem called vertex cover. Input: An undirected graph G = ( V, E ), and a number k . Question: Does there exists a vertex cover of size k ? That is, does there exist V V , | V | ≤ k such that, for each edge ( u, v ) E , at least one of u, v is in V . Show that the above problem is NP complete. Ans: (a) To show that the problem is in NP, the certificates would be of the form V of cardi- nality at most k which form a cover. Verification would be to check that indeed V V , | V | ≤ k , and for every edge ( u, v ) E , at least one of u, v is in V . (b) Two methods. First method: Note that for a given graph G = ( V, E ), V is a vertex cover iff V - V is an independent set. Thus, there exists a vertex cover of size k iff there exists an independent set of size ≥ | V |- k . As independent set problem is NP-hard, we immediately get that vertex cover problem is NP-hard. Second method: Direct reduction from 3-SAT: Suppose ( U, C ) is a 3-SAT problem. Consider the vertex cover problem constructed as follows: Suppose U = { x 1 , x 2 , . . . , x n } , and C = { c 1 , c 2 , . . . , c m } , where c i = 1 i 2 i 3 i .

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 ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern