Solveeit Logo

Question

Question: the number of ways in which all the letters of the word 'TANATAN' can be arranged so that no two ali...

the number of ways in which all the letters of the word 'TANATAN' can be arranged so that no two alike letters are together

Answer

38

Explanation

Solution

The given word is 'TANATAN'.

The letters are T (2 times), A (3 times), N (2 times). Total 7 letters.

Total number of arrangements of the letters is 7!3!2!2!=50406×2×2=504024=210\frac{7!}{3!2!2!} = \frac{5040}{6 \times 2 \times 2} = \frac{5040}{24} = 210.

We want to find the number of arrangements where no two alike letters are together.

This means no two T's are together, no two A's are together, and no two N's are together.

Let's use the inclusion-exclusion principle.

Let SS be the set of all arrangements. S=210|S|=210.

Let PTP_T be the property that the two T's are together.

Let PAP_A be the property that at least two A's are together.

Let PNP_N be the property that the two N's are together.

We want to find SPTPAPN|S| - |P_T \cup P_A \cup P_N|.

PTPAPN=PTPTPA+PTPAPN|P_T \cup P_A \cup P_N| = \sum |P_T| - \sum |P_T \cap P_A| + \sum |P_T \cap P_A \cap P_N|.

PT|P_T|: Treat (TT) as a block. Arrange (TT), A, A, A, N, N. Total 6 items. The A's are 3, N's are 2.

Number of arrangements = 6!3!2!=7206×2=60\frac{6!}{3!2!} = \frac{720}{6 \times 2} = 60.

PN|P_N|: Treat (NN) as a block. Arrange T, T, A, A, A, (NN). Total 6 items. The T's are 2, A's are 3.

Number of arrangements = 6!2!3!=7202×6=60\frac{6!}{2!3!} = \frac{720}{2 \times 6} = 60.

PA|P_A|: At least two A's are together. This is the complement of no two A's together.

Number of arrangements with no two A's together: Arrange the non-A letters T, T, N, N first. Number of ways = 4!2!2!=244=6\frac{4!}{2!2!} = \frac{24}{4} = 6.

Consider one such arrangement, e.g., TNTN. There are 5 gaps: _ T _ N _ T _ N _ .

To arrange the 3 A's such that no two are together, we must place them in these 5 gaps, with at most one A per gap. We need to choose 3 gaps out of 5. Number of ways = (53)=10\binom{5}{3} = 10.

So, number of arrangements with no two A's together = 6×10=606 \times 10 = 60.

Total arrangements = 210.

Number of arrangements with at least two A's together, PA=21060=150|P_A| = 210 - 60 = 150.

P=PT+PA+PN=60+150+60=270\sum |P| = |P_T| + |P_A| + |P_N| = 60 + 150 + 60 = 270.

PTPN|P_T \cap P_N|: Treat (TT) and (NN) as blocks. Arrange (TT), A, A, A, (NN). Total 5 items. The A's are 3.

Number of arrangements = 5!3!=1206=20\frac{5!}{3!} = \frac{120}{6} = 20.

PTPA|P_T \cap P_A|: (TT) together and at least two A's together.

Treat (TT) as a block. We are arranging (TT), A, A, A, N, N. Total 6 items.

Consider the arrangements of these 6 items where at least two A's are together.

Total arrangements of these 6 items = 6!3!2!=60\frac{6!}{3!2!} = 60.

Arrangements where no two A's are together: Arrange (TT), N, N first. 3!2!=3\frac{3!}{2!} = 3 ways. Gaps are _ (TT) _ N _ N _ (4 gaps). Place 3 A's in these 4 gaps, at most one per gap. Choose 3 gaps out of 4: (43)=4\binom{4}{3} = 4.

Number of arrangements with (TT) together and no two A's together = 3×4=123 \times 4 = 12.

Number of arrangements with (TT) together and at least two A's together, PTPA=6012=48|P_T \cap P_A| = 60 - 12 = 48.

