`knapsack` is a package for for solving knapsack problem.
Project description
knapsack is a package for solving knapsack problem. Maximize sum of selected weight. Sum of selected size is les than capacity. Algorithm: Dynamic Optimization
import knapsack size = [21, 11, 15, 9, 34, 25, 41, 52] weight = [22, 12, 16, 10, 35, 26, 42, 53] capacity = 100 knapsack.knapsack(size, weight).solve(capacity)
Requirements
Python 3
Features
nothing
Setup
$ pip install knapsack
History
0.0.1 (2015-6-26)
first release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
knapsack-0.0.5.tar.gz
(1.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file knapsack-0.0.5.tar.gz.
File metadata
- Download URL: knapsack-0.0.5.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Darwin/19.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8cf62322cc3ca29b076b6bfd121a9d3f776bd7687e905731fb90f47aa4adf6f
|
|
| MD5 |
00026f985f52b59db752fd7d3bbec992
|
|
| BLAKE2b-256 |
fcb1c6d28aaf0f0315ac71be3b60bce87809f57c4fa9ebf4ace5e8be5413bc80
|
File details
Details for the file knapsack-0.0.5-py3-none-any.whl.
File metadata
- Download URL: knapsack-0.0.5-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Darwin/19.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1d9144ba0874751132d5cf45f3dbb518953e7a8e35934774fc18bbf53df22a4
|
|
| MD5 |
279d921b8b4e394087d1f2e7a0c86e3a
|
|
| BLAKE2b-256 |
1c41dd95844245c43b962f2faf9247106f24283f9563c089f5f5a923f08db9d5
|