GATE-2024-CS1(Forenoon)
March 9, 2025GATE 2022
March 9, 2025GATE-2024-CS1(Forenoon)
Question 35
|
S | |
A | C |
10 | 90 |
30 | 45 |
40 | 80 |
R | |
A | B |
10 | 20 |
20 | 30 |
30 | 40 |
30 | 50 |
50 | 95 |
The total number of tuples obtained by evaluating the following expression
σB<C(R⋈R.A=S.A S)
is ______
2
|
|
|
|
|
|
|
out of three rows,only two rows satisfying B<c condition=""
Question 36
|
Each of the links P–Q and Q–R has a bandwidth of 106 bits/sec, and negligible propagation latency. Router Q immediately transmits every packet it receives from P to R, with negligible processing and queueing delays. Router Q can simultaneously receive on link P–Q and transmit on link Q–R .
Assume P starts transmitting the chunks at time t=0.
Which one of the following options gives the time (in seconds, rounded off to 3 decimal places) at which R receives all the chunks of the file?
8.000
|
|
8.008
|
|
15.992
|
|
16.000
|
Question 37
|

Given “MMLK” as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute S.val )?
45
|
|
50
|
|
55
|
|
65
|
Question 38
|
Which one of the following options CORRECTLY fills in the incomplete productions?.
(1) S → Rf (2) T —> Ε (3) R → cTR
|
|
(1) S →fR (2) T —> Ε (3)R → cTR
|
|
(1) S →fR (2) T→cT (3) R→ cR
|
|
(1) S → Rf (2) T→cT (3) R→ cR
|
Question 39
|
L1:t1=-1
L2:t2=0
L3:t3=0
L4:t4=4*t3
L5:t5=4*t2
L6:t6=t5*M
L7:t7=t4+t6
L8:t8=a[t7]
L9:if t8 <= max goto L11
L10:t1=t8
L11:t3=t3+1
L12: if t3 < M goto L4
L13:t2=t2+1
L14: if t2 < N goto L3
L15: max=t1
Which one of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively ?
6 and 6
|
|
6 and 7
|
|
7 and 7
|
|
7 and 6
|
Question 40
|
T1
a=a+1
b=b+1
T2
b=2*b
a=2*a
Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?
(a = 4, b = 4); (a = 3, b = 3); (a = 4, b = 3)
|
|
(a = 3, b = 4); (a = 4, b = 3); (a = 3, b = 3)
|
|
(a = 4, b = 4); (a = 4, b = 3); (a = 3, b = 4)
|
|
(a = 2, b = 2); (a = 2, b = 3); (a = 3, b = 4)
|
Question 41
|
82, 90, 101
|
|
82, 11, 93
|
|
131, 11, 93
|
|
131, 111, 90
|
Now, let’s consider the options again:
(A) 82, 90, 101 – This cannot be correct because the root element, which is the maximum, is not included.
(B) 82, 11, 93 – This cannot be correct because the second element is not necessarily the second maximum in the array.
(C) 131, 11, 93 – This cannot be correct because 11 and 93 are not necessarily the next largest values after the root.
(D) 131, 111, 90 – This is the most likely option because after the root (131), the next largest values in the array are 111 and 90.
Question 42
|
T(n)=√nT(√n)+n for n>=1,
1 for n=1
Which one of the following options is CORRECT?
T(n)= Θ(n loglogn )
|
|
T(n)=Θ(n logn)
|
|
T(n)=Θ(n2 logn)
|
|
T(n)=Θ(n2loglogn)
|
Question 43
|
53
|
|
52
|
|
27
|
|
1
|
Question 44
|
(X,Y)→ (Z,W) implies X→ (Z,W)
|
|
(X,Y)→ (Z,W) implies (X,Y)→ Z
|
|
((X,Y)→ Z and W→ Y) implies (X,W)→ Z
|
|
(X→Yand Y→ Z) implies X→ Z
|
This statement is not necessarily true. The functional dependency (X,Y) → (Z,W) means that for any given value of X and Y, there is a unique value of Z and W. However, this does not imply that for any given value of X, there is a unique value of Z and W. So, option (A) is FALSE.
(B) (X,Y) → (Z,W) implies (X,Y) → Z
This statement is TRUE. If (X,Y) functionally determines (Z,W), then it also functionally determines Z. This is because for any given combination of X and Y, there is a unique value of Z according to the functional dependency. So, option (B) is TRUE.
(C) ((X,Y) → Z and W → Y) implies (X,W) → Z
This statement is TRUE. If X and Y together determine Z and W determines Y, then X and W together determine Z. This is because for any given combination of X and W, we can find the corresponding values of Y and then use (X,Y) → Z to determine the value of Z. So, option (C) is TRUE.
(D) (X → Y and Y → Z) implies X → Z
This statement is TRUE. If X determines Y and Y determines Z, then X determines Z. This is because the transitive property of functional dependency applies here. So, option (D) is TRUE
Question 45
|
There are no back-edges in G with respect to the tree T
|
|
There are no cross-edges in G with respect to the tree T
|
|
There are no forward-edges in G with respect to the tree T
|
|
The only edges in G are the edges in T
|
(B) Not True: While the BFS aspect reduces the likelihood of cross-edges, it’s not guaranteed. Imagine a graph with a cycle that connects back to an earlier explored level. Such a cycle would create a cross-edge in G relative to T.
(C) True: In a BFS tree, all vertices at a level are explored before moving to the next level. This ensures that for any two connected vertices in G:
If they are in the same level of T, there cannot be a forward edge because BFS explores neighbors at a level before moving deeper (they would be explored in the opposite order if it were a forward edge).
If one vertex is an ancestor of the other in T, it cannot be a forward edge by definition (a forward edge points from a vertex to its descendant).
Therefore, since T is both a DFS spanning tree and a BFS tree rooted at v, all edges in T must be either back edges (pointing to an ancestor) or edges that explore neighbors at the same level. This eliminates the possibility of forward edges in G with respect to T.
Question 46
|
S: r1(z); w1(z); r2(x); r3(y); w3(y); r2(y); w2(x); w2(y);
Which of the following transaction schedules is/are conflict equivalent to S ?
T1T2T3
|
|
T1T3T2
|
|
T3T2T1
|
|
T3T1T2
|
Question 47
|
Which of the following statements is/are CORRECT?
F(X,Y,Z)=Π(0,1,2,4)
|
|
F(X,Y,Z)=XY+YZ+XZ
|
|
F(X,Y,Z) is independent of input Y
|
|
F(X,Y,Z) is independent of input X
|
This statement represents the product of terms (AND operation) for the minterms (0, 1, 2, 4). However, the actual expression uses the sum of terms (OR operation) denoted by Σ.
Here’s the key point: The given minterms (3, 5, 6, 7) can be interpreted in two ways:
Standard Interpretation (Sum of Terms): This is the more common interpretation, where the expression represents the OR operation of the minterms. In this case, the statement (A) would be incorrect.
Less Common Interpretation (Negation of Product of Terms): In some contexts, a Boolean expression can be written as the negation of its complement. The complement of F(X, Y, Z) would be the product of terms for all combinations where the output is 0 (maxterms). In this specific case, the maxterms would be (0, 1, 2, 4). Taking the negation (NOT operation) of the complement would result in the original expression F(X, Y, Z). So, under this less common interpretation, statement (A) could be considered correct.
(B) F(X, Y, Z) = XY + YZ + XZ
This statement represents an OR operation (sum of terms) using product of variables (XY, YZ, XZ). However, these specific terms don’t directly correspond to the minterms (3, 5, 6, 7).
Question 48
|
int f(int x, int y) {
for (int i=0; i<y; i++) {
x=x+x+y;
}
return x;
}
Which of the following statements is/are TRUE about the above function?
If the inputs are x=20, y=10, then the return value is greater than 220
|
|
If the inputs are x=20, y=20, then the return value is greater than 220
|
|
If the inputs are x=20, y=10, then the return value is less than 210
|
|
If the inputs are x=10, y=20, then the return value is greater than 220
|
Analyzing Statements:
(A) If the inputs are x=20, y=10, then the return value is greater than 220
Let’s simulate the function call with x = 20 and y = 10:
Iteration 1: x = 20 + 20 + 10 = 50
Iteration 2: x = 50 + 50 + 10 = 110
… (similar updates in every iteration)
Iteration 10 (assuming y = 10): x = … + … + 10 = ~210 (The exact value will be slightly higher than 210)
Therefore, statement (A) is False. The return value is likely around 210, not greater than 220.
(B) If the inputs are x=20, y=20, then the return value is greater than 220
Similar to (A), with y = 20, the final value of x will be significantly higher than 220. Statement (B) is True.
(C) If the inputs are x=20, y=10, then the return value is less than 210
As shown in the analysis of (A), the return value is around 210. Statement (C) is False.
(D) If the inputs are x=10, y=20, then the return value is greater than 220
With x = 10 and y = 20, the final value of x will be even higher than in (B). Statement (D) is True.
Question 49
|
There exist at least m-n linearly independent solutions to this system
|
|
There exist m-n linearly independent vectors such that every solution is a linear combination of these vectors
|
|
There exists a non-zero solution in which at least m-n variables are 0
|
|
There exists a solution in which at least n variables are non-zero
|
Question 50
|

