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

GATE 2026 (Session 1)

65 questions

MCQ 28 · MSQ 24 · NAT 131-mark 30 · 2-mark 35

Questions 41–45 of 65

Q41Shortest Path2 marksMCQ−0.67 if wrong
Let G(V,E)G(V, E) be an undirected, edge-weighted graph with integer weights. The weight of a path is the sum of the weights of the edges in that path. The length of a path is the number of edges in that path.

Let s∈Vs \in V be a vertex in GG. For every u∈Vu \in V and for every k≥0k \geq 0, let dk(u)d_{k}(u) denote the weight of a shortest path (in terms of weight) from ss to uu of length at most kk. If there is no path from ss to uu of length at most kk, then dk(u)=∞d_{k}(u)=\infty.

Consider the statements:

S1: For every k≥0k \geq 0 and u∈V,dk+1(u)≤dk(u)u \in V, d_{k+1}(u) \leq d_{k}(u).

S2: For every (u,v)∈E(u, v) \in E, if (u,v)(u, v) is part of a shortest path (in terms of weight) from ss to vv, then for every k≥0,dk(u)≤dk(v)k \geq 0, d_{k}(u) \leq d_{k}(v).

Which one of the following options is correct?

Q42Intermediate Code Generation2 marksMCQ−0.67 if wrong
Consider the control flow graph shown in the figure.
ENTRYEXIT B1B2B3B4B5 a = b + i a = g * kf = d − fa = c * 4 t = g * kb = c + m x = g * ky = b + iz = c + m
Which one of the following options correctly lists the set of redundant expressions (common subexpressions) in the basic blocks B44 and B55?
Note: All the variables are integers.

Q43Tuple Calculus2 marksMCQ−0.67 if wrong
Consider a relational database schema with two relations R(P,Q)R(P, Q) and S(X,Y)S(X, Y). Let E={⟨u⟩∣∃v∃w⟨u,v⟩∈R∧⟨v,w⟩∈S}E=\{\langle u\rangle \mid \exists v \exists w\langle u, v\rangle \in R \wedge\langle v, w\rangle \in S\} be a tuple relational calculus expression.
Which one of the following relational algebraic expressions is equivalent to EE ?

Q44Transport Layer Protocol2 marksMCQ−0.67 if wrong
A TCP sender successfully establishes a connection with a TCP receiver and starts the transmission of segments. The TCP congestion control mechanism's slow-start threshold is set to 1000010000 segments. Assume that the round-trip time is fixed at 11 millisecond. Assume that the sender always has data to send, the segments are numbered from 11, and no segment is lost. Let tt denote the time (in milliseconds) at which the transmission of segment number 20002000 starts.

Which one of the following options is correct?