Question

Show that the greedy approach always finds an optimal solution for the Change problem when the...

Show that the greedy approach always finds an optimal solution for the Change problem when the coins are in the denominations d0, d1, d2,, ...,di for some integers i>0 and d>0

Homework Answers

Answer #1

It is not guaranteed for a greedy algorithm to yield an optimal result in this case. Consider the case when we have the denomination as {1, 4, 5} and we have to find the change for 8.

Let's apply the greedy approach to the problem.

In the first step, greedy wi choose the highest possible value less than or equal to 8, i.e. 5,

remaining 8-5 = 3

Now, it will select the highest value greater less than or equal to 3, i.e. 1.

Remaining 3-1 = 2

Now, it will select the highest value greater less than or equal to 2, i.e. 1.

Remaining 2-1 = 1

Now, it will select the highest value greater less than or equal to 1, i.e. 1.

Remaining 1-1 = 0

Greedy, in this case, would result in {5, 1, 1, 1}, while the optima solution is {4, 4}.

However, if d0, d1, d. . . di happens to be the powers of a positive number greater than 1, then the greedy approach which yields an optimal solution.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
               For the following linear programming problem, determine the optimal solution by the...
               For the following linear programming problem, determine the optimal solution by the graphical solution method                                                                                              Max   -x + 2y                                                                                                          s.t.   6x - 2y <= 3          ...
Find the complete optimal solution to this linear programming problem.                         ...
Find the complete optimal solution to this linear programming problem.                                      Min   5x + 6y                                  s.t.   3x + y >= 15                  x + 2y >= 12       I am using excel, without the slover please show all work and formulas and all steps. and graphs i       3x + 2y >= 24                  x , y...
1 a) Show that when all consumers and producers are price takers, a competitive equilibrium is...
1 a) Show that when all consumers and producers are price takers, a competitive equilibrium is always Pareto optimal. b) Despite economists’ support of a market approach to environmental policy, the command- and-control approach continues to dominate the policy of most nations. Explain why this is the case. In your response, cite and then comment on some of the common criticisms of market-based initiatives. ( 6 mark ) c) Explain the following using appropriate diagram. ( 20 mark ) i....
QUESTION 1 The optimal solution to an LP problem was  5.17 and  3.66. If  and  were restricted to be integers,...
QUESTION 1 The optimal solution to an LP problem was  5.17 and  3.66. If  and  were restricted to be integers, then  = 5 and 4 will be a feasible solution, but not necessarily an optimal solution to the IP problem. True False Question 2 A sample of 220 patients of a family medicine practice was surveyed two weeks after their doctor's visit to ask them whether the symptoms that prompted their visit improved, and whether they complied with the physician's treatment plan. The following table...
Problem 15-10 Optimal Capital Structure with Hamada Beckman Engineering and Associates (BEA) is considering a change...
Problem 15-10 Optimal Capital Structure with Hamada Beckman Engineering and Associates (BEA) is considering a change in its capital structure. BEA currently has $20 million in debt carrying a rate of 8%, and its stock price is $40 per share with 2 million shares outstanding. BEA is a zero growth firm and pays out all of its earnings as dividends. The firm's EBIT is $15.324 million, and it faces a 40% federal-plus-state tax rate. The market risk premium is 5%,...
1. Consider the general form of the utility for goods that are perfect complements. a) Why...
1. Consider the general form of the utility for goods that are perfect complements. a) Why won’t our equations for finding an interior solution to the consumer’s problem work for this kind of utility? Draw(but do not submit) a picture and explain why (4, 16) is the utility maximizing point if the utility is U(x, y) = min(2x, y/2), the income is $52, the price of x is $5 and the price of y is $2. From this picture and...
Problem 1: Properties of Options (8 marks) The price of a European put that expires in...
Problem 1: Properties of Options The price of a European put that expires in six months and has a strike price of $100 is $3.59. The underlying stock price is $102, and a dividend of $1.50 is expected in four months. The term structure is flat, with all risk-free interest rates being 8% (cont. comp.). a. What is the price of a European call option on the same stock that expires in six months and has a strike price of...
In a class question you solved the problem of the "Ballistic Pendulum". This problem might be...
In a class question you solved the problem of the "Ballistic Pendulum". This problem might be called a "Ballistic Spring". A spring of equilibrium (un-stretched) length L 0 is hung vertically from one end. A mass M is attached to the other end of the spring and lowered so that the mass hangs stationary with the spring stretched a distance Δ L. The position of the bottom end of the un-stretched spring is defined as y = 0 and shown...
Question -Organizational change goes beyond promotions and the threat of layoffs. What ways other than those...
Question -Organizational change goes beyond promotions and the threat of layoffs. What ways other than those discussed in the case would you use to entice people to embrace proposed changes? Provide several suggestions and justify their rationale. CASE STUDY- Blue Cross and Blue Shield, and Others: Understanding the Science behind Change Kevin Sparks has been trying to get his staff to change the way it monitors and supports the data center for the past year, but he hasn’t been getting...
Please show work/formulas and financial calculator steps, if used. Answer as much as you can (The...
Please show work/formulas and financial calculator steps, if used. Answer as much as you can (The following information applies to Problems 1-4) The Collins Group, a leading producer of custom automobile accessories, has hired you to estimate the firm's weighted average cost of capital. The balance sheet and some other information are provided below. Assets Current assets                                        $ 38,000,000 Net plant, property, and equipment                    101,000,000 Total assets                                          $139,000,000 Liabilities and Equity Accounts payable                                      $ 10,000,000 Accruals                                                9,000,000 Current liabilities                                   $...