Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following Coin Change Problem: Given: A set S of n positive distinct integers as coin denominations S={d1,d2,d3,,dn} where d1=1 A positive integer B
Consider the following Coin Change Problem: Given: A set S of n positive distinct integers as coin denominations S={d1,d2,d3,,dn} where d1=1 A positive integer B Question: Find the minimum number of coins to make change of B using denominations set S. Example: S={1,5,10,25} B=80 The minimum number is 4 ( 3 quarters and 1 dime). Design a Dynamic Programming Algorithm to solve the problem and analyze its running time. Your algorithm must clearly state the 5 steps we learned in class. And you must analyze its running time. The 5 steps to help solve this problem: Step 1: What are the overlapping subproblems? Step 2: Construct a matrix Step 3: Initialize the matrix (for the simplest subproblems) Step 4: Find the optimal substructure and complete table Step 5: Identify solution (what are you returning?)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started