You are going to purchase items from a store that can carry a maximal weight of 'w' into your knapsack. There are 5 items in store available and each items weight are Wi and the worth of these items are Pi dollars. What items should you take and how using Knapsack algorithm? The weight of knapsack depend upon the sum of your two digits of age for example suppose your age is 25 then sum of age becomes 7. The list of items and their respective weight with price are given in table. Items Weight Price A Total count of your first name Total count of your first name divide by 2 B 3 Your roll no mod 5 C Second digit of your roll no 5 D Total count of your last name Total count of your first name divide by 2 E Your roll no mod 3 S Sum of roll no mod 13
You are going to purchase items from a store that can carry a maximal weight of 'w' into your knapsack. There are 5 items in store available and each items weight are Wi and the worth of these items are Pi dollars. What items should you take and how using Knapsack algorithm? The weight of knapsack depend upon the sum of your two digits of age for example suppose your age is 25 then sum of age becomes 7. The list of items and their respective weight with price are given in table. Items Weight Price A Total count of your first name Total count of your first name divide by 2 B 3 Your roll no mod 5 C Second digit of your roll no 5 D Total count of your last name Total count of your first name divide by 2 E Your roll no mod 3 S Sum of roll no mod 13
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 14PP
Related questions
Question
You are going to purchase items from a store that can carry a maximal weight of 'w' into your knapsack. There are 5 items in store available and each items weight are Wi and the worth of these items are Pi dollars. What items should you take and how using Knapsack
The weight of knapsack depend upon the sum of your two digits of age for example suppose your age is 25 then sum of age becomes 7. The list of items and their respective weight with
price are given in table.
Items | Weight | Price |
A | Total count of your first name | Total count of your first name divide by 2 |
B | 3 | Your roll no mod 5 |
C | Second digit of your roll no | 5 |
D | Total count of your last name | Total count of your first name divide by 2 |
E | Your roll no mod 3 S | Sum of roll no mod 13 |
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
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.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr