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 , and no letter is repeated i.e each letter is unique, and if we choose 2 letters suppose l 1 and 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 and 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.
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.
LOL XD - Nice!!! @Kriti Kamal
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? :)
For people ( like myself ) who find it easier to understand ( their mistake ) with some pictures.
□ □ □ ⋯ □ □ □ n letters
Now, choose 2 letters l x and l y and place them in the n boxes. Since they are not to be separated, group them in the following manner:
n − 2 □ □ □ ⋯ □ □ 1 letter group l x l y n letters
After the grouping there are a total of n − 2 + 1 = n − 1 = ( 1 n − 1 ) places the letter group can reside.
For any placement of the group we can choose the remaining letters in ( n − 2 ) ! ways to generate the sequence of n letters:
□ ( n − 2 ) □ ( n − 3 ) ⋯ □ 2 □ 1 l x l y
And finally we can swap the ordering of the chosen letters in 2 ways:
l x l y , l y l x
Thus, we have the number of sequences 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
The total number of orderings for n distinct letters without repetition is just n !
Thus, the probability of such a string P is given by:
P = n ! 2 ⋅ ( n − 1 ) ⋅ ( n − 2 ) ! = n ⋅ ( n − 1 ) ⋅ ( n − 2 ) ! 2 ⋅ ( n − 1 ) ⋅ ( n − 2 ) ! = n 2
Probability is What You Could Get What You Want . Let's solve for the numerator and denominator seperately.
There are 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 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 objects. Thus, it is ( 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 ! , or 2 . Our numerator is therefore 2 ( n − 1 ) ! .
The denominator is just how many ways there are to order the letters, which is n ! .
Let's solve for the probability and simplify.
P = What You Could Get What You Want P = n ! 2 ( n − 1 ) ! P = n ( n − 1 ) ! 2 ( n − 1 ) ! P = n 2
Because we can place the letters in n ! ways, but only ( n − 1 ) ! ⋅ 2 possibilities are good(we can see the two letters as only one body, but we can place them in two ways). n ! ( n − 1 ) ! ⋅ 2 = n 2
Nice solution! I clicked 2 n instead of n 2 !
Consider number of ways such that they are never together
x 1 L 1 x 2 L 2 x 3
So, x 1 + x 2 + x 3 = n − 2 where x 1 ≥ 0 , x 2 ≥ 1 , x 3 ≥ 0
W a y s = n − 3 + 3 − 1 C 3 − 1 = n − 1 C 2 = 2 ( n − 1 ) ( n − 2 )
Now, as objects are distinct and L 1 , L 2 can be swapped, so
Total Ways = 2 ( n − 1 ) ( n − 2 ) × ( n − 2 ) ! × 2
P r o b a b i l i t y = n ! 2 ( n − 1 ) ( n − 2 ) × ( n − 2 ) ! × 2 = 2 n − 2
Probability that they are together = 1 − 2 n − 2 = n 2
Problem Loading...
Note Loading...
Set Loading...
Posting solution is not necessary