## Calculator Use

The Combinations Calculator will find the number of possible combinations that can be obtained by taking a sample of items from a larger set. Basically, it shows how many different possible subsets can be made from the larger set. For this calculator, the order of the items chosen in the subset does not matter.

- Factorial
- There are n! ways of arranging n distinct objects into an ordered sequence, permutations where n = r.
- Combination
- The number of ways to choose a sample of r elements from a set of n distinct objects where order does not matter and replacements are not allowed.
- Permutation
- The number of ways to choose a sample of r elements from a set of n distinct objects where order does matter and replacements are not allowed. When n = r this reduces to n!, a simple factorial of n.
- Combination Replacement
- The number of ways to choose a sample of r elements from a set of n distinct objects where order does not matter and replacements are allowed.
- Permutation Replacement
- The number of ways to choose a sample of r elements from a set of n distinct objects where order does matter and replacements are allowed.
- n
- the set or population
- r
- subset of n or sample set

## Combinations Formula:

\( C(n,r) = \dfrac{n!}{( r! (n - r)! )} \)

For n ≥ r ≥ 0.

The formula show us the number of ways a sample of “r” elements can be obtained from a larger set of “n” distinguishable objects where order does not matter and repetitions are not allowed. [1] "The number of ways of picking r unordered outcomes from n possibilities." [2]

Also referred to as r-combination or "n choose r" or the **binomial coefficient**. In some resources the notation uses k instead of r so you may see these referred to as k-combination or "n choose k."

### Combination Problem 1

**Choose 2 Prizes from a Set of 6 Prizes**

You have won first place in a contest and are allowed to choose 2 prizes from a table that has 6 prizes numbered 1 through 6. How many different combinations of 2 prizes could you possibly choose?

In this example, we are taking a subset of 2 prizes (r) from a larger set of 6 prizes (n). Looking at the formula, we must calculate “6 choose 2.”

C (6,2)= 6!/(2! * (6-2)!) = 6!/(2! * 4!) = **15 Possible Prize Combinations**

The 15 potential combinations are {1,2}, {1,3}, {1,4}, {1,5}, {1,6}, {2,3}, {2,4}, {2,5}, {2,6}, {3,4}, {3,5}, {3,6}, {4,5}, {4,6}, {5,6}

### Combination Problem 2

**Choose 3 Students from a Class of 25**

A teacher is going to choose 3 students from her class to compete in the spelling bee. She wants to figure out how many unique teams of 3 can be created from her class of 25.

In this example, we are taking a subset of 3 students (r) from a larger set of 25 students (n). Looking at the formula, we must calculate “25 choose 3.”

C (25,3)= 25!/(3! * (25-3)!)= **2,300 Possible Teams**

### Combination Problem 3

**Choose 4 Menu Items from a Menu of 18 Items**

A restaurant asks some of its frequent customers to choose their favorite 4 items on the menu. If the menu has 18 items to choose from, how many different answers could the customers give?

Here we take a 4 item subset (r) from the larger 18 item menu (n). Therefore, we must simply find “18 choose 4.”

C (18,4)= 18!/(4! * (18-4)!)= **3,060 Possible Answers**

## Handshake Problem

In a group of n people, how many * different* handshakes are possible?

First, let's find the * total* handshakes that are possible. That is to say, if each person shook hands once with every other person in the group, what is the total number of handshakes that occur?

A way of considering this is that each person in the group will make a total of n-1 handshakes.Since there are n people, there would be n times (n-1) total handshakes. In other words, the total number of people multiplied by the number of handshakes that each can make will be the total handshakes. A group of 3 would make a total of 3(3-1) = 3 * 2 = 6. Each person registers 2 handshakes with the other 2 people in the group; 3 * 2.

Total Handshakes = n(n-1)

However, this includes each handshake twice (1 with 2, 2 with 1, 1 with 3, 3 with 1, 2 with 3 and 3 with 2) and since the orginal question wants to know how many * different* handshakes are possible we must divide by 2 to get the correct answer.

Total Different Handshakes = n(n-1)/2

### Handshake Problem as a Combinations Problem

