PYQ Vault

JEE Mains Maths · Permutations and Combinations

Arrangements with Restrictions

Arranging people, letters or objects in a row or around a table when some must stay together, some must stay apart, or some items repeat.

Why this matters

Nineteen PYQs, ten of them numerical answer. Twelve put a condition on who sits next to whom, solved by blocks, by gaps, or by subtracting the unwanted cases. The rest arrange repeated items or count sequences, where dividing by the repeats does the work. Two ideas cover the page.

Concept 1 of 2: Together, apart and around a table

To keep a group together, glue it into one block, arrange the blocks, then arrange inside the block. To keep items apart, first arrange the others, then drop the separated items into the gaps between them. 'Never all together' is the total minus 'all together'. Around a round table one seat is fixed, so nn people sit in (n−1)!(n-1)! ways.

Definition

  • Together: treat as one block; multiply by the inner arrangements.
  • Apart: arrange the others, then choose gaps: nn items leave n+1n+1 gaps in a row, nn around a circle.
  • Not all together == total −- all together.
  • Circular: (n−1)!(n-1)!.
  • Either AA or BB: ∣A∣+∣B∣−∣A∩B∣|A|+|B|-|A\cap B|.

No two of k items together (row)

n!×n+1Pk(n others arranged, then k items in the gaps)n!\times{}^{n+1}P_{k}\quad(n\ \text{others arranged, then}\ k\ \text{items in the gaps})

Worked example

In how many ways can 4 boys and 3 girls stand in a row so that no two girls are together?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2025 · 23 Jan 2025 · Q62Moderate

Example 1 · Permutations and Combinations · Arrangements with Restrictions

The number of words, which can be formed using all the letters of the word "DAUGHTER", so that all the vowels never come together, is

Not together is not the same as apart

'All the vowels never together' allows two of them to be adjacent; it is the total minus the all-together case. 'No two vowels together' is the gap method. Read which one is asked.

Concept 2 of 2: Repeated items, sequences and derangements

With repeats, arrangements are n!p! q!⋯\frac{n!}{p!\,q!\cdots}: swapping identical items changes nothing. A sequence of 0s, 1s and 2s with fixed counts is the same problem. A choice made independently at each step — a floor for each person, a character for each password position — multiplies. A derangement, where nobody is in their own place, is counted by inclusion–exclusion: Dn=n!∑k=0n(−1)kk!D_n=n!\sum_{k=0}^{n}\frac{(-1)^k}{k!}.

Definition

  • nn items with repeats p,q,…p,q,\dots: n!p! q!⋯\frac{n!}{p!\,q!\cdots}.
  • Independent choices: multiply; 'at least one of a kind' == total −- none of that kind.
  • Derangements: D3=2, D4=9, D5=44D_3=2,\ D_4=9,\ D_5=44.
  • A series won when one side reaches kk wins: the last game is the winner's, so count the earlier games.

Arrangements with repeats

n!p! q! r!⋯\frac{n!}{p!\,q!\,r!\cdots}

Worked example

How many arrangements of the letters of BANANA are there?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2025 · 2 Apr 2025 · Q53Moderate

Example 2 · Permutations and Combinations · Arrangements with Restrictions

The number of sequences of ten terms, whose terms are either 0 or 1 or 2 , that contain exactly five 1 s and exactly three 2 s , is equal to

People are distinct, floors are distinct

When people leave a lift, each person picks a floor; the order of choosing does not matter but the people do. '4 get off at one floor and 5 at another' is a choice of the 4 people times an ordered pair of floors.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (2)

  • Together, apart and around a table

    No two of k items together (row)

    n!×n+1Pk(n others arranged, then k items in the gaps)n!\times{}^{n+1}P_{k}\quad(n\ \text{others arranged, then}\ k\ \text{items in the gaps})
  • Repeated items, sequences and derangements

    Arrangements with repeats

    n!p! q! r!⋯\frac{n!}{p!\,q!\,r!\cdots}

Watch out for (2)

Test yourself on Permutations and Combinations

20 past JEE Mains questions from this chapter, timed at 48 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.