# Twelve People In Two Rows

I've spent a lot of time on this problem and could not arrive at a definite answer.

There is only one correct way to arrange twelve people into two rows using the following rules:

Six people A,B,C,D,E and F are sitting in row-1 facing North, and six people P,Q,R,S,T and U are sitting in row-2 facing South, but not necessarily in this order.

Row-2 is above row-1, so every person from one row faces a different person from the other row.

The following information is known about them.

1) B is to the immediate left of C, who does not face Q. Q is third to the left of R.

2) Neither Q nor C sit at the ends. B is to the right of F and D.

3) D faces the person who is third to the right of T, who faces E.

4) P sits second to the left of the person who faces A.

5) S is not an immediate neighbor of P.

PQRSTU | PQRSTU | PQRSTU | PQRSTU | PQRSTU | PQRSTU       LEFT }}

ABCDEF | ABCDEF | ABCDEF | ABCDEF | ABCDEF | ABCDEF       {{ LEFT


1) B is to the immediate left of C, who does not face Q. Q is third to the left of R.

2) Neither Q nor C sit at the ends. B is to the right of F and D.

2 means we can easily remove Q and C. B cannot be in 1 or 2 (right of F and D), or 6 (left of C). F and D cannot be in 6. B cannot be in 5 (there is no C in 6). C cannot be in 2 or 3 (no B in 1 or 2). F and D can be removed from 5 (no B to the right).

P RSTU | PQRSTU | PQRSTU | PQRSTU | PQRSTU | P RSTU       LEFT }}

A  DEF | A  DEF | AB DEF | ABCDEF | A C E  | A   E        {{ LEFT


3) D faces the person who is third to the right of T, who faces E.

T cannot be 1,2,3 (there is someone 3 to the right), E is 4,5,6.

From 1) Q is 4,5,6, R is 1,2 (not 3 as no Q in 6)..

P RS U | P RS U | P  S U | PQ STU | PQ STU | P  STU       LEFT }}

A  D F | A  D F | AB D F | ABCDEF | A C E  | A   E        {{ LEFT


4) P sits second to the left of the person who faces A.

Tells us A is not 5,6, P is not 1,2. E fixed, so we can remove it from the others, fixing C, so remove C too. B is 4 (from 1).

3) tells us T is facing E, so T fixed.

4) says A not in 4. 3) says D is 3, and so 4) says P not 5.

  RS U |   RS U | P  S U | PQ S U |  Q S U |     T       LEFT }}

A    F | A    F |    D   |  B    |   C    |     E        {{ LEFT


5) S is not an immediate neighbor of P.

S is not 3,4.

1) says Q not 5, therefore Q is 4, and R is fixed too.

SU lock in (2,5) says P is 3.

  R    |    S U | P      |  Q     |    S U |     T       LEFT }}

A    F | A    F |    D   |  B    |   C    |     E        {{ LEFT


4) gives A is 1. F is 2. 5 says S is not 2.

  R    |      U | P      |  Q     |    S   |     T       LEFT }}

A      |      F |    D   |  B    |   C    |     E        {{ LEFT


So:

RUPQST
AFDBCE

Clue

Remember the people in the top row have different lefts and rights to those in the bottom row

Solution:

ECBDFA
TSQPUR


Taking 1 and 2:

(note there is an extra ? at the start of exactly one of two lines, and one at the end of the other line or in the brackets if it is the first line)

?CB(FD)
?Q??R


Taking 3:

T and E are at the first 3 of the top and bottom lines respectively, but the only place they can be is: (this also gives D and the ? in the second spot of the second line)

ECBD??
T?Q??R


Now, by 4:

P sits in the left of the two adjacent ?s in the bottom since the second ? faces D, and also then by 5 S is in the first ? of the second line:

ECBD?A
TSQP?R


And finally:

ECBDFA
TSQPUR


• If row 1 is facing North and row 2 is facing South along with row 2 being above row 1, shouldn't the solution have A,B,C,.. below P,Q,R,... ? – Nick Adams Sep 3 '17 at 10:10
• @NimitBhardwaj It doesn't really matter, you can rotate the arrangements 180 degrees (since computer screens don't have north or south). I find it easier to visualise this way. – boboquack Sep 3 '17 at 10:12
• I tried solving the problem again using your rotate by 180 method and was able to solve it. However, I still cannot fix the positions of A,F and P,U when I keep row 1 below. Was this rotate by 180 method some trick to make the visualization easier or am I still missing something when trying to do it without rotating? – Nick Adams Sep 3 '17 at 10:29
• @boboquack Every 2D representation of directionality has north at the top, your people are facing the wrong way. – Carl Sep 3 '17 at 15:40
• B is to the left of F and D in your solution when it should be to the right? – obl Sep 3 '17 at 18:19