If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Statistics and probability>Unit 8

Lesson 2: Permutations

# Permutation formula

Want to learn about the permutation formula and how to apply it to tricky problems? Explore this useful technique by solving seating arrangement problems with factorial notation and a general formula. This video also demonstrates the benefits of deductive reasoning over memorization.

## Want to join the conversation?

• If the number of chairs is indeed greater than the number of people, it breaks the generic formula of n! / (n-r)! because the denominator is a negative factorial (undefined). Is there an explanation for this case?
• The general permutation can be thought of in two ways: who ends up seated in each chair, or which chair each person chooses to sit in. This is less important when the two groups are the same size, but much more important when one is limited. n and r are dictated by the limiting factor in question: which people get to be seated in each of the limited number of chairs (n = # of people, r = # of chairs), or which chairs do each of the limited number of people choose to sit in (n = # of chairs, r = number of people). In the permutation formula, n will always be the larger number of options and r the smaller.
• How many words can be formed using the word Pencil such that N is always next to E?
• First let's think about it a bit, to figure out how many ways you can arrange "Pencil" with N and E always next to one another it's going to be all the different ways to arrange "pencil" as if "en" was a single letter and the same thing with "ne"

1) How many ways can we arrange Pencil as if "en" was a single letter?
5! = 120 ways, we have 5 things to arrange P c i l and "en"

2) Now how many ways can we arrange Pencil as if "ne" was a single letter?
Same thing, 5! = 120

5!+5!=120+120=240 ways !

There we go ! There are 240 different ways to arrange "pencil" so that e and n are always next to each other.

Now to dig in a little deeper what if we wanted "p e and n" to always be together ? Have a go at it before looking below :)

With "e" and "n" we figured out that "en" and "ne" were the only two possible way to arrange them, and treated them as a single letter. But really we looked at all the different ways to arrange 2 items, and there was 2! ways of doing it, so 2 ways and "pencil" was treated as a 5 letters word. Finally we added them together to get our answer.
Now we're doing it with 3 letters "p e and n" so there are 3! ways of arranging them, therefore 6 ways. And "pencil" just became a 4 letters word, so it has 4! ways of being arranged, therefore 24 ways.

Let's take a second and figure out what 24 actually represents, 24 is the number of ways you can arrange "pencil" with "pen" being a single letter, but we got 6 of those (pen, nep, epn ...) so we need to multiply 24 by 6 to get our answer.
24*6=144 ways to arrange pencil so that "p e and n" are always next to each other !

Can you come up with a formula for a "n" long word where you want "x" items to be together ? :)
• Why is the factorial symbol an exclamation mark?
• The notation (and the name "factorial") was chosen by Christian Kramp, a French mathematician who did much of the early work in combinatorics. He decided that a simple notation was important because the factorial was used so often in the formulas he was using.
• At he says that the formula is n!/(n-r)!, but in the first example there are 5 seats and 5 people; which is: 5!/(5-5)! which is 5!/0!. Anything divided by zero is undefined but the answer for the first one is 120. How is this possible?
• Would (n!)/((r-1)!) also work?
• No. The formula n!/(n-r)! works because n! gives the amount ways to arrange n object over n spaces. But since we are working with r spaces, there will be n-r spaces left over where we can’t arrange n. And (n-r)! gives all those arrangements that we will be missing, so we divide n! by that in order to eliminate them.

(r-1)! gives you the number of arrangements over one less than the amount of spaces you have. The biggest problem with this is that we want to divide by the amount of arrangements we are missing, not the ones we have.
• What if each person could also have an orientation? Say: 1 of 4 possibilities.
I can reason that the answer for 5 people would be: (5*4) * (4*4) * (3*4) * (2*4) * (1*4) = 122,880.
But I'm having expressing this with the proper syntax. Or am I heading in the wrong direction with trying to use factorial notation?
• The orientation doesn't depend on their seat or anyone else's orientation. So there would be 5! ways of arranging 5 people and for each of those 5 people, there would be 4 orientations. This means that there would be 4^5 ways of orienting everyone. Why? Because the first person has 4 orientations to pick from, the second person also has 4 orientations to pick from and so on. So we multiply 4*4*4*4*4 = 4^5. So the final result is 4^5 * 5! = 122,880.
• How would you go about finding permutations of a number, where some of the digits repeat? ex. 112233
• We have 6 digits, and thus a preliminary count of 6!. However, note that several of these 6! configurations are not distinct. In particular, we have 2! ways to arrange the 1s, 2! ways to arrange the 2s, and 2! ways to arrange the 3s. Thus, we divide by those arrangements to account for the over-counting and our final answer is:
6!/(2! • 2! • 2!) = 720/8 = 90
Comment if you have questions!
• from a group of 9 different books 4 books are to be selected and arrange on a shelf.how many arrangement are possible
• There are 9 choices for the first book. For each of those choices, there are 8 choices for the second book, for a total of 72. For each of those, there are 7 choices for the third book, and so on.

So there are 9·8·7·6=3024 arrangements.
• We are using the rule of product axiom for this question.This results in multiplication not addition.
• What dose #! mean? (# means number of -blank-)
(1 vote)
• ! is the factorial function. n! (read "en factorial") is the product of n and all the positive integers less than n.

So 4!=4•3•2•1=24
6!=6•5•4•3•2•1=720

We can also define it recursively by saying
0!=1
n!=n•(n-1)!