Computers and Technology

Suppose you are an art thief (not a good start) who has broken into an art gallery. All you have to haul out your stolen art is your briefcase which holds only W pounds of art and for every piece of art, you know its weight. Write a program that contains a dynamic programming function to determine your maximum profit. Include a main program that tests your function against each of the following two data sets (each happens to have n=5 items; but your function should work for other values of n as well; we are likely to test your code against another random dataset with an unknown number of items):

Data set 1:

Items 1, 2, 3, 4, and 5 have weights 2, 3, 4, 5 , 9 and value 3, 4, 8, 8, and 10, respectively. Let W = 20.

Data set 2:

Items 1, 2, 3, 4, and 5 have weights 1, 2, 5, 6, 7 and value 1, 6, 18, 22, and 28, respectively. Let W = 11.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:10, kristofwr3444
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
image
Computers and Technology, 23.06.2019 15:20, manarhizam12
An ou structure in your domain has one ou per department, and all the computer and user accounts are in their respective ous. you have configured several gpos defining computer and user policies and linked the gpos to the domain. a group of managers in the marketing department need different policies that differ from those of the rest of the marketing department users and computers, but you don't want to change the top-level ou structure. which of the following gpo processing features are you most likely to use? a, block inheritance b, gpo enforcement c, wmi filtering d, loopback processing
Answers: 3
image
Computers and Technology, 23.06.2019 16:30, 19thomasar
How to do this programming flowchart?
Answers: 3
image
Computers and Technology, 24.06.2019 07:00, jordaaan101
Guys do you know sh27 cause he hacked me : ( pidgegunderson my old user
Answers: 2
Do you know the correct answer?
Suppose you are an art thief (not a good start) who has broken into an art gallery. All you have to...

Questions in other subjects:

Konu
Mathematics, 06.06.2021 01:00