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

Content type
User Generated
Rating
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).

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.

Review

Anonymous
Great! Studypool always delivers quality work.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4