GATE 2023 CSE Question Paper PDF is available here for download. IIT Kanpur conducted GATE 2023 CSE exam on February 4, 2023 in the Forenoon Session from 09:30 AM to 12:30 PM. According to the initial reaction of the student, GATE CSE 2023 question paper was reported to be easy to moderate in difficulty. There were 34 MCQs, 15 MSQs and 16 NATs in GATE 2023 CSE Question Paper. 10 questions are from the General Aptitude section and 55 questions are from Engineering Mathematics and Core Discipline.

GATE 2023 CSE Question Paper with Solutions PDF

GATE 2023 CSE Question Paper with Solutions download iconDownload Check Solutions

GATE 2023 CSE


Question 1:

We reached the station late, and missed the train.

  • (A) near
  • (B) nearly
  • (C) utterly
  • (D) mostly

Question 2:

Kind : _______ : : Often : Frequently

  • (A) Mean
  • (B) Type
  • (C) Cruel
  • (D) Kindly

Question 3:

A series of natural numbers \(F_1, F_2, F_3, F_4, F_5, F_6, F_7, \ldots\) obeys \(F_{n+1}=F_n+F_{n-1}\) for all integers \(n\ge 2\). If \(F_6=37\) and \(F_7=60\), then what is \(F_1\)?

  • (A) 4
  • (B) 5
  • (C) 8
  • (D) 9
  • (A) More than half of the pregnant women received medical care at least once from a doctor.
  • (B) Less than half of the pregnant women received medical care at least once from a doctor.
  • (C) More than half of the pregnant women received medical care at most once from a doctor.
  • (D) Less than half of the pregnant women received medical care at most once from a doctor.

Question 4:

Looking at the surface of a smooth 3-dimensional object from the outside, which one of the following options is TRUE?

  • (A) The surface of the object must be concave everywhere.
  • (B) The surface of the object must be convex everywhere.
  • (C) The surface of the object may be concave in some places and convex in other places.
  • (D) The object can have edges, but no corners.

Question 5:

The country of Zombieland is in distress since more than 75% of its working population is suffering from serious health issues. Studies conducted by competent health experts concluded that a complete lack of physical exercise among its working population was one of the leading causes of their health issues. As one of the measures to address the problem, the Government of Zombieland has decided to provide monetary incentives to those who ride bicycles to work.
Based only on the information provided above, which one of the following statements can be logically inferred with certainty?

  • (A) All the working population of Zombieland will henceforth ride bicycles to work.
  • (B) Riding bicycles will ensure that all of the working population of Zombieland is free of health issues.
  • (C) The health experts suggested to the Government of Zombieland to declare riding bicycles as mandatory.
  • (D) The Government of Zombieland believes that riding bicycles is a form of physical exercise.

Question 6:

Consider two functions of time \((t)\), \[ f(t) = 0.01t^2, g(t) = 4t \]
where \(0 < t < \infty\).

Now consider the following two statements:
(i) For some \(t > 0\), \(g(t) > f(t)\).
(ii) There exists a \(T\), such that \(f(t) > g(t)\) for all \(t > T\).

Which one of the following options is TRUE?

  • (A) only (i) is correct
  • (B) only (ii) is correct
  • (C) both (i) and (ii) are correct
  • (D) neither (i) nor (ii) is correct

Question 7:

Which one of the following sentence sequences creates a coherent narrative?

(i) Once on the terrace, on her way to her small room in the corner, she notices the man right away.

(ii) She begins to pant by the time she has climbed all the stairs.

(iii) Mina has bought vegetables and rice at the market, so her bags are heavy.

(iv) He was leaning against the parapet, watching the traffic below.

  • (A) (i), (ii), (iv), (iii)
  • (B) (ii), (iii), (i), (iv)
  • (C) (iv), (ii), (i), (iii)
  • (D) (iii), (ii), (i), (iv)

Question 8:

f(x) and g(y) are functions of x and y, respectively, and \( f(x) = g(y) \) for all real values of x and y. Which one of the following options is necessarily TRUE for all x and y?

  • (A) \( f(x) = 0 \) and \( g(y) = 0 \)
  • (B) \( f(x) = g(y) = constant \)
  • (C) \( f(x) \neq constant \) and \( g(y) \neq constant \)
  • (D) \( f(x) + g(y) = f(x) - g(y) \)

