Math Core

Module 2.3 · Counting and Probability

Permutations

A permutation is an arrangement of objects in order: runners on a podium, books on a shelf, letters in a word. Permutations are the multiplication principle applied to one special situation, and they come with a few standard tricks (blocks, gaps, repeated letters, round tables) that appear again and again in contests.

Arranging everything

To line up 55 different books, there are 55 choices for the first spot, 44 for the second, and so on: 5⋅4⋅3⋅2⋅1=1205 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 120.

Definition

Factorial

For a positive integer nn, n!=n⋅(n−1)⋅(n−2)⋯2⋅1n! = n \cdot (n-1) \cdot (n-2) \cdots 2 \cdot 1 is the number of ways to arrange nn different objects in a row. By convention 0!=10! = 1.

Useful values: 3!=63! = 6, 4!=244! = 24, 5!=1205! = 120, 6!=7206! = 720, 7!=50407! = 5040.

Arranging some of them

If only kk of the nn objects are placed in order, stop the product after kk factors:

P(n,k)=n⋅(n−1)⋯(n−k+1)⏟k factors=n!(n−k)!.P(n, k) = \underbrace{n \cdot (n-1) \cdots (n-k+1)}_{k \text{ factors}} = \frac{n!}{(n-k)!}.

For example, a club of 1010 members can choose a president, a vice president and a treasurer in 10⋅9⋅8=72010 \cdot 9 \cdot 8 = 720 ways. The offices are different, so order matters.

Repeated objects

How many ways can you arrange the letters of LEVEL\text{LEVEL}? If all five letters were different, there would be 5!=1205! = 120 arrangements. But swapping the two L's, or the two E's, gives the same word. Each word was counted 2!⋅2!=42! \cdot 2! = 4 times, so there are 120÷4=30120 \div 4 = 30 distinct arrangements.

Arrangements with repeats

The number of ways to arrange nn objects where one kind repeats aa times, another bb times, and so on, is

n!a! b!⋯\frac{n!}{a! \, b! \cdots}

Together and apart

Worked example: Glue them together

Five friends, including Ana and Bo, line up for a photo. In how many arrangements are Ana and Bo next to each other?

Glue Ana and Bo into a single block. Now arrange 44 units (the block and the other three friends): 4!=244! = 24 ways. Inside the block, Ana and Bo can be in 22 orders. Total: 24⋅2=4824 \cdot 2 = 48.

Worked example: Keep them apart

In how many of the arrangements above are Ana and Bo not next to each other?

Count all arrangements and subtract the ones where they are together: 5!−48=120−48=725! - 48 = 120 - 48 = 72.

Worked example: Around a table

In how many ways can 66 people sit at a round table, if two seatings count as the same when everyone has the same left and right neighbors (that is, rotations are the same)?

In a row there are 6!=7206! = 720 seatings. Around a table, each seating can be rotated to 66 positions that all look the same, so there are 720÷6=120720 \div 6 = 120 seatings.

Another way to see it: seat one person anywhere to "anchor" the table, then arrange the other 55 in the remaining seats in order: 5!=1205! = 120.

Common mistake

With repeated letters, don't subtract the repeats; divide. Each distinct word is counted once for every way of shuffling the identical letters among themselves.

Tip

For a digit or letter restriction (the number must be odd, a vowel must come first), fill the restricted position first, then arrange the rest. If the objects include repeats, split into cases by what goes in the restricted position.

Practice

Practice 1

In how many ways can 55 different books be arranged on a shelf?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

How many distinct arrangements are there of the letters in BANANA\text{BANANA}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Six people stand in a row. In how many arrangements are two particular people, Ivy and Jon, next to each other?

Practice 4

How many distinct arrangements are there of the letters in MATHCOUNTS\text{MATHCOUNTS}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Four boys and three girls line up in a row. In how many arrangements do the three girls stand together?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Four boys and three girls line up in a row so that boys and girls alternate. How many arrangements are possible?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

How many five-digit odd numbers can be made by arranging the digits 1,1,2,2,31, 1, 2, 2, 3?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Six people sit at a round table (rotations of a seating count as the same). Two of them, Kai and Lea, refuse to sit next to each other. How many seatings are possible?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Real contest practice