Which of the following is an example of an NP-complete problem?
16 views
- Sorting a list of integers in ascending order
- Finding the shortest path between two nodes in a graph
- Calculating the factorial of a number
- Traveling salesman problem (Correct Answer)
Explanation
Correct answer: D) Traveling salesman problem
Explanation: The traveling salesman problem is an example of an NP-complete problem, which is a class of problems that are believed to require exponential time to solve. NP-complete problems are important in computer science and mathematics because they are believed to be inherently difficult to solve efficiently, meaning that there is no known algorithm that can solve them in polynomial time. The other options listed are examples of problems that can be solved in polynomial time, meaning that there exist algorithms that can solve them in a reasonable amount of time.