Classic knapsack has one constraint: weight capacity. But real problems often have multiple constraints. A backpacker might care about both weight and volume. A project manager about both budget and time. Multi-dimensional knapsack tracks multiple constraints in dp.
Instead of , you use for two constraints, or for three. The next problem has two constraints: count of zeros and count of ones. Let's see how to handle it.