GATE 2025 (Session 2) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2025 (Session 2)

65 questions

MCQ 32 · MSQ 18 · NAT 151-mark 30 · 2-mark 35

Questions 56–60 of 65

Q56Pipeline Processor2 marksNAT
A 5-stage instruction pipeline has stage delays of 180, 250, 150, 170, and 250, respectively, in nanoseconds. The delay of an inter-stage latch is 10 nanoseconds. Assume that there are no pipeline stalls due to branches and other hazards. The time taken to process 1000 instructions in microseconds is __________ . (rounded off to two decimal places)

Q57B plus Tree2 marksNAT
In a B+B^+ -tree where each node can hold at most four key values, a root to leaf path consists of the following nodes:

A=(49,77,83,−), B=(7,19,33,44), C=(20∗,22∗,25∗,26∗)A = (49, 77, 83, -), \, B = (7, 19, 33, 44), \, C = (20*, 22*, 25*, 26*)

The *-marked keys signify that these are data entries in a leaf.

Assume that a pointer between keys k1k_1 and k2k_2 points to a subtree containing keys in [k1,k2)[k_1, k_2), and that when a leaf is created, the smallest key in it is copied up into its parent.

A record with key value 23 is inserted into the B+B^+ -tree.

The smallest key value in the parent of the leaf that contains 25* is __________. (Answer in integer)

Q58Memory Management2 marksNAT
A computer system supports a logical address space of 2322^{32} bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a bb-bit index to the outer page table, an offset within the page of the inner page table, and an offset within the desired page. Each entry of the inner page table uses eight bytes. All the pages in the system have the same size.

The value of bb is ___________ . (Answer in integer)

Q59Graph Traversal (BFS and DFS)2 marksNAT
Consider the following algorithm someAlgo that takes an undirected graph GG as input.

someAlgo(G):\texttt{someAlgo(G)}:
1. Let vv be any vertex in GG. Run BFS on GG starting at vv. Let uu be a vertex in GG at maximum distance from vv as given by the BFS.
2. Run BFS on GG again with uu as the starting vertex. Let zz be the vertex at maximum distance from uu as given by the BFS.
3. Output the distance between uu and zz in GG.

The output of someAlgo(T)\texttt{someAlgo(T)} for the tree shown in the given figure is __________. (Answer in integer)

Q60Finite Automata2 marksNAT
Let Σ={1,2,3,4}\Sigma = \{1, 2, 3, 4\}. For x∈Σ∗x \in \Sigma^*, let prod(x)\text{prod}(x) be the product of symbols in xx modulo 7. We take prod(ϵ)=1\text{prod}(\epsilon) = 1, where ϵ\epsilon is the null string.

For example, prod(124)=(1×2×4)mod  7=1\text{prod}(124) = (1 \times 2 \times 4) \mod 7 = 1.

Define L={x∈Σ∗∣prod(x)=2}.L = \{x \in \Sigma^* \mid \text{prod}(x) = 2\}.

The number of states in a minimum state DFA for LL is ___________. (Answer in integer)