In how many ways can 5 letters be mailed if there are 3 different mailboxes available if each letter

The correct answer to this 3* 3* 3* 3* 3
The logic being each letter can be mailed through any of the three mails

However I was trying to solve it by making it into an equation
x+y+z=5
we have three mail boxes and total 5 letters
the no of solution to this equation would be
n+r-1Cr
ie 7c2 but then the answer would be wrong.
Why is this logic wrong?

1 Like

you use 7 different variables (x, y, z, n, r, C, r, c) and don’t say what any of them stand for. n+1-1Cr is not an equation either.
The first problem with your logic is that you have to present it better so others can have the chance of helping.

When using the formula, you get 21. The following are the combinations:

[0, 0, 5]
[0, 1, 4]
[0, 2, 3]
[0, 3, 2]
[0, 4, 1]
[0, 5, 0]
[1, 0, 4]
[1, 1, 3]
[1, 2, 2]
[1, 3, 1]
[1, 4, 0]
[2, 0, 3]
[2, 1, 2]
[2, 2, 1]
[2, 3, 0]
[3, 0, 2]
[3, 1, 1]
[3, 2, 0]
[4, 0, 1]
[4, 1, 0]
[5, 0, 0]

But, this is not complete. We should also consider what letters we are putting into each mailbox.

For example, consider the second combination.

[0, 1, 4]: You can choose any 1 from the 5 letters and put it in the 2^{nd} box. Therefore, the combination [0, 1, 4] can appear in 5 different ways.

Adding all such ways, you’ll get the result as 3^5.