Let us say, I have the following: DADA which we can assign an index to $D_1$ $A_1$ $D_2$ $A_2$.

The possibilities, if the order of every letter in this word counts:

$D_1$ $A_1$ $D_2$ $A_2$

$D_1$ $D_2$ $A_1$ $A_2$

$D_1$ $A_1$ $A_2$ $D_2$

$A_1$ $A_2$ $D_1$ $D_2$

$A_1$ $D_1$ $D_2$ $A_2$

I get 5 possibilities. However, if I take the following formula:

$$\frac{n!}{n_D!\cdot n_A!}$$

plugging in the following information: $n=4$, $n_D=2$ and $n_A=2$, returns a 6, which shows that there's one more possibility or combination.

Is this correct? Also, how would this be, if the order of every letter didn't count, and instead this forms whole words.

EDIT: Every letter with a unique index is treated as a unique single letter. 

Is this the way the formula should be used?

enter image description here

  • 4
    $\begingroup$ $A_2D_1A_4D_3$ ? $\endgroup$
    – zwim
    May 24 at 12:00
  • 2
    $\begingroup$ To be clear, with your subscripts on your letters you have still only ever listed those subscripts in increasing order. You only ever wrote $D_1D_2A_1A_2$. What about $D_1D_2A_2A_1$ or $D_2D_1A_1A_2$ or $D_2D_1A_2A_1$? I suspect this is what you are missing $\endgroup$
    – JMoravitz
    May 24 at 12:30
  • 1
    $\begingroup$ ... any real long answer to what? I haven't heard a well formulated question yet. How many ways can you arrange these letters assuming every letter is unique because the letters themselves are different? $n!$. How many ways can you arrange these letters if some letters are the same but they all have different subscripts? Still $n!$... that should have been obvious. How many ways if some letters are the same and we don't have subscripts making them unique? Now this is when we have that $\frac{n!}{p!q!\cdots}$ $\endgroup$
    – JMoravitz
    May 24 at 12:38
  • 3
    $\begingroup$ I strongly recommend for the moment ignoring the existence of factorials and formulas and really stop and understand how to find and calculate the answers from first principles. Understand where those formulas you seem so gung ho about using come from in the first place. Just knowing the end result of a formula and trying to remember when it is used is not beneficial to the learning process. Actually understanding the formulas and why they are what they are is far better. $\endgroup$
    – JMoravitz
    May 24 at 12:41
  • 1
    $\begingroup$ What is the difference between those questions? Again... in the first question you have $D_1D_2A_1A_2$ is "different" than $D_2D_1A_1A_2$. In the second question those are considered "the same" $\endgroup$
    – JMoravitz
    May 24 at 12:42

2 Answers 2


The given word is DADA, it is a four letter word, but two letters, D and A, are repeated twice.

Let's, initially for no reason (don't worry about that), assign indices to all four letters. In this way: D1A1D2A2.


Let's consider D1 and D2 are not the same letter (element), similarly D1 and D1 are not same letters, they all are different from each other. i.e., D1 ≠ D2 and A1 ≠ A2.

Now, let's list all the ways in which we can arrange these letters -

  1. A1 A2 D1 D2

  2. A1 A2 D2 D1

  3. A2 A1 D1 D2

  4. A2 A1 D2 D1


  1. A1 D1 A2 D2

  2. A1 D2 A1 D2

  3. A2 D1 A2 D1

  4. A2 D2 A1 D1


  1. D1 A1 A2 D2

  2. D1 A2 A1 D2

  3. D2 A1 A2 D1

  4. D2 A2 A1 D1


  1. D1 A1 D2 A2

  2. D1 A2 D1 A2

  3. D2 A1 D2 A1

  4. D2 A2 D1 A1


  1. D1 D1 A2 A2

  2. D1 D2 A1 A2

  3. D2 D1 A2 A1

  4. D2 D2 A1 A1


  1. A1 D1 D2 A2

  2. A1 D2 D1 A2

  3. A2 D1 D2 A1

  4. A2 D2 D1 A1

