Friday, 15 March 2013

algorithm - Is it necessary for NP problems to be decision problems ? -



algorithm - Is it necessary for NP problems to be decision problems ? -

professor tim roughgarden stanford university while teaching mooc said solutions problems in class np must polynomial in length. wikipedia article says np problems decision problems. type of problems in class np ? , unnecessary solutions such problems have polynomial length output(as decision problems output either 0 or 1) ?

he talking witnesses , verifiers.

for every problem in np, there verifier—read algorithm/turing machine—that can verify "yes"-claims in polynomial time.

the thought is, have kind of information—the witness—to help given time constraints.

for instance, in travelling salesman problem:

tsp = {(g, k) if g has hamiltonian cycle of cost <= k}

for given input (g, k), need determine whether or not problem instance in tsp. that's yes/no answer.

now, if comes along , says: problem instance in tsp, demand proof. other person give sequence of cities. can check whether cities in order form hamiltonian cycle , whether total cost of cycle ≤ k.

you can perform procedure in polynomial time—given witness polynomial in length.

using sequence of cities, able correctly determine problem instance indeed in tsp.

that's thought of verifiers: take proof object/witness polynomial in length check in polynomial time, problem instance in language.

algorithm np-complete np

No comments:

Post a Comment