Skip to content
Tutorials Center
My learning

Topics

Lesson 73 of 86 ยท Puzzles and Arrangements

Grouping, Selection and Mixed Puzzles

Solve who-does-what puzzles with the tabulation method, pick teams under if-then and either-or conditions, split groups, and test answers with a checker.

The last family of puzzles in this chapter has no line, circle or ladder at all. Instead you have people and attributes: four friends and four jobs, five colleagues and five cities, or six candidates and a team of three with conditions such as "A and B cannot both be chosen". The skill is to keep several overlapping facts consistent, and the main tool is a table.

In this lesson you learn the tabulation method for who-does-what puzzles, how to count and list teams that satisfy conditions, how to split people into groups, and how to write a short program that checks a puzzle for you. The program does not replace your reasoning; it tells you whether your final answer is the only one that fits.

The tabulation method

A who-does-what puzzle describes a matching: every person gets exactly one item from each category, and no item is used twice. Draw a table with the people down the side and the items across the top. Fill it with marks:

  • โœ“ when a pair is certain,
  • โœ— when a pair is impossible.

Two rules fire constantly. Row rule: when a row (person) has a โœ“, every other cell in that row and in that column becomes โœ—. Last-one rule: when a row or column has only one cell left that is not โœ—, that cell must be โœ“.

flowchart TB
    A["Read every clue,<br/>list people and categories"] --> B["Draw the table"]
    B --> C["Mark every direct fact<br/>(โœ“ and โœ—)"]
    C --> D["Apply row and column rules:<br/>one โœ“ per row and column"]
    D --> E{"Anything new<br/>forced?"}
    E -->|"yes"| D
    E -->|"no"| F["Combine two categories into<br/>bundles and re-read clues"]
    F --> D
    E -->|"everything filled"| G["Check the answer<br/>against all clues"]

Keep applying the one-per-row-and-column rule until nothing new is forced; if you get stuck, bundle two categories.

When there are two attributes besides the person (a job and a city, say), a bundle is a clue linking the two attributes directly ("the doctor lives in Pune"). Bundles let you work with attribute pairs instead of tracking everything through the person.

Worked puzzle 1: four friends, jobs and cities

Four friends Priya, Rohan, Sana and Tarun each have a different job (doctor, pilot, teacher, chef) and live in a different city (Pune, Goa, Delhi, Kochi). Clues:

  1. The doctor lives in Pune.
  2. The teacher lives in Kochi.
  3. The pilot lives in Goa.
  4. Rohan is neither the teacher nor the chef.
  5. Sana is not the pilot and does not live in Kochi.
  6. Priya does not live in Pune or Goa and is not the chef.
  7. Tarun does not live in Pune or Delhi.

Step 1: bundles. Clues 1 to 3 pair three jobs with three cities. The only pair left is chef and Delhi, so the chef lives in Delhi. You now have four bundles: doctor-Pune, teacher-Kochi, pilot-Goa, chef-Delhi, and you only need to assign people to bundles.

Step 2: Priya. She does not live in Pune or Goa, so her bundle is teacher-Kochi or chef-Delhi. She is not the chef, so Priya is the teacher in Kochi.

Step 3: Tarun. Not Pune, not Delhi, and Kochi is taken, so Tarun lives in Goa and is the pilot.

Step 4: Rohan. He is a doctor or a pilot; the pilot is taken, so Rohan is the doctor in Pune.

Step 5: Sana. The only bundle left is chef-Delhi, and clue 5 agrees (she is not the pilot and not in Kochi). Sana is the chef in Delhi.

Person Job City
Priya Teacher Kochi
Rohan Doctor Pune
Sana Chef Delhi
Tarun Pilot Goa

The solver below tries all 24 job assignments with all 24 city assignments (576 combinations) and reports how many survive each clue. It is the same elimination, done mechanically.

JS Who-does-what solver: jobs and cities

Press Run (or Ctrl + Enter) to see the console output here.

No output.

When a puzzle has three attributes (job, city and colour, for example), extend the table with another column group and bundle two attributes at a time.

Selection puzzles: teams under conditions

A selection puzzle asks you to pick k people from a pool, subject to conditions. The condition words have exact meanings:

Wording Meaning
"A and B cannot both be chosen" at most one of them
"If C is chosen, D must be chosen" C needs D; D can be chosen without C
"E is chosen only if F is chosen" the same as "if E then F"
"Either A or B, but not both" exactly one of the two
"At least one of A or D" A, D or both
"Neither A nor B" neither is chosen

The common mistake is to turn "if C then D" into "if D then C". It says nothing of the sort.

Worked puzzle 2. A team of 3 is chosen from six candidates A to F. Conditions: (1) A and B are not both chosen. (2) If C is chosen, D must be chosen. (3) E is chosen only if F is chosen. (4) At least one of A or D is chosen. Which teams are possible?

