Suggested languages for you:

Americas

Europe

Q56E

Expert-verifiedFound in: Page 204

Book edition
7th

Author(s)
Kenneth H. Rosen

Pages
808 pages

ISBN
9780073383095

**Show that if there were a coin worth 12 cents, the greedy algorithm using quarters, 12 - cent coins, dimes, nickels, and pennies would not always produce change using the fewest coins possible**

For 12 - cents, greedy algorithm will always not produce fewest number of coins.

As mentioned in the question we have to use the greedy algorithm using quarters for 12 cents.

As per given preferences rankings of the men for the three women are:

${m}_{1}:{w}_{3},{w}_{1},{w}_{2};{m}_{2}:{w}_{1},{w}_{2},{w}_{3};{m}_{3}:{w}_{2},{w}_{3},{w}_{1}$

Now, for the rankings of the women, we have:

${w}_{1}:{m}_{1},{m}_{2},{m}_{3};{w}_{2}:{m}_{2},{m}_{1},{m}_{3};{w}_{3}:{m}_{3},{m}_{2},{m}_{1}$.

This is because then no women will be matched with the men out of her preferences and also will not violate the condition of stability.

Therefore, we can conclude that for cents greedy algorithm will always not produce fewest number of coins.

94% of StudySmarter users get better grades.

Sign up for free