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 61–65 of 65

Q61Push-down Automata2 marksNAT
In a pushdown automaton P=(Q,Σ,Γ,δ,q0,F)P=(Q, \Sigma, \Gamma, \delta, q_0, F), a transition of the form,
p q a, X → Y
where p,q∈Q,  a∈Σ∪{ϵ},  X,Y∈Γ∪{ϵ}p,q \in Q,\; a \in \Sigma \cup \{ \epsilon \} ,\;X,Y \in \Gamma \cup \{ \epsilon \}, represents

(q,Y)∈δ(p,a,X)(q,Y) \in \delta(p,a,X)

Consider the following pushdown automaton over the input alphabet Σ={a,b}\Sigma = \{a,b\} and stack alphabet Γ={#,A}\Gamma = \{ \#, A\}.
start q0 q1 q2 q3 a, ε → A b, A → ε ε, ε → # ε, ε → ε ε, A → A
The number of strings of length 100 accepted by the above pushdown automaton is ___________

Q62Eigenvalues and Eigenvectors2 marksNAT
Consider the following matrix.
(0111101111011110)\begin{pmatrix} 0 & 1 & 1 & 1\\ 1& 0& 1 & 1\\ 1& 1 & 0 & 1 \\1 & 1 & 1 & 0 \end{pmatrix}
The largest eigenvalue of the above matrix is __________.

Q63Pipeline Processor2 marksNAT
A five-stage pipeline has stage delays of 150, 120, 150, 160 and 140 nanoseconds. The registers that are used between the pipeline stages have a delay of 5 nanoseconds each.
The total time to execute 100 independent instructions on this pipeline, assuming there are no pipeline stalls, is _______ nanoseconds.

Q64Probability Theory2 marksNAT
A sender (S) transmits a signal, which can be one of the two kinds: H and L with probabilities 0.1 and 0.9 respectively, to a receiver (R)
In the graph below, the weight of edge (u,v)(u,v) is the probability of receiving vv when uu is transmitted, where u,v∈{H,L}u,v\in\{H,L\}. For example, the probability that the received signal is LL given the transmitted signal was HH, is 0.7.
H L H L S R 0.3 0.8 0.7 0.2
If the received signal is HH, the probability that the transmitted signal was HH (rounded to 2 decimal places) is __________.

Q65Machine Instruction2 marksNAT
Consider the following instruction sequence where registers R1,R2 and R3R_1,R_2 \text{ and }R_3 are general purpose and MEMORY[X]MEMORY[X] denotes the content at the memory location XX.

InstructionSemanticsInstruction Size (bytes)MOV R1,(5000)R1←MEMORY[5000]4MOV R2,(R3)R2←MEMORY[R3]4ADDR2,R1R2←R1+R22MOV (R3),R2MEMORY[R3]←R24INC R3R3←R3+12DEC R1R1←R1−12BNZ 1004Branch if not zero to the2given absolute addressHALTStop1\begin{array}{llc} \textbf{Instruction} & \textbf{Semantics} & \textbf{Instruction Size} \text{ (bytes)} \\ \hline \text{MOV } R1, (5000) & R1 \leftarrow \text{MEMORY}[5000] & 4 \\ \hline \text{MOV } R2, (R3) & R2 \leftarrow \text{MEMORY}[R3] & 4 \\ \hline \text{ADD} R2, R1 & R2 \leftarrow R1 + R2 & 2 \\ \hline \text{MOV } (R3), R2 & \text{MEMORY}[R3] \leftarrow R2 & 4 \\ \hline \text{INC } R3 & R3 \leftarrow R3+1 & 2 \\ \hline \text{DEC } R1 & R1 \leftarrow R1-1 & 2 \\ \hline \text{BNZ } 1004 & \text{Branch if not zero to the} & 2 \\ & \text{given absolute address} \\ \hline \text{HALT} & \text{Stop} & 1 \\ \hline \end{array}

Assume that the content of the memory location 5000 is 10, and the content of the register R3R_3 is 3000. The content of each of the memory locations from 3000 to 3020 is 50. The instruction sequence starts from the memory location 1000. All the numbers are in decimal format. Assume that the memory is byte addressable.
After the execution of the program, the content of memory location 3010 is ____________