GATE CSE 2021 SET-1


Question 1
Suppose that L_1 is a regular language and L_2 is a context-free language. Which one of the following languages is NOT necessarily context-free?
A
L_1\cap L_2
B
L_1\cdot L_2
C
L_1 - L_2
D
L_1\cup L_2
Theory of Computation   Context Free Language
Question 2
Let P be an array containing n integers. Let t be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary array of n elements. Which one of the following choices is correct?
A
t \gt 2n-2
B
t \gt 3\lceil \frac{n}{2}\rceil \text{ and } t\leq 2n-2
C
t \gt n \text{ and } t\leq 3\lceil \frac{n}{2}\rceil
D
t \gt \lceil \log_2(n)\rceil \text{ and } t\leq n
Data Structure   Array


Question 3
Consider the following three functions.

f_1=10^n\; f_2=n^{\log n}\;f_3=n^{\sqrt {n}}

Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
A
f_3, f_2, f_1
B
f_2, f_1, f_3
C
f_1, f_2, f_3
D
f_2, f_3, f_1
Algorithm   Asymptotic Notation
Question 4
Consider the following statements.

S1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
S2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.

Which one of the following options is correct?
A
S1 is true and S2 is false
B
S1 is false and S2 is true
C
S1 is true and S2 is true
D
S1 is false and S2 is false
Compiler Design   Runtime Environment
Question 5
Consider the following statements.

S1: Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1).
S2: For any context-free grammar, there is a parser that takes at most O(n^3) time to parse a string of length n.

Which one of the following options is correct?
A
S1 is true and S2 is false
B
S1 is false and S2 is true
C
S1 is true and S2 is true
D
S1 is false and S2 is false
Compiler Design   Parsing




There are 5 questions to complete.

2 thoughts on “GATE CSE 2021 SET-1”

  1. I’m unable to Attempt this one as Mock Test as whenever i solved que from 1 page & moge to nxt page it get again reset previous solved record so i couldn’t figerout proper marks of Full length Paper as Test

    Reply

Leave a Comment