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

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

  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. On a chess board, in how many different ways can 6 consecutive squares be chosen on the diagonals along a straight path ?

  2. There are 6 persons arranged in a row. Another person has to shake hands with 3 of them so that he should not shake hands with two consecutive persons. In how many distinct possible combinations can the handshakes take place ?

  3. In a tournament of Chess having 150 entrants, a player is eliminated whenever he loses a match. It is given that no match results in a tie/draw. How many matches are played in the entire tournament?

  4. The letters A, B, C, D and E are arranged in such a way that there are exactly two letters between A and E. How many such arrangements are possible?

  5. There is a numeric lock which has a 3-digit PIN. The PIN contains digits 1 to 7. There is no repetition of digits. The digits in the PIN from left to right are in decreasing order. Any two digits in the PIN differ by at least 2. How many maximum attempts does one need to find out the PIN with certainty?

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
6357 Attempts
4.2(118)
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