سوال ۵۸ کنکور ارشد مهندسی کامپیوتر ۱۴۰۲
کدامیک از عبارات زیر درست است؟
الف- هر مسئلهای NP- کامل یک مسئلهای NP- سخت است.
ب- هر مسئلهای NP- سخت یک مسئلهای NP- کامل است.
ج- هر مسئلهای P (چندجملهای) یک مسئلهای NP هم هست.
پاسخ صحیح: گزینهٔ B — الف و ج
Use the standard definitions of the complexity classes and the fact that .
Statement (a): Every NP-complete problem is NP-hard. — TRUE.
By definition, a problem is NP-complete iff
So NP-completeness requires NP-hardness; the implication holds for every such problem.
Statement (b): Every NP-hard problem is NP-complete. — FALSE.
NP-hard means "at least as hard as every problem in NP" (every reduces to it in polynomial time), but an NP-hard problem need not itself lie in . Classic counterexample: the Halting Problem is NP-hard yet undecidable, so it is not in and therefore not NP-complete. Hence the inclusion fails.
Statement (c): Every problem in P is also in NP. — TRUE.
A polynomial-time decider is, in particular, a polynomial-time verifier (it just ignores the certificate), so any language solvable in polynomial time is verifiable in polynomial time. Thus every P problem is an NP problem (whether the inclusion is strict — the question — is open, but is certain).
Conclusion. Statements (a) and (c) are correct, (b) is not. The answer is (a) and (c) — option 2.
Pitfall: Don't confuse NP-hard with NP-complete. NP-complete NP-hard NP; NP-hard alone allows problems strictly harder than NP (even undecidable ones), so "NP-hard NP-complete" is false.