We can also solve this Handshake Problem as a combinations problem as C(n,2).

n (objects) = number of people in the group

r (sample) = 2, the number of people involved in each different handshake

The order of the items chosen in the subset does not matter so for a group of 3 it will count 1 with 2, 1 with 3, and 2 with 3 but ignore 2 with 1, 3 with 1, and 3 with 2 because these last 3 are duplicates of the first 3 respectively.

\( C(n,r) = \dfrac{n!}{( r! (n - r)! )} \)

\( C(n,2) = \dfrac{n!}{( 2! (n - 2)! )} \)

expanding the factorials,

\( = \dfrac{1\times2\times3...\times(n-2)\times(n-1)\times(n)}{( 2\times1\times(1\times2\times3...\times(n-2)) )} \)

cancelling and simplifying,

\( = \dfrac{(n-1)\times(n)}{2} = \dfrac{n(n-1)}{2} \)

which is the same as the equation above.

## Sandwich Combinations Problem

This is a classic math problem and asks something like **How many sandwich combinations are possible?** and this is how it generally goes.

Calculate the possible sandwich combinations if you can choose one item from each of the four categories:

- 1 bread from 8 options
- 1 meat from 5 options
- 1 cheese from 5 options
- 1 topping from 3 options

Often you will see the answer, without any reference to the combinations equation C(n,r), as the multiplication of the number possible options in each of the categories. In this case we calculate:

8 × 5 × 5 × 3 = 600

possible sandwich combinations

In terms of the combinations equation below, the number of possible options for each category is equal to the number of possible combinations for each category since we are only making 1 selection; for example C(8,1) = 8, C(5,1) = 5 and C(3,1) = 3 using the following equation:

C(n,r) = n! / ( r!(n - r)! )

We can use this combinations equation to calculate a more complex sandwich problem.

### Sandwich Combinations Problem with Multiple Choices

Calculate the possible combinations if you can choose several items from each of the four categories:

- 1 bread from 8 options
- 3 meats from 5 options
- 2 cheeses from 5 options
- 0 to 3 toppings from 3 options

Applying the combinations equation, where order does not matter and replacements are not allowed, we calculate the number of possible combinations in each of the categories. You can use the calculator above to prove that each of these is true.

- 1 bread from 8 options is C(8,1) = 8
- 3 meats from 5 options C(5,3) = 10
- 2 cheeses from 5 options C(5,2) = 10
- 0 to 3 toppings from 3 options; we must calculate each possible number of choices from 0 to 3 and get C(3,0) + C(3,1) + C(3,2) + C(3,3) = 8

Multiplying the possible combinations for each category we calculate:

8 × 10 × 10 × 8 = 6,400

possible sandwich combinations

How many possible combinations are there if your customers are allowed to choose options like the following that still stay within the limits of the total number of portions allowed:

- 2 portions of one meat and 1 portion of another?
- 3 portions of one meat only?
- 2 portions of one cheese only?

In the previous calculation, replacements were not allowed; customers had to choose 3 different meats and 2 different cheeses. Now replacements are allowed, customers can choose any item more than once when they select their portions. For meats and cheeses this is now a combinations replacement or multichoose problem using the combinations with replacements equation:

*C ^{R}(n,r) = C(n+r-1, r) = (n+r-1)! / (r! (n - 1)!)*

For meats, where the number of objects n = 5 and the number of choices r = 3, we can calculate either combinations replacement CR(5,3) = 35 or substitute terms and calculate combinations C(n+r-1, r) = C(5+3-1, 3) = C(7, 3) = 35.

Calculating cheese choices in the same way, we now have the total number of possible options for each category at

- bread is 8
- meat is 35
- cheese is 15
- toppings is 8

and finally we multiply to find the total

8 × 35 × 15 × 8 = 33,600

possible sandwich combinations!

How many combinations are possible if customers are also allowed replacements when choosing toppings?

## References

[1] Zwillinger, Daniel (Editor-in-Chief). *CRC Standard Mathematical Tables and Formulae, 31st Edition* New York, NY: CRC Press, p.206, 2003.

For more information on combinations and binomial coefficients please see Wolfram MathWorld: Combination.