PAPN|P_A \cap P_N|: At least two A's together and (NN) together.

Treat (NN) as a block. We are arranging T, T, A, A, A, (NN). Total 6 items.

Consider the arrangements of these 6 items where at least two A's are together.

Total arrangements of these 6 items = 6!2!3!=60\frac{6!}{2!3!} = 60.

Arrangements where no two A's are together: Arrange T, T, (NN) first. 3!2!=3\frac{3!}{2!} = 3 ways. Gaps are _ T _ T _ (NN) _ (4 gaps). Place 3 A's in these 4 gaps, at most one per gap. Choose 3 gaps out of 4: (43)=4\binom{4}{3} = 4.

Number of arrangements with (NN) together and no two A's together = 3×4=123 \times 4 = 12.

Number of arrangements with (NN) together and at least two A's together, PAPN=6012=48|P_A \cap P_N| = 60 - 12 = 48.

PP=PTPA+PTPN+PAPN=48+20+48=116\sum |P \cap P| = |P_T \cap P_A| + |P_T \cap P_N| + |P_A \cap P_N| = 48 + 20 + 48 = 116. (Corrected the sum based on individual values calculated).

PTPAPN|P_T \cap P_A \cap P_N|: (TT) together, at least two A's together, and (NN) together.

Treat (TT) and (NN) as blocks. Arrange (TT), A, A, A, (NN). Total 5 items.

Consider arrangements where at least two A's are together.

Total arrangements of these 5 items = 5!3!=20\frac{5!}{3!} = 20.

Arrangements where no two A's are together: Arrange (TT), (NN) first. 2!1!1!=2\frac{2!}{1!1!} = 2 ways. Gaps are _ (TT) _ (NN) _ (3 gaps). Place 3 A's in these 3 gaps, at most one per gap. Choose 3 gaps out of 3: (33)=1\binom{3}{3} = 1.

Number of arrangements with (TT) together, (NN) together and no two A's together = 2×1=22 \times 1 = 2.

Number of arrangements with (TT) together, (NN) together and at least two A's together, PTPAPN=202=18|P_T \cap P_A \cap P_N| = 20 - 2 = 18.

PTPAPN=PPP+PPP|P_T \cup P_A \cup P_N| = \sum |P| - \sum |P \cap P| + \sum |P \cap P \cap P|

PTPAPN=(60+150+60)(48+20+48)+18|P_T \cup P_A \cup P_N| = (60 + 150 + 60) - (48 + 20 + 48) + 18

PTPAPN=270116+18=154+18=172|P_T \cup P_A \cup P_N| = 270 - 116 + 18 = 154 + 18 = 172.

Number of arrangements where no two alike letters are together = SPTPAPN=210172=38|S| - |P_T \cup P_A \cup P_N| = 210 - 172 = 38.

Let's verify using the gaps method for all letters.

Arrange the letters with the highest frequency first, which is A (3 times). Since no two A's should be together, we arrange the other letters first: T, T, N, N.

Number of arrangements of T, T, N, N is 4!2!2!=6\frac{4!}{2!2!} = 6.

Consider one arrangement, say TNTN. The 5 gaps are _ T _ N _ T _ N _ .

We need to place the 3 A's in these 5 gaps such that no two A's are together. This means placing at most one A in each gap. We choose 3 gaps out of 5: (53)=10\binom{5}{3} = 10.

So, there are 6×10=606 \times 10 = 60 arrangements where no two A's are together.

Now we need to ensure that in these 60 arrangements, no two T's are together and no two N's are together.

Let's consider one arrangement where no two A's are together, e.g., ATANTAN.

The arrangement of T, T, N, N is TNTN, and the A's are placed in gaps 1, 3, 5.

A T A N A T N.

Check conditions: No two T's are together. No two A's are together. No two N's are together.

