# Permutation: Repetition

How to solve a permutation with repetition: formula, 3 examples, and their solutions.

## Formula

### Formula

If there's p of idential things,
q of another idential things,
r of another idential things,
...
then the number of ways
to arrange all of them is
n!/[p!⋅q!⋅r!⋅...].

n: Total number of things

This is the permutation with repetition formula.

## Example 1

### Solution

There are 5 letters.
n = 5

There are 2 of a-s.

To make a 5-letter word,
arrange these 5 letters in a row.

So the number of ways
to make a 5-letter word is,
5!/2!.

5! = 5⋅4⋅3⋅2!

Factorial

Cancel both 2!.

5⋅4 = 20

20⋅3 = 60

## Example 2

### Solution

There are 7 letters.
n = 7

There are
3 of a-s,
2 of b-s,
and 2 of c-s.

To make a 7-letter word,
arrange these 7 letters in a row.

So the number of ways
to make a 7-letter word is,
7!/[3!⋅2!⋅2!].

7! = 7⋅6⋅5⋅4⋅3!

2! = 2⋅1 = 2
2! = 2⋅1 = 2

Cancel both 3!.

Cancel 4 in the numerator
and cancel 2⋅2 in the denominator.

6⋅5 = 30

7⋅30 = 210

## Example 3

### Solution

In the given map,
there's no disconnected part.

you can solve this by using
permutation with repetition formula.

To make the shortest path,
you should move
→ (left) 3 times
and
↓ (downward) 3 times.

To make a shortest path,
arrange these 6 directions in a row.

So the number of the shortest paths is
6!/[3!⋅3!].

6! = 6⋅5⋅4⋅3!

3! = 3⋅2⋅1 = 3⋅2

Cancel both 3!.

Cancel 6 in the numerator
and cancel 3⋅2 in the denominator.

5⋅4 = 20