# Permutations with Repetition

Given a set of **n** elements, the permutations with repetition are different groups formed by the **k** elements of a subset such that:

The order of the elements does matter.

The elements are repeated.

The permutations with repetition are denoted by **PR(n,k)**.

Permutations with repetition of **n** elements are permuations where the first element is repeated **a** times, the second **b** times, the third **c** times, ...

**n = a + b + c + ... **

#### Examples

1. How many three digit numbers can be formed with the digits: 1, 2, 3, 4, 5?

n = 5 k = 3

The order of the elements does matter.

The elements are repeated.

2. How many three digit numbers can be formed with the digits: 0, 1, 2, 3, 4, 5?

n = 6 k = 3

The numbers must be separated into two blocks:

The first set, of one number, can occupy only one of 5 digits because a number does not begin with zero (except for license plates and other special cases).

n = 5 k = 1

The second block, of two numbers, can occupy any digit.

n = 6 k = 2

3. How many nine-digit numbers can be formed with the numbers 2, 2, 2, 3, 3, 3, 3, 4, 4?

n = 9 a = 3 b = 4 c = 2 a + b + c = 9

The order of the elements does matter.

The elements are repeated.

4. The signal mast of a ship can raise nine flags at one time (three red, two blue and four green). How many different signals can be communicated by the placement of these nine flags?

n = 9 r = 3 b = 2 g = 4 r + b + g = 9

The order of the elements does matter.

The elements are repeated.