Permutations and Factorials

Permutations

  • Permutations are the number of arrangements possible when order matters.
  • Example: Passwords, where the order of characters is crucial.

Definition of Permutation

  • Represented as nPrnPr, where:
    • PP is the number of permutations we're solving for.
    • nn is the number of distinct objects.
    • rr is the number of objects taken at a time.

Example: Phone Passcode

  • Consider a phone passcode using digits 0-9.
  • If each digit can only be used once (distinct objects), we can use the permutation formula.

Factorials

  • The exclamation mark (!) in math denotes a factorial.
  • n!=n×(n1)×(n2)××1n! = n \times (n-1) \times (n-2) \times … \times 1
  • Example: 5!=5×4×3×2×1=1205! = 5 \times 4 \times 3 \times 2 \times 1 = 120

Using Permutations in the Real World

  • Scenario: you're trying to guess a friend's four-digit phone passcode.
  • Assume you observe your friend using unique numbers (no repetition) when unlocking the phone.

Applying the Permutation Formula

  • n=10n = 10 (since there are 10 unique digits: 0-9).
  • r=4r = 4 (since the passcode is four digits long).
  • The permutation formula is: nPr=n!(nr)!nPr = \frac{n!}{(n-r)!}

Calculation

10!(104)!=10!6!\frac{10!}{(10-4)!} = \frac{10!}{6!}

  • Expanding the factorials:

10×9×8×7×6×5×4×3×2×16×5×4×3×2×1\frac{10 \times 9 \times 8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1}{6 \times 5 \times 4 \times 3 \times 2 \times 1}

  • Simplifying by canceling out common terms (6!):

10×9×8×7×6!6!=10×9×8×7\frac{10 \times 9 \times 8 \times 7 \times 6!}{6!} = 10 \times 9 \times 8 \times 7

Computing the Result

  • 9×8×7=5049 \times 8 \times 7 = 504
  • 504×10=5040504 \times 10 = 5040
  • Therefore, 10P4=504010P4 = 5040 possible permutations.

Implications

  • There are 5,040 different possible combinations for a four-digit passcode with unique digits.
  • Phones have security measures (like shutting down or erasing data after multiple incorrect attempts) to prevent unauthorized access via automated permutation attempts.