Change-Making Problem: Difference between revisions

From Algorithm Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 26: Line 26:
|}
|}


== Time Complexity graph ==  
== Time Complexity Graph ==  


[[File:Change-Making Problem - Time.png|1000px]]
[[File:Change-Making Problem - Time.png|1000px]]


== Space Complexity graph ==  
== Space Complexity Graph ==  


[[File:Change-Making Problem - Space.png|1000px]]
[[File:Change-Making Problem - Space.png|1000px]]


== Pareto Decades graph ==  
== Pareto Frontier Improvements Graph ==  


[[File:Change-Making Problem - Pareto Frontier.png|1000px]]
[[File:Change-Making Problem - Pareto Frontier.png|1000px]]

Revision as of 14:05, 15 February 2023

Description

Given an unlimited amount of coins of denominations $c_1, \ldots, c_n$, and a desired sum $S$, find the minimum number of coins necessary to make $S$.

Parameters

n: number of coin denominations

S: sum to be made

Table of Algorithms

Name Year Time Space Approximation Factor Model Reference
Brute Force 1940 $O(S^n)$ $O(n)$ Exact Deterministic
Dynamic Programming 1953 $O(Sn)$ $O(Sn)$ Exact Deterministic Time
Probabilistic Convolution Tree 2014 $O(n log n)$ $O(n log n)$ Deterministic Time & Space

Time Complexity Graph

Change-Making Problem - Time.png

Space Complexity Graph

Change-Making Problem - Space.png

Pareto Frontier Improvements Graph

Change-Making Problem - Pareto Frontier.png