0

I've been stuck on Chapter 3 section 7 (Inclusion-Exclusion Principle) of the Book of Proof 3rd edition, in the exercises part, trying understand the logic behind the answer to question 4b:

  1. This problem involves lists made from the letters T, H, E, O, R, Y with repetition allowed:

    (b) How many 4 letter lists are there in which the sequence of letters T, H, E appears consecutively (in that order)?

As far as I understand, this means lists such as (T, H, E, R) and (T, H, O, E) but not (R, E, H, T). Taking that in account, I wrote all lists and found 21 different lists. I tried finding a solution using the Inclusion-Exclusion principle but I couldn't come up with any. I also tried using the choosing method for $6\tbinom{4}{3}$ for all positions of (T, H, E) times all the possible letters that could be on the last space. Problem is that $21+3=6\tbinom{4}{3}$ and the only way of subtracting 3 I can think of is $6\tbinom{4}{3}-\tbinom{3}{1}$ which seems arbitrary. I need help finding a more formal answer other than just listing all the possible lists.

N. F. Taussig
  • 79,074
Kneff
  • 1
  • Taking that in account then, the answear would be 2*nCr(4,3) which, considering it's WAY easier to figure out than whatever I was thinking, has to be the answear. I have to polish up my reading comprehension. – Kneff Jun 06 '24 at 20:15
  • 1
    There is a difference between saying that $T,H,E$ appear in that order, and saying that $T,H,E$ appear consecutively (in that order). – true blue anil Jun 06 '24 at 20:40
  • 1
    Mistake in posted question: THOE does not have T,H,E appearing in consecutive order. – user2661923 Jun 06 '24 at 21:23

2 Answers2

1

For inclusion-exclusion, note that $6\binom{4}{3}$ double counts TTHE, THHE, and THEE, so subtract $3$.

RobPratt
  • 50,938
0

As I stated in the comments, I question the original poster's interpretation of the word consecutively. That is, based on my understanding of that word, THOE does not qualify. However, it appears that the original poster wishes to interpret the problem in the alternative manner. This means (apparently), that a word such as THTE also qualifies.

This certainly makes the problem more interesting, so I will adopt the original poster's interpretation. I am going to provide two solutions: Method-1 will use the direct approach of counting, dividing the lists into mutually exclusive cases. Method-2 will then use the indirect approach of Inclusion-Exclusion.


$\underline{\text{Method-1: The Direct Approach}}$

There are the following $~4~$ mutually exclusive cases:

  • Case-1:
    1 letter each of T,H,E and a 4th letter from O,R,Y.

  • Case-2:
    1 letter each of T,H,E and the 4th letter being a 2nd T.

  • Case-3:
    1 letter each of T,H,E and the 4th letter being a 2nd H.

  • Case-4:
    1 letter each of T,H,E and the 4th letter being a 2nd E.

In Case 1: there are $~3~$ choices for the off letter, and then $~4~$ choices for the position of the off letter. Regardless of the position taken by the off letter, there will then be exactly 1 satisfactory way of distributing the letters T,H,E into the three remaining positions.

Therefore, the Case 1 enumeration is

$$3 \times 4 = 12.$$

In Case 2: there are $~\displaystyle \binom{4}{2} = 6~$ ways of distributing the two T,T letters into the four positions. These are shown below:

T T - -  : satisfactory
T - T -  : satisfactory
T - - T  : satisfactory
- T T -  : unsatisfactory
- T - T  : unsatisfactory
- - T T  : unsatisfactory

Each of the three satisfactory distributions permits exactly one satisfying distribution of the remaining letters H E into the two remaining positions.

Therefore, the Case 2 enumeration is

$$3.$$

In Case 3: there are $~\displaystyle \binom{4}{2} = 6~$ ways of distributing the two H,H letters into the four positions. These are shown below:

H H - -  : unsatisfactory
H - H -  : satisfactory
H - - H  : unsatisfactory
- H H -  : satisfactory
- H - H  : satisfactory
- - H H  : unsatisfactory

Each of the three satisfactory distributions permits exactly one satisfying distribution of the remaining letters T E into the two remaining positions.

Therefore, the Case 3 enumeration is

$$3.$$

