![thuzar](/avatars/22794.jpg)
thuzar
22.08.2019 •
Computers and Technology
Consider the problem of making change for n cents using the fewest number of coins. assume that each coin's value is an integer. [10 points] a) describe a greedy algorithm to make change consisting of quarters (25 cents each), dimes (10 cents each), nickels (5 cents each), and pennies (1 cent each). prove that your algorithm yields an optimal solution b) give a set of coin value combination (the value of coins may not be limited to quarter, dime, nickel, or penny) for which the greedy algorithm does not yield an optimal solution. use an example to justify your answer. note that your set should include a penny value so that there is a solution for every possible value of n
Solved
Show answers
More tips
- S Science and Technology How to Restore the Diamond Shine to Your Tarnished Silverware...
- C Computers and Internet Boost your processor performance with these easy tips...
- L Leisure and Entertainment When will Maslenitsa start?...
- F Food and Cooking Discovering the Mysterious Fruit of Feijoa...
- B Business and Finance How to Open an Online Store? A Detailed Guide for Beginners...
- W Work and Career How to Write a Resume That Catches the Employer s Attention?...
- C Computers and Internet Е-head: How it Simplifies Life for Users?...
- F Family and Home How to Choose the Best Diapers for Your Baby?...
- F Family and Home Parquet or laminate, which is better?...
- L Leisure and Entertainment How to Properly Wind Fishing Line onto a Reel?...
Answers on questions: Computers and Technology
- C Computers and Technology Question 15 (1 point) T/F It s best practice to covert to sRGB when saving for the web unless you have a specific reason not to. True O False Question 16 (1 point) You...
- C Computers and Technology Processes the input data based on predefined set of instructions. d. The time taken to perform the task by the computer is measured in of seconds. 2...
- C Computers and Technology Write a pseudocode algorithm that prompts the user to enter a three-digit number and outputs the hundreds, tens and units. Example: 523 will output 5 hundreds, 2 tens...
- S Spanish So i need around 10 questions about family & family members i have no idea how to start...
- M Mathematics Asofa depreciates at 20% of its original value each year. if the sofa was $349 at its time of purchase, what is the value of the sofa after 4 years? round your answer...
- M Mathematics For his long distance phone service, deandre pays a $7 monthly fee plus 7 cents per minute. last month, deandre s long distance bill was $15.47. for how many minutes...
- S Social Studies Assume that you and 10 of your friends are stuck on a deserted island. no one is coming to get you. so, you have no option other than adjusting to this new life. answer...
- M Mathematics How long would it take you to save $500 if you put $10 a week in your saving account...
- M Mathematics What is 6/8 in the simplest form...
- M Mathematics Equivalent fractions write the missing values to show pairs of equivalent fractions. 2/3-5 1/2-50 4/-3/12 1/5-10 6/5-10 3/-30/100...
Ответ:
3x²+ 2x²+4x+4x-8+2
then it would be
5x²+8x-6 and that is the answer