Data Analysis Quiz #7 Overwhelmed Plan

Hi, need explanation and clarity for the below question in the quiz:

Consider the set of letters {A,B,C,D,E}.How many different permutations can be made if the letter C must appear before the letter D and cannot be adjacent?

Correct Answer in quiz is 36 but I am unable to decode it.

Thanks

In particular, please share your approach to the problem - it’s OK if your attempt is flawed or faulty or nonsensical.

Hey @ user2172, I tried solving this so I can share my solution with you but I definitely think there is a shorter way to do it.

So, we have to keep 2 things in mind-

  1. C has to be before D
  2. C and D cannot be together meaning (CD) is not a valid pattern as CD are adjacent even though C might be before D
  3. Valid combinations can be CAEBD, CBDAE,… etc (Note that C is always before D and they are not adjacent/together)

Now we have to find such combinations-
We have 5 places to fill in so let us start with different arrangements:

  1. C is at the first place- For second place you have only 3 (A,B,C) choices as D cannot come adjacent to C. For third place, you have 3 choices as now you can consider D because it is not adjacent to C. For fourth place you have 2 choices and for fifth only option because these alphabets are not getting repeated your choices are decreasing as you move. So, first arrangement gives you 18 permutations.
  2. C is at the second place- For first place you have 3 options (A,B,E), for third place you have 2 options (D can’t be included otherwise it would become adjacent), fourth place 2 options, 5th place only 1 option. This gives you 12 permutations.
  3. C is at the third place- For first place you have 3 options (A,B,E), for second place you have 2 options (D can’t be here), for fourth place you have only 1 option (D can’t be here) and for fifth as well only 1 option. This gives you 6 permutations.
  4. C is at the fourth place- This is not valid because in this case D will either come before C or just after C which we don’t want

So total valid cases are: 18+12+6 = 36

Hope this helps. Let me know if you have any questions.

@Leaderboard Could you suggest a faster or an easier solution?

Hint: try making use of symmetry. Notice that

(number of permutations where C is before D) + (number of permutations where C is after D) = number of total permutations possible.

That can help you whittle down invalid options at the very least.

Ah… I got it so basically:

Step 1: Total Permutations
The total number of ways to arrange five letters ( A, B, C, D, E ) is ( 5! ):

[5! = 5 \times 4 \times 3 \times 2 \times 1 = 120]

Step 2: Permutations Where ( C ) is Before ( D )
For any arrangement of ( C ) and ( D ), half of the cases will have ( C ) before ( D ) and the other half will have ( D ) before ( C ). So, we can divide the total number of permutations by 2:

[\frac{120}{2} = 60]

Thus, in 60 of the 120 permutations, ( C ) will appear before ( D ).

Step 3: Exclude Adjacent ( C ) and ( D )
Now, we need to exclude the cases where ( C ) and ( D ) are adjacent. If ( C ) and ( D ) are adjacent, we can treat them as a single unit (block), leaving us with four items to permute: ( {(CD), A, B, E} ). The number of ways to arrange these four units is ( 4! ):

[4! = 4 \times 3 \times 2 \times 1 = 24]

Since ( C ) is required to be before ( D ) within the block, we do not divide by 2 here. Thus, there are 24 permutations where ( C ) and ( D ) are adjacent and ( C ) is before ( D ).

Step 4: Final Calculation
Now, subtract the 24 cases where ( C ) and ( D ) are adjacent from the 60 permutations where ( C ) is before ( D ):

[60 - 24 = 36]

Thus, the total number of permutations where ( C ) is before ( D ) and they are not adjacent is 36.

So, the correct answer is 36.

But, I have a question does this symmetry always exist? Is it because each letter has the equal probability of coming before any letter? If I had to find that by hit and trial how could I find that out @Leaderboard ?

One way to identify the symmetry is to notice that we have two cases that appear identical. It’s like a < b and a > b - keeping everything else identical, the rest of the process is exactly the same.

1 Like