Combinatorics

Combinatorics is a branch of math concerned with collections of arrangement of finite objects. It helps us answer the question of how many ways a task can be achieved.

What do we mean by "task"?

Here's some example:

  • How many ways can you draw a black queen or a red king from a deck of cards?

In this example, drawing a black queen we'll call task and a red king is task B.

Since there are 2 ways to draw a black queen, we would say A = 2 and same for task B, so B = 2.

Addition Principle

Suppose A can be done in mm ways and B can be done in nn ways, if A and B are mutually exclusive tasks, as they are in the above example, then task A or task B can be achieved in m + n ways.

Inclusion-Exclusion Principal

If we have a set of tasks A that can achieved in mm different ways, and task B that can be achieved in nn different ways, and also a number of ways kk that both can be accomplished, then task AA or task BB can be achieved in m+nkm + n - k different ways.

Multiplication Principle

There are 2 key ideas: Permutations and Combinations.