β”€β”€β”€βœ±*.q:q✱*.:q✧*.q✰*.:q✧*.q:q*.q✱ ───

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!(52βˆ’5)!=52Γ—51Γ—50Γ—49Γ—485Γ—4Γ—3Γ—2Γ—1=2598960

Combination with Replacements

  • 𝐢(𝑛+π‘Ÿβˆ’1,π‘Ÿ)=𝑛!π‘Ÿ!(π‘›βˆ’π‘Ÿ)!
  • β€œRoll 3 5-sided dice, order is irrelevant”
    • 𝐢(6+3βˆ’1,3)=𝐢(8,3)=8!3!(5!)=56

β”€β”€β”€βœ±*.q:q✱*.:q✧*.q✰*.:q✧*.q:q*.q✱ ───