Search⌘ K

Permutations

Explore the concept of permutations and how the order of items matters in arrangements. Understand how to calculate permutations using factorials, and differentiate between arrangements with and without repetition. This lesson helps you grasp the foundation of permutations in number theory crucial for competitive programming.

We'll cover the following...

Order matters for Permutations.

How many ways can we order 3 numbers (1,2,3)(1,2,3)? There are 6 ways.

  • 1 - 2 - 3
  • 1 - 3 - 2
  • 2 - 1 - 3
  • 2 - 3 - 1
  • 3 - 1 - 2
  • 3 - 2 - 1

The number of ways is just n!n!

Quick explanation: How many ways can we select the number in the first position, we have 3. Now we have 2 options for the second position. Similarly, only 1 choice for the third position.

ways =321=3!=6= 3 * 2 * 1 = 3! = 6 ...