───✱*.。:。✱*.:。✧*.。✰*.:。✧*.。:。*.。✱ ───

Factorial

  • The product of all positive integers to some number 𝑛
  • 𝑛!=𝑛𝑖=1𝑖
    • 3!=1×2×3=6

Permutations

  • An ordered arrangement of a set or items
  • Used when order matters and elements are not-reused (unless specified)

Complete Permutation

  • 𝑃(𝑛)=𝑛!, where 𝑛 is the number of items
  • Used when arranging all items in a set
  • “How many ways can the letters in ‘Lizard’ be rearranged?”
    • “Lizard” → 6 characters; 6!=720

Permutation with Replacement

  • 𝑃(𝑛,𝑟)=𝑛𝑟, where 𝑛 is the number of items in the set and 𝑟 is the number of items selected
    • 10 possible digits, 4 slots → 10,000 possible pin codes.
  • Choosing items where order matters and repetitions are allowed

Permutation without Replacement

  • 𝑃(𝑛,𝑟)=𝑛!(𝑛𝑟)!
  • Choose a subset of items where the order matters and elements cannot be duplicated

Permutation with Constraints

  • “How many ways can you arrange the letters ‘abcdefg’ where ‘bcd’ must stay together”
  • {𝑎,𝑏𝑐𝑑,𝑒,𝑓,𝑔}=5!=120

Combinations

  • Choosing 𝑟 items from a set of 𝑛 items where order does not matter

Combination without Replacements

  • 𝐶(𝑛,𝑟)=𝑛!𝑟!(𝑛𝑟)!
  • “How many 5-card hands in a 52-card deck?”
    • 𝐶(52,5)=52!5!(525)!=52×51×50×49×485×4×3×2×1=2598960

Combination with Replacements

  • 𝐶(𝑛+𝑟1,𝑟)=𝑛!𝑟!(𝑛𝑟)!
  • “Roll 3 5-sided dice, order is irrelevant”
    • 𝐶(6+31,3)=𝐶(8,3)=8!3!(5!)=56

───✱*.。:。✱*.:。✧*.。✰*.:。✧*.。:。*.。✱ ───