CS/IT Gate Yearwise
CS/IT Gate 2026 (Set 2)
CS/IT Gate 2025 (Set 1)
CS/IT Gate 2025 (Set 2)
CS/IT Gate 2024 (Set 1)
CS/IT Gate 2024 (Set 2)
CS/IT Gate 2023
CS/IT Gate 2022
CS/IT Gate 2021 (Set 1)
CS/IT Gate 2021 (Set 2)
CS/IT Gate 2020
CS/IT Gate 2019
CS/IT Gate 2018
CS/IT Gate 2017 (Set 1)
CS/IT Gate 2017 (Set 2)
CS/IT Gate 2016 (Set 1)
CS/IT Gate 2016 (Set 2)
CS/IT Gate 2015 (Set 1)
CS/IT Gate 2015 (Set 2)
CS/IT Gate 2015 (Set 3)
CS/IT Gate 2014 (Set 1)
CS/IT Gate 2014 (Set 2)
CS/IT Gate 2014 (Set 3)
CS and IT Gate 2024 Set-2 Questions with Answer
Ques 1 Gate 2024 Set-2
Let 𝑀 be the 5-state NFA with 𝜖-transitions shown in the diagram below.

Explanation:
Let us trace the languages accepted by the upper and lower paths of the $\epsilon$-NFA from the initial state 1.
1. Upper Path (States 1 → 2 → 3):
• From state 1, we can reach state 2 on an empty transition ($\epsilon$). State 2 is an accepting state.
• Moving back and forth between state 2 and state 3 requires reading exactly two 0s (2 → 3 reads 0, 3 → 2 reads 0).
• Therefore, the language accepted purely within the upper component loop is any even number of 0s: (00)*.
2. Lower Path and Cross-Over Transitions to State 5:
State 5 is the other final accepting state. Let's see all the distinct structural paths that can end at state 5:
• Path A (Directly through the bottom loop):
• Go from 1 → 4 via $\epsilon$.
• Go from 4 → 5 by reading a single 1.
• Once at state 5, we can loop back and forth to state 4 by reading pairs of 1s (5 → 4 → 5 is 11). This gives (11)*.
• Combining these parts gives the expression: 1(11)*.
• Path B (Cross-over from the top component):
• We can spend any number of even 0s in the upper loop, ending up at state 3. This is represented by (00)*0.
• From state 3, we can transition to state 5 via $\epsilon$.
• Once at state 5, we can loop an arbitrary number of times using pairs of 1s, which adds (11)*.
• Combining these gives: (00)*0(11)*, which simplifies structurally to matching an odd number of 0s followed by an even number of 1s.
### 3. Combine and Simplify the Sub-expressions:
Let's look at the collective path heading into the (11)* loop at state 5:
• Via Path A: we provide a 1.
• Via Path B: we provide an odd sequence of 0s, which is 0(00)* or equivalent combinations.
Looking at option (c): (00)* + (1 + (00)*)(11)*. Let's expand the right side:
1(11)* + (00)*(11)*
Since (00)* includes the $\epsilon$ string (zero 0s), (00)*(11)* covers (11)* directly, as well as any even number of 0s followed by an even number of 1s. This perfectly matches the reachable state-space criteria of the automation design.
Conclusion:
Option (c) is the correct regular expression mapping for machine M.
Ques 2 GATE 2024 SET-2
Consider a computer with a 4 MHz processor. Its DMA controller can transfer 8 bytes in 1 cycle from a device to main memory through cycle stealing at regular intervals. Which one of the following is the data transfer rate (in bits per second) of the DMA controller if 1% of the processor cycles are used for DMA?
To find the data transfer rate of the DMA controller, let us calculate the number of bytes transferred per second step-by-step:
• Processor Clock Frequency: The processor operates at 4 MHz, which means it runs at a total of 4,000,000 cycles per second.
• Cycles Allocated for DMA: The DMA controller uses 1% of these processor cycles for cycle stealing:
DMA cycles per second = 1% of 4,000,000 = 40,000 cycles/sec
• Bytes Transferred per Cycle: The DMA controller transfers 8 bytes of data in 1 cycle.
• Total Data Transferred in Bytes:
Data rate in bytes = 40,000 cycles/sec × 8 bytes/cycle = 320,000 bytes/sec
• Convert Bytes to Bits: Since 1 byte contains 8 bits, we multiply the total bytes by 8 to get the rate in bits per second (bps):
Data transfer rate = 320,000 × 8 = 2,560,000 bits per second (25,60,000)
Thus, the correct data transfer rate of the DMA controller is 25,60,000 bits per second, matching option (c).
Ques 3 GATE 2024 Set-2
The format of a single-precision floating-point number as per the IEEE 754 standard is:

