Box Based Puzzle

P, Q, R, S, T, U, and V are seven different boxes of different colors i.e. Black, Orange, Red, Pink, Yellow, White, and Green but not necessarily in the same order.

Box Q is not placed below S. Box which is of Black color is immediately above P. There are only two boxes between S and the box which is of Black color and Box S is above the Black color box. The box which is of Red color is above S but not immediately above S. Only three boxes are between R and the box which is of Red color. The box which is of Green color is immediately above R. The box which is of Pink color is immediately above box V. Only one box is there between Q and T. Neither box Q nor P is of Yellow color. P is not of Orange color.

How would you solve it?

1 Like

P, Q, R, S, T, U, and V are seven different boxes of different colors i.e. Black, Orange, Red, Pink, Yellow, White, and Green but not necessarily in the same order.

So we know the number of boxes can only be 7.
One thing I do is simplify the rules into a kind of domino, like they’re puzzle pieces.

Notation:

  • Items to the left are above.
  • x represents an unknown.
  • colours are lower case letters, boxes are upper case. (e.g. P is box P, but p is colour pink.)
  • anything between [ and ] is optionally included.

Box Q is not placed below S.

Ergo, Q is above S.

  1. Q[x…]S

Box which is of Black color is immediately above P.

  1. bP

There are only two boxes between S and the box which is of Black color and Box S is above the Black color box.

  1. Sxxb

The box which is of Red color is above S but not immediately above S.

  1. rx[x…]S

Only three boxes are between R and the box which is of Red color.

  1. Rxxxr or rxxxR

The box which is of Green color is immediately above R.

  1. gR

The box which is of Pink color is immediately above box V.

  1. pV

Only one box is there between Q and T.

  1. QxT or TxQ

Neither box Q nor P is of Yellow color. P is not of Orange color.

  1. Q ≠ y
  2. P ≠ y
  3. P ≠ o

How would you solve it?

I Iook at those rules in a list. I see that:

  • 2 & 3 combine to give “(S_) (x) (x) (_b) (P_)” - five slots long. So I start with that.
  • 4 can have no more than one x between r and S, or we’d have more than 7 slots, giving “(_r) (x) (S_) (x) (x) (_b) (P_)” - so now we have a static list of 7.
  • Then 5 can only be the second version, giving “(_r) (x) (S_) (x) (R_) (_b) (P_)”
  • 6 : “(_r) (x) (S_) (_g) (R_) (_b) (P_)”
  • 8 can only fit the first version, taking into account 1: “(_r) (Q_) (S_) (Tg) (R_) (_b) (P_)”
  • 7 shows V cannot be first: “(_r) (Q_) (S_) (Tg) (Rp) (Vb) (P_)”
  • By elimination, U is obvious: “(Ur) (Q_) (S_) (Tg) (Rp) (Vb) (P_)”
  • 9 & 10 mean S is yellow: “(Ur) (Q_) (Sy) (Tg) (Rp) (Vb) (P_)”
  • 11 means Q is orange, and by elimination P is white: “(Ur) (Qo) (Sy) (Tg) (Rp) (Vb) (Pw)”

So boxes, top to bottom, are:

  1. U, red
  2. Q, orange
  3. S, yellow
  4. T, green
  5. R, pink
  6. V, black
  7. P, white
3 Likes

Nice…only to know a good notation system, I am posting these questions. Thanks a lot for making all these well organised.

1 Like