XII. (22 points) Consider the following items in the Knapsack Problem: 0 1 2 8 !...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
XII. (22 points) Consider the following items in the Knapsack Problem: 0 1 2 8 ! 0 0 0 3 40 Item 1 2 3 4 (a) $15 (b) $23 (c) $25 (d) $20 In the Fractional Knapsack Problem, what is the maximum value that can be put in the knapsack? P[4][8] = P[4][9] = 0 0 0 0 Using the same items as in part (a), the Dynamic Programming approach outlined in the book and discussed in class produces a (n + 1) x (W+ 1) table containing the maximum values P[i][w] for a knapsack of capacity w, considering the first i items. w → 0 0 1 1 weight 3 6 6 6 6 4 6 12 12 12 2 4 value $6 $12 $1 $4 6 12 12 12 Knapsack capacity W = 9. 6 6 18 18 19 ? 6 6 12 18. 13 18 18 13 18 ? Compute the missing values in this table using the formula outlined in the textbook and in class Starting from the value of P[4][9] (the maximum profit for the 0-1 Knapsack in this case) which items are placed in the knapsack to achieve this maximum value? Using the procedure discussed in class, show how you arrived at your answer. XII. (continued) Using the same items, determine the maximum value in the knapsack if we allow repetitions; i.e., if there are an unlimited number of each item so that more than one such item can be chosen. Find the missing values in the following linear array. P(w) is the maximum profit obtainable for a knapsack of capacity w. 0 1 P(W): 0 0 P(8) = P(9) = 2 3 1 6 W 4 5 6 7 8 9 12 12 13 18 ? ? Which items should be put in the knapsack to achieve the maximum value P(9)? Using the procedure described in class, show how you arrived at your answer. XII. (22 points) Consider the following items in the Knapsack Problem: 0 1 2 8 ! 0 0 0 3 40 Item 1 2 3 4 (a) $15 (b) $23 (c) $25 (d) $20 In the Fractional Knapsack Problem, what is the maximum value that can be put in the knapsack? P[4][8] = P[4][9] = 0 0 0 0 Using the same items as in part (a), the Dynamic Programming approach outlined in the book and discussed in class produces a (n + 1) x (W+ 1) table containing the maximum values P[i][w] for a knapsack of capacity w, considering the first i items. w → 0 0 1 1 weight 3 6 6 6 6 4 6 12 12 12 2 4 value $6 $12 $1 $4 6 12 12 12 Knapsack capacity W = 9. 6 6 18 18 19 ? 6 6 12 18. 13 18 18 13 18 ? Compute the missing values in this table using the formula outlined in the textbook and in class Starting from the value of P[4][9] (the maximum profit for the 0-1 Knapsack in this case) which items are placed in the knapsack to achieve this maximum value? Using the procedure discussed in class, show how you arrived at your answer. XII. (continued) Using the same items, determine the maximum value in the knapsack if we allow repetitions; i.e., if there are an unlimited number of each item so that more than one such item can be chosen. Find the missing values in the following linear array. P(w) is the maximum profit obtainable for a knapsack of capacity w. 0 1 P(W): 0 0 P(8) = P(9) = 2 3 1 6 W 4 5 6 7 8 9 12 12 13 18 ? ? Which items should be put in the knapsack to achieve the maximum value P(9)? Using the procedure described in class, show how you arrived at your answer.
Expert Answer:
Answer rating: 100% (QA)
Answer Formula miw maxmi1w m1iwwi pi where i is number of items w is column numberweight wi weight o... View the full answer
Related Book For
South Western Federal Taxation 2016 Corporations Partnerships Estates and Trusts
ISBN: 9781305399884
39th edition
Authors: James Boyd, William Hoffman, Raabe, David Maloney, Young
Posted Date:
Students also viewed these programming questions
-
What is the maximum amount that can be contributed to a defined contribution pension plan?
-
What is the maximum benefit that can be paid to an individual under a defined benefit plan?
-
What is the maximum load that can be raised by an outstretched stiff arm by a 50th percentile female?
-
Discuss the ways that managed care organizations can infl uence the adoption of new technologies.
-
On Wednesday, the exchange rate between the Japanese yen and the U.S. dollar was $0.010 per yen. On Thursday, it was $0.009. Did the dollar appreciate or depreciate against the yen? By how much,...
-
1. Is religious training mandatory at all of the schools in question? 2. Does the Court see inevitable church-state entanglements if the Board were allowed to exercise jurisdiction over teachers in...
-
Defendant Kenneth Blake was married to Charlene Hinton-Blake, who died in 2012. Three of Hinton-Blakes sisters, including Yvonne Hinton, assisted her with day-to-day care during a four-year period of...
-
The following information is available for Park Valley Spa for July 2016: The following is a list of checks and deposits recorded on the books of the Park Valley Spa for July 2016: Other Information...
-
Write down a regular expression for the following language: L= {w (p, q): number of p's in w is divisible by 4 }
-
Dwight Donovan, the president of Donovan Enterprises, is considering two investment opportunities. Because of limited resources, he will be able to invest in only one of them. Project A is to...
-
Consider the following information about a firm. Debt ratio = 35% Cost of equity = 0.14 Cost of debt = 0.09 Tax rate = 25% FCFs over the next 3 years and the growth rate of the cash flows after the...
-
A closed economy has income of $1,000, government spending of $200, taxes of $150, and investment of $250. What is private saving? a. $100 b. $200 c. $300 d. $400
-
If the government wants to expand aggregate demand, it can ________ government purchases or ________ taxes. a. increase; increase b. increase; decrease c. decrease; increase d. decrease, decrease
-
If the business community becomes more optimistic about the profitability of capital, the ________ curve for loanable funds would shift, driving the equilibrium interest rate ________. a. supply; up...
-
Greta obtained an auto loan from Ridgeline Bank, but the bank did not give her a payment schedule and refused her attempts to make payments. In fact, Ridgeline told Greta that it had not given her a...
-
If the interest rate is zero, then $100 to be paid in 10 years has a present value that is a. less than $100. b. exactly $100. c. more than $100. d. indeterminate.
-
A bond currently sells at 92% of face value in the marketplace. The bond pays semi-annual coupons with a coupon rate of 4.2% APR. The face value of the bond is $1,000, and the bond will mature in...
-
The area of a rectangle is 30 cm 2 and its perimeter is 26 cm. Find the length and width of the rectangle.
-
The gross estate of Raul, decedent, includes stock in Iris Corporation (E & P of $3 million) valued at $2.5 million. At the time of his death, Raul owned 60% of the Iris stock outstanding, and he had...
-
CheapPhones, one of Josie's customers who is facing tight cash flow problems, wants to return about 100 defective cell phones. Talk2Me tells Josie to bring the phones back to headquarters. Fearing...
-
Locate the following tax services in your library, and indicate the name of the publisher: a. United States Tax Reporter. b. Standard Federal Tax Reporter. c. Federal Tax Coordinator 2d. d. Mertens...
-
The codon change (Gly-12 to Val-12) in human H-ras that converts it to oncogenic H-ras has been associated with many types of cancers. For this reason, researchers would like to develop drugs to...
-
Outline the general strategy used in metagenomics.
-
You need to understand the approach described in question 3 in More Genetic TIPS before answering this question. A muscle-specific gene was cloned and then subjected to promoter bashing. As shown...
Study smarter with the SolutionInn App