How many ways to form a 4 letter word when order doesn't matter and letters need not be different

428 Views Asked by At

Can someone please explain this. How many 4 letter words are there, when order doesn't matter and letters can be repeated ? IF I do in one approach I get $\frac{26^4}{4!} $ (26 letters for each position and then divide by 4! as the position didn't matter).

Is this logic correct ? I Am not sure because, the course video I am watching gives a different logic as below.

by composition : $a+b+c+...+z = 4$ ; therefore can use the $n+k-1\choose k-1$ formula(stars and bars), where $n$ is $4$ and $k$ is $26$.This approach also seems correct but the final answers for approach 1 and 2 are different. Thanks in advance

2

There are 2 best solutions below

1
On BEST ANSWER

You are thinking in the right direction, but your answer is a little off. Not every combination is repeated $4!=24$ times, so you can't just divide by $24$ and call it a day. For example, the combination AAAA is only counted once from the $26^4$ part of your answer, but you are dividing by $24$, so you will actually get $\frac{1}{24}$ of a way to get the combination AAAA, which is clearly incorrect. What you might want to do is to split the problem into four cases(the stars and bars approach is probably an easier way but I'm trying to do an approach similar to yours):

  1. All the four letters are the same
  2. Exactly three of the letters are the same
  3. Exactly two of the letters are the same
  4. All letters are unique
0
On

Hint: Here is a way to think about the problem. Imagine that you are in a donut shop and there are 26 types of donuts. Each type of donut has a bucket and the buckets are all arranged in a row from left to right. You tell the baker to randomly select 4 donuts for you. He starts by standing in front of the leftmost bucket with an empty box. He needs to perform 29=4+25 actions. Each action must be either pulling one donut from the box in front of him (4 actions) or stepping to right (25 actions).

How many ways can he perform those 29 actions?

(A friend of mine gave me this explanation for this problem many years ago.)