permvscomb() — Permutation vs Combination

The one question that decides which to use: does order matter?

P(n, r) vs C(n, r)

Key idea

Definition

total items to choose from
how many you take
ordered arrangements (order matters)
unordered selections (order ignored)

In plain words

Order matters? Use a permutation (P). Order doesn’t? Use a combination (C). They differ by exactly r! — the number of ways to shuffle each pick.

Where you'd use it

Frequently asked questions

How do I decide which one to use?
Ask one question: if I shuffle my picks, is it a new outcome? Yes → permutation (order matters). No → combination (order ignored).
Why are there always more permutations?
Every group of r items can be arranged in r! orders, so nPr = nCr × r!. Permutations count each of those orders separately.
Is a "combination lock" a combination?
Ironically, no — 1-2-3 and 3-2-1 open different locks, so order matters. Mathematically it is a permutation lock.
Which one is a lottery ticket?
A combination: the 6 numbers you pick win no matter what order the balls are drawn in.