You can see that, by considering D1 and D2 as different letters and A1 and A2 as different letters, we get a total of 24 different ways of arrangements.


Now, let's consider D1 and D2 as the same letters and A1 and A2 also as the same letters (you can erase the indices), i.e., D1 = D2 = D, and A1 = A2 = A.

So, let's again list those 24 permutations, but now, erasing those indices:

  1. A A D D

  2. A A D D

  3. A A D D

  4. A A D D


  1. A D A D

  2. A D A D

  3. A D A D

  4. A D A D


  1. D A A D

  2. D A A D

  3. D A A D

  4. D A A D


  1. D A D A

  2. D A D A

  3. D A D A

  4. D A D A


  1. D D A A

  2. D D A A

  3. D D A A

  4. D D A A


  1. A D D A

  2. A D D A

  3. A D D A

  4. A D D A

You can see that by erasing those indices, you're list same type of arrangement 4 times.

So, if you not consider repeated letters as different letters, then number of different permutations are 24/4 = 6 (since there are 4 types of same arrangement).

Edit 1{

The formula that you were using: n!/nD!⋅nA!, is applicable here, where nD = 2 (number of D's) and nA = 2 (number of A's). So nD!⋅nA! = 2!.2! = 4, which is exactly exactly equal to what we are dividing from n!, i.e., 24/4 = 6.


So, let's list them again by ignoring repeated arrangements-

  1. A A D D

  2. A D A D

  3. D A A D

  4. D A D A

  5. D D A A

  6. A D D A

So, hence 6 permutations, if you not consider repeated letters as different letters.

Please consider reading my both answers for maximum details.

  • $\begingroup$ You are the BEST! $\endgroup$
    – Albin M
    May 24 at 14:06
  • $\begingroup$ I Added Edit 1{...} to detail about a formula... $\endgroup$ May 24 at 14:47

The possibilities, if the order of every letter in this word counts

As you have said, if the order of every letter matters, then you are supposed so treat each letter as a completely different letter (i.e., D1 is different from D3).

So, So, Number of ways you can arrange 4 completely different elements, keeping each at one of the four given places, without repetition of any element, is given by nPr = n!/(n-r)!

So, 4!/(4-4)! = 4!/0! = 4! = 24 ways, i.e, you can arrange them in 24 different ways.

If you want to consider both D1 and D3 as same, then the number of ways you can arrange those letters is given by nPr/nD = n!/(n-r)!•nD.

Similarly, if you also want to consider A2 and A4 as same letters, then number of ways you can arrange those letters is given by nPr/nD•nA = n!/(n-r)!•nD•nA.

The problem with your answer is that you're are considering all the repeating letters as different and trying to find their permutations, but in calculation, you're using the formula used to find the number of possibilities when repeating letters are NOT treated as different letters

  • $\begingroup$ Please see my edits, and look closely at the letters. $\endgroup$
    – Albin M
    May 24 at 12:28
  • 1
    $\begingroup$ Ok, sure, but I need some time, I'm typing on phone.. :) $\endgroup$ May 24 at 12:34
  • 1
    $\begingroup$ Can you say again what's your doubt? I'm bit confused what to emphasize in my answer? $\endgroup$ May 24 at 12:58
  • 1
    $\begingroup$ "Why is it 24" Because 24 counts the list $D_1D_2A_1A_2,~D_2D_1A_1A_2,~D_1D_2A_2A_1,~D_2D_1A_2A_1,D_1A_1D_2A_2,D_1A_2D_2A_1,\dots$. Meanwhile $6$ counts the list $DDAA,~DADA,~DAAD,\dots$ $\endgroup$
    – JMoravitz
    May 24 at 13:12
  • 1
    $\begingroup$ The list of possible arrangements of the letters... in the first case where the letters are given unique identifying subscripts that make two arrangements different so long as the subscripts or letters are different... and in the second case where such subscripts don't exist $\endgroup$
    – JMoravitz
    May 24 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.