# Combinations questions

a. How many different 4 letter codes can there be?

b. What if letters cannot be repeated?

c. What if, in addition, 2 of the letters are x and y?

For a, it would simply be $26*26*26*26=456976$

For b, it would be $26*25*24*23=358800$

For c, it would be $24*23=552$

C seems a bit low to me but I think it makes sense

First, you assumed that there's exactly one x and one y in the code, whereas the problem doesn't state so.

I would interpret the "in addition" part of (C) to mean that the first two conditions hold.

If that is the case, then you choose two letters, which you did correctly. However, you then have to permute the $x, y$ and two letters chosen (this means you don't know where $x$ and $y$ are yet), which you can do in $4!$ ways. So your answer is $\binom{24}{2} * 4! = 24 * 24 * 23$.

• Ah the latter part is very interesting. I did not think about it. Thank you! :) – atherton Apr 17 '14 at 0:01

Your answer to C is wrong. First, you assumed that there's exactly one x and one y in the code, whereas the problem doesn't state so. Second, x can occur on every position in the code, same for y. For example, there are 26*26 codes where two first letters are "xy" and 26*26 codes where "xy" are the 3rd and 4th letters, respectively.

Got A and B right.

• But c states "what if, $\textit{in addition}..$ so in addition to condition b. And b states letters cannot be repeated – atherton Apr 16 '14 at 23:58