By considerations of symmetry, the Case 4 analysis of distributing the two E,E letters must parallel the Case 2 analysis, because you can visualize the sequence of letters in reverse. For example, in Case 2, where it was satisfactory to have the distribution of T,T as T T - - it must be similarly satisfactory to have the distribution of E,E as - - E E.

Therefore, the Case 4 enumeration must equal the Case 2 enumeration.

Therefore, the Case 4 enumeration is

$$3.$$

Therefore, the total number of satisfying words is

$$12 + 3 + 3 + 3 = 21.$$


$\underline{\text{Method-2: Inclusion-Exclusion}}$

See this article for an introduction to Inclusion-Exclusion. Then, see this answer for an explanation of and justification for the Inclusion-Exclusion formula.

Let $~S~$ denote the set of all possible four letter words, constructible under the constraints of the problem, where the constraint that there must be an occurrence of T H E in that order is ignored.

Label the positions of a four letter word, from left to right, so that the leftmost position is Position-1, and the rightmost position is Position-4.

For $~k \in \{1,2,3,4\},~$ let $~S_k~$ denote the subset of $~S~$ where, with Position-k ignored, the three remaining positions contain T,H,E in that order.

Then, the desired computation is

$$| ~S_1 \cup S_2 \cup S_3 \cup S_4 ~|. \tag1 $$

Let $~T_1~$ denote $~|S_1| + |S_2| + |S_3| + |S_4|.$

Let $~T_2~$ denote $~\displaystyle \sum_{1 \leq i_1 < i_2 \leq 4} | ~S_{i_1} \cap S_{i_2} ~|.$

That is, $~T_2~$ denotes the sum of $~\displaystyle \binom{4}{2}~$ terms.

Let $~T_3~$ denote $~\displaystyle \sum_{1 \leq i_1 < i_2 < i_3 \leq 4} | ~S_{i_1} \cap S_{i_2} \cap S_{i_3} ~|.$

That is, $~T_3~$ denotes the sum of $~\displaystyle \binom{4}{3}~$ terms.

Let $~T_4~$ denote $~ |~S_1 \cap S_2 \cap S_3 \cap S_4 ~|.$

Then, in accordance with Inclusion-Exclusion theory, the computation in (1) above is equivalent to

$$\sum_{r=1}^4 (-1)^{r+1} T_r. \tag2 $$

So, the entire problem reduces to computing $~T_r ~: ~r \in \{1,2,3,4\}.$


$\underline{\text{Computation of} ~T_1}$

S-1 = - T H E
S-2 = T - H E
S-3 = T H - E
S-4 = T H E -

For each of the $~4~$ sets illustrated above, there are $~6~$ choices for the off-letter.

Therefore,

$$T_1 = 4 \times 6 = 24.$$


$\underline{\text{Computation of} ~T_2}$

S-1 = - T H E
S-2 = T - H E
S-3 = T H - E
S-4 = T H E -

From the above tableau, you have that:

  • $| ~S_1 \cap S_2 ~| = 1.$

  • $| ~S_1 \cap S_3 ~| = 0,$
    because $~S_1~$ requires a T in the 2nd position, and $~S_3~$ requires an H in the second position.

  • $| ~S_1 \cap S_4 ~| = 0,~$ by similar reasons.

  • $| ~S_2 \cap S_3 ~| = 1.$

  • $| ~S_2 \cap S_4 ~| = 0.$

  • $| ~S_3 \cap S_4 ~| = 1.$

Therefore,

$$T_2 = 3.$$


$\underline{\text{Computation of} ~T_r ~: ~r \geq 3}$

From the analysis of the $~T_2~$ computation, you can see that it will be impossible to have the intersection of any three of the sets $~S_1, S_2, S_3, S_4~$ not be the empty set.

Therefore,

$$0 = T_3 = T_4.$$


$\underline{\text{Final Computation For Inclusion-Exclusion}}$

$$\sum_{r=1}^4 (-1)^{r+1} T_r$$

$$= ( ~T_1 + T_3 ~) - ( ~T_2 + T_4 ~)$$

$$= ( ~24 + 0 ~) - ( ~3 + 0 ~)$$

$$= 21.$$


$\underline{\text{Addendum}}$

Under the normal interpretation of the word consecutively, only the following two tableaus are satisfactory:

T H E -
- T H E

Therefore, under this interpretation, there are $~2 \times 6 = 12~$ satisfactory words.

user2661923
  • 42,303
  • 3
  • 21
  • 46