What it is
People stand in a row or are ranked in a class. A person's position is given from one end, and you find the position from the other end, the total number, or how many are between two people.
How to solve it
The three formulas, all from one idea (count the person once):
- total = position from top + position from bottom − 1
- position from the right = total − position from the left + 1
- people between two positions p and q (same end) = |p − q| − 1
Swaps. When A and B swap places, A takes B's old spot. So A's new position from one end, together with B's old position from the other end, gives the total.
Tips and shortcuts
- The "− 1" (or "+ 1") is the whole trick. Without it you count the person twice (or not at all).
- Draw a short line with the person marked, and write the counts on each side.
- "Between" excludes the two people themselves.
- For swaps, follow one person. After the swap, A is where B was, so B's old position from the right is A's new position from the right.
Solved examples
Example 1 (easy): total in a class
Anu is 14th from the top and 22nd from the bottom. How many students?
14 + 22 − 1 = 35.
Example 2 (medium): from the other end
In a row of 40, Bala is 17th from the left. Position from the right?
40 − 17 + 1 = 24th.
Example 3 (hard): a swap
In a row, Charu is 8th from the left and Deepa is 12th from the right. They swap; now Charu is 15th from the left. How many people in the row?
Charu now stands in Deepa's old place: 15th from the left and 12th from the right. Total = 15 + 12 − 1 = 26.
Example 4 (medium): people between
In a queue, Esha is 7th from the front and Farhan is 18th from the front. How many people stand between them?
18 − 7 − 1 = 10.