Ranking
Position from left + position from right = total + 1. Everything in this topic is that one line.
Why this topic matters
Ravi is 7th from the left and 12th from the right in a row. How many people are there? 7 + 12 - 1 = 18: Ravi was counted twice.
Ranking questions all come from one identity: position from left + position from right = total + 1.
Left + right - 1 = total
A person counted from both ends is counted twice, so subtract 1.
Between two people: if A is p-th from the left and B is q-th from the left, there are |p - q| - 1 people between them.
- Bottom rank = 40 - 15 + 1.Rearranged identity.
- = 26.
- After the swap A is where B was: 18th from the left and 15th from the right.The swap tells us B's left position.
- 18 + 15 - 1 = 32.
From top or bottom, and people between
Top and bottom work exactly like left and right: rank from top + rank from bottom = total + 1.
People between two positions from the same end: |p - q| - 1. From opposite ends, turn one rank round first.
- Bottom rank = 35 - 12 + 1.Same identity as left/right.
- = 24.
- B from the left = 30 - 10 + 1 = 21.Put both ranks on the same end.
- Between = 21 - 8 - 1 = 12.
Ranks in a class with ties and unknown totals
If a question asks for the minimum number of people, the two people can overlap: the total is the larger count when they could be the same seat.
When A's rank from each end is known, the total is certain; when only relative positions are known, draw a line and mark every fact.
- 7 + 12 - 1.Ravi counted twice.
- 18.
- 15 + 26 - 1.
- 40 students.
Formula summary
Shortcuts and tricks
Total from both ends
Use it when: '15th from the top and 20th from the bottom'.
- 15 + 20 - 1 = 34.
- 34.
Before you move on, you should be able to...
- use left + right - 1 = total
- count people between two positions
- solve swap questions
Practice questions (10)
Try each one before opening the solution. Or practise them one by one so your score is saved.
easy Ram is 12th from the left and 18th from the right in a row. How many are in the row?
- 12 + 18 - 1.
Answer: 29
easy In a class of 40, Sita is 15th from the top. Rank from the bottom?
- 40 - 15 + 1.
Answer: 26
easy A and B are 10th and 25th from the left in a row of 40. How many between them?
- 25 - 10 - 1.
Answer: 14
medium A is 14th from the left, B is 17th from the right, and there are 5 people between them (A to the left of B). Total?
- 14 + 5 + 17 = 36.
Answer: 36
medium A and B swap places. A was 8th from the left and moves to 15th from the left; B was 12th from the right. B's new rank from the right?
- A moved 7 places right, so B moved 7 places left.
- 12 + 7 = 19.
Answer: 19
hard Rita is 12th from the left, Mona 4th from the right. They swap, and Rita is now 15th from the left. How many are in the row?
- Rita now sits where Mona was: 15th from left and 4th from right.
- 15 + 4 - 1.
Answer: 18
advanced In a row of 40 people, A is 13th from the left and B is 9th from the right. How many people sit between them?
- B from the left = 40 - 9 + 1 = 32.Put both on the same end.
- Between = 32 - 13 - 1 = 18.
Answer: 18
advanced In a row, A is 12th from the left and B is 15th from the right. They swap places, and A becomes 20th from the left. How many are in the row?
- After the swap A sits where B was: 20th from the left and 15th from the right.The swap tells us B's left position.
- 20 + 15 - 1 = 34.
Answer: 34
advanced Of five friends, P is shorter than Q but taller than R. S is taller than Q. T is the shortest. Who is third tallest?
- S > Q > P > R, and T is below everyone.Chain the comparisons.
- Order: S, Q, P, R, T. Third is P.
Answer: P
advanced Rohan is 18th from the top and 27th from the bottom in a class. 6 students failed, all ranked below Rohan. How many passed?
- Class size = 18 + 27 - 1 = 44.
- Passed = 44 - 6 = 38.
Answer: 38
Class plan (2 hours, for trainers)
A tested order for teaching this topic in one 2-hour session. Present mode follows the same order.
| 10 min | Warm-up. |
| 30 min | The identity with a real row of students. |
| 25 min | People between two positions. |
| 15 min | Swaps. |
| 35 min | Practice set. |
| 5 min | Recap. |