There are 9 cups placed on a table arranged in equal number of rows and columns out of which 6 cups contain…
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?
18
27
54
81
Solution
The cups form a 3x3 grid. Case 1: each row has 2 coffee and 1 tea; the single tea cup in each row can be placed in 3 ways per row, giving $3^3 = 27$. Case 2: one row has 3 coffee cups, the others have 2 and 1; this gives $9 \times 6 = 54$ arrangements. Total = 27 + 54 = 81.