CAT and MBA Entrance Preparation Module 6 – Quantitative Ability: geometry, counting and probability
Permutations and combinations: CAT methods
Count arrangements with repeated letters and round tables, selections with at-least conditions, capped shares and derangements, each checked by listing.
What you will learn
- Count arrangements with repeated items, neighbours kept together or apart, and round tables
- Count selections with at-least and at-most conditions by cases and by the complement
- Count shares of identical items with a cap, shares of distinct items, and derangements
Before you start
What you’ll learn · Before you start
What you will learn
- Count arrangements with repeated items, neighbours kept together or apart, and round tables
- Count selections with at-least and at-most conditions by cases and by the complement
- Count shares of identical items with a cap, shares of distinct items, and derangements
Before you start
On this page
A committee of 5 from 6 men and 4 women must include at least 2 women. Picking 2 women first and then any 3 of the 8 people left gives C(4, 2) × C(8, 3) = 336, but the right count is 186: that route builds each committee with 3 women three times and each with 4 women six times.
Permutations count orders and combinations count choices. Test-level questions add conditions, such as repeated letters, people who sit together or apart, a circular arrangement: An arrangement of people or things round a circle, where turning everyone by the same number of places gives the same arrangement; n different people sit round a table in (n − 1)! ways., an “at least” or a share among people, and each condition has one move that handles it; a program checks every solved problem by listing the cases.
Repeated letters divide, neighbours glue, a round table fixes a seat
COMMITTEE has 9 letters, with M, T and E each twice, and its words are permutations of those letters in which alike letters cannot be told apart. Swapping its two Ms, two Ts or two Es leaves a word as it was, so each word turns up 2! × 2! × 2! = 8 times among the 9! orders of the letters: 9!/8 = 45,360 words (NCERT Class 11, Chapter 6). Each other condition has its own move:
| Condition | The move | Count |
|---|---|---|
| Letters alike | Divide by each repeat’s orders | 9!/(2! 2! 2!) = 45,360 |
| Two kept together | Glue them into one unit | MM glued: 8!/(2! 2!) = 10,080 |
| Two kept apart | All, minus together | 35,280 |
| A round table of n | Fix one person’s seat: (n − 1)! | 8 people: 7! = 5,040 |
A round table has no first seat: a turn of everyone gives the same seating, so the n! rows of n chairs make n!/n seatings.
Doubling a glued pair of identical letters
Two different people glued together have 2 orders inside the unit; the two Ms do not, since MM read the other way is still MM, so the count stays 10,080, not 20,160.
Checkpoint
Check: Arrangements with repeats, neighbours and round tables
At least 2 women: add the cases, then check with the complement
Split the committee by its number of women. Every committee has exactly one such number, so the cases cannot overlap and their counts add; each case is a product of combinations, C(n, k) = n!/(k!(n − k)!) (DLMF §26.3). Step through the cases, the check and the shortcut:
The drawing shows the whole scene; its 10 steps are listed below.
Every step as text
- The question. Six men and four women; a committee of 5 must hold at least 2 women. Every committee has exactly one number of women, 2, 3 or 4, so the count splits by that number.
- Two women. Two of the 4 women and three of the 6 men: C(4, 2) × C(6, 3) = 6 × 20 = 120 committees.
- Three women. Three women and two men: C(4, 3) × C(6, 2) = 4 × 15 = 60 committees.
- Four women. All four women and one of the men: 1 × 6 = 6 committees.
- The cases add. No committee has two different numbers of women, so the three cases never overlap and their counts add: 120 + 60 + 6 = 186.
- Count from the other side. With no condition there are C(10, 5) = 252 committees. The ones the question forbids have fewer than 2 women.
- The forbidden ones. No woman: C(6, 5) = 6 committees. Exactly one woman: 4 × C(6, 4) = 4 × 15 = 60. Together 66.
- The check. 252 − 66 = 186, the same as the cases. Two routes that agree are worth the extra half minute in a typed-answer question.
- The shortcut. Pick 2 women first, in C(4, 2) = 6 ways, then any 3 of the other 8 people, in C(8, 3) = 56 ways. That gives 336, far more than the 186 committees there are.
- Why it overcounts. A committee with 3 women is built once for each pair of its women picked first, so 3 times, and one with all 4 women 6 times: 120 + 3 × 60 + 6 × 6 = 336.
Both routes give 186. The shortcut fails the test the cases pass: a committee with 3 women can start from any 2 of them, so it is built three times, an overcount: A count that includes some cases more than once, usually because a method builds part of each case first and then fills in the rest freely, as when 336 committees are counted instead of 186. that a second route catches at once.
Key idea
Count an “at least” by cases that cannot overlap, or by the total less the forbidden cases, and let one route check the other.
Checkpoint
Check: At-least selections by cases and by the complement
Shares: stars and bars for identical items, one choice per item for distinct ones
Twelve identical chocolates for 4 children: a share is a row of 12 stars and 3 bars, so there are C(15, 3) = 455 of them, the stars and bars: A count of the ways to share n identical things among r people: n stars and r − 1 bars in a row, so C(n + r − 1, r − 1) ways, or C(n − 1, r − 1) when everyone gets at least one. count. A cap of 5 a child is handled by inclusion–exclusion: A way of counting by subtraction: take all the cases, subtract the cases that break each rule, and add back the cases that break two rules, since they were subtracted twice. (DLMF §26.18): take away the shares that break it, then add back those taken away twice:
The drawing shows the whole scene; its 5 steps are listed below.
Every step as text
- Every share. Without a cap, a share is a row of 12 stars and 3 bars that split them among 4 children. Choosing the 3 places for the bars among the 15 gives C(15, 3) = 455 shares.
- Too many for one child. For each child, take away the shares that give it 6 or more: hand that child 6 first and share the other 6 freely, C(9, 3) = 84 ways. The 4 children make 4 × 84 = 336.
- Taken away twice. A share in which two children both get 6 was taken away twice, once for each of them, so 336 is more than the 330 shares that break the cap. Only 6 + 6 + 0 + 0 fits, and the pair can be chosen in C(4, 2) = 6 ways, so add 6 back.
- Three is impossible. Three children with 6 or more would need 18 chocolates, more than the 12 there are, so the next term is 0 and the count stops here.
- The count. 455 − 336 + 6 = 125 shares give every child at most 5. The program below lists all of them and finds the same 125.
The cap leaves 125 shares. Distinct items are counted one item at a time: 6 different prizes for 4 students go in 4⁶ = 4,096 ways, since each prize picks its student. A derangement: An order of a set of items in which no item is in its own place, such as letters that all go into wrong envelopes. Four items have 9 derangements and five have 44. sends no item to its own place; DLMF §26.13 gives D(n) = n!(1 − 1/1! + 1/2! − … ± 1/n!), so 4 letters can all miss their envelopes in 9 ways and 5 letters in 44.
Checkpoint
Check: Shares of identical and distinct items, and derangements
Five test-level problems, each counted twice
The program counts each one by its formula and again by listing every case:
- Repeated letters. COMMITTEE: 45,360 words, 35,280 of them with the two Ms apart.
- At least 2 women. 186 committees, not the shortcut’s 336.
- A round table. Eight people, two of them never side by side: 7! − 2 × 6! = 3,600 seatings.
- Capped shares. 12 chocolates for 4 children, at most 5 each: 125 shares.
- Envelopes. Five letters all in wrong envelopes: 44 ways; exactly one right: 5 × 9 = 45.
"""Five counting problems at CAT level, each counted twice: by its formula, and by listing every case.
The listing uses no formula: it builds every word, committee, seating, share or order of letters, keeps the
ones that fit the question and counts them. Press Edit, change a number (12 chocolates to 15, say) and run it again.
"""
from itertools import combinations, permutations, product
from math import comb, factorial
def check(name, by_formula, by_listing):
verdict = "they agree" if by_formula == by_listing else "THEY DIFFER"
print(f"{name}: formula {by_formula:,}, listing {by_listing:,}; {verdict}")
def side_by_side(seating, a, b):
"""Whether a and b sit next to each other at a round table (the last seat touches the first)."""
gap = abs(seating.index(a) - seating.index(b))
return gap in (1, len(seating) - 1)
def wrong_letters(order):
"""How many letters of an order are not in their own envelope (letter i belongs in envelope i)."""
return sum(1 for envelope, letter in enumerate(order) if letter != envelope)
# 1. The letters of COMMITTEE, and the words in which the two Ms are apart.
words = set(permutations("COMMITTEE")) # 9! orders, each different word kept once
ms_apart = [w for w in words if "MM" not in "".join(w)]
check("1. COMMITTEE, every arrangement", factorial(9) // (2 * 2 * 2), len(words))
check(" COMMITTEE, the two Ms apart", factorial(9) // 8 - factorial(8) // 4, len(ms_apart))
# 2. Committees of 5 from 6 men (0 to 5) and 4 women (6 to 9) with at least 2 women.
committees = [c for c in combinations(range(10), 5) if sum(p >= 6 for p in c) >= 2]
by_cases = comb(4, 2) * comb(6, 3) + comb(4, 3) * comb(6, 2) + comb(4, 4) * comb(6, 1)
check("2. Committees with at least 2 women", by_cases, len(committees))
print(f" the shortcut C(4, 2) × C(8, 3) gives {comb(4, 2) * comb(8, 3)}: more than there are")
# 3. Eight people at a round table; persons 1 and 2 refuse to sit side by side.
seatings = [(0,) + rest for rest in permutations(range(1, 8))] # person 0 fixed: a turn changes nothing
apart = [s for s in seatings if not side_by_side(s, 1, 2)]
check("3. Round table of 8, two people apart", factorial(7) - 2 * factorial(6), len(apart))
# 4. Twelve identical chocolates for 4 children, at most 5 each. Change the three numbers to count another share.
chocolates, children, cap = 12, 4, 5
shares = [s for s in product(range(chocolates + 1), repeat=children) if sum(s) == chocolates and max(s) <= cap]
# Stars and bars, less the shares with a child over the cap, plus those taken away twice, and so on:
# for 12, 4 and 5 that is C(15, 3) - 4 × C(9, 3) + 6 × C(3, 3).
capped = sum((-1) ** j * comb(children, j) * comb(chocolates - j * (cap + 1) + children - 1, children - 1)
for j in range(children + 1) if chocolates >= j * (cap + 1))
check(f"4. {chocolates} chocolates, {children} children, at most {cap} each", capped, len(shares))
# 5. Five letters and their five envelopes: every letter wrong, and exactly one right.
orders = list(permutations(range(5)))
d4 = sum((-1) ** k * factorial(4) // factorial(k) for k in range(5))
d5 = sum((-1) ** k * factorial(5) // factorial(k) for k in range(6))
check("5. Five letters, none in its envelope", d5, sum(1 for o in orders if wrong_letters(o) == 5))
check(" Five letters, exactly one right", 5 * d4, sum(1 for o in orders if wrong_letters(o) == 4)) Output
1. COMMITTEE, every arrangement: formula 45,360, listing 45,360; they agree COMMITTEE, the two Ms apart: formula 35,280, listing 35,280; they agree 2. Committees with at least 2 women: formula 186, listing 186; they agree the shortcut C(4, 2) × C(8, 3) gives 336: more than there are 3. Round table of 8, two people apart: formula 3,600, listing 3,600; they agree 4. 12 chocolates, 4 children, at most 5 each: formula 125, listing 125; they agree 5. Five letters, none in its envelope: formula 44, listing 44; they agree Five letters, exactly one right: formula 45, listing 45; they agree
Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 count.py
Runs on this device, in your browser. The first run downloads Python (about 13.5 MB), which is kept for the next runs.
Your run, in this browser
Every pair agrees; press Edit and change 12 chocolates to 15 to check a new count. CAT’s FAQs give the test no defined syllabus, NMAT lists “Algebra and Probability” among its quantitative topics, and XAT’s overview names “modern Maths”.
Not affiliated
Based on public information about the IIMs, XLRI and GMAC. MySmartCoPilot is not affiliated with the IIMs, XLRI and GMAC, and the IIMs, XLRI and GMAC’s real test rules may differ from what this lesson describes.
Practise: ten questions, untimed
Ten questions on the three moves; the one you know least comes first, and a miss is asked again.
Practice that adapts to you
Practise this lesson
10 questions about 5 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.
Twenty counting problems, fully worked and checked by brute force Pro: opens with a Pro, Premium or Ultimate pass
Twenty original problems in four families, each worked in full; a program then counts every answer again by listing the cases themselves.
In this part:
- Arrangements with repeats, gaps and round tables, worked
- Selections from polygons, papers and grids, with numbers
- Shares, prizes and wrong envelopes, worked
- Digits, rectangles, stairs and rounds, with numbers
1 runnable example (Python) · about 5 minutes
Opening this part with your pass…
This part opens with any MySmartCoPilot pass.
- Pro pass · 1 week₹79$2.99
- 30 days₹179$5.99
- 1 year₹1,699$45
One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.
Passes can’t be bought right now, so this part can’t be opened at the moment. The free part above stands on its own. If you have a pass, enter your licence key.
It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).
Overcounting, reproduced: six answers that count a case more than once Pro: opens with a Pro, Premium or Ultimate pass
Six wrong answers, each from a method that builds part of a case first, names groups that have no names or ignores a turn of the table. A program builds every case each method builds and counts how often it reaches each one.
In this part:
- Six wrong methods, measured case by case
- Why each method overcounts, with the numbers
- Divide, or split into cases: the check that decides
1 runnable example (Python) · about 4 minutes
Opening this part with your pass…
This part opens with any MySmartCoPilot pass.
- Pro pass · 1 week₹79$2.99
- 30 days₹179$5.99
- 1 year₹1,699$45
One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.
Passes can’t be bought right now, so this part can’t be opened at the moment. The free part above stands on its own. If you have a pass, enter your licence key.
It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).
Interview questions
Warm-up: what is a derangement?
An order of n items in which no item takes its own place: for example, letters that each go into an envelope addressed to someone else. By inclusion–exclusion, D(n) = n!(1 − 1/1! + 1/2! − … ± 1/n!), so D(4) = 9 and D(5) = 44; with exactly k items in place, choose them and derange the rest, C(n, k) × D(n − k).
-
Fresher to mid
Seven people sit at a round table. Asha and Bala refuse to sit side by side, while Chitra and Dev insist on sitting together. How many seatings are possible, and how would you check the count?
-
Fresher to mid
Fifteen identical sweets are shared among four children so that every child gets at least 2 and at most 6. How many shares are possible, and how would you reach the number quickly in a test?
-
Fresher to mid
Six different prizes go to four students so that every student gets at least one. A classmate counts 6 × 5 × 4 × 3 ways to give each student a first prize, then 4² ways for the other two: 5,760. Is that right? Find the count.
Flashcards · 7 cards
Recall it, then check
Say the answer to yourself before you look: recalling it is what makes it stick.
-
How many words can be made from the letters of COMMITTEE?
45,360: 9! orders of the letters, divided by 2! for each pair of alike letters (M, T and E), since swapping two alike letters leaves a word as it was.
-
In how many COMMITTEE words are the two Ms together, and apart?
Together: glue MM into one unit, 8!/(2! × 2!) = 10,080, with no extra factor 2 since MM reversed is the same. Apart: all less together, 45,360 − 10,080 = 35,280.
-
In how many ways can n people sit round a table?
(n − 1)!, since turning everyone one seat gives the same seating: 8 people sit in 7! = 5,040 ways. With two of them never side by side, 7! − 2 × 6! = 3,600.
-
A committee of 5 from 6 men and 4 women needs at least 2 women. How many committees?
186, by cases of exactly 2, 3 and 4 women, 120 + 60 + 6, checked by the total less the forbidden cases: 252 − 6 − 60.
-
Why is C(4, 2) × C(8, 3) = 336 wrong for "at least 2 women"?
It builds the same committee more than once: one with 3 women can start from any 2 of them, so it is counted three times, and one with 4 women six times. A second route catches such an overcount.
-
Share 12 identical chocolates among 4 children so that nobody gets more than 5. How many shares?
125. Stars and bars give C(15, 3) = 455 shares in all; take away the 4 × 84 = 336 that give some child 6 or more, then add back the 6 taken away twice: 455 − 336 + 6.
-
In how many ways can 5 letters all go into wrong envelopes?
44. D(n) is n! times the alternating sum 1 − 1/1! + 1/2! − … ± 1/n!, which gives D(4) = 9 and D(5) = 44. With exactly one letter right: 5 × D(4) = 45.
Key takeaways
- Repeats divide the count, neighbours who stay together are glued into one unit, and n people sit round a table in (n − 1)! ways.
- An “at least” count is a sum of cases that cannot overlap, checked by the total less the forbidden cases.
- Identical items are shared by stars and bars, a cap taken away and added back; distinct items go one at a time.
- Fixing part of a case first and filling the rest freely reaches some cases twice or more: 336, not 186.
Terms in this lesson
- circular arrangement
- An arrangement of people or things round a circle, where turning everyone by the same number of places gives the same arrangement; n different people sit round a table in (n − 1)! ways.
- derangement
- An order of a set of items in which no item is in its own place, such as letters that all go into wrong envelopes. Four items have 9 derangements and five have 44.
- overcount
- A count that includes some cases more than once, usually because a method builds part of each case first and then fills in the rest freely, as when 336 committees are counted instead of 186.
References
- Mathematics, Class 11, Chapter 6: Permutations and Combinations (National Council of Educational Research and Training (NCERT))
- NIST Digital Library of Mathematical Functions, §26.3: Lattice Paths: Binomial Coefficients (National Institute of Standards and Technology (NIST))
- NIST Digital Library of Mathematical Functions, §26.13: Permutations: Cycle Notation (derangements) (National Institute of Standards and Technology (NIST))
- NIST Digital Library of Mathematical Functions, §26.18: Counting Techniques (inclusion-exclusion) (National Institute of Standards and Technology (NIST))
- CAT 2026 FAQs (Indian Institutes of Management (CAT 2026, conducted by IIM Indore))
- About the NMAT exam: sections and topics (Graduate Management Admission Council (GMAC))
- XAT 2026: a quick overview (XLRI – Xavier School of Management)
- itertools: permutations, combinations and product (Python Software Foundation)
Related tools
Report a problem with this lesson
Kept only in this browser. Your Learn progress