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. The following figure is made with nine squares of length 1 cm each.
                                                                                                             

    A student is standing at point P. The total number of shortest paths to reach point Q from point P, if the student walks along the boundaries of the squares only, is:

  2. Consider the following statements (all the angles are measured in degrees) :
    1. If two supplementary angles are $4x + 40$ and $10x$, then $x$ is;
    2. The complementary angle of $\frac{4}{5} \times 45$ is :
    3. If two complementary angles are in the ratio of $4 : 5$, then the smallest angle is :
    Which of the following is correct?
    Codes:
    1   2   3

  3. There are 40 persons in a palace. If every person shakes hands with every other person, what will be the total number of handshakes?
  4. How many words can be formed with or without meaning by using all letters of the word DELHI?
  5. A rectangular wall is divided into four squares of equal size where there are two rows each having two squares. The top left square is coloured with green. If, including green, there are three colours available and each square is coloured using any one of these three colours such that no two adjacent squares get painted with the same colour; then how many colour combinations are possible ?

Need Expert Advice?
Upcoming Exams
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
6456 Attempts
4.2(119)
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