Discussion
Let P\(_{1}\) be the problem of finding a Hamiltonian cycle in a graph G and P\(_{2}\) be the problem of determining if a Hamiltonian cycle exists in a graph. Which one of the following is true ?
Answer: A
Both P\(_{1}\) and P\(_{2}\) are NP-hard.
P\(_{2}\), deciding whether a Hamiltonian cycle exists, is a classic NP-complete problem, so it is NP-hard.
P\(_{1}\), finding a Hamiltonian cycle, is at least as hard: any algorithm that finds a cycle also decides whether one exists (it either returns a cycle or reports none). So P\(_{2}\) reduces to P\(_{1}\), and P\(_{1}\) is NP-hard too. That rules out every option denying NP-hardness to either.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development