# Logic using Permutation

I have this question in front of me:

How many different four letter word can be formed using the letters of “power” such that at least one letter is repeated within the new word.

I solved this using this concept:

I have four places, so at each place there can be 5 letters placed, assuming 2 places as one (because the letted in both the places is same) and multiplying $5×5×5$ I get 125. Now because in those 2 places any of the 5 nos. can come so I will multiply 125 by 5 again which gives me 625, but this is wrong... the correct ans is 505. Kindly help me where I am wrong.

Ignoring the restriction, there are $5^4=625$ possible four-letter words that can be formed. The ones with no repeated letters – the excluded words – number $^5P_4=\frac{5!}{(5-4)!}=120$. Therefore there are $625-120=505$ admissible words.

• but doesn't these 505 words also have words with 3 ,4 and all repeated letters? Mar 13, 2018 at 19:07
• @GaganBatra Yes. We're supposed to count them here (e.g. eeee). I could not understand fully your working, but from what I could find you wanted to find the number of cases with just a single repeat. In that case it's not $5×5×5×5$ it's $5×4×3×6=360$, where the last 6 refers to the places the repeated letters can occupy. Mar 13, 2018 at 19:11
• sorry sir, i didn't understand, if u can just tell me about the 505 thing Mar 13, 2018 at 19:16
• @GaganBatra Aiya, if you wanted to do it your way, you would have several cases. My approach is cleaner and simpler. Mar 13, 2018 at 19:17
• @GaganBatra As I said before, we're supposed to include those words. In fact, all words except those where there are no letters repeated - where all the letters are different. Mar 13, 2018 at 19:21

In addition to the economical "negative space" approach given by Parcly Taxel, we can build up the answer by cases.

case $1$: one repeated letter, 3 sub-cases:

case $1a$: 2 copies of repeated letter: choose the repeated letter, place in two spots, chose the remaining letters: $5\cdot \binom 42 \cdot 4\cdot 3 = 5\cdot 6 \cdot 12 = 360$ options.

case $1b$: 3 copies of repeated letter: choose the repeated letter, place in three spots, chose the remaining letter: $5\cdot \binom 43 \cdot 4 = 5\cdot 4\cdot 4 = 80$ options.

case $1c$: 4 copies of repeated letter: choose the repeated letter: $5$ options.

case $2$: two repeated letters, must be two repeats for each. Choose the letter that goes first, choose the other location for that, choose the other letter: $5\cdot \binom 31 \cdot 4 = 5\cdot 3\cdot 4 = 60$ options

Total of $360+80+5+60 = 505$ options as before.

Note that you can get into error on case $2$ if you say "choose a letter, choose two places for it, choose the other letter", because the same configuration will come up twice.