HPSC Engineering · Module 62 · standard depth · 13 min
Ranking, order and comparison
What HPSC Engineering asks from this chapter
Syllabus lines this chapter covers:
- Screening test (general) · General mental ability, basic numeracy, data interpretation
HPSC Engineering questions from this module are being sorted into our bank.
Cut to standard depth for HPSC Engineering. 12 deeper paragraphs are in the full chapter.
Start from zero: how many in Ravi's class?
In a class ranking, Ravi is 7th from the top and 14th from the bottom. How many students are there? Adding 7 and 14 gives 21, but that is one too many. Ravi has been counted twice, once in each count.
So the total is 7 + 14 − 1 = 20. Picture the class as a single column: 6 students above Ravi, Ravi himself and 13 students below him. That makes 6 + 1 + 13 = 20, the same answer.
This one idea, total = position from one end + position from the other end − 1, runs through the whole chapter. Rows in a hall, queues at a counter and merit lists all work the same way. The other half of the chapter is about comparisons: putting people in order when you are told only who is taller, heavier or older than whom.
Why this topic exists. Merit lists, seniority lists, waiting lists and queues are part of every office. Officers must read them without off-by-one errors, because a single slip can deny someone a post or a benefit. Ranking questions test exactly that care.
One line, two ends
The formula in all its forms. If a person is at position L from the left and R from the right in a row of N, then N = L + R − 1. So R = N − L + 1 and L = N − R + 1. These three forms solve every basic question.
Examples. In a row of 35, Mohan is 12th from the left, so he is 35 − 12 + 1 = 24th from the right. Neha is 9th from the left and 13th from the right, so the row has 9 + 13 − 1 = 21 people. Rahul is 11th from the top in a class of 40, so there are 40 − 11 = 29 students below him.
"Above" and "below" are different from "position". Being 11th from the top means 10 people are above you, not 11. Questions that ask how many people are "ahead", "behind", "above" or "below" need one less than the position. Read the question word carefully.
Why it matters. The minus one is the whole trick, and it is also where most marks are lost. Draw a tiny row of five dots once to convince yourself, and the formula will never feel strange again.
Counting the people between
Convert to one end first. In a row of 40, A is 12th from the left and B is 15th from the right. B's position from the left is 40 − 15 + 1 = 26. Now both are counted from the left: 12 and 26.
People between. Between positions 12 and 26 there are 26 − 12 − 1 = 13 people. The minus one appears again because neither end person is "between". This is the safest method, since it works whatever the arrangement.
When the counts overlap. In a row of 20, A is 14th from the left and B is 12th from the right. B's position from the left is 20 − 12 + 1 = 9, which is to the left of A. So between them there are 14 − 9 − 1 = 4 people, and B is actually on A's left.
A quick warning sign. If the two positions from opposite ends add up to more than the total, the counts overlap. Then the people between are fewer than you might expect, and the two persons are on the "wrong" sides of each other. Always convert to one end to be sure.
Why it matters. "How many between" is the most common ranking question after the basic total. Converting to one end turns every version into one subtraction.
When two people swap places
The key fact. When A and B interchange places, A moves into B's old seat and B into A's. Nobody else moves. So A's new position from any end is exactly B's old position from that end.
Example. In a row, A is 10th from the left and B is 15th from the right. They swap, and now A is 18th from the left. So B's old position was 18th from the left, and since B was also 15th from the right, the row has 18 + 15 − 1 = 32 people.
Finding the other's new rank. In the same row, B's new position is A's old one, 10th from the left. So B is now 32 − 10 + 1 = 23rd from the right. Use the swap rule and then the basic formula.
Why it matters. Swap questions look tricky because two people move at once. Once you see that each simply inherits the other's old seat, they need only one line of working.
Comparisons: building one line
From statements to a line. "P is taller than Q, R is shorter than Q and S is taller than P." Write each statement with the taller person first: P > Q, Q > R and S > P. Joining them gives S > P > Q > R, so S is the tallest and R the shortest.
Watch the direction words. "Shorter than", "lighter than" and "younger than" reverse the order. Rewrite every statement in one direction, such as "taller than", before joining. Many errors come from copying a "shorter than" statement the wrong way round.
What cannot be said. "A is heavier than B, and A is heavier than C." We know A is the heaviest, but B and C are not linked by any statement. So who is the lightest cannot be determined, and an option claiming B or C must be rejected.
Middle positions. For five people, once the full line is built, the middle person is the 3rd from either end. Questions often ask "who is in the middle" or "who is second tallest". A complete line answers all of them at once.
Why it matters. Comparison chains are the simplest form of logical ordering. They prepare you for the larger arrangement puzzles of the next module, where the same discipline of "only what is fixed" decides the answer.
Where and why this is asked
Why examiners test it. Ranking checks whether you can count without off-by-one errors and order information correctly. Officers prepare merit lists, seniority lists for promotion and beneficiary queues for schemes. A wrong count by one can push a deserving person off a list, and such mistakes often end up in court.
Where it shows up. Ranking and comparison questions are standard in state aptitude papers and in recruitment exams for teachers, police, clerks and banks. Basic totals, people between and comparison chains are the most frequent forms. The union aptitude paper folds ordering into its arrangement puzzles.
When it goes wrong. The usual slips are forgetting the minus one, mixing positions from opposite ends, reversing a "shorter than" statement and answering a comparison that the statements do not fix. In queue questions, the trap is assuming one order and missing the overlapping case.
The habit to build. Convert every position to the same end before calculating. For comparisons, write a single line from greatest to least and mark any person who is not linked.
Practice set: twelve solved problems
Try each problem first, then read the steps. The problems go from easy to hard.
1. A student is 10th from the top and 21st from the bottom. How many students are in the class?
The total is 10 + 21 − 1. The answer is 30.
2. In a class of 35, Mohan is 12th from the top. What is his position from the bottom?
His position is 35 − 12 + 1. The answer is 24th.
3. Neha is 9th from the left and 13th from the right in a row. How many people are in the row?
The total is 9 + 13 − 1. The answer is 21.
4. In a row of 30, A is 10th from the left and B is 8th from the right. How many people are between them?
B is 23rd from the left, so 23 − 10 − 1 are between. The answer is 12.
5. In a row of 25, A is 15th from the left and B is 14th from the right. How many people are between them?
B is 12th from the left, so 15 − 12 − 1 are between. The answer is 2.
6. A is 6th from the left and B is 10th from the right. After they swap, A is 14th from the left. How many are in the row?
A's new place was B's old place, so the total is 14 + 10 − 1. The answer is 23.
7. P is taller than Q, Q is taller than R and S is taller than P. Who is the shortest?
The line is S > P > Q > R. The answer is R.
8. A is heavier than B, C is lighter than B and D is heavier than A. Who is the heaviest?
The line is D > A > B > C. The answer is D.
9. A is heavier than B and A is heavier than C. Who is the lightest?
B and C are not compared with each other. The answer is cannot be determined.
10. In a class of 40, Rahul is 11th from the top. How many students are below him?
The students below are 40 − 11. The answer is 29.
11. M is older than N but younger than O, and P is older than O. Who is the youngest?
The line is P > O > M > N. The answer is N.
12. In a queue, A is 8th from the front and B is 10th from the back, with 2 people between them. What is the least number of people in the queue?
With B ahead of A, B is 5th from the front, so the queue has 5 + 10 − 1. The answer is 14.
Quick revision
- Total = position from one end + position from the other end − 1.
- Position from the other end = total − position + 1.
- People above or ahead = position − 1.
- Convert both positions to the same end; people between = difference − 1.
- After a swap, each person's new position is the other's old position.
- Comparisons: rewrite every statement in one direction and build one line.
- People not linked by any chain cannot be compared.
- When the order of two people is unknown, try both cases; the overlap gives the minimum.