What are chances that not all S's will be adjacent given a phrase at random.

1.8k Views Asked by At

IF the letters in the phrase A ROLLING STONE GATHERS NO MOSS are arranged at random, what are the chances that not all the S's will be adjacent.

Attempt: Given there are 6 letters that appear twice, 2 letters that appear 4 times, and 1 letter that appears 3 times, while the rest appear once. Given there are 26 letters, the number of possible arranged at random is {26!/[6(2!)*2(4!)3(1!)(3!)]}. Now, assume the four S's appear as a single letter, then there would be 23 letters. Thus, P(S's appear adjacent) = {23!/[6(2!)*2(4!)*3(1!)*4(1!)]}/{26!/[6(2!)*2(4!)3(1!)(3!)]}.

Then P(S's not adjacent) = 1 - P(S's appear adjacent) = 0.9999038462

Please does this make sense. I am not sure. Please can anyone help me finish? Thank you very much.

1

There are 1 best solutions below

1
On

Suppose you have a phrase composed of $n$ letters, with $n_i$ letters of each kind, so that $\sum_{i=1}^s n_i=n$. We can arrange this in $M=\binom{n}{n_1,\ldots,n_s}$ ways. Collapsing the block of $n_i$ letters into $1$ single block of adjacent letters, gives $n-n_i+1$ letters, and this can be arranged in $N=\binom{n-n_i+1}{n_1,\ldots,1,\ldots,n_s}$ ways. Thus the probability of unwanted occurrences is $N/M$ and the probability that a favorable permutation occurrs is $1-N/M$. Note that $$M/N=\frac{n!}{n_1!\cdots n_i!\cdots n_s!}\frac{n_1!\cdots 1!\cdots n_s!}{(n-n_i+1)!}=\frac{n!}{n_i!(n-n_i+1)! }=\frac{1}{n-n_i+1}\binom n{n_i}$$

so the probability depends only on the total number of letters $n$, and the number of letters that are being looked at $n_i$. In your case $n=26$ and $n_i=4$, so $P'^{-1}=\frac{1}{22}\binom {26}4=\frac 1{23}\frac{26!}{22!4!}=\frac{26\cdot 25\cdot 23}{23} $, and then $1-P'=P=1-\frac{1}{ 23\cdot 25}$