Consider the following instance of the knapsack problem: number of jobs n = 4; Capacity of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following instance of the knapsack problem: number of jobs n = 4; Capacity of the knapsack M= 9, profits (p1, P2, P3, P4) = (2, 4, 6, 8) and weights (W₁, W2, W3, W4) =(4, 3, 2, 1). (a) (3 points) First explain basic idea of the following dynamic programming formulation: fi(y) = max {fi-1(y), fi-1(y — wi) + Pi} (b) (10 points) Then develop the set solution by developing all sets, show purging as you develop sets. Discuss all your work, specially explaining the idea of purging. (c) (2 points) Finally use the above sets to find the optimal solution when capacity of knapsack is 9. Show all your work. Consider the following instance of the knapsack problem: number of jobs n = 4; Capacity of the knapsack M= 9, profits (p1, P2, P3, P4) = (2, 4, 6, 8) and weights (W₁, W2, W3, W4) =(4, 3, 2, 1). (a) (3 points) First explain basic idea of the following dynamic programming formulation: fi(y) = max {fi-1(y), fi-1(y — wi) + Pi} (b) (10 points) Then develop the set solution by developing all sets, show purging as you develop sets. Discuss all your work, specially explaining the idea of purging. (c) (2 points) Finally use the above sets to find the optimal solution when capacity of knapsack is 9. Show all your work. Consider the following instance of the knapsack problem: number of jobs n = 4; Capacity of the knapsack M= 9, profits (p1, P2, P3, P4) = (2, 4, 6, 8) and weights (W₁, W2, W3, W4) =(4, 3, 2, 1). (a) (3 points) First explain basic idea of the following dynamic programming formulation: fi(y) = max {fi-1(y), fi-1(y — wi) + Pi} (b) (10 points) Then develop the set solution by developing all sets, show purging as you develop sets. Discuss all your work, specially explaining the idea of purging. (c) (2 points) Finally use the above sets to find the optimal solution when capacity of knapsack is 9. Show all your work.
Expert Answer:
Answer rating: 100% (QA)
a Dynamic Programming Formulation The dynamic programming formulation for the knapsack problem involves defining a recursive function fiy that represe... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The time it takes a person to complete the game monopoly followsa normal distribution with a mean of 85hours and a variance of 225.1. Describe the sampling distribution of Y, the completion time of 1...
-
what is the regular language for the following expression r=(aa)* (bb)* b (Please note: Show all the steps to get the full points points for just only the answer.) Question r = (aa)*(bb)* b 1 answer
-
Let us roll a magical die, where probability of obtaining an oddnumber is twice as high (P(X = xodd) = 2P(X = xeven)). What is theexpected value of X?1. 3.52. 3313. 44. 2135. 3 1 answer
-
?
-
Lisa sells business property with an adjusted basis of $130,000 to her son, Alfred, for its fair market value of $100,000. a. What is Lisa's realized and recognized gain or loss? b. What is Alfred's...
-
prepare selling and administrative expenses budget of second quarter when the direct labour of April, may and June are 27625, 28875, and 30375 respectively. Labour requires 15 minutes per unit for...
-
In a study of birth order and intelligence, IQ tests were given to 18- and 19-year-old men to estimate the size of the difference, if any, between the mean IQs of firstborn sons and secondborn sons....
-
A firm has the following short run demand and cost schedule for a product. Q = 200 5P TC = 400 + 4Q a. What are price, quantity and profit for this company? b. Suppose the above demand shifted to Q...
-
79 51 is k. er Use the 30 test scores listed below to solve Exercises 28-29. 67 50 78 62 89 83 73 80 88 48 60 71 79 89 63 55 93 71 41 81 46 50 61 59 50 90 75 61 28. Construct a grouped frequency...
-
Tax Software Assignment - Fall 2023 Ms. Jeanette Letourneau (SIN 123-456-789) was born in Montreal on December 15, 1979. She has spent most of her working life a song writer but also has a part-time...
-
1. Estimate the Pre-Tax Cost of Debt What is the pre-tax cost of debt for your company? Show how you get the number. Use the default spread (default premium) table in this case study and identify...
-
Why do some people dread public speaking or just want to avoid it? Identify some potential benefits of public speaking in academic, professional, personal, and civic contexts that might make people...
-
Tara and Todd are married. Tara is a lawyer who operates her practice as a sole proprietorship. Todd works for a local architecture firm. Their taxable income before the QBI deduction is $404,200,...
-
The following data refer to Huron Corporation for the year 20x2. Sales revenue Raw-material inventory, 12/31/x1 Purchases of raw material in 20x2 Raw-material inventory, 12/31/x2 Direct labor cost...
-
A mineral processing plant will soon undergo a shutdown for a major annual maintenance. The shutdown will last a total of eight days, and will require a significant number of contract workers in each...
-
Waterway Company manufactures two products, Mini A and Maxi B. Waterway's overhead costs consist of setting up machines- $870000; machining- $2040000; and inspecting- $610000. Information on the two...
-
The oxidation number of a nitrogen atom in NO3 is 1 4 7 +/- 2 3 5 6 8 9 0 X C x 100
-
(a) As Section 17.3 discusses, high-frequency sound waves exhibit less diffraction than low-frequency sound waves do. However, even high-frequency sound waves exhibit much more diffraction under...
-
Consider the system depicted. Design a full-stale observer for the system. Determine the observer gain matrix L to place the observer poles at s1,2 = -10 j10.
-
A control system, as shown in Figure E7.17, has a process G(s) = 1 / s(s - 1). (a) When Gc(s) = K, show that the system is always unstable by sketching the root locus. (b) When Gc(s) K(s + 2) / s +...
-
The drive motor and slide system uses the output of a tachometer mounted on the shaft of the motor as shown in Figure CDP4.1 (switch-closed option). The output voltage of the tachometer is vT =...
-
Who has the responsibility to initiate communications when a change of auditors occurs? What specific inquiries should be made?
-
List the matters normally included in an audit engagement letter.
-
Describe four potential duties of audit committees.
Study smarter with the SolutionInn App