`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] knapsack.knapsack(size, weight).solve(100)
Requirements
Python 2 or Python 3
Features
nothing
Setup
$ pip install knapsack or $ easy_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.1.zip
(3.5 kB
view details)
File details
Details for the file knapsack-0.0.1.zip.
File metadata
- Download URL: knapsack-0.0.1.zip
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a98cea22f1fc262dac684d53c1f82d0b30580b7bd6bd0508a7c72916998c8a91
|
|
| MD5 |
0948892a26c26f995f5cf74d211b8e71
|
|
| BLAKE2b-256 |
33dbe8507988fc895a01c8f3d14cf87e4f92430d05875c4acd1578d44bd45729
|