Six candidates give C(6, 3) = 20 teams in total. Work by cases, using condition (4):

flowchart TB
    S["Choose 3 of A to F"] --> A{"Is A on the team?"}
    A -->|"yes"| A1["B is out<br/>(rule 1)"]
    A -->|"no"| A2["D must be in<br/>(rule 4)"]
    A1 --> A3["Remaining spots from C, D, E, F<br/>respecting rules 2 and 3"]
    A2 --> A4["Two more from B, C, E, F<br/>respecting rules 2 and 3"]

Splitting on one person (A) turns four rules into two small sub-problems.

  • A is on the team (B is out). Two more from C, D, E, F. C needs D, E needs F, so the pairs that survive are (C, D), (D, F) and (E, F); the pair (D, E) fails because E needs F, and (C, F), (C, E) fail because C needs D. Teams: ACD, ADF, AEF.
  • A is not on the team (so D is on it). Two more from B, C, E, F. Pairs: (B, C) works (C has D), (B, F) works, (C, F) works, (E, F) works, while (B, E), (C, E) fail because E needs F. Teams: BCD, BDF, CDF, DEF.

That gives 7 teams: ACD, ADF, AEF, BCD, BDF, CDF, DEF. The program below enumerates the 20 combinations, applies the rules one at a time and prints the survivors.

JS Team selection under conditions

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Splitting into groups

A grouping puzzle divides people into teams or tables with membership rules: "P and Q are in different teams", "R and S are in the same team". The best trick is to fix one person, say P in the red team, which removes the red/blue mirror image that would otherwise double-count every split.

Worked puzzle 3. Six people P, Q, R, S, T and U are split into a red team of three and a blue team of three. P is in the red team. P and Q are in different teams. R and S are in the same team. T is not in P's team.

  • Q is in the blue team (clue 2). T is in the blue team too, since T is not with P.
  • R and S together: if both were blue, the blue team would be Q, T, R, S, which is four people. So both are red.
  • Red: P, R, S. Blue: Q, T, U.

Counting splits works the same way. Without the last clue there would be two splits (T could be in either team); with it, one. A mechanical check is the quickest way to see this.

JS Group splits with membership rules

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Mixed puzzles: when two types combine

Exam sets often mix ideas, for example a seating puzzle where people also have professions, or a selection puzzle with an order. Treat them in layers: solve the part with the most definite clues first (usually the arrangement), then apply the attribute clues as a second filter. If two layers share a clue, read it twice; it may tie the layers together.

Common traps

  • Assuming a negative clue gives a positive fact. "Sana does not live in Kochi" only rules out one city; do not guess a city for her until the table forces it.
  • Forgetting the one-per-row rule. When Tarun is the pilot, no one else is, and nobody else lives in Goa if Goa is bundled with pilot.
  • Treating "only if" backwards. "E only if F" means E needs F, not the other way round.
  • Overlooking the mirror in group splits. Unless the teams are named in the question, red-blue and blue-red are the same split.
  • Skipping the final check. Re-read every clue against your answer table.

The chapter's puzzle toolkit is now complete: rows, circles, ladders and schedules, orderings, machines and grids, and matching puzzles. The verbal-ability chapter comes next, followed by projects where you build your own puzzle solver.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. In worked puzzle 1, who is the pilot?

    Tarun cannot live in Pune or Delhi, and Kochi (teacher) belongs to Priya, so Tarun lives in Goa and is the pilot.
  2. 2. In worked puzzle 1, in which city does Sana live?

    Sana is the chef, and the chef is bundled with Delhi because the other three job-city pairs were fixed by the first three clues.
  3. 3. A team of 3 is picked from A to F with the rules in worked puzzle 2. Which team is allowed?

    A, C, D works: A and B are not both present, C has D, there is no E, and A is present. A, B, D breaks rule 1; C, E, F has C without D; B, E, F has neither A nor D.
  4. 4. The rule says 'E is chosen only if F is chosen'. A team includes F but not E. Does this break the rule?

    The rule is 'if E then F', which only restricts E. Having F without E is allowed.
  5. 5. Among the seven valid teams in worked puzzle 2 (ACD, ADF, AEF, BCD, BDF, CDF, DEF), how many contain D?

    Only AEF lacks D, so six teams contain D.

Summary

  • Draw a table, mark every certain pair with a tick and every impossible pair with a cross, and use the one-per-row-and-column rule until nothing new is forced.
  • Bundle two attributes that the clues link directly, then assign people to bundles.
  • "If C then D" does not mean "if D then C"; "only if" and "cannot both" have exact meanings.
  • Split on one person or one rule to break a selection puzzle into small cases.
  • In group splits, fix one person to avoid counting mirror images.
  • Always check the final answer against every clue, and use a checker script to confirm that the answer is unique.

Next: Grammar and Error Spotting, the start of the verbal ability chapter.