Questions / Quant trading, Counting & stopping
Allocations with a capacity ceiling
Eight identical units must be allocated among three labeled bins, each holding at most four units. Empty bins are allowed. How many integer allocations are possible?
Answer it in the app It's free. You get hints, a second try if you miss, and a follow-up question.
Show the answer and worked solution
Answer: 15 allocations
- Unrestricted allocations number C(10,2) = 45. If a specified bin gets at least 5, reserve those 5 and allocate the remaining 3 in C(5,2) = 10 ways. Two bins cannot both exceed capacity with only 8 units, so the result is 45 − 3 × 10 = 15.
Interview shortcut. Stars and bars gives 45; remove 3 × C(5,2) where one bin overflows.
In the app this has a follow-up where one thing about the setup changes. Try the follow-up.