All Exams Test series for 1 year @ ₹349 only
Question

A rectangular wall is partitioned into 5 rectangular parts as shown in the following diagram. If you have three different colours to paint the wall and if no two adjacent parts are to be painted with the same colour, in how many different ways can one paint the wall?

Rectangular wall partitioned into 5 rectangular parts

This question was previously asked in
UPSC CAPF 2026 General Ability and Intelligence Question Paper (19-Jul-2026)
The correct answer is

18

Label the five parts as shown in the diagram: top-left (TL), bottom-left (BL), top-middle (TM), bottom-middle (BM), and the single full-height part on the right (R).

From the diagram, the pairs that share a boundary (and so must get different colours) are: TL–BL, TL–TM, BL–BM, TM–BM, TM–R, and BM–R.

TM, BM, and R are mutually adjacent to each other (TM–BM, TM–R, and BM–R are all shared edges), so all three must get three different colours. With 3 colours available, this can be done in 3! = 6 ways.

For each such choice, TL must differ from TM (2 remaining colours) and BL must differ from BM (2 remaining colours), giving 4 combinations for (TL, BL); but TL and BL are themselves adjacent, so the 1 combination where they would coincide (both equal to the one colour used by neither TM nor BM) is invalid, leaving 4 − 1 = 3 valid combinations.

Multiplying, the total number of ways is 6 × 3 = 18 based on the adjacency shown in the diagram.

Was this answer helpful?

Similar Questions

  1. A person has to make a payment of ₹56. He has twenty-five ₹2 coins and nine ₹5 coins. In how many different ways can he make this payment?

  2. There are three rooms (I, II and III) with occupancy capacity of three each. P, Q, R, S and T are five friends. R and S occupied room I; T occupied room II. In how many different ways can P and Q occupy the rooms if there is no additional restriction?

  3. In a matching problem, there are two columns. The first column has 4 statements whereas the second column has 5 statements. Every statement of the first column is to be matched with exactly one statement of the second column. In how many different ways can one student match the two columns if the student has no idea of the correct match?


Important Questions from Permutation and Combination

  1. If Quantity A is the number of ways to assign a number from 1 to 5 without repetition to each of four people, and Quantity B is the number of ways to assign a number from 1 to 5 without repetition to each of 5 people, then which of the following statements is correct with respect to Quantities A and B?

  2. Which of the following muscles regulates the exit of food from the stomach into the small intestine?

  3. 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?

  4. In how many different ways can the letters of the word 'OPTICAL' be arranged so that the vowels always come together?

  5. There are $15$ distinct points on a plain sheet of paper. If $4$ of these points are collinear, find the maximum number of triangles that can be drawn using these points.

Need Expert Advice?
Upcoming Exams
UPSC IFoS
November 22, 2026
UPSC SO Steno
December 12, 2026
Test Series
UPSC CAPF img
UPSC
UPSC CAPF (Assistant Commandants) 2026 Mock Test Series
181 Tests 4 Tests Free
6310 Attempts
4.2(116)
English, Hindi
More Questions from UPSC CAPF

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App