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

Sign in to watch this lesson
Advanced - Combinatorics, Games and Puzzles · 4:38
Inclusion-exclusion counts too much on purpose and then corrects with alternating signs. We count six capped numbers that sum to twenty by subtracting the solutions that break a cap and adding back the ones removed twice, see on a three-set Venn diagram why every element ends up counted exactly once, turn the rule into a bitmask loop whose sign is the parity of the popcount, and derive the derangement formula behind the hat-check puzzle and its limit 1/e.