Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Use the greedy algorithm to make change using quarters, dimes, nickels, and pennies for

a) 51 cents. b) 69 cents.

c) 76 cents. d) 60 cents.

Short Answer

Expert verified

Subpart (a):

Hence, 51cents can be changed with 2 quarters and 1 pennies.

Subpart (b):

Hence, can be changed with 2 quarters, 1 dime, 1 nickel and 4 pennies.

Subpart (c):

Hence, 76 cents can be changed with 3 quarters and 1 penny.

Subpart (d):

Hence, 60 cents can be changed with quarters 2 and 1 dime.

Step by step solution

01

Subpart (a):

Step 1:

So, the conversion between U.S. coins are:

1penny=1cents1nickel=5cents1dime=10cents1quarter=25cents

Step 2:

So, by greedy change algorithm 51 cents can have following combinations of quarters, dimes, nickels, and pennies:

2quarters=50cents1penny=1cent

Therefore, 51cents can be changed with 2 quarters and 1 pennies.

02

Subpart (b):

Step 1:

So, the conversion between U.S. coins are:

1penny=1cents1nickel=5cents1dime=10cents1quarter=25cents

Step 2:

So, by greedy change algorithm 69 cents can have following combinations of quarters, dimes, nickels, and pennies:

2quarters=50cents1dime=10cents1nickel=5cents4pennis=4cents
Therefore, 69cents can be changed with 2 quarters, 1 dime, 1 nickel and 4 pennies.

03

Subpart (c):

Step 1:

So, the conversion between U.S. coins are:

1penny=1cents1nickel=5cents1dime=10cents1quarters=25cents

Step 2:

So, by greedy change algorithm 76 cents can have following combinations of quarters, dimes, nickels, and pennies:

3quarters=75cents1penny=1cent

Therefore, 76 cents can be changed with 3 quarters and 1 penny.

04

Subpart (d):

Step 1:

So, the conversion between U.S. coins are:

1penny=1cents1nickel=5cents1dime=10cents1quarter=25cents

Step 2:

So, by greedy change algorithm 60 cents can have following combinations of quarters, dimes, nickels, and pennies:

2quarters=50cents1dime=10cents

Therefore, 60 cents can be changed with 2 quarters and 1 dime.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Study anywhere. Anytime. Across all devices.

Sign-up for free