top of page

Arrangements with Restrictions: The Gap Method Made Simple (JEE Maths)

Writer: Sukriti Neet jee
Sukriti Neet jee
Oct 25
5 min read

You know that 5 people can stand in a row in 5! = 120 ways. Then the question adds one line: "but two particular people must never stand together", and suddenly half the class gets a wrong answer. Restrictions are where permutations stop being a formula and become a way of thinking, and the gap method is the cleanest tool for it. This concept matters for JEE (Mathematics); it is not part of NEET.

Quick Summary

  • Handle a restriction first: place the fussy objects or positions before the free ones.

  • "Always together": glue them into one block, arrange the block, then arrange the members inside it.

  • "Never together": count all arrangements and subtract the "together" ones, or use the gap method.

  • Gap method: arrange the unrestricted objects first, then drop the restricted ones into the gaps between them, at most one per gap.

Start from what you already know

Without any condition, n different objects in a row can be arranged in n! ways (n factorial = n × (n−1) × … × 1). The number of ways to choose r of them and line them up is nPr = n! ÷ (n−r)!. Every restricted problem is just this basic count, applied in a smart order, or applied to a modified set of objects.

The guiding rule is the multiplication principle: if one task can be done in a ways and then a second in b ways, the pair can be done in a × b ways. Restrictions simply tell you which task to do first. Do the most restricted choice first, because that choice has the fewest options and does not depend on the others.

Case 1: objects that must stay together

Why does gluing work? If A and B must be adjacent, then in every valid arrangement they occupy two neighbouring seats as a pair. So think of the pair as a single super-object. Arrange the super-object along with the others, then multiply by the ways the pair can order itself inside.

Example: 6 people P1 to P6 stand in a row. In how many ways are P1 and P2 always together?

  1. Glue P1 and P2 into one block. Now there are 5 objects: the block and 4 others.

  2. Arrange these 5 objects: 5! = 120 ways.

  3. Inside the block, P1 and P2 can swap: 2! = 2 ways.

  4. Total = 120 × 2 = 240.

Case 2: objects that must not be together

The subtraction idea: bad = total − together. For the same 6 people, the total is 6! = 720 and the "together" count is 240, so P1 and P2 are never together in 720 − 240 = 480 ways. This works well for one forbidden pair. For several people who must be separated, subtraction becomes messy, and that is when the gap method wins.

The gap method, step by step

Take 5 boys and 3 girls. In how many ways can they stand in a row so that no two girls are adjacent?

  1. Arrange the boys first, since they have no restriction: 5! = 120 ways.

  2. Five boys in a row create 6 gaps: one before the first boy, four between boys, one after the last boy. Write them as _ B _ B _ B _ B _ B _.

  3. If each girl stands in a different gap, no two girls can be neighbours, because a boy always separates them. So we choose 3 of the 6 gaps and place the three different girls in them: 6P3 = 6 × 5 × 4 = 120 ways.

  4. Multiply: 120 × 120 = 14400.

Notice the general pattern: if there are m unrestricted objects, they create (m+1) gaps, and k restricted objects that must be separated can be placed in (m+1)Pk ways when they are all different, or (m+1)Ck ways when they are identical.

Case 3: restricted positions

Example: How many 4-digit even numbers can be formed using the digits 1, 2, 3, 4, 5 without repetition?

  1. The restriction is on the units place: it must be 2 or 4. Fill it first: 2 ways.

  2. The thousands place can now use any of the 4 remaining digits: 4 ways.

  3. Hundreds: 3 ways. Tens: 2 ways.

  4. Total = 2 × 4 × 3 × 2 = 48.

Had we filled the thousands place first, the units place would have a different number of options depending on what we chose, and we would be forced to split into cases. Filling the restricted place first avoids that.

Mistakes students actually make

  • Forgetting the internal arrangement of the glued block, so the answer comes out half of what it should be.

  • Using the gap method but counting gaps as m−1 (only the inside gaps) and forgetting the two end gaps.

  • Placing the restricted objects first and then trying to fit the free ones around them, which breaks the multiplication principle.

  • Treating identical objects as different. If the girls were identical, the answer would use 6C3 = 20, not 6P3.

  • Subtracting "together" cases from the wrong total, for example using n! when some objects repeat.

How JEE asks it

Expect these shapes: words whose vowels must (or must not) occupy specific positions; people seated in a row or around a table with some pairs together or apart; numbers formed from a digit set with parity or divisibility conditions; and "no two of a kind adjacent" questions. In JEE Main these are usually one-step or two-step counts; in JEE Advanced the same ideas appear inside multi-case problems. A habit that helps when practising with a group like Sukriti NeetJee is to write the structure on paper (blocks, gaps, slots) before touching any number.

Pro Tip: Before calculating, ask one question: "Is this a together problem, a separate problem, or a position problem?" Together means glue, separate means gap, position means fill the restricted slot first. Naming the type before computing prevents most wrong answers, because each type has exactly one correct opening move. For a quick sanity check, your "never together" answer must be smaller than the unrestricted total.

Frequently Asked Questions

When should I use subtraction and when the gap method?

Use subtraction when only one pair or one small group must be kept apart, since the "together" count is a simple glue calculation. Use the gap method when several objects must all be separated from each other, because subtracting multiple overlapping bad cases becomes error-prone.

How many gaps do n objects in a row create?

They create n+1 gaps: n−1 between the objects and one at each end. Students often forget the end gaps, which undercounts the answer.

What changes if the restricted objects are identical?

Once you choose which gaps they occupy, there is nothing left to arrange among them, so you use combinations (m+1)Ck instead of permutations (m+1)Pk. Identical objects mean the order among them is invisible.

Why do we fill the restricted position first?

Because its number of choices is fixed and independent of everything else. If you fill a free position first, you may use up a digit or person that the restricted position needed, which forces you to split into cases.

Does the same idea work for circular arrangements?

Yes, but first fix one object to remove the rotational symmetry, which gives (n−1)! for n different objects. After that, gluing and gap arguments work the same way on the remaining positions.

Stuck on a restriction problem that refuses to give the book's answer? Drop it in the comments and we will sort out which type it is, and share this with a fellow JEE aspirant who keeps mixing up "together" and "apart".

Recent Posts

See All

Comments


bottom of page