Which of the following statements is/are FALSE?
States 2 and 4 are distinguishable in M
|
|
States 3 and 4 are distinguishable in M
|
|
States 2 and 5 are distinguishable in M
|
|
Any string w with n(w)=n1(w) is in L(M)
|
Question 51
|
G contains a complete subgraph with k vertices
|
|
G contains an independent set of size at least n/k
|
|
G contains at least k(k−1)/2 edges
|
|
G contains a vertex of degree at least k
|
|
|
Dense graphs with a chromatic number k are more likely to have at least k(k-1)/2 edges
Question 52
|

A
|
|
B
|
|
C
|
|
D
|
|
|
Question 53
|
A read miss in WBC never evicts a dirty block
|
|
A read miss in WTC never triggers a write back operation of a cache block to main memory
|
|
A write hit in WBC can modify the value of the dirty bit of a cache block
|
|
A write miss in WTC always writes the victim cache block to main memory before loading the missed block to the cache
|
|
|
In a Write Through Cache (WTC), every write operation to the cache is immediately propagated to main memory. However, a read miss only involves reading data from main memory into the cache; it does not trigger any write back operations. Therefore, a read miss in WTC does not cause any write back operation. This statement is true.
(C) A write hit in WBC can modify the value of the dirty bit of a cache block
In a Write Back Cache (WBC), a write hit means that the data to be written is already present in the cache. When a write occurs, the value of the dirty bit for the block is set to indicate that the block has been modified. Thus, a write hit in WBC will modify (set) the dirty bit of the cache block. This statement is true.
Question 54
|
4096
|
|
|
|
|
|
|
|
|
o Given: 512 GB
o Convert GB to bytes: 512 GB=512×2^30 bytes=512×1073741824 bytes=549755813888 bytes
2. Bytes per track:
o Number of sectors per track = 4096
o Number of bytes per sector = 1024
o Total bytes per track: Bytes per track=4096 sectors/track×1024 bytes/sector=4194304 bytes
3. Total number of tracks:
o Total storage capacity / Bytes per track: Number of tracks=549755813888 bytes/4194304 bytes/track=131072
4. Calculate the number of cylinders:
o Given: 32 storage surfaces
o Each cylinder contains one track per surface.
o Number of cylinders = Number of tracks / Number of surfaces: Number of cylinders=131072 tracks /32 surfaces=4096
Therefore, the number of cylinders in the hard disk is indeed 4096
Question 55
|
The number of cores that minimize the execution time of the program is ________
3
|
|
|
|
|
|
|
|
|
Question 56
|
3.00
|
|
|
|
|
|
|
|
|
Question 57
|
int x = 3;
while(x > 0) {
fork();
printf(“hello”);
wait(NULL);
x–;
}
The total number of times the printf statement is executed is _______
14
|
|
|
|
|
|
|
|
|
First iteration: 2 executions
Second iteration: 4 executions
Third iteration: 8 executions
So, 2+4+8=14
Question 58
|
This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205 . The number of packets forwarded via the next hop router R2 is _______
40
|
|
|
|
|
|
|
|
|
Question 59
|

