Question:medium

Six people — P, Q, R, S, T, U — stand in a line.
P is somewhere ahead of Q.
Exactly two people stand between Q and R.
S is not adjacent to P or R.
T is not in the first or last position.
How many distinct valid arrangements are possible?

Show Hint

When positions depend on fixed spacing (like two people between Q and R), begin by placing those pairs, then apply directional and adjacency constraints to reduce possibilities.
Updated On: Jul 4, 2026
Show Solution

Correct Answer: 7

Solution and Explanation

Step 1: The pairs of positions at "distance \(3\)" apart (exactly two people between) are \(\{1,4\},\{2,5\},\{3,6\}\); Q and R occupy one such pair in either order, \(6\) possibilities total.
Step 2: Discard any case with Q in position \(1\), since P must sit somewhere ahead of Q and no position is ahead of the very first spot, this removes \(2\) of the \(6\), leaving \(4\).
Step 3: For each of the \(4\) remaining (Q,R) placements, count how many ways P (ahead of Q), then S (not adjacent to P or R), then T (not first or last), can be placed in the leftover seats, with U filling whatever's left: \(6\) ways for \((Q,R)=(4,1)\), \(1\) way for \((2,5)\), \(5\) ways for \((5,2)\).
Step 4: Add the surviving counts: \[ 6+1+5=\boxed{12} \]
Was this answer helpful?
0