3. Consider 0-1 knapsack problem with the capacity M = 35 and four objects with the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. Consider 0-1 knapsack problem with the capacity M = 35 and four objects with the following weights (w₁ = 18, W₂ = 15, W3 = 10, W4 = 11) and profits (p₁ = 25, P₂ = 26, P3= 15, P4 = 17). a) (10 pts) Use the greedy algorithm with a strategy to choose in non-increasing order of Profit/Weight. b) (10 pts) Is this optimal/correct? Explain why. 3. Consider 0-1 knapsack problem with the capacity M = 35 and four objects with the following weights (w₁ = 18, W₂ = 15, W3 = 10, W4 = 11) and profits (p₁ = 25, P₂ = 26, P3= 15, P4 = 17). a) (10 pts) Use the greedy algorithm with a strategy to choose in non-increasing order of Profit/Weight. b) (10 pts) Is this optimal/correct? Explain why.
Expert Answer:
Answer rating: 100% (QA)
a Greedy Algorithm with ProfitWeight Strategy Calculate the ProfitWeight ratio for each object Objec... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Simplify the following expressions according to the commutative law: a. b. A B + A C + B A c. (L M N)(A B)(C D E)(M N L) d. F (K + R) + S V + W + V S + W + (R + K) F A.B + B.A + C.D.E + C.DE + E.T.D
-
Champaign Inc., a company that provides educational consulting services to large universities across the nation, has a gross payroll of $25,000 for the pay period. The entire payroll is subject to...
-
MidSouth Tool Company produces an aircraft part. The company can produce the part entirely at a flexible work center with computerized machines. The company has four work centers, all of which have...
-
In 16 experiments studying the electrical behavior of single cells, 12 use micro-electrodes made of metal and the other 4 use micro-electrodes made from glass tubing. If 2 of the experiments are to...
-
Donna Jamison, a 2003 graduate of the University of Florida with 4 years of banking experience, was recently brought in as assistant to the chairperson of the board of DLeon Inc., a small food...
-
After graduating from high school, Jose is thinking about going to college. The college tuition is $18,000 a year. Instead of going to college, Jose could take a full-time job that pays $28,000. What...
-
In a July 2018 Gallup poll that surveyed 1,033 randomly selected U.S. adults, 5% said that they considered themselves vegetarians. a. Describe what the parameter is in this context. b. The standard...
-
A, B, and C form a partnership with an agreed ratio to share profit and loss in the ratio of 4:3:2. With a net income of 50,000 Partner B would receive?
-
What is the purpose of the different layers?
-
Which of the following transactions are counted in GDP? Select one or more answers from the choices shown. a. Kerry buys a new sweater to wear this winter. b. Patricia receives a Social Security...
-
Suppose that this years nominal GDP is $16 trillion. To account for the effects of inflation, we construct a price-level index in which an index value of 100 represents the price level 5 years ago....
-
The total instantaneous power absorbed by a three-phase motor (under balanced steady-state conditions) as well as a balanced three-phase impedance load is (a) A constant (b) A function of time
-
The rms value of \(v(t)=\mathrm{V}_{\text {max }} \cos (\omega t+\delta)\) is given by (a) \(\mathrm{V}_{\max }\) (b) \(\mathrm{V}_{\max } / \sqrt{2}\) (c) \(2 \mathrm{~V}_{\max }\) (d) \(\sqrt{2}...
-
So $15 $12 $9 $6 $3 Do 10 20 30 40 50 Quantity Figure 3.2 Supply and Demand 23. The equilibrium price and quantity in Figure 3.2 are, respectively, A) $9 and 30 units. B) $6 and 20 units. C) $12 and...
-
Walker, Inc., is an all-equity firm. The cost of the company's equity is currently 11.4 percent and the risk-free.rate is 3.3 percent. The company is currently considering a project that will cost...
-
Diego, age 28, married Dolores, age 27, in 2012. Their salaries for the year amounted to $46,479 and they had interest income of $3,500. Diego and Dolores' deductions for adjusted gross income...
-
Dr. George E. Beeper is a single taxpayer. He lives at 45 Mountain View Dr., Apt. 321, Spokane, WA 99210. Dr. Beeper's Social Security number is 775-88-9531. Dr. Beeper works for the Pine Medical...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-4. Ivan and Irene paid the following in 2012 (all by check or can otherwise be...
-
Mark and Sofia walk together down a long, straight road. They walk without stopping for 4 miles. At this point Sofia says their displacement during the trip must have been 4 miles; Mark says their...
-
Hicham El Guerrouj of Morocco holds the world record in the 1500 m running race. He ran the final 400 m in a time of 51.9 s. What was his average speed in mph over the last 400 m? A. 14.2 mph B. 15.5...
-
Luis is visiting a public garden that has a large, circular path. When he has walked one-quarter of the distance around the path, the magnitude of his displacement is 180 m. What is the diameter of...
Study smarter with the SolutionInn App