in Algorithms recategorized by
8,497 views
2 votes
2 votes

The Knapsack problem belongs to which domain of problems?

  1. Optimization
  2. NP complete
  3. Linear Solution
  4. Sorting
in Algorithms recategorized by
by
8.5k views

2 Answers

2 votes
2 votes

Optimization problem is the problem of finding the best solution from all possible solutions (When we need maximum value or minimum value as an output we can say it's an optimization problem).

There are many variations of the knapsack problem but in all of them we always want maximum profit, So we can say it's an optimization problem.

Answer: A

 

 


A knapsack problem is NP-complete or not depends on problem constraints like the size of the input, the capacity of the knapsack.There are, however, different variants (e.g., 0-1 Knapsack and others) that may or may not have polynomial-time solutions or good approximations. But this is not the same as the general Knapsack problem. Also, there might be efficient algorithms that work for specific (families of) instances, but these algorithms will take longer on other instances.

Knapsack problem - Wikipedia

1 vote
1 vote

0-1 Knapsack problem is NP Complete but here it just says Knapsack problem which included fractional knapsack (P class problem).

A is correct as its an optimizaion problem.

Ref: 

https://cs.stackexchange.com/questions/909/knapsack-problem-np-complete-despite-dynamic-programming-solution

Answer:

Related questions