# Find number of ways..

The number of ways in which we can post 5 letters in 10 letter boxes is.....

I already have the answer given to me but I am not able to get there(Only answer is given not solution). Please answer with appropriate solution for understanding.

-

## 1 Answer

If you had only one letter, there would be $10$ ways to post it. With two letters you’d have $10$ ways to post the first letter, and no matter which letter box you used, you could still post the second letter in any of the $10$ letter boxes. Thus, you’d have $10^2$ possible choices. If this isn’t clear, imagine that the letter boxes are labelled A through J. If you post the first letter in box A, you can post the second in any of the $10$ boxes; that’s a total of $10$ different ways to post the two letters. If you post the first letter in box B, you can again post the second in any of the $10$ boxes; that’s another $10$ different ways to post the two letters. Thus, there are $10$ different ways to post the two letters for each of the $10$ ways to post the first letter, for a grand total of $10\cdot10=10^2$ ways to post the two letters.

Now just extent the reasoning. Each of those $10^2$ ways to post the first two letters can be combined with any of $10$ different ways to post the third letter, so there are $10^2\cdot10=10^3$ ways to post the first three letters. Two more arguments of the same kind lead to the conclusion that there are $10^5$ different ways to post the $5$ letters.

Note that I’m assuming that you’re allowed to post more than one letter in the same letter box. If that’s not the case, the reasoning is similar, but the answer is quite different. If you can post at most one letter in a box, there are still $10$ different ways to post the first letter. After you’ve done that, however, there are only $9$ ways to post the second letter, since you can’t use the first letter box again. Thus, you get only $10\cdot9$ different combinations of letter boxes for the first two letters. Similarly, after they’ve been posted you must pick one of the $8$ remaining letter boxes for the third letter, so each of the $10\cdot9$ ways of posting the first two letters gives you only $8$ ways of posting the first three. As a result, there are $10\cdot9\cdot8$ ways of posting the first three letters. Two more arguments of the same kind lead this time to the conclusion that there are $10\cdot9\cdot8\cdot7\cdot6=30,240$ different ways to post the letters if you can use each letter box at most once.

-

Yes you are very right, and the answer is correct. What's more interesting is the solution, which after seeing I am thinking how could I miss that. Thankyou very much. Sorry for delay in accepting the answer I was reading the wiki entry on stars and bars :D – Master Chief Dec 21 '12 at 12:55
@MasterChief: No problem: that’s a very good use of your time. :-) And you’re welcome. – Brian M. Scott Dec 21 '12 at 13:12
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 24, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9356698989868164, "perplexity_flag": "head"}