Ques 4 GATE 2024 Set-2
Let T(n) be the recurrence relation defined as follows:
T(0) = 1,
T(1) = 2, and
T(n) = 5T(n-1) - 6T(n-2) for n ≥ 2
Which one of the following statements is TRUE?
To find the correct asymptotic bound for T(n), let us solve the given linear homogeneous recurrence relation step-by-step using its characteristic equation.
1. Set up the Characteristic Equation:
The recurrence relation for n ≥ 2 is:
T(n) = 5T(n-1) - 6T(n-2)
We assume a solution of the form T(n) = rn. Substituting this into the relation gives the quadratic characteristic equation:
r2 - 5r + 6 = 0
2. Find the Roots of the Equation:
Factoring the quadratic polynomial:
(r - 2)(r - 3) = 0
The characteristic roots are r1 = 2 and r2 = 3.
3. Write the General Solution:
Since the roots are real and distinct, the general solution is a linear combination of both roots raised to the power of n:
T(n) = c1(2n) + c2(3n)
4. Solve for Constants using Initial Conditions:
We use the given base cases to evaluate c1 and c2:
• For n = 0:
T(0) = c1(20) + c2(30) → c1 + c2 = 1
• For n = 1:
T(1) = c1(21) + c2(31) → 2c1 + 3c2 = 2
Multiply the first equation by 2:
2c1 + 2c2 = 2
Subtracting this from the second equation:
(2c1 + 3c2) - (2c1 + 2c2) = 2 - 2 → c2 = 0
Substituting c2 = 0 back into the first equation:
c1 + 0 = 1 → c1 = 1
5. Find the Exact Expression and Asymptotic Complexity:
Substituting our calculated constants c1 = 1 and c2 = 0 back into the general solution formula:
T(n) = 1 · (2n) + 0 · (3n) = 2n
Since the exact form reduces directly to 2n, its tight asymptotic bound is:
T(n) = Θ(2n)
Conclusion:
The statement T(n) = Θ(2n) is true, matching option (a).
Ques 5 GATE 2024 Set-2
Let f(x) be a continuous function from R to R such that
f(x) = 1 - f(2-x)
Which one of the following options is the CORRECT value of ∫02f(x)dx?
Ques 6 GATE 2024 Set-2
Let A be the adjacency matrix of a simple undirected graph G.
Suppose A is its own inverse.
Which one of the following statements is always TRUE?
To find which statement is always true when the adjacency matrix A of a simple undirected graph G is its own inverse, let us analyze the mathematical implications step-by-step.
1. Understand the Matrix Properties:
• Since A is its own inverse, we have:
A · A = I → A2 = I (where I is the Identity Matrix)
• Since G is a simple undirected graph, its adjacency matrix A has two specific traits:
1. It is symmetric (A = AT).
2. Its diagonal elements are all zero (Aii = 0 for all i), because a simple graph has no self-loops.
2. Analyze the Matrix Multiplication (A2):
Let's look at what an individual diagonal entry in the matrix A2 represents. By definition of matrix multiplication:
(A2)ii = ∑j=1n Aij · Aji
Since A is symmetric (Aij = Aji), this simplifies to:
(A2)ii = ∑j=1n (Aij)2
In an adjacency matrix, Aij is either 1 (if an edge exists between vertex i and vertex j) or 0 (if no edge exists). Therefore, (Aij)2 = Aij. This means:
(A2)ii = ∑j=1n Aij = Degree of vertex i
Since we are given that A2 = I, every diagonal element of A2 must equal 1 (the diagonal entries of the identity matrix):
Degree of vertex i = 1 (for every vertex i in the graph G)
3. Interpret the Structural Layout of G:
• If every single vertex in an undirected graph has a degree of exactly 1, the graph must be a collection of disjoint edges.
• Since every vertex has exactly one edge incident upon it, all vertices are perfectly paired up into independent edges.
• A graph where every vertex is incident on exactly one edge forms a perfect matching (or a 1-regular graph made of disconnected copies of K2).
Conclusion:
Graph G must be a perfect matching, which matches option (b).
Ques 7 GATE 2024 Set-2
When six unbiased dice are rolled simultaneously, the probability of getting all distinct numbers (i.e., 1, 2, 3, 4, 5, and 6) is
Ques 8 GATE 2024 Set-2
Once the DBMS informs the user that a transaction has been successfully completed, its effect should persist even if the system crashes before all its changes are reflected on disk.
This property is called
To identify the correct transaction property described in the statement, let us look at the standard ACID properties of a Database Management System (DBMS):
• Atomicity: Ensures that all operations within a transaction are completed successfully; if any operation fails, the entire transaction is aborted and rolled back ("all or nothing").
• Consistency: Ensures that a transaction transforms the database from one valid, consistent state to another valid state, preserving all pre-defined schema rules and constraints.
• Isolation: Ensures that the concurrent execution of multiple transactions leaves the database in the same state as if they were executed sequentially, keeping incomplete modifications hidden from other transactions.
• Durability: Ensures that once a transaction has been committed successfully and the user is notified of its completion, all updates made by that transaction become permanent. These changes must survive any subsequent system failures, software failures, or unexpected power crashes, even if the runtime modifications have not yet been written physically from memory cache to secondary storage disk.
The property that guarantees modifications persist through an unexpected system crash following a successful completion is durability. This corresponds directly to option (a).
Ques 9 GATE 2024 Set-2
In the context of owner and weak entity sets in the ER (Entity-Relationship) data model, which one of the following is TRUE?
To determine the correct participation constraints in an Entity-Relationship (ER) model, let us analyze the structural relationship between a weak entity set and its identifying owner entity set.
1. Understanding Weak Entity Sets:
• A weak entity set is an entity set that does not possess sufficient attributes to form a primary key on its own. It depends on a dominant entity set, known as the identifying owner (or parent entity set), to exist.
• Because a weak entity cannot exist without its owner, every single member of the weak entity set must be linked to an owner entity via the identifying relationship set.
• This absolute dependency means the weak entity set must always have total participation (indicated by a double line in ER diagrams) in the identifying relationship.
2. Understanding Owner Entity Sets:
• The owner entity set (or strong entity set) exists completely independently of the weak entity set. It possesses its own standalone primary key.
• An owner entity can exist perfectly fine in the database without being associated with any weak entities. For example, in a database mapping a Company_Branch (Owner) to its Physical_Rooms (Weak), a branch can open up without any rooms assigned to it yet.
• Therefore, the owner entity set has partial participation in the identifying relationship—it is not required or forced to participate.
Conclusion:
Only the weak entity set is structurally mandated to have total participation in the identifying relationship. This directly validates option (a).
Ques 10 GATE 2024 Set-2
Consider the following two sets:

