0/1 Knapsack for a seating chart
Built for k-12 students learning it in middle or high school. Watch the idea come alive with plain-language steps and everyday examples — perfect for projects and homework. Simulate a seating chart live below — adjust the inputs and watch it respond, right in your browser.
Controls
Presets
The knapsack problem: pick items to maximize value without exceeding a weight limit. Greedily grabbing the most valuable item fails; the optimal answer needs dynamic programming, which builds a table of best values for every capacity. It models budgeting, cargo loading, and resource allocation — and is a classic NP-hard problem solved efficiently by DP.
Data Inspector
Governing equation
Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.
More with 0/1 Knapsack
Frequently asked questions
- Is this good for k-12 students?
- Yes — this version of "0/1 Knapsack for a seating chart" is framed for k-12 students learning it in middle or high school. Watch the idea come alive with plain-language steps and everyday examples — perfect for projects and homework.
- Do I need to install anything?
- No. It runs in any modern browser, free, with no account required.