Most counting questions in JEE Main do not ask for a plain arrangement of $n$ objects. They add a rule: two people must sit together, three letters must never be adjacent, a digit cannot lead a number, the table is round, the beads form a necklace. The rule is what turns a one-line factorial into a question that can be answered wrongly in five different ways. The chapter guide on permutations and combinations sets out the two principles, the formulas for $^nP_r$ and $^nC_r$, and a first pass at every sub-topic. This post takes two of those sub-topics much further: arrangements under restrictions, and arrangements in a circle.
The aim is to give you a small set of methods that cover almost every restriction you will meet. They are the glue method for "together", the gap method for "never together", the complement method for "not all", the position-by-position method for digit problems, and the fix-one-object method for circles. For each one we show the reasoning, then the family of questions it solves, then the slip that students usually make. The twelve worked examples at the end were all checked by brute-force enumeration in Python before they were written down, so the answers are safe to rely on. A sibling post, distribution problems and derangements, covers the other half of the advanced counting material.
What this post covers
| Topic | Where it shows up |
|---|---|
| Together, never together, not all together | Words, people in a row, books on a shelf |
| Gap (slot) method | Separating vowels, men and women, identical objects |
| Fixed and forbidden positions | Ranks, seats, "A not first", "B not last" |
| Relative order | "A before B before C" in a line |
| Digit problems with restrictions | Divisibility by 2, 4, 5, 3; leading zero; ranges |
| Circular arrangements | Round tables, couples, alternate seating, a block |
| Necklaces and garlands | Reflection symmetry, identical beads |
All of this is inside the JEE Main Mathematics syllabus under permutations and combinations. We give no weightage claim; in our JEE Main mocks the chapter gets about one question in the Mathematics section, which is our design and not an official figure.
The vocabulary of restrictions
Every restricted-arrangement question is one of four types, and naming the type is half the solution.
- Must be together. A set of objects must occupy consecutive places. Method: glue them into one block, arrange the blocks, then arrange inside the block.
- Must not be together (or no two adjacent). Method: either subtract the "together" count from the total, or place the unrestricted objects first and drop the restricted ones into the gaps.
- Position restrictions. An object must or must not occupy a given place. Method: fill the restricted places first.
- Order restrictions. Objects must appear in a given relative order. Method: symmetry.
Write the type on your page before you write a single factorial. A surprising number of wrong answers come from using the "together" method on a "not adjacent" question, or counting a restricted place last when it should have been counted first.
Also read: Friction and Circular Motion for JEE: Banking and Loops
The glue method for objects that must be together
Suppose $n$ distinct objects stand in a row and $k$ particular objects must be consecutive. Treat the $k$ objects as a single block. There are now $n-k+1$ units to arrange, which can be done in $(n-k+1)!$ ways. Inside the block the $k$ objects can be ordered in $k!$ ways. So
$$\text{together} = (n-k+1)!\;k!$$
If the $k$ objects must be together in one fixed order, drop the $k!$. If two separate groups must each be together, glue each into its own block and multiply the internal orders: for a group of size $a$ and a group of size $b$, the count is $(n-a-b+2)!\,a!\,b!$.
For words, "the vowels are together" works the same way, as long as every letter is distinct. If a letter repeats, divide by the factorial of the repeats after gluing, taking care that the glued block does not change what is repeated.
A related and very common phrase is "the vowels occupy only odd positions" or "only even positions". Here you do not glue anything. You count the vowels' allowed positions first (a permutation of positions, $^pP_v$) and then arrange the consonants in whatever places remain.
The complement method: not all together, never together
For a set of $k$ objects, "never together" has two meanings and JEE questions use both. You must read the sentence carefully.
- "The $k$ objects are not all together" means they do not occupy $k$ consecutive places. Count is total minus together: $n! - (n-k+1)!\,k!$.
- "No two of the objects are adjacent" is a much stronger condition. This one needs the gap method below.
For $k=2$ the two meanings coincide, so $n!-2\,(n-1)!$ answers both. For $k\ge3$ they differ, and a question that says "no two vowels are together" is not the same as "the vowels are not all together". Mixing them up is the most frequent error in this topic.
The gap method for no two adjacent
Place the unrestricted objects first, leaving gaps between and around them. If there are $m$ unrestricted objects in a row, they create $m+1$ gaps (one before, one after, and $m-1$ between). Choose gaps for the restricted objects, at most one object per gap, then arrange. For $k$ restricted objects, all distinct:
$$\text{count} = (m!)\cdot{}^{m+1}P_k$$
If the restricted objects are identical, the arrangement inside the chosen gaps carries no extra factor, so the count is $m!\cdot{}^{m+1}C_k$ (for distinct unrestricted objects) because only the choice of gaps matters.
For a word with repeated letters, say consonants with repeats and vowels that must be separated, divide the consonant arrangement by the repeated-letter factorials, then use the gaps. The method adapts without change.
A second variant is "at least one object between two particular ones", or "exactly $r$ objects between $A$ and $B$". For exactly $r$ objects between $A$ and $B$ in a row of $n$ persons, think of $A\ldots B$ as a rigid frame of length $r+2$. There are $n-r-1$ positions for the frame, two orders for $A$ and $B$, and the other $n-2$ people fill the remaining places in $(n-2)!$ ways, so the count is $2\,(n-r-1)\,(n-2)!$.
Fixed, forbidden and relative positions
Fixed positions. If a person must occupy a given seat, remove that seat and that person and arrange the rest. For $n$ people with two of them fixed in two named seats, the count is $(n-2)!$.
Forbidden positions. Use inclusion and exclusion when two objects each avoid a place: total, minus those with the first in the bad place, minus those with the second in the bad place, plus those with both. With $n$ distinct objects, $A$ not first and $B$ not last gives $n!-2(n-1)!+(n-2)!$. For more than two forbidden placements the same pattern continues, which leads to derangements; the sibling post handles that case in full.
Relative order. If $k$ named objects must appear in one particular left-to-right order within a row of $n$, the answer is $n!/k!$. The reason is symmetry: among all $n!$ arrangements, each of the $k!$ possible orderings of those $k$ objects is equally likely. If the $k$ objects must appear in some order that is either increasing or decreasing, double the result. For "$A$ is to the left of $B$" the answer is $n!/2$.
Digit problems under restrictions
Number problems are permutation problems with a digit rule. The reliable method is to fill the restricted positions first and the free positions after.
Leading zero. A number with $r$ digits cannot start with 0. If digits are drawn from $\{0,1,\dots,9\}$ without repetition, there are $9$ choices for the first place and then $9, 8, \dots$ for the rest. Alternatively, total minus those with zero in front.
Divisibility.
- By 2: the last digit is even.
- By 5: the last digit is 0 or 5. When 0 is among the digits, split into "ends in 0" and "ends in 5", because the first-digit rule behaves differently in the two cases.
- By 4: the last two digits form a multiple of 4. List the allowed pairs and then fill the other places.
- By 3 or 9: the digit sum is a multiple of 3 or 9. Choose the digit sets that satisfy this first, then arrange each set (watch the leading zero).
Ranges. For "greater than 3000" or "between 3000 and 6000", the first digit is restricted to an allowed set. Start with the first digit, then the last (if parity or divisibility applies), then the middle places.
The golden order: most restricted place first. Counting the free places before the restricted one often forces you into case splits that the restricted-first order avoids.
Words with repeated letters under restrictions
When letters repeat, the number of distinct arrangements of $n$ letters with repeats $p,q,r,\ldots$ is $n!/(p!\,q!\,r!\cdots)$. Under a restriction, there are two safe routes.
Gap route. Arrange the unrestricted letters first (with the repeat division), then place the restricted letters in the gaps. For the word BANANA, to keep the three A's apart, arrange B, N, N in $3!/2!=3$ ways, giving four gaps, then pick three of the four gaps for the identical A's: $3\times\binom43=12$.
Complement route. Count all distinct arrangements, then subtract the bad ones, computed by the glue method with the repeat adjustments. This works well when the bad event is "all together".
Do not mix routes in one problem. If you start with the gap route, finish with it.
Circular arrangements
Round a circular table, only the relative positions matter: rotating everyone by one seat gives the same arrangement. Fix one person at a reference seat and arrange the rest:
$$\text{circular arrangements of } n \text{ distinct objects} = (n-1)!$$
This assumes clockwise and anticlockwise orders are different, which is the default for seating. For things that can be flipped over, a necklace or garland, a clockwise arrangement and its mirror image are the same object, and the count halves:
$$\text{necklace of } n \text{ distinct beads} = \frac{(n-1)!}{2} \quad (n\ge3)$$
The halving is valid only when no arrangement equals its own mirror image, which is true for $n\ge3$ distinct beads. With repeated or identical beads the symmetries can coincide, and the formula fails; count such cases directly (see Example 10).
Circular with a rule.
- Two people together: glue them; there are $n-1$ units, so $(n-2)!\cdot2$.
- Two people not together: $(n-1)!-2(n-2)!$.
- $k$ people together: $(n-k)!\,k!$.
- Alternate seating of $a$ men and $a$ women: seat the men first in $(a-1)!$ ways, which creates $a$ gaps, then the women in $a!$ ways: $(a-1)!\,a!$.
- Couples side by side: glue each couple, arrange $c$ couples in $(c-1)!$ ways, times $2^c$ for the internal orders.
- A rule about who sits next to whom: fix one of the people in the rule at a seat. Once someone is fixed, left and right are different, and the question reduces to a linear count.
The "fix one" principle. Whenever a circular question looks hard, fix one person and re-read it as a line problem. The only times the line method fails are when the fixed person has to appear in two roles, or in necklace problems where mirror images merge.
A common companion question counts the number of ways to seat $n$ people on a round table with $m$ chairs where $m>n$. Choose the chairs first and arrange: $\binom mn(n-1)!$ is valid only when the chairs are identical and unnumbered; if the chairs are numbered, there is no rotation symmetry, and the answer is $^mP_n$. Read what the question tells you about the seats.
Worked examples
All twelve were verified by brute-force enumeration in Python before being included.
Example 1 (single-correct). The number of arrangements of the nine letters of LOGARITHM (all different) in which the three vowels O, A, I are not all together is: (A) $332640$ (B) $362880$ (C) $302400$ (D) $30240$.
Solution. Total arrangements are $9!=362880$. When the vowels are together, glue them: $7!\times3!=5040\times6=30240$. Subtract: $362880-30240=332640$. Answer: (A). Note that option (D) is the "together" count and option (B) is the total, the two common wrong answers.
Example 2 (numerical-value). In how many ways can the letters of LOGARITHM be arranged so that the three vowels occupy odd places only? ______.
Solution. There are $5$ odd places among $9$. Place the three vowels in them: $^5P_3=60$ ways. The six consonants fill the remaining six places in $6!=720$ ways. Total $60\times720=43200$. Answer: 43200.
Example 3 (numerical-value). The number of five-digit numbers with all digits different, formed from $0,1,\ldots,9$, that are divisible by $5$ is ______.
Solution. Split on the last digit. If it is $0$, the first four places take any four of the other nine digits in order: $9\times8\times7\times6=3024$. If it is $5$, the first digit is neither $0$ nor $5$ (8 choices), and the next three places use the remaining digits including $0$: $8\times8\times7\times6=2688$. Total $3024+2688=5712$. Answer: 5712.
Example 4 (single-correct). The number of even four-digit numbers greater than $3000$ and less than $6000$ that can be made from the digits $1,2,3,4,5,6$ with no digit repeated is: (A) $72$ (B) $96$ (C) $108$ (D) $120$.
Solution. The first digit is $3$, $4$ or $5$, and the last digit is $2$, $4$ or $6$. Fill those two places first. If the first digit is $3$ or $5$ (odd), the last digit has $3$ choices; if the first digit is $4$, the last digit has $2$ choices. Hence the ordered pairs (first, last) number $3+2+3=8$. Each pair leaves $4$ digits for the two middle places, in $4\times3=12$ ways. Total $8\times12=96$. Answer: (B).
Example 5 (numerical-value). Eight people sit at a round table. Three particular people $A$, $B$, $C$ are not all adjacent in a block of three. The number of seatings is ______.
Solution. Total circular arrangements: $7!=5040$. For the three together, glue them: six units around the table in $5!=120$ ways, and $3!=6$ orders inside: $720$. Subtract: $5040-720=4320$. Answer: 4320. (This is "not all together", not "no two adjacent"; those would be different counts.)
Example 6 (numerical-value). Four married couples sit around a round table so that every husband is next to his wife. The number of arrangements is ______.
Solution. Glue each couple. Four blocks sit around a table in $3!=6$ ways. Each couple can be ordered inside its block in $2$ ways, so $2^4=16$. Total $6\times16=96$. Answer: 96. Note that a husband sits "next to his wife" in this reading, but each husband could also be next to someone else's wife on his other side; the question allows that.
Example 7 (single-correct). Five men and five women sit around a round table so that no two men are adjacent. The number of ways is: (A) $2880$ (B) $14400$ (C) $5760$ (D) $3600$.
Solution. Seat the men first: $(5-1)!=24$ ways. This leaves five gaps, one between each pair of neighbouring men. The women occupy the gaps in $5!=120$ ways. Total $24\times120=2880$. Answer: (A). Option (B) is $5!\times5!$, which wrongly treats the men's circle as a line.
Example 8 (numerical-value). Four men and three women stand in a row so that no two women are adjacent. The number of ways is ______.
Solution. Arrange the four men: $4!=24$. This creates five gaps. The three women go into three different gaps, in order, in $^5P_3=60$ ways. Total $24\times60=1440$. Answer: 1440.
Example 9 (single-correct). A necklace is made of seven different beads. The number of necklaces in which two particular beads, $P$ and $Q$, lie next to each other is: (A) $240$ (B) $120$ (C) $60$ (D) $720$.
Solution. First count circular arrangements: glue $P$ and $Q$ into a block, six units in a circle in $5!=120$ ways, and $2$ internal orders gives $240$. A necklace can be turned over, so each arrangement and its mirror image give one necklace: $240/2=120$. Answer: (B). Seven distinct beads cannot be a mirror image of themselves, so dividing by $2$ is valid.
Example 10 (numerical-value). A garland is made of three identical red and three identical white flowers. If the garland may be turned over, the number of different garlands is ______.
Solution. Count the arrangements up to rotation first. Around the circle the red flowers can be separated by white ones in these patterns: RRRWWW, RRWRWW, RRWWRW, RWRWRW. That is $4$ rotationally distinct arrangements. Turning the garland over exchanges RRWRWW and RRWWRW (they are mirror images and not rotations of each other) and leaves the other two unchanged. So there are $3$ garlands. Answer: 3. (The formula $(n-1)!/2$ would give nonsense here; identical objects need direct enumeration.)
Example 11 (numerical-value). Six persons $A,B,C,D,E,F$ stand in a line. The number of arrangements in which $A$ is to the left of $B$ and $B$ is to the left of $C$ (not necessarily adjacent) is ______.
Solution. Among the $6!=720$ arrangements, each of the $3!=6$ relative orders of $A,B,C$ is equally frequent. So the count is $720/6=120$. Answer: 120.
Example 12 (numerical-value). The number of distinct arrangements of the letters of BANANA in which no two A's are adjacent is ______.
Solution. Arrange the non-A letters B, N, N: $3!/2!=3$ ways. They create $4$ gaps. Choose $3$ gaps for the identical A's: $\binom43=4$. Total $3\times4=12$. Answer: 12. The total number of arrangements of BANANA is $60$, so only one in five is valid.
Common traps
- Using the "together" count for "no two adjacent". For three or more objects these are different questions. "Vowels not all together" is total minus glued; "no two vowels adjacent" needs gaps. Read the exact words.
- Forgetting the internal order of a block. After gluing $k$ objects, multiply by $k!$ unless the question fixes their order.
- Dividing a circle by $n$ in the wrong place. The circular count is $(n-1)!$, not $n!/2$. A block inside a circle uses $(n-k)!\,k!$, not $(n-k+1)!\,k!$.
- Halving a necklace that cannot be halved. The factor $\tfrac12$ applies only when the two mirror images are different arrangements. For identical beads, enumerate directly.
- Counting the leading zero. In digit problems, a first digit of $0$ is invalid. If you count total arrangements first, subtract the ones with $0$ in front, or fill the first place before the others.
- Splitting digit problems without checking overlaps. For divisibility by 5 with a $0$ in the digit set, the "ends in 0" and "ends in 5" cases have different first-digit rules; one product does not cover both.
- Treating seat order as unimportant on a table. On a round table with no marked head seat, rotations are the same. On a table with numbered or distinct seats, they are different, and the answer is $n!$, not $(n-1)!$.
- Gap count off by one. $m$ objects make $m+1$ gaps in a line, but only $m$ gaps in a circle. A circular gap problem uses $m$ gaps (Example 7).
- Mixing the gap and complement methods inside one problem. Choose one route and finish it; mixing leads to double subtraction.
- Misreading "adjacent" in a circle. In a circle, the first and last persons of a listed order are adjacent too. A block is circularly consecutive, which is why we glue before counting.
- Using $n!/k!$ for a relative-order rule when the objects must also be adjacent. The symmetry argument counts relative order only. Adjacency needs the glue method.
- Not stating the type of question. Many errors vanish if you write "together", "gap", "position" or "order" at the top of the page before computing.
A one-page recap
| Situation | Count |
|---|---|
| $k$ of $n$ distinct objects together in a row | $(n-k+1)!\,k!$ |
| $k$ of $n$ not all together | $n!-(n-k+1)!\,k!$ |
| $m$ objects, no two of $k$ others adjacent | $m!\cdot{}^{m+1}P_k$ (distinct) |
| Exactly $r$ objects between $A$ and $B$ | $2(n-r-1)(n-2)!$ |
| $A$ not first and $B$ not last | $n!-2(n-1)!+(n-2)!$ |
| $k$ named objects in a given relative order | $n!/k!$ |
| Circle of $n$ distinct objects | $(n-1)!$ |
| Circle, $k$ together | $(n-k)!\,k!$ |
| Circle, $a$ men and $a$ women alternating | $(a-1)!\,a!$ |
| Necklace of $n\ge3$ distinct beads | $(n-1)!/2$ |
| Digit problems | restricted places first, then free places |
Also read: Seating Arrangement Questions: Linear and Circular Tricks
How to practise this chapter
Start with the book: Permutations and Combinations, chapter 3 of the Matrices and Counting book, which is also available in Hindi and Telugu. Then do the four chapter tests in order: Chapter Test 01, then 02, 03 and 04 (the ids end in -03-02, -03-03 and -03-04). Each has 15 questions in 36 minutes, with numerical-value questions included. After the chapter tests, put the topic into a JEE Main Mathematics practice test and, weekly, a full JEE Main mock. The free JEE Main mini mock is a quick way to see where you stand. Full mocks, practice tests and chapter tests are part of the Pro Pass.
The same ideas feed the binomial theorem, where the coefficients are counting numbers, and conditional probability, where you count favourable arrangements. For the overview of the whole block, see matrices, determinants, permutations and the binomial theorem.
A ten-day plan we suggest:
| Day | Work |
|---|---|
| 1 | Re-derive the glue and gap formulas; 15 "together" and "not together" problems |
| 2 | Gap method with identical objects and repeated letters; 15 problems |
| 3 | Fixed, forbidden and relative positions; inclusion and exclusion for two forbidden places |
| 4 | Digit problems: leading zero, divisibility by 2, 4, 5, 3; chapter test 01 |
| 5 | Digit problems with ranges and repeated digits; sum of numbers |
| 6 | Circular arrangements: fix-one, blocks, alternation; chapter test 02 |
| 7 | Couples, necklaces, garlands, identical beads |
| 8 | Mixed set of 25 restricted-arrangement questions, timed; chapter test 03 |
| 9 | Chapter test 04; write each wrong answer in an error log with its type |
| 10 | Redo the error log; one timed mixed practice test |
If your error log shows the same label three times, such as "gap count off by one", spend an extra evening on that one method before moving on.
Frequently asked questions
What is the difference between "not all together" and "no two together"?
"Not all together" removes only the arrangements in which the whole group sits in one consecutive block, so the count is the total minus the glued count. "No two together" removes every arrangement in which any two members of the group are neighbours, which needs the gap method. For exactly two objects the two statements mean the same thing; for three or more they do not.
Why is the number of circular arrangements $(n-1)!$?
Rotating all $n$ people by one seat gives the same seating, so each distinct arrangement appears $n$ times among the $n!$ linear arrangements. Dividing by $n$ gives $(n-1)!$. Equivalently, fix one person at a reference seat and arrange the remaining $n-1$ around the table.
When do I divide by 2 for a necklace?
Divide by $2$ when the beads are all different (and there are at least three), because the mirror image of an arrangement is always a different arrangement and is the same necklace. For identical or repeated beads some arrangements are their own mirror image, and you must enumerate directly, as in the garland example above.
How do I count the digit problems that ask for numbers divisible by 4?
A number is divisible by $4$ when its last two digits form a multiple of $4$. List the permitted ending pairs from the allowed digits, count the first-digit and middle-digit choices for each pair, and add. When repetition is allowed the middle places are free; when it is not, remove the two digits used in the ending.
How do I handle a table with $m$ seats and $n<m$ people?
If the seats are identical and unmarked, choose the occupied seats up to rotation, which is a harder question and rarely asked. The usual version has numbered or distinct seats, so there is no rotation symmetry and the count is $^mP_n$. Check whether the question names the seats.
Is a restriction like "A before B" the same as "A to the left of B"?
Yes, in a row. Among the $n!$ arrangements, half have $A$ before $B$, so the count is $n!/2$. In a circle there is no left and right of that kind without a reference point, so such a question will fix someone first.
How many restricted-arrangement questions should I expect in the exam?
Counting questions appear in the Mathematics section in small numbers, and a restricted arrangement is one of the usual forms. We do not claim an official weightage. The methods above are short enough to master within a week, and the same skills help with probability and the binomial theorem.

Comments (0)
No comments yet. Be the first to share your thoughts.