⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 18m 48s17 days 22 hours 18 minutes 48 seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 18m 48s17 days 22 hours 18 minutes 48 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.