Permutation

Last Updated : 9 Jul, 2026

Permutation determines the number of possible arrangements for a specific set of elements. Therefore, it plays a big role in computer science, cryptography, and operations research.

Note: In permutations, order matters; for example, (2, 1) and (1, 2) are counted as different.

For example, take a set {1, 2, 3}:

  • All Permutations taking all three objects are {1, 2, 3}, {1, 3, 2}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1}.
  • All Permutations taking two objects at a time are, {1, 2}, {1, 3}, {2, 3}, {3, 2}, {3, 1}, {2, 1}.

Calculating permutations involves figuring out how many different ways you can arrange a set of items where the order matters.

Formula

The permutation formula is used to calculate the number of ways to arrange a subset of objects from a larger set where the order of selection matters.

Permutation

Some of the most common representations or notations are as follows:

  • P(n, r)
  • nPr
  • nPr
  • P(n, k)

Derivation

To derive the formula for permutation, we can use the first principle of counting

If an event can occur in m different ways, and another event can occur in n different ways, then the total number of occurrences of the events is m × n.

By the definition of permutation and the principle of counting, we know

nPr = n × (n - 1)  . . .  (n - r + 1)

This product is exactly:

P(n, r) = n! / (n−r)!

Note that there are n ways to pick an item for the first position, (n - 1) ways to pick the second and so on

Multiplying and dividing by (n - r)! on the LHS, we get

nPr = n × (n - 1) × (n - 2) × . . . × (n - r + 1) × (n - r)! / (n - r)!

nPr = n × (n - 1) × (n - 2) × . . . × (n - r + 1) × (n - r) × (n - r - 1) × . . . × 1 / (n - r)!

nPr = n! / (n - r)! where  0 ≤ r ≤ n

Properties

Some of the common properties of permutations are listed as follows:

  • nPn = n (n-1) (n-2) . . . 1 = n!
  • nP0 = n! / n! = 1
  • nP1 = n
  • nP(n - 1) = n!/1 = n!
  • nPr / nPr-1 = n - r + 1
  • nPr =n × n-1Pr-1 = n × (n-1) × n-2Pr-2 = n × (n-1) × (n-2) × n-3Pr-3 = and so on.
  • n-1Pr + r × n-1Pr-1 = nPr

Types of Permutation

In the study of permutation, there are some cases such as:

1. Permutation With Repetition

This is the simplest of the lot. In such problems, the objects can be repeated. Let's understand these problems with some examples.

Example: How many 3-digit numbers greater than 500 can be formed using 3, 4, 5, and 7?

Since a three-digit number greater than 500 will have either 5 or 7 at its hundredth place, we have 2 choices for this place.

There is no restriction on the repetition of the digits hence, for the remaining 2 digits; we have 4 choices for each

So the total permutations are,

2 × 4 × 4 = 32

2. Permutation Without Repetition

In this class of problems, the repetition of objects is not allowed. Let's understand these problems with some examples.

Example: How many 3-digit numbers divisible by 3 can be formed using the , digits 2, 4, 6, and 8 without repetition?

For a number to be divisible by 3, the sum of it digits must be divisible by 3

From the given set, various arrangements like 444 can be formed but since repetition isn't allowed we won't be considering them.

We are left with just 2 cases i.e. 2, 4, 6 and 4, 6, 8

Number of arrangements are 3! in each case

Hence the total number of permutations are: 3! + 3! = 12

3. Permutation of Multi-Sets

A permutation of a multiset is used when the objects are not distinct

Example: Find the number of arrangements of the word BALLOON.

  • Total letters = 7
  • Repeated letters: L (2 times), O (2 times)

Number of distinct permutations: \frac{7!}{2! \cdot 2!} = 1260

➢Practice: Solved Examples

Comment

Explore