Question text and figures as in the official paper, with the answer from the official key. Worked solutions for every question are in your report after you take the paper as a 3-hour test.
Which is the weakest normal form that the new database satisfies, but the old one does not?
(A)
1NF
(B)
2NF
(C)
3NF
(D)
BCNF
Answer (official key): B
Worked solution: in your report after you take this paper.
Q14 · Algorithms · MCQ · 1 mark
The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are:
(A)
Θ(nlogn),Θ(nlogn),Θ(n2)
(B)
Θ(n2),Θ(n2),Θ(nlogn)
(C)
Θ(n2),Θ(nlogn),Θ(nlogn)
(D)
Θ(n2),Θ(nlogn),Θ(n2)
Answer (official key): D
Worked solution: in your report after you take this paper.
Q15 · Algorithms · MCQ · 1 mark
Let G be a weighted connected undirected graph with distinct positive edge weights.
If every edge weight is increased by the same value, then which of the following statements is/are true?
P: Minimum spanning tree of G does not change.
Q: Shortest path between any pair of vertices does not change.
(A)
P only
(B)
Q only
(C)
Neither P nor Q
(D)
Both P and Q
Answer (official key): A
Worked solution: in your report after you take this paper.
Q16 · Discrete Mathematics · MCQ · 1 mark
Let an be the number of n-bit strings that do not contain two consecutive 1s.
Which one of the following is the recurrence relation for an?
(A)
an=an−1+2an−2
(B)
an=an−1+an−2
(C)
an=2an−1+an−2
(D)
an=2an−1+2an−2
Answer (official key): B
Worked solution: in your report after you take this paper.
Q17 · Theory of Computation · MCQ · 1 mark
Which of the following decision problems are undecidable?
I. Given NFAs N1 and N2, is L(N1)∩L(N2)=∅?
II. Given a CFG G=(N,Σ,P,S) and a string x∈Σ∗, does x∈L(G)?
III. Given CFGs G1 and G2, is L(G1)=L(G2)?
IV. Given a Turing machine M, is L(M)=∅?
(A)
I and IV only
(B)
II and III only
(C)
III and IV only
(D)
II and IV only
Answer (official key): C
Worked solution: in your report after you take this paper.
Q18 · Computer Networks · MCQ · 1 mark
Not in GATE 2027 syllabus: SMTP, FTP and e-mail protocols
Which of the following is/are example(s) of stateful application layer protocols?
(i) HTTP
(ii) FTP
(iii) TCP
(iv) POP3
(A)
(i) and (ii) only
(B)
(ii) and (iii) only
(C)
(ii) and (iv) only
(D)
(iv) only
Answer (official key): C
Worked solution: in your report after you take this paper.
Q19 · Calculus · Numerical · 1 mark
Evaluate:
x→4limx−4sin(x−4)
The value is __________.
Answer (official key): 1
Worked solution: in your report after you take this paper.
Q20 · Theory of Computation · MCQ · 1 mark
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?
(A)
(0+1)∗0011(0+1)∗+(0+1)∗1100(0+1)∗
(B)
(0+1)∗(00(0+1)∗11+11(0+1)∗00)(0+1)∗
(C)
(0+1)∗00(0+1)∗+(0+1)∗11(0+1)∗
(D)
00(0+1)∗11+11(0+1)∗00
Answer (official key): B
Worked solution: in your report after you take this paper.
Q21 · Algorithms · Numerical · 1 mark
Consider the following directed graph:
The number of different topological orderings of the vertices of the graph is __________.
Answer (official key): 6
Worked solution: in your report after you take this paper.
Q22 · Computer Organization and Architecture · Numerical · 1 mark
The 16-bit 2's complement representation of an integer is:
1111 1111 1111 0101
Its decimal representation is __________.
Answer (official key): -11
Worked solution: in your report after you take this paper.
Q23 · Programming and Data Structures · Numerical · 1 mark
Consider the following C program.
#include <stdio.h>
void mystery(int *ptra, int *ptrb) {
int *temp;
temp = ptrb;
ptrb = ptra;
ptra = temp;
}
int main() {
int a = 2016, b = 0, c = 4, d = 42;
mystery(&a, &b);
if (a < c)
mystery(&c, &a);
mystery(&a, &d);
printf("%d\n", a);
}
The output of the program is __________.
Answer (official key): 2016
Worked solution: in your report after you take this paper.
Q24 · Digital Logic · MCQ · 1 mark
Consider the Boolean operator # with the following properties:
x#0=x,x#1=x,x#x=0,x#x=1.
Then x#y is equivalent to:
(A)
xy+xy
(B)
xy+xy
(C)
xy+xy
(D)
xy+xy
Answer (official key): A
Worked solution: in your report after you take this paper.
Q25 · Computer Networks · MCQ · 1 mark
Not in GATE 2027 syllabus: ARP, DHCP and ICMP
Which one of the following protocols is not used to resolve one form of address to another one?
(A)
DNS
(B)
ARP
(C)
DHCP
(D)
RARP
Answer (official key): C
Worked solution: in your report after you take this paper.
Q26 · Compiler Design · MCQ · 1 mark
Consider the following C program.
void f(int, short);
void main()
{
int i = 100;
short s = 12;
short *p = &s;
__________ ; // call to f()
}
Which one of the following expressions, when placed in the blank above, will not result in a type checking error?
(A)
f(s,*s)
(B)
i = f(i,s)
(C)
f(i,*s)
(D)
f(i,*p)
Answer (official key): D
Worked solution: in your report after you take this paper.
Q27 · Compiler Design · Numerical · 1 mark
Consider the following code segment.
x = u - t;
y = x * v;
x = y + w;
y = t - z;
y = x * y;
The minimum number of total variables required to convert the above code segment to static single assignment form is __________.
Answer (official key): 10
Worked solution: in your report after you take this paper.
Q28 · Computer Organization and Architecture · Numerical · 1 mark
A processor can support a maximum memory of 4 GB, where the memory is word-addressable and one word consists of two bytes.
The size of the address bus of the processor is at least __________ bits.
Answer (official key): 31
Worked solution: in your report after you take this paper.
Q29 · Linear Algebra · Numerical · 1 mark
Two eigenvalues of a 3×3 real matrix P are
2+−1
and
3.
The determinant of P is __________.
Answer (official key): 15
Worked solution: in your report after you take this paper.
Q30 · Operating System · MCQ · 1 mark
Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system.
Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?
(A)
Shortest remaining time first
(B)
Round-robin with time quantum less than the shortest CPU burst
(C)
Uniform random
(D)
Highest priority first with priority proportional to CPU burst length
Q32 · Programming and Data Structures · MCQ · 1 mark
A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently.
Which one of the following statements is correct? Here n refers to the number of items in the queue.
(A)
Both operations can be performed in O(1) time.
(B)
At most one operation can be performed in O(1) time but the worst case time for the other operation will be Ω(n).
(C)
The worst case time complexity for both operations will be Ω(n).
(D)
Worst case time complexity for both operations will be Ω(logn).
Answer (official key): A
Worked solution: in your report after you take this paper.
Q33 · Discrete Mathematics · Numerical · 1 mark
Let p,q,r,s represent the following propositions.
p:x∈{8,9,10,11,12}q:x is a composite numberr:x is a perfect squares:x is a prime number
The integer x≥2 which satisfies
¬((p⇒q)∧(¬r∨¬s))
is __________.
Answer (official key): 11
Worked solution: in your report after you take this paper.
Q34 · Probability and Statistics · Numerical · 1 mark
A probability density function on the interval [a,1] is given by
x21
and outside this interval the value of the function is zero.
The value of a is __________.
Answer (official key): 0.5
Worked solution: in your report after you take this paper.
Q35 · Databases · MCQ · 1 mark
Which one of the following is not a part of the ACID properties of database transactions?
(A)
Atomicity
(B)
Consistency
(C)
Isolation
(D)
Deadlock-freedom
Answer (official key): D
Worked solution: in your report after you take this paper.
Q36 · Programming and Data Structures · MCQ · 2 marks
The following function computes the maximum value contained in an integer array p[] of size n, where n≥1.
int max(int *p, int n) {
int a = 0, b = n - 1;
while (__________) {
if (p[a] <= p[b]) {
a = a + 1;
}
else {
b = b - 1;
}
}
return p[a];
}
The missing loop condition is:
(A)
a != n
(B)
b != 0
(C)
b > (a + 1)
(D)
b != a
Answer (official key): D
Worked solution: in your report after you take this paper.
Q37 · Digital Logic · MCQ · 2 marks
Consider a carry lookahead adder for adding two n-bit integers, built using gates of fan-in at most two.
The time to perform addition using this adder is:
(A)
Θ(1)
(B)
Θ(logn)
(C)
Θ(n)
(D)
Θ(n)
Answer (official key): B
Worked solution: in your report after you take this paper.
Q38 · Compiler Design · MCQ · 2 marks
What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed?
a = 3;
void n(x) {
x = x * a;
print(x);
}
void m(y) {
a = 1;
a = y - a;
n(a);
print(a);
}
void main() {
m(a);
}
(A)
6, 2
(B)
6, 6
(C)
4, 2
(D)
4, 4
Answer (official key): D
Worked solution: in your report after you take this paper.
Q39 · Programming and Data Structures · Numerical · 2 marks
Let Q denote a queue containing sixteen numbers and S be an empty stack.
Head(Q) returns the element at the head of the queue Q without removing it from Q. Similarly, Top(S) returns the element at the top of S without removing it from S.
Consider the algorithm given below.
while Q is not Empty do
if S is Empty OR Top(S) <= Head(Q) then
x := Dequeue(Q);
Push(S, x);
else
x := Pop(S);
Enqueue(Q, x);
end
end
The maximum possible number of iterations of the while loop in the algorithm is __________.
Answer (official key): 256
Worked solution: in your report after you take this paper.
Q40 · Discrete Mathematics · Numerical · 2 marks
The coefficient of x12 in
(x3+x4+x5+x6+⋯)3
is __________.
Answer (official key): 10
Worked solution: in your report after you take this paper.
Q41 · Computer Organization and Architecture · Numerical · 2 marks
The stage delays in a 4-stage pipeline are 800, 500, 400 and 300 picoseconds.
The first stage, with delay 800 picoseconds, is replaced with a functionally equivalent design involving two stages with respective delays 600 and 350 picoseconds.
The throughput increase of the pipeline is __________ percent.
Answer (official key): 33 to 34
Worked solution: in your report after you take this paper.
Q42 · Probability and Statistics · Numerical · 2 marks
Consider the following experiment.
Step 1. Flip a fair coin twice.
Step 2. If the outcomes are TAILS, HEADS, then output Y and stop.
Step 3. If the outcomes are either HEADS, HEADS or HEADS, TAILS, then output N and stop.
Step 4. If the outcomes are TAILS, TAILS, then go to Step 1.
The probability that the output of the experiment is Y, up to two decimal places, is __________.
Answer (official key): 0.33 to 0.34
Worked solution: in your report after you take this paper.
Q43 · Computer Organization and Architecture · Numerical · 2 marks
The size of the data count register of a DMA controller is 16 bits.
The processor needs to transfer a file of 29154 kilobytes from disk to main memory.
The memory is byte addressable.
The minimum number of times the DMA controller needs to get the control of the system bus from the processor to transfer the file from the disk to main memory is __________.
Answer (official key): 456
Worked solution: in your report after you take this paper.
Q44 · Discrete Mathematics · Numerical · 2 marks
Consider the recurrence relation
a1=8,an=6n2+2n+an−1.
Let
a99=K×104.
The value of K is __________.
Answer (official key): 197.9 to 198.1
Worked solution: in your report after you take this paper.
Q45 · Algorithms · Numerical · 2 marks
Consider the weighted undirected graph with 4 vertices, where the weight of edge {i,j} is given by the entry Wij in the matrix W.
W=02852058850x58x0
The largest possible integer value of x, for which at least one shortest path between some pair of vertices will contain the edge with weight x, is __________.
Answer (official key): 12
Worked solution: in your report after you take this paper.
Q46 · Discrete Mathematics · Numerical · 2 marks
A function
f:N+→N+
defined on the set of positive integers N+ satisfies the following properties:
f(n)=f(2n)if n is even
and
f(n)=f(n+5)if n is odd.
Let
R={i∣∃j:f(j)=i}
be the set of distinct values that f takes.
The maximum possible size of R is __________.
Answer (official key): 2
Worked solution: in your report after you take this paper.
Q47 · Algorithms · Numerical · 2 marks
Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being
1,2,3,4,5,6.
The maximum possible weight that a minimum weight spanning tree of G can have is __________.
Answer (official key): 7
Worked solution: in your report after you take this paper.
Q48 · Theory of Computation · MCQ · 2 marks
Consider the following context-free grammars:
G1:S→aS∣B,B→b∣bBG2:S→aA∣bB,A→aA∣B∣ϵ,B→bB∣ϵ
Which one of the following pairs of languages is generated by G1 and G2, respectively?
(A)
{ambn∣m>0 or n>0} and {ambn∣m>0 and n>0}
(B)
{ambn∣m>0 and n>0} and {ambn∣m>0 or n≥0}
(C)
{ambn∣m≥0 or n>0} and {ambn∣m>0 and n>0}
(D)
{ambn∣m≥0 and n>0} and {ambn∣m>0 or n>0}
Answer (official key): D
Worked solution: in your report after you take this paper.
Q49 · Algorithms · MCQ · 2 marks
G=(V,E) is an undirected simple graph in which each edge has a distinct weight, and e is a particular edge of G.
Which of the following statements about the minimum spanning trees of G is/are true?
I. If e is the lightest edge of some cycle in G, then every MST of G includes e.
II. If e is the heaviest edge of some cycle in G, then every MST of G excludes e.
(A)
I only
(B)
II only
(C)
both I and II
(D)
neither I nor II
Answer (official key): B
Worked solution: in your report after you take this paper.
Q50 · Digital Logic · MCQ · 2 marks
Consider the two cascaded 2-to-1 multiplexers as shown in the figure.
The minimal sum of products form of the output X is:
Q51 · Programming and Data Structures · MCQ · 2 marks
An operator delete(i) for a binary heap data structure is to be designed to delete the item in the i-th node.
Assume that the heap is implemented in an array and i refers to the i-th index of the array.
If the heap tree has depth d, where depth is the number of edges on the path from the root to the farthest leaf, then what is the time complexity to re-fix the heap efficiently after the removal of the element?
(A)
O(1)
(B)
O(d) but not O(1)
(C)
O(2d) but not O(d)
(D)
O(d2d) but not O(2d)
Answer (official key): B
Worked solution: in your report after you take this paper.
Q52 · Programming and Data Structures · MCQ · 2 marks
What will be the output of the following C program?
Worked solution: in your report after you take this paper.
Q53 · Databases · MCQ · 2 marks
Consider the following two-phase locking protocol.
Suppose a transaction T accesses, for read or write operations, a certain set of objects:
{O1,…,Ok}.
This is done in the following manner:
Step 1. T acquires exclusive locks to O1,…,Ok in increasing order of their addresses.
Step 2. The required operations are performed.
Step 3. All locks are released.
This protocol will:
(A)
guarantee serializability and deadlock-freedom
(B)
guarantee neither serializability nor deadlock-freedom
(C)
guarantee serializability but not deadlock-freedom
(D)
guarantee deadlock-freedom but not serializability
Answer (official key): A
Worked solution: in your report after you take this paper.
Q54 · Operating System · Numerical · 2 marks
Consider a computer system with ten physical page frames.
The system is provided with an access sequence:
(a1,a2,…,a20,a1,a2,…,a20),
where each ai is a distinct virtual page number.
The difference in the number of page faults between the last-in-first-out page replacement policy and the optimal page replacement policy is __________.
Answer (official key): 1
Worked solution: in your report after you take this paper.
Q55 · Theory of Computation · MCQ · 2 marks
Let X be a recursive language and Y be a recursively enumerable but not recursive language.
Let W and Z be two languages such that Y reduces to W, and Z reduces to X, where reduction means the standard many-one reduction.
Which one of the following statements is TRUE?
(A)
W can be recursively enumerable and Z is recursive.
(B)
W can be recursive and Z is recursively enumerable.
(C)
W is not recursively enumerable and Z is recursive.
(D)
W is not recursively enumerable and Z is not recursive.
Answer (official key): C
Worked solution: in your report after you take this paper.
Q56 · Compiler Design · Numerical · 2 marks
The attributes of three arithmetic operators in some programming language are given below.
Operator
Precedence
Associativity
Arity
+
High
Left
Binary
−
Medium
Right
Binary
∗
Low
Left
Binary
The value of the expression
2−5+1−7∗3
in this language is __________.
Answer (official key): 9
Worked solution: in your report after you take this paper.
Q57 · Computer Networks · Numerical · 2 marks
A sender uses the Stop-and-Wait ARQ protocol for reliable transmission of frames.
Frames are of size 1000 bytes and the transmission rate at the sender is 80 Kbps, where 1 Kbps=1000 bits/second.
The size of an acknowledgement is 100 bytes and the transmission rate at the receiver is 8 Kbps.
The one-way propagation delay is 100 milliseconds.
Assuming no frame is lost, the sender throughput is __________ bytes/second.
Answer (official key): 2500
Worked solution: in your report after you take this paper.
Q58 · Computer Networks · MCQ · 2 marks
Consider that B wants to send a message m that is digitally signed to A.
Let the pair of private and public keys for A and B be denoted by Kx− and Kx+ for x=A,B, respectively.
Let Kx(m) represent the operation of encrypting m with a key Kx, and H(m) represent the message digest.
Which one of the following indicates the CORRECT way of sending the message m along with the digital signature to A?
(A)
{m,KB+(H(m))}
(B)
{m,KB−(H(m))}
(C)
{m,KA−(H(m))}
(D)
{m,KA+(m)}
Answer (official key): B
Worked solution: in your report after you take this paper.
Q59 · Computer Networks · Numerical · 2 marks
An IP datagram of size 1000 bytes arrives at a router.
The router has to forward this packet on a link whose MTU, maximum transmission unit, is 100 bytes.
Assume that the size of the IP header is 20 bytes.
The number of fragments that the IP datagram will be divided into for transmission is __________.
Answer (official key): 13
Worked solution: in your report after you take this paper.
Q60 · Computer Networks · Numerical · 2 marks
For a host machine that uses the token bucket algorithm for congestion control, the token bucket has a capacity of 1 megabyte and the maximum output rate is 20 megabytes per second.
Tokens arrive at a rate to sustain output at a rate of 10 megabytes per second.
The token bucket is currently full and the machine needs to send 12 megabytes of data.
The minimum time required to transmit the data is __________ seconds.
Answer (official key): 1.1
Worked solution: in your report after you take this paper.
Q61 · Theory of Computation · MCQ · 2 marks
Consider the transition diagram of a PDA given below with input alphabet Σ={a,b} and stack alphabet Γ={X,Z}. Z is the initial stack symbol. Let L denote the language accepted by the PDA.
Which one of the following is TRUE?
(A)
L={anbn∣n≥0} and is not accepted by any finite automata
(B)
L={an∣n≥0}∪{anbn∣n≥0} and is not accepted by any deterministic PDA
(C)
L is not accepted by any Turing machine that halts on every input
(D)
L={an∣n≥0}∪{anbn∣n≥0} and is deterministic context-free
Answer (official key): D
Worked solution: in your report after you take this paper.
Q62 · Operating System · MCQ · 2 marks
Consider the following proposed solution for the critical section problem. There are n processes: P0,…,Pn−1.
In the code, function pmax returns an integer not smaller than any of its arguments. For all i, t[i] is initialized to zero.
Code for Pi:
do {
c[i] = 1;
t[i] = pmax(t[0], ..., t[n-1]) + 1;
c[i] = 0;
for every j != i in {0, ..., n-1} {
while (c[j]);
while (t[j] != 0 && t[j] <= t[i]);
}
Critical Section;
t[i] = 0;
Remainder Section;
} while (true);
Which one of the following is TRUE about the above solution?
(A)
At most one process can be in the critical section at any time
(B)
The bounded wait condition is satisfied
(C)
The progress condition is satisfied
(D)
It cannot cause a deadlock
Answer (official key): A
Worked solution: in your report after you take this paper.
Q63 · Compiler Design · MCQ · 2 marks
Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S,A} and terminals {a,b}.
S→aA{print1}S→a{print2}A→Sb{print3}
Using the above SDTS, the output printed by a bottom-up parser for the input aab is:
(A)
1 3 2
(B)
2 2 3
(C)
2 3 1
(D)
syntax error
Answer (official key): C
Worked solution: in your report after you take this paper.
Q64 · Operating System · Numerical · 2 marks
Consider a disk queue with requests for I/O to blocks on cylinders:
47,38,121,191,87,11,92,10.
The C-LOOK scheduling algorithm is used. The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199.
The total head movement, in number of cylinders, incurred while servicing these requests is __________.
Answer (official key): 346
Worked solution: in your report after you take this paper.
Q65 · Operating System · Numerical · 2 marks
Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes.
If the computer system has a one-level page table per process and each page table entry requires 48 bits, then the size of the per-process page table is __________ megabytes.
Answer (official key): 384
Worked solution: in your report after you take this paper.