This arrangement A T A N A T N satisfies all conditions.

Let's consider the arrangements of T, T, N, N (6 ways). For each arrangement, place the 3 A's in the 5 gaps ((53)=10\binom{5}{3}=10 ways). Total 60 arrangements with no two A's together.

We need to exclude the cases where T's are together or N's are together in these 60 arrangements.

Consider arrangements of T, T, N, N where T's are together: (TT)NN, N(TT)N, NN(TT). 3 ways.

For (TT)NN, gaps are _ (TT) _ N _ N _ (4 gaps). Place 3 A's in 4 gaps: (43)=4\binom{4}{3}=4 ways. E.g., A(TT)AN A N. Here T's are together.

Consider arrangements of T, T, N, N where N's are together: TT(NN), T(NN)T, (NN)TT. 3 ways.

For TT(NN), gaps are _ T _ T _ (NN) _ (4 gaps). Place 3 A's in 4 gaps: (43)=4\binom{4}{3}=4 ways. E.g., A T A T A (NN). Here N's are together.

Consider arrangements of T, T, N, N where T's and N's are together: (TT)(NN), (NN)(TT). 2 ways.

For (TT)(NN), gaps are _ (TT) _ (NN) _ (3 gaps). Place 3 A's in 3 gaps: (33)=1\binom{3}{3}=1 way. E.g., A(TT)A(NN)A. Here T's are together and N's are together.

Number of arrangements with no two A's together: 60.

Among these 60 arrangements, we need to remove those where T's are together or N's are together.

Let QTQ_T be the property that T's are together in the arrangements with no two A's together.

Let QNQ_N be the property that N's are together in the arrangements with no two A's together.

We want 60QTQN=60(QT+QNQTQN)60 - |Q_T \cup Q_N| = 60 - (|Q_T| + |Q_N| - |Q_T \cap Q_N|).

QT|Q_T|: Arrangements with no two A's together and T's together.

Arrange (TT), N, N: 3!2!=3\frac{3!}{2!} = 3 ways. Place 3 A's in the 4 gaps: (43)=4\binom{4}{3} = 4 ways. QT=3×4=12|Q_T| = 3 \times 4 = 12.

QN|Q_N|: Arrangements with no two A's together and N's together.

Arrange T, T, (NN): 3!2!=3\frac{3!}{2!} = 3 ways. Place 3 A's in the 4 gaps: (43)=4\binom{4}{3} = 4 ways. QN=3×4=12|Q_N| = 3 \times 4 = 12.

QTQN|Q_T \cap Q_N|: Arrangements with no two A's together, T's together, and N's together.

Arrange (TT), (NN): 2!1!1!=2\frac{2!}{1!1!} = 2 ways. Place 3 A's in the 3 gaps: (33)=1\binom{3}{3} = 1 way. QTQN=2×1=2|Q_T \cap Q_N| = 2 \times 1 = 2.

QTQN=QT+QNQTQN=12+122=22|Q_T \cup Q_N| = |Q_T| + |Q_N| - |Q_T \cap Q_N| = 12 + 12 - 2 = 22.

Number of arrangements with no two alike letters together = 6022=3860 - 22 = 38.

Let's double check the inclusion-exclusion calculation.

S=210|S|=210.

PT=60|P_T|=60, PA=150|P_A|=150, PN=60|P_N|=60.

P=60+150+60=270\sum |P| = 60+150+60 = 270.

PTPA=48|P_T \cap P_A|=48.

PTPN=20|P_T \cap P_N|=20.

PAPN=48|P_A \cap P_N|=48.

PP=48+20+48=116\sum |P \cap P| = 48+20+48 = 116.

PTPAPN=18|P_T \cap P_A \cap P_N|=18.

PTPAPN=270116+18=172|P_T \cup P_A \cup P_N| = 270 - 116 + 18 = 172.

Number of ways = 210172=38210 - 172 = 38.

Both methods give the same result.