Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 42s1 days 16 hours 1 minutes 42 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 42s1 days 16 hours 1 minutes 42 seconds.

Sign in to watch this lesson
Algorithms - Recursion, Backtracking and Combinatorics · 4:08
How many ways can 10 identical shares be split across 4 desks? Lay the shares out as stars and cut the row with bars: every arrangement is one split, so the count is a binomial, C(n+k-1, k-1) (56 for 5 shares and 4 desks, 286 for 10 and 4). We extend it to equations, to boxes that must be non-empty (bars only in the gaps, C(n-1, k-1)), to minimums per box (hand them out first), and to disguises like non-decreasing sequences and three identical dice, whose 56 outcomes are not equally likely.