Definition 1.1.1 · Factorial
A factorial is the product of all positive integers less than or equal to a given positive integer. In other words,
Line things up, seat people at round tables, rearrange words, choose teams and count subsets: the counting toolkit behind every AMC combinatorics problem.
Nothing beyond solid middle-school math. This is where it all starts.
In this section you will be able to compute factorials quickly and see why n! counts the ways to line up n different things.
How many ways can 5 different books stand on a shelf? Fill the shelf one spot at a time, and watch the choices shrink.
The first spot has 5 choices, the next has 4, and so on down to 1. Multiplying a countdown like comes up so often that it has its own symbol: , read “5 factorial”.
A factorial is the product of all positive integers less than or equal to a given positive integer. In other words,
In this section you will be able to count arrangements in a line, around a circle, and of k objects chosen from n.
Seat 5 friends in a row, then around a round table. Why does the round table give fewer seatings?
In a row, seatings. At a round table, turning everyone one seat to the left keeps every neighbor the same, so those seatings are not new. The trick: fix one person at the top and arrange everyone else.
When you only fill some of the positions, stop the countdown early. That is the permutations formula below.
A permutation is a possible arrangement of objects in a set where the order of the objects matters.
The number of ways of arranging objects in a line is .
The number of ways of arranging objects in a circle, where rotations of the same arrangement aren't considered distinct, is .
The number of ways of arranging objects in a circle, where rotations and reflections of the same arrangement aren't considered distinct, is
Fix 1 person at the top. There are ways to arrange the other people. This takes care of rotations, since rotating an arrangement would put someone else on top. We divide by 2 for reflections because of the symmetry between the left and right sides of the person at the top.
The number of ways to arrange objects out of total objects is
In this section you will be able to count arrangements with rules by filling the most restrictive spot first.
How many 4 digit numbers have an odd first digit, three even digits after it, and no repeated digits?
Rules make some spots pickier than others. Fill the pickiest spot first. Then every other spot has a fixed number of choices, no matter what you picked before, and you can just multiply.
How many 4 digit numbers exist such that the first digit is odd and the other 3 digits are even and all digits distinct?
How many choices does the first digit have?
Gauss, Pauli, Einstein, Newton, Edison, and Faraday are sitting at a circular table. Einstein, Newton, and Faraday are enemies so they refuse to sit next to each other. With this condition, how many ways are there for the 6 physicists to sit at the table if rotations are not counted as distinct orientations?
Without the condition, how many seatings are there?
How many 6 digit numbers exist such that all the digits are distinct, its first 2 digits are 6 or more, the last 2 digits are 5 or less, and the 3rd digit is a nonzero multiple of 7?
Which digit is the most restrictive? How many choices does it have?
Peter is packing his pencil case for the AMC 12. He must pack 3 distinct pencils, 2 distinct erasers, and 2 distinct markers in some order. However, he will not put an item in his case if there are already more of that type of item than any other type of item. (E.g. Peter will not put another pencil in his case if there are already more pencils than markers or more pencils than erasers in the case.) How many different orders are there for Peter to put items in his case?
Peter can only add a type that is tied for the fewest items in the case. What must his first 3 items be?
A license plate in a certain state consists of 4 digits, not necessarily distinct, and 2 letters, also not necessarily distinct. These six characters may appear in any order, except that the two letters must appear next to each other. How many distinct license plates are possible?
Each square in a grid of squares is colored red, white, blue, or green so that every square contains one square of each color. One such coloring is shown on the right below. How many different colorings are possible?
In this section you will be able to count rearrangements of words with repeated letters, glued blocks and alphabetical positions.
COMPUTER has 8 different letters. MISSISSIPPI doesn’t. What changes when letters repeat?
Swapping two identical letters gives the same word. So if you count as if every letter were different, each word gets counted too many times: once for every way to shuffle its repeated letters. Divide those repeats out.
The same trick works for anything with repeats: tiles, cubes, even the columns a marksman shoots at.
The number of ways to order a word is
where is the number of letters and are the number of times each letter that occurs more than once appears in the word.
This is not only true for words! The number of ways of arranging objects (or anything else) with repeats is given by the same formula. In Example 1.6 the "letters" are the names of the columns.
Don't forget to add 1 to the number of words before USAMO in alphabetical order!
How many ways are there to rearrange the letters in COMPUTER such that the C, O, M, and P stay together (not necessarily in the same order)?
How should we deal with the condition that C, O, M and P must stay together?
In a shooting match, eight clay targets are arranged in two hanging columns of three targets each and one column of two targets. A marksman is to break all the targets according to the following rules:
If the rules are followed, in how many different orders can the eight targets be broken?
Inside one column, can the marksman choose which target breaks first?
Using the letters A, M, O, S, and U, we can form five-letter "words". If these "words" are arranged in alphabetical order, then the "word" USAMO occupies position
In alphabetical order the letters are A, M, O, S, U. Which words come before USAMO because of their first letter? How many are there?
How many distinguishable arrangements are there of 1 brown tile, 1 purple tile, 2 green tiles, and 3 yellow tiles in a row from left to right? (Tiles of the same color are indistinguishable.)
A child builds towers using identically shaped cubes of different colors. How many different towers with a height of 8 cubes can the child build with 2 red cubes, 3 blue cubes, and 4 green cubes? (One cube will be left out.)
How many 15-letter arrangements of 5 A's, 5 B's, and 5 C's have no A's in the first 5 letters, no B's in the next 5 letters, and no C's in the last 5 letters?
In this section you will be able to count selections where order doesn't matter, and combine several choices.
A company picks 2 managers from 6 applicants. Is “Ana, then Ben” a different choice from “Ben, then Ana”?
No: both give the same pair of managers. When order doesn’t matter, every group shows up times among the ordered picks, so divide by . That is “ choose ”.
A combination is a possible arrangement in a collection of items where the order of the selection does not matter.
Usually, the words "permute", "order does matter", etc. mean a permutation, while the words "choose", "select", "order doesn't matter", etc. mean a combination.
The number of ways to choose objects out of a total of objects is
This is usually read " choose ".
Look:
This is true because choosing the objects you take (left side) is the same as choosing the objects you leave behind (right side).
There are 6 experienced applicants and 7 inexperienced applicants applying for a job. Out of the experienced applicants, 2 managers are selected. Out of all of the other applicants who aren't selected for a manager (both experienced and inexperienced), 4 other employees are selected. How many ways are there to do this?
First, how many ways are there to select the 2 managers?
You have 12 different energy bars that you need to give to 3 people: Alice, Betty, and Chase. Alice needs 3 bars, Betty needs 4 bars, and Chase needs 5 bars. How many ways are there to distribute the 12 bars to satisfy their requirements?
Start with Alice. How many ways are there to choose her 3 bars?
How many ways are there to place 4 balls into a grid such that no column or row has more than one ball in it? (Rotations and reflections are considered distinct.)
The grid has 4 rows. How many of the rows get a ball?
Robert has 4 indistinguishable gold coins and 4 indistinguishable silver coins. Each coin has an engraving of one face on one side, but not on the other. He wants to stack the eight coins on a table into a single stack so that no two adjacent coins are face to face. Find the number of possible distinguishable arrangements of the 8 coins.
First, deal with the colors. How many ways are there to arrange the 4 gold and 4 silver coins?
12 astronauts applied to go on a mission to explore Mars. 2 different rockets will be sent from Earth: one carrying 3 people and another carrying 4. Out of the 12 astronauts, 4 of them are very experienced so they must go on either rocket. How many ways are there to place the astronauts in the rockets?
At a gathering of 30 people, there are 20 people who all know each other and 10 people who know no one. People who know each other hug, and people who do not know each other shake hands. How many handshakes occur within the group?
Values for , and are to be selected from without replacement (i.e. no two letters have the same value). How many ways are there to make such choices so that the two curves and intersect? (The order in which the curves are listed does not matter; for example, the choices is considered the same as the choices .)
A game uses a deck of different cards, where is an integer and . The number of possible sets of 6 cards that can be drawn from the deck is 6 times the number of possible sets of 3 cards that can be drawn. Find .
What is the number of ways the numbers from 1 to 14 can be split into 7 pairs such that for each pair, the greater number is at least 2 times the smaller number?
In this section you will be able to count subsets with 2 choices per element, and use clever pairings of subsets.
A burger shop offers 8 condiments, and you can take any collection of them. Each condiment is a switch: on or off.
Each element of a set is either in your subset or out of it. Two choices per element, so choices in all. That count includes the empty set, where every switch is off.
The number of subsets of a set of size is .
We have 2 choices for each element of the set: include it in our subset or leave it out. Since there are elements, the total number of subsets is ( times) .
Note: one of these subsets is the empty subset, where we leave out every element. Always check the problem wording to see whether the empty subset should count.
Two subsets of the set are to be chosen so that their union is and their intersection contains exactly two elements. In how many ways can this be done, assuming that the order in which the subsets are chosen does not matter?
Call the subsets and . Since , how many places can each element go?
For and each of its non-empty subsets a unique alternating sum is defined as follows. Arrange the numbers in the subset in decreasing order and then, beginning with the largest, alternately add and subtract successive numbers. For example, the alternating sum for is and for it is simply . Find the sum of all such alternating sums for .
It's possible to add them all by hand, but there's a cleverer way. For , what is the sum of all alternating sums?
Henry's Hamburger Haven offers its hamburgers with the following condiments: ketchup, mustard, mayonnaise, tomato, lettuce, pickles, cheese, and onions. A customer can choose one, two, or three meat patties and any collection of condiments. How many different kinds of hamburgers can be ordered?
In this section you will be able to mix every tool from this chapter on contest problems.
Time to mix it all up. These problems use factorials, choose-formulas, word rearrangements and subsets, sometimes all at once. Each one has three hints if you get stuck.
Want every problem from this chapter on one page? Open the problem set.
In a table tennis tournament every participant played every other participant exactly once. Although there were twice as many right-handed players as left-handed players, the number of games won by left-handed players was more than the number of games won by right-handed players. (There were no ties and no ambidextrous players.) What is the total number of games played?
Ten points in the plane are given, with no three collinear. Four distinct segments joining pairs of these points are chosen at random, all such segments being equally likely. The probability that some three of the segments form a triangle whose vertices are among the ten given points is , where and are relatively prime positive integers. Find .
Three numbers, , are drawn randomly and without replacement from the set . Three other numbers, , are then drawn randomly and without replacement from the remaining set of 997 numbers. Let be the probability that, after suitable rotation, a brick of dimensions can be enclosed in a box of dimensions , with the sides of the brick parallel to the sides of the box. If is written as a fraction in lowest terms, what is the sum of the numerator and denominator?