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 nPr, where:
- P is the number of permutations we're solving for.
- n is the number of distinct objects.
- r 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×(n−1)×(n−2)×…×1
- Example: 5!=5×4×3×2×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.
- n=10 (since there are 10 unique digits: 0-9).
- r=4 (since the passcode is four digits long).
- The permutation formula is: nPr=(n−r)!n!
Calculation
(10−4)!10!=6!10!
- Expanding the factorials:
6×5×4×3×2×110×9×8×7×6×5×4×3×2×1
- Simplifying by canceling out common terms (6!):
6!10×9×8×7×6!=10×9×8×7
Computing the Result
- 9×8×7=504
- 504×10=5040
- Therefore, 10P4=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.