UPSC CSAT 2022 Q77: Arranging Coffee and Tea Cups in a 3×3 Grid — Solved

There are 9 cups placed on a table arranged in equal number of rows and columns out of which 6 cups contain coffee and 3 cups contain tea. In how many ways can they be arranged so that each row should contain at least one cup of coffee?

  1. 18
  2. 27
  3. 54
  4. 81

Answer: (d) 81

Solution

  1. Read the set-up. 9 cups sit in equal rows and columns, so the grid is 3 × 3 (3 rows, 3 columns). 6 cups hold coffee and 3 hold tea. Cups with the same drink are treated as identical, so an arrangement is fixed once you decide which 3 of the 9 positions get tea.
  2. Count every possible arrangement with no condition. Choose 3 positions out of 9 for tea: C(9,3) = (9 × 8 × 7) ÷ (3 × 2 × 1) = 504 ÷ 6 = 84.
  3. Turn the condition around. "Each row has at least one coffee" fails only when some row has no coffee, which means all 3 cups in that row are tea.
  4. Count the bad arrangements. There are only 3 tea cups, so at most one row can be all tea. Once one row holds all 3 teas, the other 6 cups are all coffee and there is nothing left to choose. The all-tea row can be row 1, row 2 or row 3, so there are 3 bad arrangements.
  5. Subtract: 84 − 3 = 81.
  6. Check by direct cases. Split the 3 teas across the 3 rows so that no row gets 3: - Pattern (1, 1, 1), one tea in each row: each row picks 1 of its 3 positions, so 3 × 3 × 3 = 27. - Pattern (2, 1, 0), two teas in one row, one in another, none in the third: pick the row with 2 teas (3 ways), pick the row with 1 tea from the remaining 2 (2 ways), place the 2 teas in that row in C(3,2) = 3 ways, and place the single tea in its row in 3 ways. Total 3 × 2 × 3 × 3 = 54. - Total = 27 + 54 = 81, the same as step 5.

  7. Answer: 81 ways.

Option-wise explanation

  • a: incorrect — 18 does not come from any valid case. You get it by counting row patterns only (3 × 2 = 6 orders of 2, 1, 0) and then multiplying by 3 once instead of twice, so you forget where the tea goes inside one of the rows. It undercounts badly.
  • b: incorrect — 27 = 3 × 3 × 3 counts only the case with exactly one tea in each row. That is the trap of reading the condition as "each row must have exactly two coffees". It leaves out the 54 arrangements where one row has two teas and another has one.
  • c: incorrect — 54 counts only the (2, 1, 0) case, where one row gets two teas, another gets one and the third gets none. It leaves out the 27 arrangements with one tea in each row.
  • d: correct — There are C(9,3) = 84 ways to place the teas in total. A row has no coffee only when it holds all 3 teas, which happens in 3 ways. 84 − 3 = 81, and the case split gives the same total: 27 + 54 = 81.

How to eliminate

Use the complement. Count every placement of 3 teas in 9 cells: C(9,3) = 84. The only arrangement that breaks the rule is a full row of tea, and there are 3 rows, so remove 3. That gives 81 in two lines. A sanity check also works without much arithmetic. The answer must be below 84, which every option is, and it must be at least the 27 arrangements with one tea per row. You can also see that very few placements fail, because 3 teas landing in exactly one row is rare. So the answer should sit just under 84, and only 81 does. The options 27 and 54 are the two partial cases, a strong hint that the correct answer is their sum. About 30–45 seconds once you think of the complement. Attempt it in the first round.

Know more

Complementary counting for "at least one" conditions

When a condition says at least one, count everything and subtract the arrangements where the condition fails completely:

Wanted = Total − (arrangements where some group has none)

For identical items in a grid, the total is just which cells get the minority item: C(cells, minority count).

Why it is fast here: a row with no coffee needs all 3 of its cells to be tea. With only 3 teas, that can happen in just one row at a time, so there is no overlap to correct for.

Tea split across rows Allowed? Count
(1, 1, 1) Yes 3 × 3 × 3 = 27
(2, 1, 0) in any order Yes 3 × 2 × 3 × 3 = 54
(3, 0, 0) in any order No 3
Total 84

Worked variant: 3 × 3 grid, 5 coffee, 4 tea, and each row needs at least one coffee.

  • Total = C(9,4) = 126.
  • Bad: one row all tea (3 choices), and the 4th tea goes in any of the other 6 cells, so 3 × 6 = 18. Two all-tea rows would need 6 teas, so that cannot happen and there is no overlap.
  • Answer = 126 − 18 = 108.

If two groups could both fail at the same time, you would add back the overlap. That is inclusion–exclusion: Total − Σ(one fails) + Σ(two fail) − …