Given a set of pairs. {(136, 34), (195, 15), (125, 25), (216, 12), (360, 30) } The first component in a ordered pair is the value of an item and the second the component is the weight (ponds) of the item. The value of a thief can get if he can carry is. if the maximum weight is 50 ponds by by applying the greed algorithm 0-1_KNAPSACK. 311 O 411 527 633 none of these

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
111100
none of these
QUESTION 14
Given a set of pairs.
{ (136, 34), (195, 15), (125, 25), (216, 12), (360, 30) }
The first component in a ordered pair is the value of an item and the second the component is the weight (ponds) of the item. The value
of a thief can get if he can carry is
if the maximum weight is 50 ponds by by applying the greed algorithm 0-1_KNAPSACK.
O 311
411
527
633
none of these
QUESTION 15
Given the following recursive algorithm. The running time complexity of the algorithm is
int algorithm_1(int n, int a, int b)
//a, b are constants
Click Save and Submit to save and submit. Click Save All Answers to save all answers.
Save.
Transcribed Image Text:111100 none of these QUESTION 14 Given a set of pairs. { (136, 34), (195, 15), (125, 25), (216, 12), (360, 30) } The first component in a ordered pair is the value of an item and the second the component is the weight (ponds) of the item. The value of a thief can get if he can carry is if the maximum weight is 50 ponds by by applying the greed algorithm 0-1_KNAPSACK. O 311 411 527 633 none of these QUESTION 15 Given the following recursive algorithm. The running time complexity of the algorithm is int algorithm_1(int n, int a, int b) //a, b are constants Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save.
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Fundamentals of Blockchaining
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning