ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
Which of the following problems is equivalent to the 0-1 Knapsack problem?
Correct Answer: B — You are studying for an exam and you have to study N questions. The questions take {t1, t2, t3,...., tn} time(in hours) and carry {m1, m2, m3,...., mn} marks. You can study for a maximum of T hours. You can either study a question or leave it. Choose the questions in such a way that your score is maximized
In this case, questions are used instead of items. Each question has a score which is same as each item having a value. Also, each question takes a time t which is same as each item having a weight w. You have to maximize the score in time T which is same as maximizing the value using a bag of weight W.