From Following Table maximum value : 34
![o if iro, M=0 c[i] [m] = (Ei-1] [M] if wizm man (vi+c[i-1] [M-wi], c[i-1] [M]) ich ixo & wiem weight Palue - 1 – 4 0 13 13 18](http://img.homeworklib.com/questions/b1114d30-3067-11eb-a151-adad1fa90f46.png?x-oss-process=image/resize,w_560)
Question 1. There are 6 gifts with weights 5, 3, 2, 1, 6 and 4; and...
Please help with question 2 (c).
(2) Suppose, the game is updated so that every item, i, now has weight, wi], in kilograms (you can assume you are passed the item weights in an array, w, of size m). You can only carry n kilograms of weight. (a) (1 point) Example: Let n Ξ 15, m 5. If the item values are v (5.30, 17, 32, 40) and the item weights are w - 2,4, 3,6,15} which should you choose...
5) (10 pts) Greedy Algorithms The 0-1 Knapsack problem is as follows: you are given a list of items, each item has an integer weight and integer value. The goal of the problem is to choose a subset of the items which have a sum of weights less than or equal to a given W with a maximal sum of values. For example, if we had the following five items (each in the form (weight, value)): 11(6, 13), 2(4, 10),...
You want to put your valuable items into a box. The maximum capacity of the box is 4. The table below shows the values and weights for items 1, 2, 3 and 4 respectively. Item i Value Vi Weight Wi 1 15 1 2 10 5 3 9 3 4 5 2 (i) Use recursion strategy to put the items into the box such that it holds the highest value (ii) Repeat (i) above using backtracking approach.
Modify the item weights to be [2, 1, 2, 3, 5] and keep the item
values the same [25, 20, 15, 40, 50].
How many different optimal subsets does the instance of part (a)
have?
item weight value $25 $20 $15 $40 $50 capacity W-6 4 4
item weight value $25 $20 $15 $40 $50 capacity W-6 4 4
Haloo , i have java program , Java Program , dynamic program Given a knapsack with capacity B∈N and -n- objects with profits p0, ..., p n-1 and weights w0, ..., wn-1. It is also necessary to find a subset I ⊆ {0, ..., n-1} such that the profit of the selected objects is maximized without exceeding the capacity. However, we have another limitation: the number of objects must not exceed a given k ∈ N Example: For the items...
matlab help
Write a script to manipulate the array A = [2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19] to be in descending order without using the sort function. You must do everything using array manipulation in MATLAB (i.e. you cannot sort it by hand and then hardcode it, you cannot simply create the array 1:20, you cannot simply add .rej3mat(J-l 1],1,10) to A). Write a script that...
QUESTION 6 & 7.
The next three questions (5 - 7) refer to the following: Weights of walleye from the Lake Winnipeg follow a normal distribution with mean 11 kg and standard deviation 2.5 kg. Question 5 (1 point) ✓ Saved What is the probability that the average weight of a random sample of 5 walleye is less than 10 kg? Keep 4 decimal places in intermediate calculations and report your final answer to 4 decimal places. Your Answer: 0.1038...
1)Dog weights. Adult German shepherd weights are normally distributed with mean of 73 pounds and standard deviation of 8 pounds. (a) The bottom 24% of weights are below what weight? _________ (b) 76% of weights are above what weight?___________ (c) The top 24% of weights are above what weight? ___________ (Round answers to one decimal place) 2)A distribution of values is normal with a mean of 60 and a standard deviation of 7. Find the interval containing the middle-most 82%...
e 1: Question 17 (5 points) 2A3 Following are the weights of 5 boxes of cookies, each of which is labeled as containing 16 ounces. Assume that the population of weights is normally distributed. 15.91, 14.46,1488, 16.07, 14.79 A quality control inspector wants to know whether the mean weight is actually less than 16 46,14.88, 16.07, 14.79 ounces. Compute the Pvalue of the test. Write down your P-value. You will need it for the next question. Write only a number...