Permutations and Combinations
4. Block and Gap method
Block Method (String Method):
The Block Method is used to calculate permutations of \(n\) different objects, where \(r\) different objects are always together. In this method, we treat \(r\) different things as a single block and calculate the number of permutations. Furthermore, the \(r\) different objects inside the block can also be permuted.
For example, suppose A, B, C, D, and E are five letters, and we want to calculate the number of permutations such that A, B, C are always together. First, assume A, B, and C as a single block; let's denote this block as X. Now, effectively, there are three letters including X, and these letters can be permuted in 3! (= 6) different ways:
XDE, XED, DEX, DXE, EDX, EXD
These three letters can be arranged in 3! ways, but the letters A, B, C (inside the block) can also be permuted in 3! ways.
Thus, the total number of ways equals 3!×3! = 6×6 = 36.
Another similar example could be the seating arrangements of 4 boys and 3 girls, where all three girls must be seated together.
First, create a block consisting of the three girls. This block can then be permuted along with the 4 boys in 5! ways. Within the block, the three girls can interchange their positions in 3! ways.
Therefore, the total number of possible seating arrangements is 5! × 3! = 720.
Let us take an example of the block method, where the letters are repeated.
Example: How many permutations of the letters of the word MISSISSIPPI are there in which all 4 S's are together?
To calculate the permutations, let us first make a block of all the four S's; let this block be named X. So, there are effectively 8 letters including X:
X M I I I I P P
Among these 8 letters, there are 4 identical I’s and 2 identical Ps, so these letters can be permuted in \(\frac{{8!}}{{2! \times 4!}}\) ways. Additionally, note that all 4 S's are identical, so they are not permutable. The final answer is \(\frac{{8!}}{{2! \times 4!}} = 840\)
Join Online/Offline Batches for MCA 2025
(NIMCET, CUET, MAHCET, VIT)
Contact Us
Gap method:
The gap method is used if we have to arrange \(n\) different things in such a way such that no two of the \(r\) things are together. In this method we first place \((n - r)\) things in a line so that there are \((n - r + 1)\) gaps in between and at extreme ends. Now place \(r\) things on these gaps so that no two of these things are together provided that \(r \le n - r + 1\).
Suppose T1, T2, T3, ……….T10 are 10 distinct objects and we want that no two of T1, T2, T3 and T4 are together in the arrangement. First place remaining things T5, T6……T10
–T5 –T6—T7—T8—T9—T10–
So there are 7 gaps
Total number of ways = (7.6.5.4).6!
Here are some examples, of where we can use the gap method:
Example: In how many ways, 10 boys and 4 girls stand in a line such that no two girls are together? Let's first arrange the 10 boys in a line. This creates 11 gaps (one gap to the left of the first boy and the 11th gap to the right of the 10th boy).
–B–B– B– B–B– B–B–B–B–B–
The 4 girls can stand in these 11 gaps in 11×10×9×8 = 7920 ways.
Example 1: In how many ways letters of the word PERMUTATION can be arranged so that no two vowels are together?
Remaining letters are P, R, M, T, T, N
Let us first place the letters P, R, M, T, T, N in a line and on the gaps created, the vowels are placed.
– P – R – M – T – T – N –
There are 7 gaps where we can place 5 vowels and the letters P, R, M, T, T, N can be permuted in \(\frac{{6!}}{{2!}}\) ways.
Number of arrangements = \((7 \times 6 \times 5 \times 4 \times 3)\left( {\frac{{6!}}{2}} \right) = \frac{{7! \times 6!}}{4}\)
Example 2: In how many ways the letters of the word MATHEMATICIAN be arranged such that no vowels should come together?
First place the 7 consonants of which 2 M’s are similar and 2 T’s in a line.
– M – M – T – T – H – C – N –
We see that there are 8 gaps (6 gaps between the consonants and 2 at the ends of the row). The 6 vowels of which 3 A’s are similar and 2 I’s are similar can be placed on these gaps in
\(\frac{{8 \times 7 \times 6 \times 5 \times 4 \times 3}}{{3! \times 2!}} = 1680\) ways.
The consonants can be mutually permuted in \(\frac{{7!}}{{2! \times 2!}} = 1260\) ways.
Hence the total number of arrangements = \(1680 \times 1260 = 2116800\)
Test on Gap and Block Methods