Eight boxes – D, E, F, G, H, I, J and K – are placed one above the other.
Each of the boxes are colored with different colors among blue, purple, green, white, pink, yellow, black and red.
1) Two boxes are placed between box H and pink box, which is not placed at the bottom.
2) The black box is placed immediately below box H.
3) Not more than two boxes are placed below black box.
From above it is clear that there will be three cases,
| Number | Case 1 | Case 2 | Case 3 | |
|---|
| 1 | | | | |
| 2 | (Pink) | | | |
| 3 | | (Pink) | | |
| 4 | | | (Pink) | |
| 5 | H | | | |
| 6 | (Black) | H | | |
| 7 | | (Black) | H | |
| 8 | | | (Black) | ×Pink |
4) yellow box is placed above pink box.
5) One box is placed between box F and yellow box.
6) Only three boxes are placed between box F and box J and Box J is not the bottommost box.
In case 2, If we put yellow colored box on 2nd position then F will be at the 4th position and from point 6 J will be at the bottommost box which is not possible so we will put Yellow colored box at the topmost position.
In case 3, just like case 2 yellow colored box cannot be put at the 2nd position and if we put it on 1st position then F will be at the 3rd position and according to to point 6 J will be at the 7th position which is not possible so we simply put it at 3rd position and again there will be two possibilities of F.
| Number | Case 1 | Case 2 | Case 3 | | |
|---|
| 1 | (Yellow) | (Yellow) | F | J | |
| 2 | (Pink) | | | | |
| 3 | F | F (Pink) | (Yellow) | (Yellow) | |
| 4 | | | (Pink) | (Pink) | |
| 5 | H | | J | F | |
| 6 | (Black) | H | | | |
| 7 | J | J (Black) | H | H | |
| 8 | | | (Black) | (Black) | ×Pink, ×J |
7) The number of boxes between box J and box H is the same as between blue box and pink box.
8) Two boxes are placed between blue box and purple box.
9) K is green color box and is placed below box H, which is not white colored box. If H is not white then there is only one place left for White colored box and one color left for H.
From point 9 case3 will be eliminated because there is no place for K and in case 2 if we put Blue colored box at 4th position then there will be no place for Purple colored box so we simply put it at 2nd position,
| Number | Case 1 | Case 2 | ×Case 3 | | |
|---|
| 1 | (Yellow) | (Yellow) | F | J | |
| 2 | (Pink) | (Blue) | | | |
| 3 | F(White) | F (Pink) | (Yellow) | (Yellow) | |
| 4 | (Blue) | (White) | (Pink) | (Pink) | |
| 5 | H(Red) | (Purple) | J | F | |
| 6 | (Black) | H(Red) | | | |
| 7 | J(Purple) | J (Black) | H | H | |
| 8 | K(Green) | K(Green) | (Black) | (Black) | ×Pink, ×J |
10) Box D is placed immediately above box E.
11) Box E is neither purple colored nor yellow colored box.
12) Box G is placed above box I but is not white colored box.
In case 1 D and E will be placed at 1st position and 2nd position respectively and in case 2 E is neither purple colored nor yellow colored so E will be placed and position. But from point 12 it is not possible for G to placed above I G is not white colored box so case 2 will be eliminated.
| Number | Case 1 | ×Case 2 | |
|---|
| 1 | D(Yellow) | D(Yellow) | |
| 2 | E(Pink) | E(Blue) | |
| 3 | F(White) | F (Pink) | |
| 4 | G(Blue) | G(White) | |
| 5 | H(Red) | I(Purple) | |
| 6 | I(Black) | H(Red) | |
| 7 | J(Purple) | J (Black) | |
| 8 | K(Green) | K(Green) | ×Pink, ×J |
So, the final arrangement will be,
| Number | Box |
|---|
| 1 | D(Yellow) |
| 2 | E(Pink) |
| 3 | F(White) |
| 4 | G(Blue) |
| 5 | H(Red) |
| 6 | I(Black) |
| 7 | J(Purple) |
| 8 | K(Green) |
Hence box G is placed two boxes above the Black colored box.