# Show that the greedy algorithm for making change for n ## Problem 36E Chapter 3.3

Discrete Mathematics and Its Applications | 7th Edition

• 2901 Step-by-step solutions solved by professors and subject experts
• Get 24/7 help from StudySoup virtual teaching assistants Discrete Mathematics and Its Applications | 7th Edition

4 5 0 407 Reviews
21
0
Problem 36E

Show that the greedy algorithm for making change for n cents using quarters, dimes, nickels, and pennies has O(n) complexity measured in terms of comparisons needed.

Step-by-Step Solution:

Step 1</p>

In this problem, we are asked to show that the greedy algorithm for making change for n cents has O(n) complexity measured in terms comparisons needed.

Step 2</p>

The algorithm for making changes for n cents using quarters, dimes, nickels and pennies are

Procedure change for i=1 to n

di=0

while   { is the number of coins of denominations ci }

Step 3 of 3

##### ISBN: 9780073383095

Unlock Textbook Solution

Show that the greedy algorithm for making change for n

×
Get Full Access to Discrete Mathematics And Its Applications - 7th Edition - Chapter 3.3 - Problem 36e

Get Full Access to Discrete Mathematics And Its Applications - 7th Edition - Chapter 3.3 - Problem 36e

I don't want to reset my password

Need help? Contact support

Need an Account? Is not associated with an account
We're here to help