GATE CSE 2022
Q32.
Consider a simple undirected weighted graph G, all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of G is/are TRUE?MSQQ33.
Which one of the following regular expressions correctly represents the language of the finite automaton given below?Q34.
Let G(V, E) be a directed graph, where V = \{1, 2, 3, 4, 5 \} is the set of vertices and E is the set of directed edges, as defined by the following adjacency matrix A.A[i][j]= \left \{ \begin{matrix} 1 &1 \leq j \leq i \leq 5 \\ 0& otherwise \end{matrix} \right. A[i][j]=1 indicates a directed edge from node i to node j . A directed spanning tree of G , rooted at r \in V , is defined as a subgraph T of G such that the undirected version of T is a tree, and T contains a directed path from r to every other vertex in V . The number of such directed spanning trees rooted at vertex 5 is ____Q35.
Consider three floating point numbers A, B and C stored in registers R_A, R_B and R_C, respectively as per IEEE-754 single precision floating point format. The 32-bit content stored in these registers (in hexadecimal form) are as follows. R_A=0xC1400000R_B=0x42100000R_C=0x41400000 Which one of the following is FALSE?Q36.
Let R1 and R2 be two 4-bit registers that store numbers in 2's complement form. For the operation R1+R2, which one of the following values of R1 and R2 gives an arithmetic overflow?Q38.
Consider the following grammar along with translation rules. \begin{aligned} &S \rightarrow S_1 \# T & & \{S._{val}=S_{1.val}*T._{val} \} \\ &S \rightarrow T & & \{S._{val}=T._{val} \} \\ &T \rightarrow T_1 \% R & & \{T._{val}=T_{1.val} \div R._{val} \} \\ &T \rightarrow R & & \{T._{val}=R._{val} \} \\ &R \rightarrow id & & \{R._{val}=id._{val} \} \\ \end{aligned}Here \# and \% are operators and id is a token that represents an integer and id_{.val} represents the corresponding integer value. The set of non-terminals is \{S,T,R,P \} and a subscripted non-terminal indicates an instance of the non-terminal. Using this translation scheme, the computed value of S_{.val} for root of the parse tree for the expression 20 \# 10 \% 5 \# 8 \% 2 \% 2 isQ39.
Consider the augmented grammar with \{+, *, (, ), id \} as the set of terminals. \begin{aligned}&S' \rightarrow S \\ &S \rightarrow S+R|R \\ &R \rightarrow R*P|P \\ &P \rightarrow (S)|id \end{aligned}If I_0 is the set of two LR(0) items \{ [S' \rightarrow S.], [S \rightarrow S.+R] \}, then goto(closure(I_0 ),+) contains exactly ______ items.