Match the following:
(A) E – P, F – R, G – Q, H – S
(B) E – R, F – P, G – S, H – Q
(C) E – R, F – P, G – Q, H – S
(D) E – P, F – R, G – S, H – Q
Answer: (C)
Explanation: H – S because it is the only option that gives even length palindrome.
So, B and D are incorrect.
Now, we are left with A and C.
Both have G – Q. So, G has to be paired with Q.
Now, we are left with E and F that are to be paired with P and R.
Consider E – R.
R says that either w will be null, that is, it will give only ‘c’ or it will give ‘wcw’, where w is any string of a’s and b’s.
So, if w is used, i.e., it is not null, then it will surely be declared before use and if it is not used, i.e., it is null, then also it satisfies E.
So, E – R is the correct match and thus, C is the correct choice.
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 2008 | Question 1
- GATE | GATE CS 2008 | Question 2
- GATE | GATE CS 2008 | Question 85
- GATE | GATE CS 2008 | Question 4
- GATE | GATE CS 2008 | Question 85
- GATE | GATE CS 2008 | Question 85
- GATE | GATE CS 2008 | Question 8
- GATE | GATE CS 2008 | Question 9
- GATE | GATE CS 2008 | Question 10
- GATE | GATE CS 2008 | Question 85
- GATE | GATE CS 2008 | Question 12
- GATE | GATE CS 2008 | Question 85
- GATE | GATE CS 2008 | Question 14
- GATE | GATE CS 2008 | Question 15
- GATE | GATE CS 2008 | Question 16
- GATE | GATE CS 2008 | Question 17
- GATE | GATE CS 2008 | Question 85
- GATE | GATE CS 2008 | Question 85
- GATE | GATE CS 2008 | Question 20
- GATE | GATE CS 2008 | Question 21


