Question: [NP-Completeness] a) Define SPATH as the set {G, a, b, k} such that G is a graph with a path from a to b of
[NP-Completeness]
a) Define SPATH as the set {G, a, b, k} such that G is a graph with a path from a to b of length at most k. Show that SPATH is in P.
b) Define LPATH as the set {G, a, b, k} such that G is a graph with a path from a to b without repeated nodes of length at least k. Show that LPATH is NP-Complete. (You may assume the NP-Completeness of HAMPATH.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