Question 9:

Which one of the options best describes the transformation of the 2-dimensional figure P to Q, and then to R, as shown?

  • (A) Operation 1: A clockwise rotation by 90° about an axis perpendicular to the plane of the figure
    Operation 2: A reflection along a horizontal line
  • (B) Operation 1: A counter clockwise rotation by 90° about an axis perpendicular to the plane of the figure
    Operation 2: A reflection along a horizontal line
  • (C) Operation 1: A clockwise rotation by 90° about an axis perpendicular to the plane of the figure
    Operation 2: A reflection along a vertical line
  • (D) Operation 1: A counter clockwise rotation by 180° about an axis perpendicular to the plane of the figure
    Operation 2: A reflection along a vertical line

Question 10:

Consider the following statements regarding the front-end and back-end of a compiler.

S1: The front-end includes phases that are independent of the target hardware.

S2: The back-end includes phases that are specific to the target hardware.

S3: The back-end includes phases that are specific to the programming language used in the source code.

Identify the CORRECT option.

  • (A) Only S1 is TRUE.
  • (B) Only S1 and S2 are TRUE.
  • (C) S1, S2, and S3 are all TRUE.
  • (D) Only S1 and S3 are TRUE.

Question 11:

Which one of the following sequences when stored in an array at locations \(A[1], \ldots, A[10]\) forms a max-heap?

  • (A) 23, 17, 10, 6, 13, 14, 1, 5, 7, 12
  • (B) 23, 17, 14, 7, 13, 10, 1, 5, 6, 12
  • (C) 23, 17, 14, 6, 13, 10, 1, 5, 7, 15
  • (D) 23, 14, 17, 1, 10, 13, 16, 12, 7, 5

Question 12:

Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let DLLdel be another function that deletes a node in a doubly-linked list given a pointer to the node and a pointer to the head of the list. Let n denote the number of nodes in each of the linked lists. Which one of the following choices is TRUE about the worst-case time complexity of SLLdel and DLLdel?

  • (A) SLLdel is \( O(1) \) and DLLdel is \( O(n) \)
  • (B) Both SLLdel and DLLdel are \( O(\log n) \)
  • (C) Both SLLdel and DLLdel are \( O(1) \)
  • (D) SLLdel is \( O(n) \) and DLLdel is \( O(1) \)

Question 13:

Consider the Deterministic Finite-state Automaton (DFA) A shown below. The DFA runs on the alphabet {0, 1}, and has the set of states {s, p, q, r}, with s being the start state and p being the only final state.



Which one of the following regular expressions correctly describes the language accepted by A?

  • (A) \( 1(0^*11)^* \)
  • (B) \( 0(0 + 1)^* \)
  • (C) \( 1(0 + 11)^* \)
  • (D) \( 1(110^*)^* \)

Question 14:

The Lucas sequence \(L_n\) is defined by the recurrence relation: \[ L_n = L_{n-1} + L_{n-2}, for n \geq 3, \]
with \(L_1 = 1\) and \(L_2 = 3\).

Which one of the options given is TRUE?

  • (A) L_n = \left(\frac{1+\sqrt{5}}{2}\right)^n + \left(\frac{1-\sqrt{5}}{2}\right)^n
  • (B) L_n = \left(\frac{1+\sqrt{5}}{2}\right)^n - \left(\frac{1-\sqrt{5}}{3}\right)^n
  • (C) L_n = \left(\frac{1+\sqrt{5}}{2}\right)^n + \left(\frac{1-\sqrt{5}}{3}\right)^n
  • (D) L_n = \left(\frac{1+\sqrt{5}}{2}\right)^n - \left(\frac{1-\sqrt{5}}{2}\right)^n

Question 15:

Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?

  • (A) Number of attributes of its relation schema.
  • (B) Number of tuples stored in the relation.
  • (C) Number of entries in the relation.
  • (D) Number of distinct domains of its relation schema.

Question 16:

