GATE 2021 (Session 1) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2021 (Session 1)

65 questions

MCQ 34 · MSQ 13 · NAT 181-mark 30 · 2-mark 35

Questions 41–45 of 65

Q41Context Free Grammar2 marksMCQ−0.67 if wrong
Consider the following context-free grammar where the set of terminals is {a,b,c,d,f}\{a,b,c,d,f\}.

S→d a T∣R fT→a S ∣ b a T ∣ϵR→c a T R ∣ϵ\begin{array}{lll} S & \rightarrow & d \: a \: T \mid R \: f \\ T & \rightarrow & a \: S \: \mid \: b \: a \: T \: \mid \epsilon \\ R & \rightarrow & c \: a \: T \: R \: \mid \epsilon \end{array}

The following is a partially-filled LL(1) parsing table.
a b c d f $ S T R S → d a T T → aS T → b a T T → ε R → c a TR R → ε 1 2 3 4
Which one of the following choices represents the correct combination for the numbered cells in the parsing table ("blank" denotes that the corresponding cell is empty)?
(A) 1 S → R f 2 S → R f 3 T → ε 4 T → ε (B) 1 blank 2 S → R f 3 T → ε 4 T → ε (C) 1 S → R f 2 blank 3 blank 4 T → ε (D) 1 blank 2 S → R f 3 blank 4 blank

Q42Transaction2 marksMCQ−0.67 if wrong
Let ri(z)r_i(z) and wi(z)w_i(z) denote read and write operations respectively on a data item zz by a transaction TiT_i. Consider the following two schedules.

S1:r1(x)r1(y)r2(x)r2(y)w2(y)w1(x)S1: r_1(x)r_1(y)r_2(x)r_2(y)w_2(y)w_1(x)
S2:r1(x)r2(x)r2(y)w2(y)r1(y)w1(x)S2: r_1(x)r_2(x)r_2(y)w_2(y)r_1(y)w_1(x)

Which one of the following options is correct?

Q43Relational Schema2 marksMCQ−0.67 if wrong
Consider the relation R(P,Q,S,T,X,Y,Z,W)R(P,Q,S,T,X,Y,Z,W) with the following functional dependencies.

PQ→X;P→YX;Q→Y;Y→ZWPQ\rightarrow X;\quad P\rightarrow YX;\quad Q\rightarrow Y; \quad Y\rightarrow ZW

Consider the decomposition of the relation R into the constituent relations according to the following two decomposition schemes.

D1:R=[(P,Q,S,T);  (P,T,X);  (Q,Y);  (Y,Z,W)]D1:\quad R=[(P,Q,S,T);\;(P,T,X);\;(Q,Y);\;(Y,Z,W)]
D2:R=[(P,Q,S);  (T,X);  (Q,Y);  (Y,Z,W)]D2:\quad R=[(P,Q,S);\;(T,X);\;(Q,Y);\;(Y,Z,W)]

Which one of the following options is correct?

Q44Group Theory2 marksMCQ−0.67 if wrong
Let G be a group of order 6, and H be a subgroup of G such that 1 < |H| < 6. Which one of the following options is correct?

Q45Probability Theory2 marksMCQ−0.67 if wrong
Consider the two statements.

S1: There exist random variables XX and YY such that (E[(X−E(X))(Y−E(Y))])2>Var[X]Var[Y]\left(\mathbb E[(X-\mathbb E(X))(Y-\mathbb E(Y))]\right)^2 \gt \textsf{Var}[X]\textsf{Var}[Y]
S2: For all random variables XX and YY, Cov[X,Y]=E[∣X−E[X]∣∣Y−E[Y]∣]\textsf{Cov}[X,Y]=\mathbb E \left[|X-\mathbb E[X]||Y-\mathbb E[Y]|\right ]

Which one of the following choices is correct?