Free tools & games for everyone
Free · No sign-up · No accounts
Solve classic best-choice problems exactly: linear programs with a picture, the knapsack, the assignment problem and the shortest round trip.
First line: max or min and the objective's numbers. Then one constraint per line: the numbers, a sign (<=, >= or =) and the limit. Every variable is 0 or more.
Which things to take so the total value is as high as possible without going over the capacity? One item per line: name, weight (whole number), value.
Match each row (for example a worker) to one column (a job) so the total is as small, or as large, as possible. Type a square table, one row per line.
The shortest route that visits every stop once and comes back. Tap the square to add stops, or make random ones.
| Arrow keys on the tabs | Change problem |
|---|---|
| Tab | Move between the boxes and buttons |
| Tap the square | Add a stop (Round trip) |
Linear programs are solved with the two-phase simplex method using Bland's rule (no cycling); the knapsack with the textbook dynamic programme over whole-number capacities; the assignment with the Hungarian method (Kuhn and Munkres, O(n³)); the round trip exactly with the Held–Karp dynamic programme for up to 12 stops, and otherwise with nearest neighbour followed by 2-opt, which removes crossings but is not guaranteed best. The test for this page compares every method with a brute-force check on random problems. Everything runs in your browser. Nothing is sent anywhere.
A fresh daily puzzle every morning, and new tools added every month.
Browse every product