1. University MCA (AI/ML) Semester 2
  2. PEA516
  3. Unit 5

PEA516 · Unit 5: Series, coding and arrangements

Ranking and ordering

10 practice questions

Key points

  • Left position + right position = N + 1
  • Between = difference of positions - 1
  • Interchange: new position = old position of the other person
  • Chain comparisons into one ordered line
  • Alphabetical order compares letter by letter

Basic rule. In a row of N people, position from the left + position from the right = N + 1.

  • Rank 7th from the top and 15th from the bottom: N = 7 + 15 - 1 = 21.
  • 8th from the top among 30 means 30 - 8 + 1 = 23rd from the bottom.
  • In a row of 40, 14th from the left is 40 - 14 + 1 = 27th from the right.

People between two positions. If A is 5th and B is 12th from the same end, there are 12 - 5 - 1 = 6 between them. If two people are at known positions from opposite ends, convert one position to the same end first. In a row of 31, A is 9th from the left and B is 12th from the right (20th from the left), so 20 - 9 - 1 = 10 are between them.

Interchange problems. After two people swap, each takes the other's old position. If Ram (7th from the left) swaps with Shyam and becomes 18th from the left, Shyam's old position was 18th from the left. With Shyam 12th from the right, N = 18 + 12 - 1 = 29.

With a gap. P is 14th from the front and Q is 16th from the back, with 6 people between them and P ahead: Q is 14 + 6 + 1 = 21st from the front, so N = 21 + 16 - 1 = 36.

Ordering from comparisons. Chain the statements into a single order. A is taller than B, B taller than C, D shorter than C, E taller than A gives E > A > B > C > D, so the second tallest is A.

Alphabetical (dictionary) order. Compare first letters, then later letters. STRANGE arranged alphabetically is A, E, G, N, R, S, T, so the third letter is G.

Try two questions

Question 1 · Tier 2, Understand

The words Table, Chair, Desk, Bed, Lamp are arranged in dictionary order. Which word is third?

  1. Desk
  2. Bed
  3. Chair
  4. Lamp
Show the answer

A. Dictionary order is Bed, Chair, Desk, Lamp, Table, so the third word is Desk.

Question 2 · Tier 2, Understand

In a row of 40 students, Mohan is 14th from the left. His position from the right is:

  1. 27th
  2. 25th
  3. 28th
  4. 26th
Show the answer

A. Position from right = 40 - 14 + 1 = 27.