Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thekamik/solving-coin-change-problem-2-using-generating-functions
Solving coin change problem 2 using generating functions
https://github.com/thekamik/solving-coin-change-problem-2-using-generating-functions
generating-function generating-functions mathematics python3 sympy
Last synced: 26 days ago
JSON representation
Solving coin change problem 2 using generating functions
- Host: GitHub
- URL: https://github.com/thekamik/solving-coin-change-problem-2-using-generating-functions
- Owner: thekamik
- License: mit
- Created: 2024-07-19T15:52:28.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-03T15:34:59.000Z (about 2 months ago)
- Last Synced: 2024-12-03T16:35:59.718Z (about 2 months ago)
- Topics: generating-function, generating-functions, mathematics, python3, sympy
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Solving the Coin Change Problem 2 Using Generating Functions
This repository contains a Python solution to the "Coin Change 2" problem, where the objective is to determine the number of ways to make change for a given amount using specific coin denominations.
The solution is designed to be flexible, allowing it to compute the number of ways to make change for any target amount, not just the specified 5000 PLN. By utilizing generating functions, the solution can easily adapt to different target values and coin denominations.
## Exercise
> In how many ways can 5000 PLN be exchanged using coins of 1, 2, 3, and 5 PLN denominations?## Key Features
- **Generality**: Solves the coin change problem for any input amount, using any specified set of coin denominations.
- **Efficient Computation**: Uses generating functions to effectively calculate the number of ways to make change.## Libraries Used
- **SymPy**: For symbolic mathematics, polynomial expansion, and simplification.
- **itertools**: For iteration utilities.
- **functools**: For functional programming utilities.