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 51–55 of 65

Q51Regular Language2 marksMSQ
Let L1L_{1} and L2L_{2} be two languages over a finite alphabet, such that L1∩L2L_{1} \cap L_{2} and L2L_{2} are regular languages.
Which of the following statements is/are always true?

One or more options are correct.

Q52Context Free Grammar2 marksMSQ
Consider the following context-free grammar GG.

S→abaABAbbaA→aaBBAb∣bBabaaB→aBb∣ab\begin{array}{l} S \rightarrow a b a A B A b b a \\ A \rightarrow a a B B A b \mid b B a b a a \\ B \rightarrow a B b \mid a b \end{array}

In the above grammar, SS is the start symbol, aa and bb are terminal symbols, and AA and BB are non-terminal symbols.

Let L(G)L(G) be the language generated by the grammar GG. For a string s∈L(G)s \in L(G), let n1(s)n_{1}(s) be the number of aa 's in ss and n2(s)n_{2}(s) be the number of bb 's in ss.

Which of the following statements is/are true?

One or more options are correct.

Q53Syntax-directed Translation2 marksMSQ
Consider the following two syntax-directed definitions SDD1\text{SDD1} and SDD2\text{SDD2} for type declarations.

SDD1Grammar(G1)Semantic RulesD→TVD.type=T.typeV.type=T.typeT→intT.type=intT→floatT.type=floatV→V1 idV1.type=V.typeput(id.entry, V.type)V→idput(id.entry, V.type)\begin{array}{|l|l|} \hline {\textbf{SDD1}} \\ \hline { \begin{array}{c} \textbf{Grammar} \\ (G_1) \end{array}} & {\textbf{Semantic Rules}} \\ \hline \hline D \rightarrow TV & \begin{array}{l} D.type = T.type \\ V.type = T.type \end{array} \\ \hline T \rightarrow \text{int} & T.type = \text{int} \\ \hline T \rightarrow \text{float} & T.type = \text{float} \\ \hline V \rightarrow V_1\ \text{id} & \begin{array}{l} V_1.type = V.type \\ \text{put(id.entry, V.type)} \end{array} \\ \hline V \rightarrow \text{id} & \text{put(id.entry, V.type)} \\ \hline \end{array}

SDD2Grammar(G2)Semantic RulesD→D1 idD.type=D1.typeput(id.entry, D1.type)D→T idD.type=T.typeput(id.entry, T.type)T→intT.type=intT→floatT.type=float\begin{array}{|l|l|} \hline {\textbf{SDD2}} \\ \hline { \begin{array}{c} \textbf{Grammar} \\ (G_2) \end{array}} & {\textbf{Semantic Rules}} \\ \hline \hline D \rightarrow D_1\ \text{id} & \begin{array}{l} D.type = D_1.type \\ \text{put(id.entry, }D_1.type) \end{array} \\ \hline D \rightarrow T\ \text{id} & \begin{array}{l} D.type = T.type \\ \text{put(id.entry, T.type)} \end{array} \\ \hline T \rightarrow \text{int} & T.type = \text{int} \\ \hline T \rightarrow \text{float} & T.type = \text{float} \\ \hline \end{array}

DD is the start symbol, and int, float and id are the three terminals. The non-terminal V1V_{1} is the same as VV and the non-terminal D1D_{1} is the same as DD. Here, the subscript is used to differentiate the grammar symbols on the two sides of a production. The function put updates the symbol table with the type information for an identifier.

Let P\text{P} and Q\text{Q} be the languages specified by grammars G1\text{G1} and G2\text{G2}, respectively. Which of the following statements is/are true?

One or more options are correct.

Q54Memory Management2 marksMSQ
Consider a system that has a cache memory unit and a memory management unit (MMU). The address input to the cache memory is a physical address. The MMU has a translation lookaside buffer (TLB). Assume that when a page is evicted from the main memory, the corresponding blocks in the cache are marked as invalid.

For a given memory reference, which of the following sequences of events can NEVER happen?

One or more options are correct.

Q55Graph Theory2 marksMSQ
An undirected, unweighted, simple graph G(V,E)G(V, E) is said to be 22-colorable if there exists a function c:V→{0,1}c: V \rightarrow\{0,1\} such that for every (u,v)∈E,c(u)≠c(v)(u, v) \in E, c(u) \neq c(v).

Which of the following statements about 22-colorable graphs is/are true?

One or more options are correct.