179
|
|
|
|
|
|
|
|
|
Question 60
|
60
|
|
|
|
|
|
|
|
|
Number of edges=V-K
40=100-K
K=60
Question 61
|
r= 0*+1*
s=01*+10*
The total number of strings of length less than or equal to 5, which are neither in r nor in s, is _________
44
|
|
|
|
|
|
|
|
|
Question 62
|
6596
|
|
|
|
|
|
|
|
|
Offset=Virtual address mod Page size
Offset= 2500 mod 2048=452
Frame number for Page 1 is 3
Page size = 2048 bytes
Calculate the Physical Address:
Physical address = (Frame number × Page size) + Offset =(3*2048)+452=6596
Question 63
|
0.370 to 0.380
|
|
|
|
|
|
|
|
|
Total number of red balls: 10
Total number of blue balls: 15
Total balls: 25
Two balls are drawn randomly without replacement.
The first ball drawn is red.
Let’s denote:
A = Event that the first ball drawn is red.
B = Event that both balls drawn are red.
We need to find P(B|A), the probability that both balls are red given that the first ball is red.
Total number of ways to draw two balls:
Since the first ball is known to be red, we need to find the probability of drawing another red ball from the remaining balls.
Remaining Balls After First Draw:
After drawing the first red ball, there are 9 red balls and 15 blue balls left.
Total remaining balls = 24
Probability of Drawing a Second Red Ball:
The number of favorable outcomes for drawing another red ball is 9 (since there are 9 red balls left).
The total number of outcomes is 24 (total remaining balls).
So, the probability of drawing a second red ball given that the first one was red is:
P(Second ball is red |First ball is red)= Number of remaining red balls
/ Total remaining balls = 9/24=0.375
Question 64
|
A, B, and C are select lines of M1, M2, and M3, respectively.
For an instance of inputs X1=1, X2=1, X3=0, and X4=0, the number of
combinations of A, B, C that give the output Y=1 is _________
4
|
|
|
|
|
|
|
|
|
Question 65
|
header) from a sender to a receiver over a path of two links with a router between
them. The first link (sender to router) has an MTU (Maximum Transmission Unit)
size of 542 bytes, while the second link (router to receiver) has an MTU size of 360
bytes. The number of fragments that would be delivered at the receiver is ________
6
|
|
|
|
|
|
|
|
|
out of three rows,only two rows satisfying B<c condition=""