# Combinations

In this lesson, we'll learn how to calculate combinations in different cases.

We'll cover the following

For combinations, the order doesn’t matter.

## Without repetition

For example, I want to pick three balls from a bag of five balls. The end result is that I should have three balls, the order in which I actually pick the balls is not important. How many ways can I do this?

The formula is $C(n,k) = \frac{P(n,k)}{k!} = \frac{n!}{(n-k)!k!} = {n \choose k}$

Quick explanation: If order mattered, the number of ways would be $P(n,k)$ in which there are $k!$ variations for every choice. To explain further, suppose the three balls we pick are $(2,3,5)$. We end up counting this same selection of $3$ balls $3!$ times. This happens for every subset of balls, so we divide by $3!$

ways = ${5 \choose 3} = \frac{5!}{2!3!} = \frac{120}{12} = 10$

## Selecting from identical objects

There is only 1 way to select $k$ objects from $n$ identical objects.

The order doesn’t matter and the objects are identical, so every way you choose results in the same combination.

## With repetitions

This is hardest to explain and out of the scope of this level’s discussion. We will cover this in detail when we discuss the number of integer solutions of a linear equation in later lessons.

${N \choose K} = {N-1 \choose K} + {N-1 \choose K-1}$

## Question

Question: From a group of seven men and six women. A committee needs to be made of five people with at least three men. In how many ways can this be done?

Solution: We need at least three men in the committee. So, there are three ways to form the committee.

• 3 men + 2 women
• 4 men + 1 women
• 5 men

So, required number of ways:

$= {7 \choose 3}*{6 \choose 2} + {7 \choose 4}*{6 \choose 1} + {7 \choose 5}$

$= 525 + 210 + 21$

$= 756$

In the next lesson, we’ll discuss a solved PnC problem.

Get hands-on with 1200+ tech skills courses.