# number of possible strings of length 4 with exactly 1 digit repeated?

I am trying to find the number of string that have a length of 4 and have 1 digit repeated (ex. 7181). What i did was I found the total number of permutations and got 12, since there is a pair of indistinguishable numbers, and multiplied that by 10, which is the number of possible repeated digits, and multiplied that by 9, then multiplied that by 8. My final answer was 8640, but I see that people got half of that as the answer. Why doesnt my method work?

• I would disagree with the $12$ "types." There are $\binom{4}{2}$ ways to choose where the repeated digits will go, and now for any one of these types, the doubled letter can be chosen in $10$ ways, and for every choice the remaining slots can be filled in $(9)(8)$ ways. Commented May 10, 2015 at 23:56
• @AndréNicolas both of our methods are right Commented May 11, 2015 at 0:04
• Yes,. My argument for $\binom{4}{2}$ is that It makes the "natural" $(10)(9)(8)$ right. Commented May 11, 2015 at 1:34

The problem is your factors of $9$ and $8$. You’re right that there are $10$ choices for the repeated digit, but there are only $\binom92$ choices for the other $2$ digits, not $9\cdot 8$: you’ve already taken order into account in your figure of $12$ permutations, and all that remains is to choose the digits themselves.
In other words, you’re counting $7181$ twice, once picking $7$ and then $8$ for the two non-$1$ slots, and once picking $8$ and then $7$.
{"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": 1, "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, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}