- Linear Programming
- The Art of Linear Programming
- Find a vector
[b1, b2, ..., bn] - That dot product with a vector
[a1, a2, ..., an]subject to the constraints - And dot product with a vector
[c1, c2, ..., cn]maximize a function
- Knapsack Problem
- A list of objects where each object has a weight and a value:
Object{Weight, Value} - Find a binary vector
[b1, b2, ..., bn] - Then do dot product with the vector
objects.Weightwith the constraint:b1 + b2 + ... + bn <= capacity - And maximize dot product with the vector
objects.Value
make test