# The Basic Counting Principle

When there are m ways to do one thing,
and n ways to do another,
then there are m×n ways of doing both.

Example: you have 3 shirts and 4 pants.

That means 3×4=12 different outfits.

Example: There are 6 flavors of ice-cream, and 3 different cones.

That means 6×3=18 different single-scoop ice-creams you could order.

It also works when you have more than 2 choices:

### Example: You are buying a new car.

 There are 2 body styles: sedan or hatchback There are 5 colors available: There are 3 models: GL (standard model), SS (sports model with bigger engine) SL (luxury model with leather seats)

How many total choices?

You can see in this "tree" diagram:

You can count the choices, or just do the simple calculation:

Total Choices = 2 × 5 × 3 = 30

## Independent or Dependent?

But it only works when all choices are independent of each other.

If one choice affects another choice (i.e. depends on another choice), then a simple multiplication is not right.

### Example: You are buying a new car ... but ...

the salesman says "You can't choose black for the hatchback" ... well then things change!

You now have only 27 choices.

Because your choices are not independent of each other.

But you can still make your life easier with this calculation:

Choices = 5×3 + 4×3 = 15 + 12 = 27