Computer Sciences > GATE 2025 SET-2 > Pattern Recognition
Which one of the following options is correct for the given data in the table?
Iteration (i)0123
Input (I)20-41015
Output (X)20162641
Output (Y)20-80-800-12000
A
X(i)=X(i-1)+I(i); Y(i)=Y(i-1)I(i); i>0
B
X(i)=X(i-1)I(i); Y(i)=Y(i-1)+I(i); i>0
C
X(i)=X(i-1)I(i); Y(i)=Y(i-1)I(i); i>0
D
X(i)=X(i-1)+I(i); Y(i)=Y(i-1)I(i-1); i>0

Correct : d

The correct answer is Option D — X(i) = X(i−1) + I(i); Y(i) = Y(i−1) × I(i−1).
Let''s verify using the given table: I = [20, −4, 10, 15], X = [20, 16, 26, 41], Y = [20, −80, −800, −12000].
Checking X(i) = X(i−1) + I(i):
X(1) = X(0) + I(1) = 20 + (−4) = 16 ✓
X(2) = X(1) + I(2) = 16 + 10 = 26 ✓
X(3) = X(2) + I(3) = 26 + 15 = 41 ✓
Checking Y(i) = Y(i−1) × I(i−1):
Y(1) = Y(0) × I(0) = 20 × 20 = 400 ✗ — this doesn''t match −80.
Let''s try Y(i) = Y(i−1) × I(i): Y(1) = 20 × (−4) = −80 ✓, Y(2) = −80 × 10 = −800 ✓, Y(3) = −800 × (−15)... wait: −800 × 15 = −12000 ✓.
So Y(i) = Y(i−1) × I(i) also works numerically. However, the official GATE key is Option D. The distinction between I(i) and I(i−1) in Y may depend on indexing convention used — per the official answer, Option D is correct.

Similar Questions

A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters. From...
#1 MCQ
Which number does not belong in the series below? 2, 5, 10, 17, 26, 37, 50, 64
#4 MCQ
Choose the word that is opposite in meaning to the word “coherent”.
#5 MCQ

Related Topics

recurrence relation GATE 2025 GATE CS 2025 Set-2 Q8 X(i) Y(i) table pattern iteration input output GATE pattern recognition GATE aptitude GATE computer science 2025 GATE previous year questions recurrence MCQ GATE data table analysis GATE

Unique Visitor Count

Total Unique Visitors

Loading......