← All MathIsland labs
nCrCounting & Combinatorics Lab

8,145,060 — the denominator behind a lottery jackpot.

3 shirts and 2 pairs of pants — how many outfits? 3+2=5? 3×2=6?

Counting every possibility — without omission or repetition.

Experiment

Hands-on experiment

Predict first — 3 shirts, 2 pairs of pants. How many outfits?

Fill in the outfits one by one

Tap the grid cells to complete each outfit. Let's count how many get filled.

🟥
🟨
🟦
🟫

outfits filled: 0 / 6

Read more — why it exists · insights · common mistakes · formulasExpand ▾

Why

Why does this exist?

Probability is 'favorable cases ÷ total cases' — numerator and denominator are both counts. Miscount and the whole probability collapses. The letters between Pascal and Fermat answering gamblers' questions founded this field.

But counting by listing hits a wall fast. You cannot list 8.14 million lottery combinations — laws for counting without listing were needed.

Three tools suffice for astronomically large counts: the product rule, the sum rule, and the question of order (permutations vs combinations). Password strength, gene combinations, network routes — all counted with these.

Insight

Insights from the video

Counting is math's oldest skill and its easiest to get wrong.

Miss a case (omission) or count one twice (repetition) — counting has exactly these two failure modes. The product/sum rules and permutations/combinations are the safety devices against both.

The lottery's 8.14 million comes from calculation, not listing.

45×44×43×42×41×40 divided by 6! is 8,145,060. One line of arithmetic captures a cosmic number of cases — the power of counting without listing.

Misconception

Common misconceptions

Multiple stages of choices always add.

'And' (passing through every stage) multiplies; 'or' (picking one branch) adds. Wear a shirt AND pants: 3×2. Choose chicken OR pizza: 3+2.

Choosing 2 from 3 people is always 3×2=6.

For president & vice-president (order matters), 6 is right. For two cleaning-duty members (order doesn't), (Amy,Ben) and (Ben,Amy) are the same case — 6÷2=3. Asking 'does order matter?' is half of counting.

Formula

Writing it as math

The rules discovered in the outfit grid and the picking experiments, formalized.

Product rule · sum rule

Pass through every stage: multiply. Pick one branch: add. The two pillars of all counting.

Permutations (order matters)

Choose r from n and line them up: n ways for the first seat AND (n−1) for the next… — a chain of the product rule.

Combinations (order ignored)

Ignoring order, each group was counted r! times — so divide by r!. The identity of the lottery's 8.14 million.

In Real Life

Where you meet it in real life

The denominator of probability

Lottery jackpot 1/8,145,060, royal flush 1/649,740 — every probability's denominator is a count. Wrong count, wrong probability.

Password strength

4 digits: 10⁴ = 10,000 cases. 8 alphanumerics: 36⁸ ≈ 2.8 trillion. The time to try them all IS the security — counting is the shield.

Genetics

Parental gene combinations, DNA sequences (4ⁿ) — genetics has run on counting since Mendel's peas.

Scheduling and routing

Visiting 10 cities has 10! = 3.6 million orderings. Counts explode combinatorially — which is why optimization algorithms exist. Combinatorial explosion is central to computer science.

Try Yourself

Test yourself

Q14 mains and 3 drinks — how many set menus?Show answer ▾

Pick a main AND a drink: 4×3 = 12. If you picked only a main OR only a drink, it would be 4+3 = 7.

Q2From 5 people, how many ways to pick a president and vice-president? And to pick 2 delegates?Show answer ▾

President & VP (order matters): 5×4 = 20. Two delegates (order doesn't): 20÷2 = 10. The same 'pick 2' changes answer with the order question.

Q3Flipping a coin 10 times, how many possible outcome sequences are there?Show answer ▾

2 choices chained 10 times by 'and': 2¹⁰ = 1,024. The product rule gives birth to powers — counting meets exponents.

Try answering yourself before revealing it — getting it wrong is where learning starts.

Connection

Concepts connect

Leads to next

P(A)

Probability

You've learned to count; now divide — favorable ÷ total, putting a number on uncertainty.

Go to the Probability lab →

Related

Labs worth exploring together

Related lab

P(A)

Probability

Probability = favorable ÷ total — counting supplies the denominator.

Go to the Probability lab →

Related lab

aⁿ

Powers

Repeat the same choice n times and the count explodes as a power.

Go to the Powers lab →