1.

State true or false?(a) Statement: If a problem X is in NP and a polynomial time algorithm for X could also be used to solve problem Y in polynomial time, then Y is also in NP.(b) true(c) falseThis question was addressed to me in an interview.Question is taken from Non Deterministic Polynomial Time topic in portion Intractable Problems of Automata Theory

Answer»

Right option is (a) STATEMENT: If a PROBLEM X is in NP and a polynomial TIME algorithm for X could also be used to solve problem Y in polynomial time, then Y is also in NP.

The explanation: This is just a commutative property of NP complexity class where a problem is SAID to be in NP if it can be solved USING an algorithm which was used to solve another NP problem in polynomial amount of time.



Discussion

No Comment Found

Related InterviewSolutions