The Sticky Letters!

Note: This was a contest question hosted earlier by me, so don't get confused by the comments of the solutions posted in this problem.

Question:- Suppose we have n letters, for n 2 n\ge 2 , and no letter is repeated i.e each letter is unique, and if we choose 2 letters suppose l 1 { l }_{ 1 } and l 2 { l }_{ 2 } . After that, a word is created using those n letters randomly. So what is the probability that newly created word has the letters l 1 { l }_{ 1 } and l 2 { l }_{ 2 } next to each other.

For example, if we have the letters C, A, R and S, and we choose A and R as the 2 letters. The words CARS and SRAC are 2 possible combinations where the letters A and R are next to each other.

1 n ! \frac { 1 }{ n! } n 2 \frac { n }{ 2 } 2 n \frac { 2 }{ n } 2 n ! ( n 1 ) \frac { 2 }{ n!(n-1) }

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Posting solution is not necessary

LOL XD - Nice!!! @Kriti Kamal

Log in to reply

@Percy Jackson ,thanks。

A Former Brilliant Member - 9 months, 1 week ago

My solution is the bottom solution . But your "solution" is the top "solution". BTW if posting a solution isn't necessary, then why is your "solution" here? :)

A Former Brilliant Member - 9 months, 3 weeks ago

Log in to reply

It is a paradox :-).

A Former Brilliant Member - 9 months, 3 weeks ago

For people ( like myself ) who find it easier to understand ( their mistake ) with some pictures.

n letters \LARGE\overbrace{ \Box \, \Box \, \Box \, \cdots \Box \,\Box \, \Box }^{ n \, \text{letters} }

Now, choose 2 2 letters l x l_x and l y l_y and place them in the n n boxes. Since they are not to be separated, group them in the following manner:

n 2 l x l y 1 letter group n letters \overbrace{ \underbrace{ \LARGE \Box \, \Box \, \Box \, \cdots \Box \, \Box \,}_{ n-2 } \underbrace{ \small \boxed{ l_x \, l_y} }_{ 1 \,\, \text{letter group} } }^{n \,\, \text{letters} }

After the grouping there are a total of n 2 + 1 = n 1 = ( n 1 1 ) n -2 + 1 = n-1 = { n - 1 \choose 1 } places the letter group can reside.

For any placement of the group we can choose the remaining letters in ( n 2 ) ! (n-2)! ways to generate the sequence of n n letters:

( n 2 ) ( n 3 ) 2 1 l x l y \overbrace{ \LARGE \Box }^{ \scriptsize (n-2) } \, \overbrace{ \LARGE \Box }^{ \scriptsize (n-3) } \, \cdots \, \overbrace{ \LARGE \Box }^{ \scriptsize 2 } \, \overbrace{ \LARGE \Box }^{ \scriptsize 1 } \, \small \boxed{ l_x \, l_y}

And finally we can swap the ordering of the chosen letters in 2 2 ways:

l x l y , l y l x \boxed{ l_x \, l_y}, \, \boxed{ l_y \, l_x}

Thus, we have the number of sequences N N with the two chosen letters adjacent given by:

N = 2 ways to swap chosen letters ( n 1 ) places for letter group ( n 2 ) ! ways to choose remaining letters N = \overbrace{ 2 }^{ \begin{array}{c}\tiny \text{ways to swap} \\ \tiny \text{chosen letters} \end{array} } \cdot \overbrace{ ( n- 1 ) }^{\begin{array}{c}\tiny \text{places for} \\ \tiny \text{letter group} \end{array} } \cdot \overbrace{ ( n-2 )! }^{ \begin{array}{c}\tiny \text{ways to choose} \\ \tiny \text{remaining letters} \end{array} }

The total number of orderings for n n distinct letters without repetition is just n ! n!

Thus, the probability of such a string P P is given by:

P = 2 ( n 1 ) ( n 2 ) ! n ! = 2 ( n 1 ) ( n 2 ) ! n ( n 1 ) ( n 2 ) ! = 2 n P = \frac{2 \cdot ( n-1 ) \cdot ( n-2 )! }{ n!} = \frac{ 2 \cdot \cancel{( n-1 )} \cdot \cancel{ ( n-2 )!} }{ n \cdot \cancel{( n-1)} \cdot \cancel{ ( n-2 )! } } = \frac{2}{n}

Eric Roberts - 3 months, 2 weeks ago
Ved Pradhan
Jul 8, 2020

Probability is What You Want What You Could Get \frac{\text{What You Want}}{\text{What You Could Get}} . Let's solve for the numerator and denominator seperately.

Numerator

There are n n elements, but since we want to group two of them together, we can consider that pair as one object itself. Thus, there are n 1 n-1 objects.

In the numerator, we need to find how many ways are there to place these letters such that two specific letters are next to each other. This is the equivalent of finding the number of permutations for these n 1 n-1 objects. Thus, it is ( n 1 ) ! (n-1)! .

However, we have to remember that the letters inside our compound object can be switched around to create a new solution. Thus, we need to multiply this by 2 ! 2! , or 2 2 . Our numerator is therefore 2 ( n 1 ) ! 2(n-1)! .

Denominator

The denominator is just how many ways there are to order the letters, which is n ! n! .

Putting It Together

Let's solve for the probability and simplify.

P = What You Want What You Could Get P=\dfrac{\text{What You Want}}{\text{What You Could Get}} P = 2 ( n 1 ) ! n ! P=\dfrac{2(n-1)!}{n!} P = 2 ( n 1 ) ! n ( n 1 ) ! P=\dfrac{2(n-1)!}{n(n-1)!} P = 2 n \boxed{P=\dfrac{2}{n}}

Because we can place the letters in n ! n! ways, but only ( n 1 ) ! 2 (n-1)!\cdot2 possibilities are good(we can see the two letters as only one body, but we can place them in two ways). ( n 1 ) ! 2 n ! = 2 n \cfrac{(n-1)!\cdot2}{n!}=\cfrac{2}{n}

Nice solution! I clicked n 2 \frac{n}{2} instead of 2 n \frac{2}{n} !

Yajat Shamji - 11 months, 1 week ago
Aryan Sanghi
Jul 8, 2020

Method-1

Consider number of ways such that they are never together

x 1 L 1 x 2 L 2 x 3 \boxed{x_1}L1\boxed{x_2}L2\boxed{x_3}

So, x 1 + x 2 + x 3 = n 2 where x 1 0 , x 2 1 , x 3 0 x_1 + x_2 + x_3 = n - 2 \text{ where } x_1 \geq 0, x_2 \geq 1, x_3 \geq 0

W a y s = n 3 + 3 1 C 3 1 = n 1 C 2 = ( n 1 ) ( n 2 ) 2 Ways = ^{n - 3 + 3 - 1} C _{3 - 1} = ^{n - 1} C_ {2} = \frac{(n - 1)(n - 2)}{2}

Now, as objects are distinct and L 1 , L 2 L_1, L_2 can be swapped, so

Total Ways = ( n 1 ) ( n 2 ) 2 × ( n 2 ) ! × 2 \text{Total Ways } = \frac{(n - 1)(n - 2)}{2} × (n - 2)! × 2

P r o b a b i l i t y = ( n 1 ) ( n 2 ) 2 × ( n 2 ) ! × 2 n ! = n 2 2 Probability = \frac{\frac{(n - 1)(n - 2)}{2} × (n - 2)! × 2}{n!} = \frac{n - 2}{2}

Probability that they are together = 1 n 2 2 = 2 n \text{Probability that they are together } = 1 - \frac{n - 2}{2} = \color{#3D99F6}{\boxed{\frac{2}{n}}}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...