• S
    SwaseekhGATE Preparation
General
  • Dashboard
  • Syllabus
  • Questions
  • Aptitude
  • Mock Tests
  • TCS NQT 2026
Account
  • Pricing
  • Contact
  1. GATE CS
  2. PYQs
  3. General Aptitude

In the square grid shown on the left, a person standing at position P2 is required to move to position P5. The only movement allowed for a step involves two moves along one direction followed by one move in a perpendicular direction (like a chess knight). For example, a person at a given position X can only move to the positions marked X on the right. The permissible directions for movement are shown as dotted arrows in the right figure. What is the minimum number of steps required to go from P2 to P5? A. 4 B. 5 C. 6 D. 7

GATE 2022 · General Aptitude · Logical Reasoning · medium

Answer: The minimum number of steps to go from P2 to P5 using knight moves is 5. Answer: B.

  1. Set up coordinates and identify P2 and P5: Reading the grid from the image: the labeled positions run from P1 to P9 (or similar) across a 5x5 grid. P2 is near the bottom-left corner and P5 is near the top-right corner. Assign P2 = (0,0) and determine P5 coordinates from the label layout. Based on the image, P5 is approximately at (4,4) relative to P2.
  2. BFS expansion from P2: Step 0: {P2=(0,0)}. Step 1: knight moves from (0,0) reach (2,1),(1,2),(2,-1),(1,-2),(-2,1),(-1,2),(-2,-1),(-1,-2) -- keep those on the grid. Step 2: from each step-1 cell, expand again. Step 3: continue expansion. The position corresponding to P5 first appears at distance 5 from P2 given the diagonal displacement of approximately (4,4) on the grid.
  3. Verify: no path of length 4 exists: Four knight moves can cover a maximum Manhattan displacement of 4x3=12 or 4x(2+1)=12 units but must land on specific parity cells. The parity of (row+col) flips with every knight move. If P2 and P5 differ in (row+col) parity by an odd amount relative to 4 moves, then 4 moves cannot reach P5, confirming 5 is the minimum.