## Permutations

**
The number of ways you can change the order of a set of things is called
the number of ***PERMUTATIONS* of that set of things.

For example, how many different ways can you arrange the letters in the
word

WHO
Answer: WHO WOH HWO HOW OHW OWH = 6 ways
1 2 3 4 5 6

Each different letter arrangement is called a *permutation* of the
word "WHO".

How about the word "STOP"? Well, here they are:

STOP STPO SOTP SOPT SPTO SPOT <- starts with "S"
TSOP TSPO TOSP TOPS TPSO TPOS <- starts with "T"
OSTP OSPT OTSP OTPS OPST OPTS <- starts with "O"
PSTO PSOT PTSO PTOS POST POTS <- starts with "P"

There are 24 ways to order the letters in "STOP".
Is there a general rule here? Fortunately, yes. Here's the rule for
"STOP":
- There are 4 ways to pick the first letter.
- After you pick the first letter there are 3 ways to pick the second
letter.
- After you pick the first 2 letters, there are 2 ways to pick the third
letter.
- After picking the first 3 letters, there is only 1 letter left to
pick.

So the number of ways to order the letters in "STOP" is 4 x 3 x 2 x 1 = 24
ways!

Do you see the pattern
here? |

WORD LENGTH | EXAMPLE | PERMUTATIONS | RESULT |

1 | A | 1 | =1 |

2 | AM |
2x1 | =2 |

3 | BOY |
3x2x1 | =6 |

4 | GIRL |
4x3x2x1 | =24 |

5 | TABLE |
5x4x3x2x1 | =120 |

6 | PIANOS |
6x5x4x3x2x1 | =720 |

7 | PICTURE |
7x6x5x4x3x2x1 | =5040 |

8 | PURCHASE |
8x7x6x5x4x3x2x1 | =40320 |

Now, let's suppose you only want to choose a few letters out of your word.
For example, you only want to choose 2 letters out of the word "TABLE".
Here are all the ways to pick them:

TA TB TL TE AT AB AL AE BT BA
BL BE LT LA LB LE ET EA EB EL

There are 20 pairs.

Is there a rule here too? Of course there is! Here it is:

- There are 5 ways to choose the first letter.
- After you choose the first letter, there are 4 ways to choose the
second letter.

So, the number of 2 letter permutations of the 5 letter word "TABLE" is

5 x 4 = 20

How about a general rule? Here it is:
If you have a word with "N" letters in it, then:

- to select 2 letters, the number of permutations is N x (N-1)

Example:
TABLE, N=5, 5 x 4 = 20
- to select 3 letters, the number of permutations is N x (N-1) x (N-2)
Example:
TABLE, N=5, 5 x 4 x 3 = 60
- to select 4 letters, the number of permutations is N x (N-1) x (N-2) x
(N-3) Example:
TABLE, N=5, 5 x 4 x 3 x 2 = 120