Explain difference between multiplying and adding in combinatorics

108 Views Asked by At

Today I did combinatorics. It was about the following task:

A password consists of any sequence of upper-case letters (A-Z), lower-case letters (a-z) or numbers ($0-9$).

Question: How many such passwords with exactly 3 characters are there?

The answer is simple: $62\cdot 62 \cdot 62 = 238.328$.

Today the question came up from a student, why do we multiply instead of add? How would you explain this difference as simply as possible to someone who has never done anything with combinatorics or probability theory before.

2

There are 2 best solutions below

0
On

For a single character you're adding the choices:

#[A-Z]: 26 #[a-z]: 26 #[0-9]: 10

Total: 62

Addition usually corresponds to "OR". Here, for each character it can either be uppercase, lowercase, or digit. Multiplication is usually for "AND". Here, you're choosing 3 char password. Loosely translate to choose 1st char AND 2nd char AND 3rd char.

0
On

I would say that, starting with 2 sets only and then expanding it to $n$, that if you have multiple elements in each set, and each of them in the first can form a connection to any in the other, then this is the definition of multiplication, i.e. one element from the first forms as many connections to the other as its number of elements, and therefore the total number of connections is this number of elements of the other times the number of elements of the first.
Now if we have more sets, then we can continue with saying that the already connected pairs are elements of a set themselves, and these should be further connected with the third, so there is multiplication again, till all $n$ sets are used.
Addition would be if we have listed all the elements from all the sets next to each other in one list, or in other words, if we can logically make only one connection from one entire set to an entire other one, these create one set and only one connection can be made from this entire set to the next entire set, and so forth for all sets.