Access over 35 million academic & study documents

4 LONG PATH is the problem of, given (G, u, v, k) where G is a grap

Content type
User Generated
Showing Page:
1/1
4. LONG-PATH is the problem of, given (G, u, v, k) where
G is a graph, u and v vertices and k an integer,
determining if there is a simple path in G from u to v of
length at least k. Show that LONG-PATH is NP-complete.
Solution
Long Path is in NP
since the path is the certificate (we can check easily in
polynomial time that it is a path, and its length is k or
more)
and NP-Complete since Hamiltonian Path (The variant
where we specify a start and end node) is a special case
of Long Path,
namely where k = the number of vertices of (G - 1).

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
4. LONG-PATH is the problem of, given (G, u, v, k) where G is a graph, u and v vertices and k an integer, determining if there is a simple path in G from u to v of length at least k. Show that LONG-PATH is NP-complete. Solution Long Path is in NP since the path is the certificate (we can check eas ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Documents