UPSC Prelims 2022·CSAT·Quantitative Aptitude·Combinatorics and Probability

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?

Dalvoy logo
Reviewed by Dalvoy
UPSC Civil Services preparation
Last updated 23 May 2026, 3:31 pm IST
  1. A18
  2. B27
  3. C54
  4. D81Correct

Explanation

The problem asks for the number of ways to arrange 6 coffee cups (C) and 3 tea cups (T) in a 3x3 grid such that each row contains at least one coffee cup. Each row has 3 positions. Let C_i and T_i be the number of coffee and tea cups in row i, respectively. We know: 1. C_1 + C_2 + C_3 = 6 (total coffee cups) 2. T_1 + T_2 + T_3 = 3 (total tea cups) 3. C_i + T_i = 3 for each row i (each row has 3 positions) 4. C_i >= 1 for each row i (at least one coffee cup per row) From C_i >= 1 and C_i + T_i = 3, the possible distributions of cups within a single row are: a) (C=1, T=2): 1 coffee cup, 2 tea cups. (e.g., CTT, TCT, TTC) b) (C=2, T=1): 2 coffee cups, 1 tea cup. (e.g., CCT, CTC, TCC) c) (C=3, T=0): 3 coffee cups, 0 tea cups. (e.g., CCC) Now we need to find combinations of these row types for the three rows (Row 1, Row 2, Row 3) such that the total coffee cups sum to 6 and total tea cups sum to 3. Let x, y, z be the number of rows of type (C=1, T=2), (C=2, T=1), and (C=3, T=0) respectively. x + y + z = 3 (total rows) 1x + 2y + 3z = 6 (total coffee cups) 2x + 1y + 0z = 3 (total tea cups) From the tea cup equation (2x + y = 3), considering x, y, z are non-negative integers: Case 1: x = 0 y = 3. Substitute into x+y+z=3: 0+3+z=3 => z=0. Check coffee sum: 1(0) + 2(3) + 3(0) = 6. This is consistent. This scenario is (x,y,z) = (0,3,0), meaning all three rows are of type (C=2, T=1). Case 2: x = 1 2(1) + y = 3 => y = 1. Substitute into x+y+z=3: 1+1+z=3 => z=1. Check coffee sum: 1(1) + 2(1) + 3(1) = 1+2+3 = 6. This is consistent. This scenario is (x,y,z) = (1,1,1), meaning one row of each type: (C=1, T=2), (C=2, T=1), and (C=3, T=0). Now we calculate the number of arrangements for each scenario: Scenario 1: All three rows are of type (C=2, T=1). - There's only 1 way to assign this type to all three rows (all rows are identical in type). - For a single row of type (C=2, T=1): We need to choose 2 positions for coffee cups out of 3. This is 3C2 = 3 ways. - Since there are 3 such rows, the total ways for this scenario = 1 * (3 * 3 * 3) = 27 ways. Scenario 2: One row of type (C=1, T=2), one of type (C=2, T=1), and one of type (C=3, T=0). - There are 3! = 6 ways to assign these three distinct types to the three rows (e.g., Row1 is C1T2, Row2 is C2T1, Row3 is C3T0; or Row1 is C1T2, Row2 is C3T0, Row3 is C2T1, etc.). - For a row of type (C=1, T=2): Choose 1 position for coffee out of 3. This is 3C1 = 3 ways. - For a row of type (C=2, T=1): Choose 2 positions for coffee out of 3. This is 3C2 = 3 ways. - For a row of type (C=3, T=0): Choose 3 positions for coffee out of 3. This is 3C3 = 1 way. - For each of the 6 assignments of types to rows, the internal arrangement ways are 3 * 3 * 1 = 9 ways. - Total ways for this scenario = 6 * 9 = 54 ways. Total number of ways = Ways from Scenario 1 + Ways from Scenario 2 Total = 27 + 54 = 81 ways. The final answer is D.
Quantitative Aptitude: 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

Related questions

More UPSC Prelims practice from the same subject and topic.