Ques 11 GATE 2024 Set-2
Which one of the following regular expressions is equivalent to the language accepted by the DFA given below?

Ques 12 GATE 2024 Set-2
Node X has a TCP connection open to node Y. The packets from X to Y go through an intermediate IP router R. Ethernet switch S is the first switch on the network path between X and R. Consider a packet sent from X to Y over this connection.
Which of the following statements is/are TRUE about the destination IP and MAC addresses on this packet at the time it leaves X?
To determine the correct destination IP and MAC addresses when a packet leaves Node X, let us analyze how addressing works across different layers of the OSI model as data moves through an internetwork.
1. Destination IP Address Analysis (Network Layer - Layer 3):
• IP addresses are used for end-to-end routing across different logical networks.
• The source IP address is always the original sender (Node X), and the destination IP address is always the ultimate recipient (Node Y).
• Intermediate devices like routers (R) or switches (S) do not change the ultimate destination IP address of a standard data packet during transit.
→ Therefore, the destination IP address is the IP address of Y. (Validates Option b)
2. Destination MAC Address Analysis (Data Link Layer - Layer 2):
• MAC addresses are used for hop-by-hop delivery within the same physical local area network (LAN) segment.
• Node X uses its routing table to determine that Node Y is on a different network, meaning the packet must be sent to its default gateway, which is the intermediate IP router R.
• Node X uses ARP (Address Resolution Protocol) to find the MAC address matching Router R's IP address and sets it as the destination MAC address.
• What about Ethernet Switch S? An Ethernet switch is a Layer 2 device that transparently forwards frames within a local network segment using its MAC address table. Packets are never logically addressed to the switch itself unless the switch is the final management destination.
→ Therefore, the destination MAC address is the MAC address of the next-hop router R. (Validates Option c)
Conclusion:
Statements b and c are both correct.
Ques 13 GATE 2024 Set-2
Which of the following is/are the responsibility of the Memory Management Unit (MMU) of the CPU in a system with paged memory management?
Total Unique Visitors