https://github.com/codenameyau/calculation
Script that computes number combinations for Calculords
https://github.com/codenameyau/calculation
Last synced: over 1 year ago
JSON representation
Script that computes number combinations for Calculords
- Host: GitHub
- URL: https://github.com/codenameyau/calculation
- Owner: codenameyau
- License: mit
- Created: 2014-09-01T00:03:00.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-02T12:18:09.000Z (almost 12 years ago)
- Last Synced: 2025-01-29T20:19:49.288Z (over 1 year ago)
- Language: Python
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
calculation
===========
Script that computes number combinations for Calculords
The goal:
> Given a list, L, of non-unique integers, and a number N:
> Find a way to calculate N using the integers in L at most once with the operations: +, -, *.
Actually, this problem is probably in NP. Non-deterministic polynomial time to solve, but polynomial time to verify.
It is related to the [Subset Sum problem](https://en.wikipedia.org/wiki/Subset_sum_problem)
except with an arbitary target number instead of zero, and three operations (+, -, *) instead of one (+).