Suppose two hosts are connected by a point-to-point link and they are configured to use Stop-and-Wait protocol for reliable data transfer. Identify in which one of the following scenarios, the utilization of the link is the lowest.

  • (A) Longer link length and lower transmission rate
  • (B) Longer link length and higher transmission rate
  • (C) Shorter link length and lower transmission rate
  • (D) Shorter link length and higher transmission rate

Question 17:

Let \[ A = \begin{bmatrix} 1 & 2 & 3 & 4
4 & 1 & 2 & 3
3 & 4 & 1 & 2
2 & 3 & 4 & 1 \end{bmatrix} and B = \begin{bmatrix} 3 & 4 & 1 & 2
4 & 1 & 2 & 3
1 & 2 & 3 & 4
2 & 3 & 4 & 1 \end{bmatrix} \]
Let det(A) and det(B) denote the determinants of the matrices A and B, respectively.

Which one of the options given below is TRUE?

  • (A) \( det(A) = det(B) \)
  • (B) \( det(B) = -det(A) \)
  • (C) \( det(A) = 0 \)
  • (D) \( det(AB) = det(A) + det(B) \)

Question 18:

Consider the following definition of a lexical token \texttt{id for an identifier in a programming language, using extended regular expressions:
\[ letter \;\;\rightarrow\;\; [A\!-\!Za\!-\!z] \] \[ digit \;\;\rightarrow\;\; [0\!-\!9] \] \[ id \;\;\rightarrow\;\; letter (letter | digit)^* \]

Which one of the following Non-deterministic Finite-state Automata with \(\epsilon\)-transitions accepts the set of valid identifiers? (A double-circle denotes a final state).


Question 19:

An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let \(k\) be the number of keys, \(m\) be the number of slots in the hash table, and \(k > m\). Which one of the following is the best hashing strategy to counteract the adversary?

  • (A) Division method, i.e., use the hash function \(h(k) = k \bmod m\).
  • (B) Multiplication method, i.e., use the hash function \(h(k) = \lfloor m(kA - \lfloor kA \rfloor) \rfloor\), where \(A\) is a carefully chosen constant.
  • (C) Universal hashing method.
  • (D) If \(k\) is a prime number, use Division method. Otherwise, use Multiplication method.

Question 20:

The output of a 2-input multiplexer is connected back to one of its inputs as shown in the figure. Match the functional equivalence of this circuit to one of the following options.

  • (A) D Flip-flop
  • (B) D Latch
  • (C) Half-adder
  • (D) Demultiplexer

Question 21:

Which one or more of the following need to be saved on a context switch from one thread (T1) of a process to another thread (T2) of the same process?

  • (A) Page table base register
  • (B) Stack pointer
  • (C) Program counter
  • (D) General purpose registers

Question 22:

Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?

  • (A) Function Call
  • (B) malloc Call
  • (C) Page Fault
  • (D) System Call

Question 23:

Which of the following statements is/are CORRECT?

  • (A) The intersection of two regular languages is regular.
  • (B) The intersection of two context-free languages is context-free.
  • (C) The intersection of two recursive languages is recursive.
  • (D) The intersection of two recursively enumerable languages is recursively enumerable.

Question 24:

Which of the following statements is/are INCORRECT about the OSPF (Open Shortest Path First) routing protocol used in the Internet?

  • (A) OSPF implements Bellman-Ford algorithm to find shortest paths.
  • (B) OSPF uses Dijkstra’s shortest path algorithm to implement least-cost path routing.
  • (C) OSPF is used as an inter-domain routing protocol.
  • (D) OSPF implements hierarchical routing.

Question 25:

Geetha has a conjecture about integers, of the form \(\forall x\big(P(x)\Rightarrow \exists y\,Q(x,y)\big)\), where \(P\) is a statement about integers and \(Q\) is a statement about pairs of integers. Which of the following option(s) would \emph{imply Geetha's conjecture?

  • (A) \(\exists x\big(P(x)\wedge \forall y\,Q(x,y)\big)\)
  • (B) \(\forall x\,\forall y\,Q(x,y)\)
  • (C) \(\exists y\,\forall x\big(P(x)\Rightarrow Q(x,y)\big)\)
  • (D) \(\exists x\big(P(x)\wedge \exists y\,Q(x,y)\big)\)

Question 26:

Which one or more of the following CPU scheduling algorithms can potentially cause starvation?

  • (A) First-in First-Out
  • (B) Round Robin
  • (C) Priority Scheduling
  • (D) Shortest Job First

Question 27:

Let \[ f(x) = x^3 + 15x^2 - 33x - 36 \]
be a real-valued function. Which of the following statements is/are TRUE?

  • (A) \(f(x)\) does not have a local maximum.
  • (B) \(f(x)\) has a local maximum.
  • (C) \(f(x)\) does not have a local minimum.
  • (D) \(f(x)\) has a local minimum.

Question 28:

Let \(f\) and \(g\) be functions of natural numbers given by \(f(n)=n\) and \(g(n)=n^2\). Which of the following statements is/are TRUE?

  • (A) \(f \in O(g)\)
  • (B) \(f \in \Omega(g)\)
  • (C) \(f \in o(g)\)
  • (D) \(f \in \Theta(g)\)

Question 29:

Let \(A\) be the adjacency matrix of the given graph with vertices \(\{1,2,3,4,5\}\). Let \(\lambda_1,\lambda_2,\lambda_3,\lambda_4,\lambda_5\) be the eigenvalues of \(A\) (not necessarily distinct). Find \(\lambda_1+\lambda_2+\lambda_3+\lambda_4+\lambda_5 = \; \).



Question 30:

The value of the definite integral \(\displaystyle \int_{-3}^{3}\int_{-2}^{2}\int_{-1}^{1}\big(4x^{2}y - z^{3}\big)\,dz\,dy\,dx\) is __________. (Rounded off to the nearest integer)


Question 31:

A particular number is written as \(132\) in radix-\(4\) representation. The same number in radix-\(5\) representation is \(\_\_\_\_\_\_\_\_\).


Question 32:

Consider a 3-stage pipelined processor having a delay of 10 ns, 20 ns, and 14 ns for the first, second, and third stages, respectively. Assume that there is no other delay and the processor does not suffer from any pipeline hazards. Also assume that one instruction is fetched every cycle.

The total execution time for executing 100 instructions on this processor is _________ ns.


Question 33:

A keyboard connected to a computer is used at a rate of 1 keystroke per second. The computer polls the keyboard every 10 ms, each poll takes 100 \(\mu s\). If a key is detected, an additional 200 \(\mu s\) is used for processing. Let \(T_1\) be the fraction of a second spent in polling and processing a keystroke. In an alternative implementation with interrupts, each keystroke requires 1 ms to service and process. Let \(T_2\) be the fraction of a second in the interrupt method. Find the ratio \(T_1/T_2\).


Question 34:

The integer value printed by the ANSI-C program given below is _________.

#include

int funcp(){
static int x = 1;
x++;
return x;


int main(){
int x,y;
x = funcp();
y = funcp() + x;
printf("%d\n", (x+y));
return 0;


Question 35:

Consider the following program:

int main() {
f1();
f2(2);
f3();
return(0);


int f1() {
f1();
return(1);


int f2(int X) {
f3();
if (X==1)
return f1();
else
return (X * f2(X-1));


int f3() {
return(5);

Which one of the following options represents the activation tree corresponding to the main function?


Question 36:

Consider the control flow graph shown. Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?

  • (A) B1: \{\}, B2: \{a\}, B3: \{a\}, B4: \{a\}
  • (B) B1: \{i, j\}, B2: \{a\}, B3: \{a\}, B4: \{i\}
  • (C) B1: \{a, i, j\}, B2: \{a, i, j\}, B3: \{a, i\}, B4: \{a\}
  • (D) B1: \{a, i, j\}, B2: \{a, j\}, B3: \{a, j\}, B4: \{a, i, j\}

Question 37:

Consider the two functions \texttt{incr} and \texttt{decr} below. Five threads each call \texttt{incr} once and three threads each call \texttt{decr} once on the same shared variable \(X\) (initially \(10\)). There are two semaphore implementations:

I-1: \(s\) is a binary semaphore initialized to \(1\). I-2: \(s\) is a counting semaphore initialized to \(2\).

Let \(V_1, V_2\) be the values of \(X\) at the end of all threads for I-1 and I-2, respectively. Which choice gives the \emph{minimum possible values of \(V_1, V_2\)?

incr(){ decr(){
wait(s); wait(s);
X = X + 1; X = X - 1;
signal(s); signal(s);

 

  • (A) 15, 7
  • (B) 7, 7
  • (C) 12, 7
  • (D) 12, 8

Question 38:

Consider the context-free grammar \(G\) below:
\[ S \;\to\; aSb \;|\; X \] \[ X \;\to\; aX \;|\; Xb \;|\; a \;|\; b \]

where \(S\) and \(X\) are non-terminals, and \(a\) and \(b\) are terminal symbols. The starting non-terminal is \(S\).

Which one of the following statements is CORRECT?

  • (A) The language generated by \(G\) is \((a+b)^*\)
  • (B) The language generated by \(G\) is \(a^*(a+b)b^*\)
  • (C) The language generated by \(G\) is \(a^*b^*(a+b)\)
  • (D) The language generated by \(G\) is not a regular language

Question 39:

Consider the pushdown automaton (PDA) \(P\) over input alphabet \(\{a,b\}\) and stack alphabet \(\{\perp,A\}\) with start state \(s\) and acceptance by \emph{empty stack. The transition sketch shows: in \(s\) on each \(a\) it \emph{pushes one \(A\) (i.e., \(a/\perp \to A\perp\) and \(a/A \to AA\)); on first \(b\) it goes to \(p\) with \(b/A \to \epsilon\) and stays in \(p\) popping one \(A\) per \(b\) (\(b/A \to \epsilon\)); from \(p\) it may go to \(q\) by \(\epsilon/A \to \epsilon\) and in \(q\) it can keep popping \(A\)’s and finally pop \(\perp\) by \(\epsilon/\perp \to \epsilon\). Which option describes \(L(P)\)?

  • (A) \(\{a^m b^n \mid 1 \le m and n < m\}\)
  • (B) \(\{a^m b^n \mid 0 \le n \le m\}\)
  • (C) \(\{a^m b^n \mid 0 \le m and 0 \le n\}\)
  • (D) \(\{a^m \mid 0 \le m\} \;\cup\; \{b^n \mid 0 \le n\}\)

Question 40:

Consider the given C-code and its corresponding assembly code, with a few
operands U1–U4 being unknown. Some useful information as well as the semantics
of each unique assembly instruction is annotated as inline comments in the code.
The memory is byte-addressable.

  • (A) \((8,\,4,\,1,\,L02)\)
  • (B) \((3,\,4,\,4,\,L01)\)
  • (C) \((8,\,1,\,1,\,L02)\)
  • (D) \((3,\,1,\,1,\,L01)\)

Question 41:

A 4 KB byte-addressable memory is built using four 1 KB memory blocks. IA4 and IA3 feed a decoder that drives the active-high CS of the four blocks; the remaining ten address lines (all except IA4, IA3) go to the Addr inputs of each block. For each block, let \(X_1,X_2,X_3,X_4\) be the input memory address (IA11–IA0), in decimal, of its starting location (Addr \(=0\)). Which option is correct?


  • (A) \((0,1,2,3)\)
  • (B) \((0,1024,2048,3072)\)
  • (C) \((0,8,16,24)\)
  • (D) \((0,0,0,0)\)

Question 42:

Consider a sequential digital circuit consisting of T flip-flops and D flip-flops as shown. At the beginning, \(Q_1=0\), \(Q_2=1\), \(Q_3=1\). Which one of the given values of \((Q_1,Q_2,Q_3)\) can \emph{NEVER be obtained with this circuit?

  • (A) \((0,0,1)\)
  • (B) \((1,0,0)\)
  • (C) \((1,0,1)\)
  • (D) \((1,1,1)\)

Question 43:

A Boolean digital circuit is composed using two 4-input multiplexers (M1 and M2) and one 2-input multiplexer (M3) as shown in the figure. X0–X7 are the inputs of M1 and M2 and can be set to 0 or 1. The select lines of M1 and M2 are \((A,C)\), and the select line of M3 is \(B\). The output of M3 is the final circuit output.

Which one of the following sets of values of \((X0,X1,X2,X3,X4,X5,X6,X7)\) will realise the Boolean function \[ F(A,B,C) = \overline{A} + \overline{A}C + ABC \; ? \]

  • (A) (1, 1, 0, 0, 1, 1, 1, 0)
  • (B) (1, 1, 0, 0, 1, 1, 0, 1)
  • (C) (1, 1, 0, 1, 1, 1, 0, 0)
  • (D) (0, 0, 1, 1, 0, 1, 1, 1)

Question 44:

Consider the IEEE-754 single precision floating point numbers \(P=0xC1800000\) and \(Q=0x3F5C2EF4\). Which one of the following corresponds to the product \(P \times Q\), represented in IEEE-754 single precision format?

  • (A) 0x404C2EF4
  • (B) 0x405C2EF4
  • (C) 0xC15C2EF4
  • (D) 0xC14C2EF4

Question 45:

Let \(A\) be a priority queue implemented using a max-heap. \textsc{Extract-Max(A) deletes and returns the maximum element; \textsc{Insert(A,\textit{key) inserts a new element. The max-heap property is preserved after each operation. When \(A\) has \(n\) elements, which statement about the \emph{worst-case running times is TRUE?

  • (A) Both \textsc{Extract-Max}(A) and \textsc{Insert}(A,key) run in \(O(1)\).
  • (B) Both \textsc{Extract-Max}(A) and \textsc{Insert}(A,key) run in \(O(\log n)\).
  • (C) \textsc{Extract-Max}(A) runs in \(O(1)\) whereas \textsc{Insert}(A,key) runs in \(O(n)\).
  • (D) \textsc{Extract-Max}(A) runs in \(O(1)\) whereas \textsc{Insert}(A,key) runs in \(O(\log n)\).

Question 46:

Consider the C function foo and the binary tree shown. When foo is called with a pointer to the root node of the given binary tree, what will it print?

typedef struct node {
int val;
struct node *left, *right;
node;

int foo(node *p) {
int retval;
if (p == NULL)
return 0;
else {
retval = p->val + foo(p->left) + foo(p->right);
printf("%d ", retval);
return retval;

Binary tree structure:

  • (A) 3 8 5 13 11 10
  • (B) 3 5 8 10 11 13
  • (C) 3 8 16 13 24 50
  • (D) 3 16 8 50 24 13

Question 47:

Let \(U=\{1,2,\ldots,n\}\) with \(n>1000\). Let \(k
How many permutations of \(U\) separate \(A\) from \(B\)?

  • (A) \(n!\)
  • (B) \(\binom{n}{2k}(n-2k)!\)
  • (C) \(\binom{n}{2k}(n-2k)!\,(k!)^2\)
  • (D) \(2\binom{n}{2k}(n-2k)!\,(k!)^2\)

Question 48:

Let \(f:A\to B\) be an onto (surjective) function, where \(A\) and \(B\) are nonempty sets. Define an equivalence relation \(\sim\) on \(A\) by \(a_1\sim a_2\) iff \(f(a_1)=f(a_2)\). Let \(\mathcal{E}=\{[x]:x\in A\}\) be the set of all equivalence classes under \(\sim\). Define \(F:\mathcal{E}\to B\) by \(F([x])=f(x)\) for all classes \([x]\in\mathcal{E}\). Which of the following statements is/are TRUE?

  • (A) \(F\) is NOT well-defined.
  • (B) \(F\) is an onto (surjective) function.
  • (C) \(F\) is a one-to-one (injective) function.
  • (D) \(F\) is a bijective function.

Question 49:

A new reliable byte-stream protocol (myTCP) runs over a 100 Mbps network with RTT = 150 ms and maximum segment lifetime (MSL) = 2 minutes. Which of the following are valid sequence number field lengths?

  • (A) 30 bits
  • (B) 32 bits
  • (C) 34 bits
  • (D) 36 bits

Question 50:

Let \(X\) be a set and \(2^{X}\) denote the power set of \(X\). Define a binary operation \(\,\Delta\,\) on \(2^{X}\) by \(A \Delta B = (A-B)\cup(B-A)\) (symmetric difference). Let \(H=(2^{X},\Delta)\). Which of the following statements about \(H\) is/are correct?

  • (A) \(H\) is a group.
  • (B) Every element in \(H\) has an inverse, but \(H\) is NOT a group.
  • (C) For every \(A\in 2^{X}\), the inverse of \(A\) is the complement of \(A\).
  • (D) For every \(A\in 2^{X}\), the inverse of \(A\) is \(A\).

Question 51:

Suppose in a web browser you click on \texttt{www.gate-2023.in}. The browser cache is empty. The DNS address is not cached, so an iterative DNS lookup across 3 tiers is required. Let RTT denote the round trip time between your host and either a DNS server or the web server. RTT between local host and web server is also equal to RTT. The HTML page is very small and references 10 small objects from the same server. Neglect transmission and rendering time.

Which of the following statements is/are CORRECT about the \emph{minimum elapsed time} between clicking the URL and full rendering?

  • (A) 7 RTTs, in case of non-persistent HTTP with 5 parallel TCP connections.
  • (B) 5 RTTs, in case of persistent HTTP with pipelining.
  • (C) 9 RTTs, in case of non-persistent HTTP with 5 parallel TCP connections.
  • (D) 6 RTTs, in case of persistent HTTP with pipelining.

Question 52:

Consider a random experiment where two fair coins are tossed. Let \(A\) be the event that denotes HEAD on both throws, \(B\) the event that denotes HEAD on the first throw, and \(C\) the event that denotes HEAD on the second throw. Which of the following statements is/are TRUE?

  • (A) \(A\) and \(B\) are independent.
  • (B) \(A\) and \(C\) are independent.
  • (C) \(B\) and \(C\) are independent.
  • (D) \(\Pr(B \mid C) = \Pr(B)\).

Question 53:



Consider functions \texttt{Function_1} and \texttt{Function_2} as follows. Let \(f_1(n)\) and \(f_2(n)\) be the number of times the statement \(x=x+1\) executes in \texttt{Function_1 and \texttt{Function_2, respectively. Which statements are TRUE?


Function_1 Function_2
while n > 1 do for i = 1 to 100 * n do
for i = 1 to n do x = x + 1;
x = x + 1; end for
end for
n = floor(n/2);
end while


Question 54:

Let \(G\) be a simple, finite, undirected graph with vertex set \(\{v_1,\ldots,v_n\}\). Let \(\Delta(G)\) denote the maximum degree of \(G\) and let \(\mathbb{N}=\{1,2,\ldots\}\) denote the set of all possible colors. Color the vertices of \(G\) using the following greedy strategy: for \(i=1,\ldots,n\), \[ color(v_i)\leftarrow \min\{j\in\mathbb{N}:\ no neighbour of v_i is colored j\}. \]
Which of the following statements is/are TRUE?

  • (A) This procedure results in a proper vertex coloring of \(G\).
  • (B) The number of colors used is at most \(\Delta(G)+1\).
  • (C) The number of colors used is at most \(\Delta(G)\).
  • (D) The number of colors used is equal to the chromatic number of \(G\).

Question 55:

Let \(U=\{1,2,3\}\). Let \(2^U\) denote the power set of \(U\). Consider an undirected graph \(G\) whose vertex set is \(2^U\). For any \(A,B\in 2^U\), \((A,B)\) is an edge in \(G\) iff (i) \(A\ne B\), and (ii) either \(A\subset B\) or \(B\subset A\). For any vertex \(A\) in \(G\), the set of all possible orderings in which the vertices of \(G\) can be visited in a BFS starting from \(A\) is denoted by \(\mathcal{B}(A)\). If \(\varnothing\) denotes the empty set, find \(|\mathcal{B}(\varnothing)|\).


Question 56:

Consider the two-dimensional array \texttt{D[128][128]} in C, stored in row-major order. Each physical page frame holds 512 elements of D. There are 30 physical page frames. The following code executes:

for (int i = 0; i < 128; i++)
for (int j = 0; j < 128; j++)
D[j][i] *= 10;

The number of page faults generated during this execution is:


Question 57:



A computer uses 57-bit virtual addresses with multi-level tree-structured page tables (L levels). Page size = 4 KB and each page-table entry (PTE) = 8 bytes. Find \(L\).


Question 58:

Consider a sequence \(a\) of elements \(a_0=1,\,a_1=5,\,a_2=7,\,a_3=8,\,a_4=9,\,a_5=2\). The following operations are performed on a stack \(S\) and a queue \(Q\), both initially empty.


[I:] push the elements of \(a\) from \(a_0\) to \(a_5\) (in that order) into \(S\).
[II:] enqueue the elements of \(a\) from \(a_0\) to \(a_5\) (in that order) into \(Q\).
[III:] pop an element from \(S\).
[IV:] dequeue an element from \(Q\).
[V:] pop an element from \(S\).
[VI:] dequeue an element from \(Q\).
[VII:] dequeue an element from \(Q\) and \textit{push the same element into \(S\).
[VIII:] Repeat operation VII three times.
[IX:] pop an element from \(S\).
[X:] pop an element from \(S\).


Question 59:

Consider the syntax-directed translation with non-terminals \(N,I,F,B\) and the rules: \[ \begin{aligned} &N \to I\ \#\ F \qquad &&N.val = I.val + F.val
&I \to I_1\ B \qquad &&I.val = 2\,I_1.val + B.val
&I \to B \qquad &&I.val = B.val
&F \to B\ F_1 \qquad &&F.val = \tfrac12\big(B.val + F_1.val\big)
&F \to B \qquad &&F.val = \tfrac12\,B.val
&B \to 0 \qquad &&B.val = 0
&B \to 1 \qquad &&B.val = 1 \end{aligned} \]
Find the value computed for the input string \texttt{10\#011} (rounded to three decimals).


Question 60:

Consider the table Student with attributes (rollNum, name, gender, marks). The primary key is \texttt{rollNum}. The SQL query:
SELECT *
FROM Student
WHERE gender = 'F' AND marks > 65;

The number of rows returned by this query is:


Question 61:



A database has 25{,}000 fixed-length records of 100 bytes (primary key 15 bytes). The data file is block-aligned so each record is fully contained within a block. The file is indexed by a \emph{primary} index file, also block-aligned and ordered. Block size is 1024 bytes and a block pointer is 5 bytes. Each index entry stores the block’s anchor key (15 bytes) and a pointer (5 bytes). Binary search on an index file of \(b\) blocks needs \(\lceil \log_2 b \rceil\) block accesses in the worst case. Given a key, the number of block accesses required to \emph{identify the data file block that may contain the record, in the worst case, is \underline{\hspace{1.2cm.



Question 62:

Consider the language \(L\) over the alphabet \(\{0,1\}\): \[ L=\{\, w\in \{0,1\}^* \mid \(w\) does not contain three or more consecutive \(1\)'s\,\}. \]
The minimum number of states in a Deterministic Finite-State Automaton (DFA) for \(L\) is _______.


Question 63:

An 8-way set associative cache of size 64 KB (1 KB = 1024 bytes) is used in a system with a 32-bit address. The address is sub-divided into TAG, INDEX, and BLOCK OFFSET. Find the number of bits in the TAG.


Question 64:

The forwarding table of a router is shown below. A packet addressed to a destination address 200.150.68.118 arrives at the router.
It will be forwarded to the interface with ID ______\ .


GATE 2023 CSE Question Paper Analysis

Details Paper Analysis Highlights
Overall Difficulty Easy to Moderate
Number of MCQs 34
Number of MSQs 15
Number of NATs 16

GATE 2023 CSE Paper Analysis- Weightage of Topics

Subjects Questions Asked Total Marks
1 Mark 2 Marks
Databases 1 2 5
Operating Systems 3 3 9
Discrete Mathematics 1 4 9
Digital Logic 4 2 8
Computer Networks 2 3 8
Computer Organisation 3 2 7
Data Structures & Programming 2 4 10
Algorithm  2 2 6
Theory of Computation 3 3 9
Compiler Design 1 3 7
Engineering Mathematics 3 2 7
General Aptitude 15 5 15

Also Check:

GATE Previous Year Question Papers

Other PG Exam Question Papers