GATE 2015 CS (Set 1)

All 65 questions of GATE 2015 CS (Set 1)

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.

Q1 · General Aptitude · MCQ · 1 mark

Which of the following options is the closest in meaning to the sentence below?

She enjoyed herself immensely at the party.

  • (A)
    She had a terrible time at the party
  • (B)
    She had a horrible time at the party
  • (C)
    She had a terrific time at the party
  • (D)
    She had a terrifying time at the party

Answer (official key): C

Worked solution: in your report after you take this paper.

Q2 · General Aptitude · MCQ · 1 mark

Which one of the following combinations is incorrect?

  • (A)
    Acquiescence - Submission
  • (B)
    Wheedle - Roundabout
  • (C)
    Flippancy - Lightness
  • (D)
    Profligate - Extravagant

Answer (official key): B

Worked solution: in your report after you take this paper.

Q3 · General Aptitude · MCQ · 1 mark

Given

A={2,3,4,5}A=\{2,3,4,5\}

and

B={11,12,13,14,15},B=\{11,12,13,14,15\},

two numbers are randomly selected, one from each set.

What is the probability that the sum of the two numbers equals 16?

  • (A)
    0.20
  • (B)
    0.25
  • (C)
    0.30
  • (D)
    0.33

Answer (official key): A

Worked solution: in your report after you take this paper.

Q4 · General Aptitude · MCQ · 1 mark

Based on the given statements, select the most appropriate option to solve the given question.

If two floors in a certain building are 9 feet apart, how many steps are there in a set of stairs that extends from the first floor to the second floor of the building?

Statements:

I. Each step is 34\frac{3}{4} foot high.
II. Each step is 1 foot wide.

  • (A)
    Statement I alone is sufficient, but statement II alone is not sufficient.
  • (B)
    Statement II alone is sufficient, but statement I alone is not sufficient.
  • (C)
    Both statements together are sufficient, but neither statement alone is sufficient.
  • (D)
    Statements I and II together are not sufficient.

Answer (official key): A

Worked solution: in your report after you take this paper.

Q5 · General Aptitude · MCQ · 1 mark

Didn't you buy __________ when you went shopping?

  • (A)
    any paper
  • (B)
    much paper
  • (C)
    no paper
  • (D)
    a few paper

Answer (official key): A

Read the worked solution

Q6 · General Aptitude · MCQ · 2 marks

The given statement is followed by some courses of action. Assuming the statement to be true, decide the correct option.

Statement:

There has been a significant drop in the water level in the lakes supplying water to the city.

Courses of action:

I. The water supply authority should impose a partial cut in supply to tackle the situation.
II. The government should appeal to all the residents through mass media for minimal use of water.
III. The government should ban the water supply in lower areas.

  • (A)
    Statements I and II follow.
  • (B)
    Statements I and III follow.
  • (C)
    Statements II and III follow.
  • (D)
    All statements follow.

Answer (official key): A

Read the worked solution

Q7 · General Aptitude · Numerical · 2 marks

The pie chart below has the breakup of the number of students from different departments in an engineering college for the year 2012.

Pie chart for Q8

The proportion of male to female students in each department is 5:4.

There are 40 males in Electrical Engineering.

What is the difference between the number of female students in the Civil department and the female students in the Mechanical department?

Answer (official key): 32

Worked solution: in your report after you take this paper.

Q8 · General Aptitude · MCQ · 2 marks

Select the alternative meaning of the underlined part of the sentence.

The chain snatchers took to their heels when the police party arrived.

  • (A)
    took shelter in a thick jungle
  • (B)
    opened indiscriminate fire
  • (C)
    took to flight
  • (D)
    unconditionally surrendered

Answer (official key): C

Worked solution: in your report after you take this paper.

Q9 · General Aptitude · MCQ · 2 marks

The number of students in a class who have answered correctly, wrongly, or not attempted each question in an exam are listed in the table below.

The marks for each question are also listed. There is no negative or partial marking.

Q No.MarksAnswered CorrectlyAnswered WronglyNot Attempted
1221176
2315272
3111294
4223183
5531121

What is the average of the marks obtained by the class in the examination?

  • (A)
    2.290
  • (B)
    2.970
  • (C)
    6.795
  • (D)
    8.795

Answer (official key): C

Worked solution: in your report after you take this paper.

Q10 · General Aptitude · MCQ · 2 marks

The probabilities that a student passes in Mathematics, Physics and Chemistry are mm, pp and cc, respectively.

Of these subjects, the student has 75% chance of passing in at least one, a 50% chance of passing in at least two and a 40% chance of passing in exactly two.

Following relations are drawn in mm, pp, cc:

I. p+m+c=2720p+m+c=\frac{27}{20}

II. pm+mc+cp=1320p m + m c + c p=\frac{13}{20}

III. (p)(m)(c)=110(p)(m)(c)=\frac{1}{10}

  • (A)
    Only relation I is true.
  • (B)
    Only relation II is true.
  • (C)
    Relations II and III are true.
  • (D)
    Relations I and III are true.

Answer (official key): D

Worked solution: in your report after you take this paper.

Q11 · Programming and Data Structures · MCQ · 1 mark

What are the worst-case complexities of insertion and deletion of a key in a binary search tree?

  • (A)
    Θ(log⁡n)\Theta(\log n) for both insertion and deletion
  • (B)
    Θ(n)\Theta(n) for both insertion and deletion
  • (C)
    Θ(n)\Theta(n) for insertion and Θ(log⁡n)\Theta(\log n) for deletion
  • (D)
    Θ(log⁡n)\Theta(\log n) for insertion and Θ(n)\Theta(n) for deletion

Answer (official key): B

Worked solution: in your report after you take this paper.

Q12 · Algorithms · MCQ · 1 mark

Match the following:

AlgorithmTechnique
(P) Prim's algorithm for minimum spanning tree(i) Backtracking
(Q) Floyd-Warshall algorithm for all pairs shortest paths(ii) Greedy method
(R) Merge sort(iii) Dynamic programming
(S) Hamiltonian circuit(iv) Divide and conquer
  • (A)
    P-iii, Q-ii, R-iv, S-i
  • (B)
    P-i, Q-ii, R-iv, S-iii
  • (C)
    P-ii, Q-iii, R-iv, S-i
  • (D)
    P-ii, Q-i, R-iii, S-iv

Answer (official key): C

Worked solution: in your report after you take this paper.

Q13 · Computer Organization and Architecture · MCQ · 1 mark

For computers based on three-address instruction formats, each address field can be used to specify which of the following?

(S1) A memory operand
(S2) A processor register
(S3) An implied accumulator register

  • (A)
    Either S1 or S2
  • (B)
    Either S2 or S3
  • (C)
    Only S2 and S3
  • (D)
    All of S1, S2 and S3

Answer (official key): A

Worked solution: in your report after you take this paper.

Q14 · Programming and Data Structures · MCQ · 1 mark

Match the following:

Testing conceptTesting type
(P) Condition coverage(i) Black-box testing
(Q) Equivalence class partitioning(ii) System testing
(R) Volume testing(iii) White-box testing
(S) Alpha testing(iv) Performance testing
  • (A)
    P-ii, Q-iii, R-i, S-iv
  • (B)
    P-iii, Q-iv, R-ii, S-i
  • (C)
    P-iii, Q-i, R-iv, S-ii
  • (D)
    P-iii, Q-i, R-ii, S-iv

Answer (official key): C

Worked solution: in your report after you take this paper.

Q15 · Compiler Design · MCQ · 1 mark

Which one of the following is TRUE at any valid state in shift-reduce parsing?

  • (A)
    Viable prefixes appear only at the bottom of the stack and not inside.
  • (B)
    Viable prefixes appear only at the top of the stack and not inside.
  • (C)
    The stack contains only a set of viable prefixes.
  • (D)
    The stack never contains viable prefixes.

Answer (official key): C

Worked solution: in your report after you take this paper.

Q16 · Programming and Data Structures · Numerical · 1 mark

The output of the following C program is __________.

void f1(int a, int b) {
    int c;
    c = a;
    a = b;
    b = c;
}

void f2(int *a, int *b) {
    int c;
    c = *a;
    *a = *b;
    *b = c;
}

int main() {
    int a = 4, b = 5, c = 6;

    f1(a, b);
    f2(&b, &c);

    printf("%d", c - a - b);
}

Answer (official key): -5

Worked solution: in your report after you take this paper.

Q17 · Theory of Computation · MCQ · 1 mark

For any two languages L1L_1 and L2L_2 such that L1L_1 is context-free and L2L_2 is recursively enumerable but not recursive, which of the following is/are necessarily true?

I. L1‾\overline{L_1} is recursive.
II. L2‾\overline{L_2} is recursive.
III. L2L_2 is context-free.
IV. L1∪L2L_1\cup L_2 is recursively enumerable.

  • (A)
    I only
  • (B)
    III only
  • (C)
    III and IV only
  • (D)
    I and IV only

Answer (official key): D

Worked solution: in your report after you take this paper.

Q18 · Computer Networks · MCQ · 1 mark

Which of the following statements is/are FALSE?

I. XML overcomes the limitations in HTML to support a structured way of organizing content.

II. XML specification is not case sensitive while HTML specification is case sensitive.

III. XML supports user-defined tags while HTML uses pre-defined tags.

IV. XML tags need not be closed while HTML tags must be closed.

  • (A)
    II only
  • (B)
    II and IV only
  • (C)
    III and IV only
  • (D)
    I and IV only

Answer (official key): B

Worked solution: in your report after you take this paper.

Q19 · Databases · MCQ · 1 mark

SELECT operation in SQL is equivalent to:

  • (A)
    the selection operation in relational algebra
  • (B)
    the selection operation in relational algebra, except that SELECT in SQL retains duplicates
  • (C)
    the projection operation in relational algebra
  • (D)
    the projection operation in relational algebra, except that SELECT in SQL retains duplicates

Answer (official key): D

Worked solution: in your report after you take this paper.

Q20 · Programming and Data Structures · MCQ · 1 mark

The height of a tree is the length of the longest root-to-leaf path in it.

The maximum and minimum number of nodes in a binary tree of height 5 are:

  • (A)
    63 and 6, respectively
  • (B)
    64 and 5, respectively
  • (C)
    32 and 6, respectively
  • (D)
    31 and 5, respectively

Answer (official key): A

Worked solution: in your report after you take this paper.

Q21 · Algorithms · MCQ · 1 mark

Which one of the following is the recurrence equation for the worst case time complexity of the quicksort algorithm for sorting n (n≥2)n\ (n \ge 2) numbers?

Here cc is a constant.

  • (A)
    T(n)=2T(n/2)+cnT(n)=2T(n/2)+cn
  • (B)
    T(n)=T(n−1)+T(1)+cnT(n)=T(n-1)+T(1)+cn
  • (C)
    T(n)=2T(n−1)+cnT(n)=2T(n-1)+cn
  • (D)
    T(n)=T(n/2)+cnT(n)=T(n/2)+cn

Answer (official key): B

Worked solution: in your report after you take this paper.

Q22 · Calculus · MCQ · 1 mark

If

g(x)=1−xg(x)=1-x

and

h(x)=xx−1,h(x)=\frac{x}{x-1},

then

h(g(x))g(h(x))\frac{h(g(x))}{g(h(x))}

is:

  • (A)
    h(x)g(x)\frac{h(x)}{g(x)}
  • (B)
    −1x-\frac{1}{x}
  • (C)
    g(x)h(x)\frac{g(x)}{h(x)}
  • (D)
    x(1−x)2\frac{x}{(1-x)^2}

Answer (official key): C

Worked solution: in your report after you take this paper.

Q23 · Computer Networks · MCQ · 1 mark

Which one of the following fields of an IP header is NOT modified by a typical IP router?

  • (A)
    Checksum
  • (B)
    Source address
  • (C)
    Time to Live (TTL)
  • (D)
    Length

Answer (official key): B

Worked solution: in your report after you take this paper.

Q24 · Linear Algebra · Numerical · 1 mark

In the LU decomposition of the matrix

[2249],\begin{bmatrix} 2 & 2\\ 4 & 9 \end{bmatrix},

if the diagonal elements of UU are both 1, then the lower diagonal entry l22l_{22} of LL is __________.

Answer (official key): 5

Worked solution: in your report after you take this paper.

Q25 · Operating System · Numerical · 1 mark

The following two functions P1P1 and P2P2 that share a variable BB with an initial value of 2 execute concurrently.

P1() {
    C = B - 1;
    B = 2 * C;
}

P2() {
    D = 2 * B;
    B = D - 1;
}

The number of distinct values that BB can possibly take after the execution is __________.

Answer (official key): 3

Worked solution: in your report after you take this paper.

Q26 · Discrete Mathematics · MCQ · 1 mark

For a set AA, the power set of AA is denoted by 2A2^A.

If

A={5,{6},{7}},A=\{5,\{6\},\{7\}\},

which of the following options are TRUE?

I. ∅∈2A\emptyset\in 2^A
II. ∅⊆2A\emptyset\subseteq 2^A
III. {5,{6}}∈2A\{5,\{6\}\}\in 2^A
IV. [5,{6}]∈2A[5,\{6\}]\in 2^A

  • (A)
    I and III only
  • (B)
    II and III only
  • (C)
    I, II and III only
  • (D)
    I, II and IV only

Answer (official key): C

Worked solution: in your report after you take this paper.

Q27 · Computer Networks · MCQ · 1 mark

Suppose two hosts use a TCP connection to transfer a large file.

Which of the following statements is/are FALSE with respect to the TCP connection?

I. If the sequence number of a segment is mm, then the sequence number of the subsequent segment is always m+1m+1.

II. If the estimated round trip time at any given point of time is tt seconds, then the value of the retransmission timeout is always set to greater than or equal to tt seconds.

III. The size of the advertised window never changes during the course of the TCP connection.

IV. The number of unacknowledged bytes at the sender is always less than or equal to the advertised window.

  • (A)
    III only
  • (B)
    I and III only
  • (C)
    I and IV only
  • (D)
    II and IV only

Answer (official key): B

Read the worked solution

Q28 · Computer Networks · MCQ · 1 mark

Suppose that everyone in a group of NN people wants to communicate secretly with the N−1N-1 others using symmetric key cryptographic systems.

The communication between any two persons should not be decodable by the others in the group.

The number of keys required in the system as a whole to satisfy the confidentiality requirement is:

  • (A)
    2N2N
  • (B)
    N(N−1)N(N-1)
  • (C)
    N(N−1)2\frac{N(N-1)}{2}
  • (D)
    (N−1)2(N-1)^2

Answer (official key): C

Worked solution: in your report after you take this paper.

Q29 · Programming and Data Structures · MCQ · 1 mark

Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s)?

I. 3,5,7,8,15,19,253,5,7,8,15,19,25
II. 5,8,9,12,10,15,255,8,9,12,10,15,25
III. 2,7,10,8,14,16,202,7,10,8,14,16,20
IV. 4,6,7,9,18,20,254,6,7,9,18,20,25

  • (A)
    I and IV only
  • (B)
    II and III only
  • (C)
    II and IV only
  • (D)
    II only

Answer (official key): A

Worked solution: in your report after you take this paper.

Q30 · Operating System · Numerical · 1 mark

Consider a system with byte-addressable memory, 32-bit logical addresses, 4 kilobyte page size and page table entries of 4 bytes each.

The size of the page table in the system in megabytes is __________.

Answer (official key): 4

Read the worked solution

Q31 · Digital Logic · MCQ · 1 mark

Consider a 4-bit Johnson counter with an initial value of 0000.

The counting sequence of this counter is:

  • (A)
    0,1,3,7,15,14,12,8,00,1,3,7,15,14,12,8,0
  • (B)
    0,1,3,5,7,9,11,13,15,00,1,3,5,7,9,11,13,15,0
  • (C)
    0,2,4,6,8,10,12,14,00,2,4,6,8,10,12,14,0
  • (D)
    0,8,12,14,15,7,3,1,00,8,12,14,15,7,3,1,0

Answer (official key): D

Worked solution: in your report after you take this paper.

Q32 · Calculus · MCQ · 1 mark

lim⁡x→∞x1/x\lim_{x\to\infty} x^{1/x}

is:

  • (A)
    ∞\infty
  • (B)
    00
  • (C)
    11
  • (D)
    Not defined

Answer (official key): C

Worked solution: in your report after you take this paper.

Q33 · Databases · MCQ · 1 mark

A file is organized so that the ordering of data records is the same as, or close to, the ordering of data entries in some index.

Then that index is called:

  • (A)
    Dense
  • (B)
    Sparse
  • (C)
    Clustered
  • (D)
    Unclustered

Answer (official key): C

Worked solution: in your report after you take this paper.

Q34 · Discrete Mathematics · MCQ · 1 mark

Which one of the following is NOT equivalent to p↔qp \leftrightarrow q?

  • (A)
    (¬p∨q)∧(p∨¬q)(\neg p \vee q)\wedge(p\vee\neg q)
  • (B)
    (¬p∨q)∧(q⇒p)(\neg p \vee q)\wedge(q\Rightarrow p)
  • (C)
    (¬p∧q)∨(p∧¬q)(\neg p\wedge q)\vee(p\wedge\neg q)
  • (D)
    (¬p∧¬q)∨(p∧q)(\neg p\wedge\neg q)\vee(p\wedge q)

Answer (official key): C

Worked solution: in your report after you take this paper.

Q35 · Computer Networks · MCQ · 1 mark

Not in GATE 2027 syllabus: SMTP, FTP and e-mail protocols

In one of the pairs of protocols given below, both protocols can use multiple TCP connections between the same client and the server.

Which one is that pair?

  • (A)
    HTTP, FTP
  • (B)
    HTTP, TELNET
  • (C)
    FTP, SMTP
  • (D)
    HTTP, SMTP

Answer (official key): A

Worked solution: in your report after you take this paper.

Q36 · Computer Networks · Numerical · 2 marks

Consider a LAN with four nodes S1,S2,S3S_1,S_2,S_3 and S4S_4.

Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot.

A collision is said to have occurred if more than one node transmits in the same slot.

The probabilities of generation of a frame in a time slot by S1,S2,S3S_1,S_2,S_3 and S4S_4 are 0.1,0.2,0.30.1, 0.2, 0.3 and 0.40.4, respectively.

The probability of sending a frame in the first slot without any collision by any of these four stations is __________.

Answer (official key): 0.4 to 0.46

Worked solution: in your report after you take this paper.

Q37 · Theory of Computation · MCQ · 2 marks

Consider the NPDA shown below:

NPDA for Q50

Which one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton?

  • (A)
    10110
  • (B)
    10010
  • (C)
    01010
  • (D)
    01001

Answer (official key): B

Read the worked solution

Q38 · Discrete Mathematics · MCQ · 2 marks

Suppose L={p,q,r,s,t}\mathcal{L}=\{p,q,r,s,t\} is a lattice represented by the following Hasse diagram:

Hasse diagram for Q42

For any x,y∈Lx,y\in\mathcal{L}, not necessarily distinct, x∨yx\vee y and x∧yx\wedge y are join and meet of x,yx,y, respectively.

Let L3={(x,y,z):x,y,z∈L}\mathcal{L}^3=\{(x,y,z):x,y,z\in\mathcal{L}\} be the set of all ordered triplets of elements of L\mathcal{L}.

Let prp_r be the probability that an element (x,y,z)∈L3(x,y,z)\in\mathcal{L}^3 chosen equiprobably satisfies

x∨(y∧z)=(x∨y)∧(x∨z).x\vee(y\wedge z)=(x\vee y)\wedge(x\vee z).

Then:

  • (A)
    pr=0p_r=0
  • (B)
    pr=1p_r=1
  • (C)
    0<pr≤150<p_r\le\frac{1}{5}
  • (D)
    15<pr<1\frac{1}{5}<p_r<1

Answer (official key): D

Worked solution: in your report after you take this paper.

Q39 · Programming and Data Structures · MCQ · 2 marks

Consider a max heap, represented by the array:

40, 30, 20, 10, 15, 16, 17, 8, 4.40,\ 30,\ 20,\ 10,\ 15,\ 16,\ 17,\ 8,\ 4.
Array Index123456789
Value4030201015161784

Now consider that a value 35 is inserted into this heap. After insertion, the new heap is:

  • (A)
    40,30,20,10,15,16,17,8,4,3540,30,20,10,15,16,17,8,4,35
  • (B)
    40,35,20,10,30,16,17,8,4,1540,35,20,10,30,16,17,8,4,15
  • (C)
    40,30,20,10,35,16,17,8,4,1540,30,20,10,35,16,17,8,4,15
  • (D)
    40,35,20,10,15,16,17,8,4,3040,35,20,10,15,16,17,8,4,30

Answer (official key): B

Worked solution: in your report after you take this paper.

Q40 · Discrete Mathematics · MCQ · 2 marks

Let ana_n represent the number of bit strings of length nn containing two consecutive 1s.

What is the recurrence relation for ana_n?

  • (A)
    an−2+an−1+2n−2a_{n-2}+a_{n-1}+2^{n-2}
  • (B)
    an−2+2an−1+2n−2a_{n-2}+2a_{n-1}+2^{n-2}
  • (C)
    2an−2+an−1+2n−22a_{n-2}+a_{n-1}+2^{n-2}
  • (D)
    2an−2+2an−1+2n−22a_{n-2}+2a_{n-1}+2^{n-2}

Answer (official key): A

Worked solution: in your report after you take this paper.

Q41 · Calculus · Numerical · 2 marks

Evaluate:

∑x=1991x(x+1)\sum_{x=1}^{99}\frac{1}{x(x+1)}

The value is __________.

Answer (official key): 0.99

Worked solution: in your report after you take this paper.

Q42 · Discrete Mathematics · MCQ · 2 marks

The binary operator ≠\ne is defined by the following truth table.

ppqqp≠qp \ne q
000
011
101
110

Which one of the following is true about the binary operator ≠\ne?

  • (A)
    Both commutative and associative
  • (B)
    Commutative but not associative
  • (C)
    Not commutative but associative
  • (D)
    Neither commutative nor associative

Answer (official key): A

Worked solution: in your report after you take this paper.

Q43 · Compiler Design · Numerical · 2 marks

The least number of temporary variables required to create a three-address code in static single assignment form for the expression

q+r3+s−t∗5+u∗vwq+\frac{r}{3}+s-t*5+\frac{u*v}{w}

is __________.

Answer (official key): 8

Worked solution: in your report after you take this paper.

Q44 · Digital Logic · MCQ · 2 marks

Consider the operations

f(X,Y,Z)=X′YZ+XY′+Y′Z′f(X,Y,Z)=X'YZ+XY'+Y'Z'

and

g(X,Y,Z)=X′YZ+X′YZ′+XY.g(X,Y,Z)=X'YZ+X'YZ'+XY.

Which one of the following is correct?

  • (A)
    Both {f}\{f\} and {g}\{g\} are functionally complete
  • (B)
    Only {f}\{f\} is functionally complete
  • (C)
    Only {g}\{g\} is functionally complete
  • (D)
    Neither {f}\{f\} nor {g}\{g\} is functionally complete

Answer (official key): B

Worked solution: in your report after you take this paper.

Q45 · Discrete Mathematics · Numerical · 2 marks

Let GG be a connected planar graph with 10 vertices.

If the number of edges on each face is three, then the number of edges in GG is __________.

Answer (official key): 24

Worked solution: in your report after you take this paper.

Q46 · Theory of Computation · Numerical · 2 marks

Consider the DFAs MM and NN given below.

DFAs M and N for Q49

The number of states in a minimal DFA that accepts the language

L(M)∩L(N)L(M)\cap L(N)

is __________.

Answer (official key): 1

Worked solution: in your report after you take this paper.

Q47 · Compiler Design · MCQ · 2 marks

A variable xx is said to be live at a statement SiS_i in a program if the following three conditions hold simultaneously:

  1. There exists a statement SjS_j that uses xx.
  2. There is a path from SiS_i to SjS_j in the flow graph corresponding to the program.
  3. The path has no intervening assignment to xx including at SiS_i and SjS_j.

Consider the control flow graph below:

Control flow graph for Q46

The variables which are live both at the statement in basic block 2 and at the statement in basic block 3 of the above control flow graph are:

  • (A)
    p,s,up,s,u
  • (B)
    r,s,ur,s,u
  • (C)
    r,ur,u
  • (D)
    q,vq,v

Answer (official key): C

Worked solution: in your report after you take this paper.

Q48 · Databases · Numerical · 2 marks

Consider an Entity-Relationship (ER) model in which entity sets E1E_1 and E2E_2 are connected by an m:nm:n relationship R12R_{12}.

E1E_1 and E3E_3 are connected by a 1:n1:n relationship R13R_{13}, where 1 is on the side of E1E_1 and nn is on the side of E3E_3.

E1E_1 has two single-valued attributes a11a_{11} and a12a_{12}, of which a11a_{11} is the key attribute.

E2E_2 has two single-valued attributes a21a_{21} and a22a_{22}, of which a21a_{21} is the key attribute.

E3E_3 has two single-valued attributes a31a_{31} and a32a_{32}, of which a31a_{31} is the key attribute.

The relationships do not have any attributes.

If a relational model is derived from the above ER model, then the minimum number of relations that would be generated if all the relations are in 3NF is __________.

Answer (official key): 4

Worked solution: in your report after you take this paper.

Q49 · Programming and Data Structures · Numerical · 2 marks

Consider the following C program segment.

while (first <= last)
{
    if (array[middle] < search)
        first = middle + 1;
    else if (array[middle] == search)
        found = TRUE;
    else
        last = middle - 1;

    middle = (first + last) / 2;
}

if (first > last)
    notPresent = TRUE;

The cyclomatic complexity of the program segment is __________.

Answer (official key): 5

Worked solution: in your report after you take this paper.

Q50 · Computer Networks · Numerical · 2 marks

Suppose that the stop-and-wait protocol is used on a link with a bit rate of 64 kilobits per second and 20 milliseconds propagation delay.

Assume that the transmission time for the acknowledgement and the processing time at nodes are negligible.

Then the minimum frame size in bytes to achieve a link utilization of at least 50% is __________.

Answer (official key): 160

Worked solution: in your report after you take this paper.

Q51 · Algorithms · Numerical · 2 marks

The graph shown below has 8 edges with distinct integer edge weights.

The minimum spanning tree (MST) is of weight 36 and contains the edges:

{(A,C),(B,C),(B,E),(E,F),(D,F)}.\{(A,C),(B,C),(B,E),(E,F),(D,F)\}.

The edge weights of only those edges which are in the MST are given in the figure shown below.

Weighted graph for Q63

The minimum possible sum of weights of all 8 edges of this graph is __________.

Answer (official key): 69

Worked solution: in your report after you take this paper.

Q52 · Operating System · Numerical · 2 marks

Not in GATE 2027 syllabus: Secondary storage (magnetic disk)

Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM).

It has 600 sectors per track and each sector can store 512 bytes of data.

Consider a file stored in the disk. The file contains 2000 sectors.

Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation.

The total time, in milliseconds, needed to read the entire file is __________.

Answer (official key): 14020

Worked solution: in your report after you take this paper.

Q53 · Computer Organization and Architecture · Numerical · 2 marks

Consider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four.

The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 2 gigahertz.

Assume that there are no stalls in the pipeline.

The speedup achieved in this pipelined processor is __________.

Answer (official key): 3.2

Worked solution: in your report after you take this paper.

Q54 · Calculus · Numerical · 2 marks

Evaluate:

∫1/π2/πcos⁡(1/x)x2 dx\int_{1/\pi}^{2/\pi} \frac{\cos(1/x)}{x^2}\,dx

The value is __________.

Answer (official key): -1

Worked solution: in your report after you take this paper.

Q55 · Operating System · Numerical · 2 marks

Suppose the following disk request sequence, track numbers, for a disk with 100 tracks is given:

45, 20, 90, 10, 50, 60, 80, 25, 70.45,\ 20,\ 90,\ 10,\ 50,\ 60,\ 80,\ 25,\ 70.

Assume that the initial position of the R/W head is on track 50.

The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN, Elevator, algorithm, assuming that SCAN algorithm moves towards 100 when it starts execution, is __________ tracks.

Answer (official key): 10

Worked solution: in your report after you take this paper.

Q56 · Programming and Data Structures · MCQ · 2 marks

Consider the following pseudo code, where xx and yy are positive integers.

begin
    q := 0
    r := x

    while r >= y do
    begin
        r := r - y
        q := q + 1
    end
end

The postcondition that needs to be satisfied after the program terminates is:

  • (A)
    {r=qx+y∧r<y}\{r=qx+y \wedge r<y\}
  • (B)
    {x=qy+r∧r<y}\{x=qy+r \wedge r<y\}
  • (C)
    {y=qx+r∧0<r<y}\{y=qx+r \wedge 0<r<y\}
  • (D)
    {q+1<r−y∧y>0}\{q+1<r-y \wedge y>0\}

Answer (official key): B

Worked solution: in your report after you take this paper.

Q57 · Linear Algebra · MCQ · 2 marks

Consider the following 2×22\times2 matrix AA, where two elements are unknown and are marked by aa and bb.

A=[14ba]A= \begin{bmatrix} 1 & 4\\ b & a \end{bmatrix}

The eigenvalues of this matrix are −1-1 and 77.

What are the values of aa and bb?

  • (A)
    a=6, b=4a=6,\ b=4
  • (B)
    a=4, b=6a=4,\ b=6
  • (C)
    a=3, b=5a=3,\ b=5
  • (D)
    a=5, b=3a=5,\ b=3

Answer (official key): D

Worked solution: in your report after you take this paper.

Q58 · Algorithms · MCQ · 2 marks

Let G=(V,E)G=(V,E) be a simple undirected graph, and ss be a particular vertex in it called the source.

For x∈Vx\in V, let d(x)d(x) denote the shortest distance in GG from ss to xx.

A breadth-first search (BFS) is performed starting at ss. Let TT be the resultant BFS tree.

If (u,v)(u,v) is an edge of GG that is not in TT, then which one of the following CANNOT be the value of

d(u)−d(v)?d(u)-d(v)?
  • (A)
    −1-1
  • (B)
    00
  • (C)
    11
  • (D)
    22

Answer (official key): D

Worked solution: in your report after you take this paper.

Q59 · Algorithms · MCQ · 2 marks

Consider the following C function.

int fun1(int n) {
    int i, j, k, p, q = 0;

    for (i = 1; i < n; ++i) {
        p = 0;

        for (j = n; j > 1; j = j / 2)
            ++p;

        for (k = 1; k < p; k = k * 2)
            ++q;
    }

    return q;
}

Which one of the following most closely approximates the return value of the function fun1?

  • (A)
    n3n^3
  • (B)
    n(log⁡n)2n(\log n)^2
  • (C)
    nlog⁡nn\log n
  • (D)
    nlog⁡(log⁡n)n\log(\log n)

Answer (official key): D

Worked solution: in your report after you take this paper.

Q60 · Programming and Data Structures · MCQ · 2 marks

An algorithm performs (log⁡N)1/2(\log N)^{1/2} find operations, NN insert operations, (log⁡N)1/2(\log N)^{1/2} delete operations, and (log⁡N)1/2(\log N)^{1/2} decrease-key operations on a set of data items with keys drawn from a linearly ordered set.

For a delete operation, a pointer is provided to the record that must be deleted.

For the decrease-key operation, a pointer is provided to the record that has its key decreased.

Which one of the following data structures is the most suited for the algorithm to use, if the goal is to achieve the best total asymptotic complexity considering all the operations?

  • (A)
    Unsorted array
  • (B)
    Min-heap
  • (C)
    Sorted array
  • (D)
    Sorted doubly linked list

Answer (official key): A

Worked solution: in your report after you take this paper.

Q61 · Digital Logic · MCQ · 2 marks

A positive edge-triggered D flip-flop is connected to a positive edge-triggered JK flip-flop as follows.

The QQ output of the D flip-flop is connected to both the JJ and KK inputs of the JK flip-flop, while the QQ output of the JK flip-flop is connected to the input of the D flip-flop.

Initially, the output of the D flip-flop is set to logic one and the output of the JK flip-flop is cleared.

Which one of the following is the bit sequence, including the initial state, generated at the QQ output of the JK flip-flop when the flip-flops are connected to a free-running common clock?

Assume that J=K=1J=K=1 is the toggle mode and J=K=0J=K=0 is the state-holding mode of the JK flip-flop. Both the flip-flops have non-zero propagation delays.

  • (A)
    0110110...
  • (B)
    0100100...
  • (C)
    011101110...
  • (D)
    011001100...

Answer (official key): A

Worked solution: in your report after you take this paper.

Q62 · Operating System · Numerical · 2 marks

Consider a uniprocessor system executing three tasks T1T_1, T2T_2 and T3T_3, each of which is composed of an infinite sequence of jobs, or instances, which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively.

The priority of each task is the inverse of its period, and the available tasks are scheduled in order of priority, with the highest priority task scheduled first.

Each instance of T1T_1, T2T_2 and T3T_3 requires an execution time of 1, 2 and 4 milliseconds, respectively.

Given that all tasks initially arrive at the beginning of the first millisecond and task preemptions are allowed, the first instance of T3T_3 completes its execution at the end of __________ milliseconds.

Answer (official key): 12

Worked solution: in your report after you take this paper.

Q63 · Operating System · MCQ · 2 marks

Consider a main memory with five page frames and the following sequence of page references:

3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3.3,\ 8,\ 2,\ 3,\ 9,\ 1,\ 6,\ 3,\ 8,\ 9,\ 3,\ 6,\ 2,\ 1,\ 3.

Which one of the following is true with respect to page replacement policies First-In-First-Out (FIFO) and Least Recently Used (LRU)?

  • (A)
    Both incur the same number of page faults
  • (B)
    FIFO incurs 2 more page faults than LRU
  • (C)
    LRU incurs 2 more page faults than FIFO
  • (D)
    FIFO incurs 1 more page fault than LRU

Answer (official key): A

Worked solution: in your report after you take this paper.

Q64 · Databases · Numerical · 2 marks

Consider the following relations.

Student

Roll_NoStudent_Name
1Raj
2Rohit
3Raj

Performance

Roll_NoCourseMarks
1Math80
1English70
2Math75
3English80
2Physics65
3Math80

Consider the following SQL query.

SELECT S.Student_Name, SUM(P.Marks)
FROM Student S, Performance P
WHERE S.Roll_No = P.Roll_No
GROUP BY S.Student_Name;

The number of rows that will be returned by the SQL query is __________.

Answer (official key): 2

Worked solution: in your report after you take this paper.

Q65 · Programming and Data Structures · MCQ · 2 marks

What is the output of the following C code?

Assume that the address of x is 2000 in decimal and an integer requires four bytes of memory.

int main() {
    unsigned int x[4][3] = {
        {1, 2, 3},
        {4, 5, 6},
        {7, 8, 9},
        {10, 11, 12}
    };

    printf("%u, %u, %u", x+3, *(x+3), *(x+2)+3);
}
  • (A)
    2036, 2036, 2036
  • (B)
    2012, 4, 2204
  • (C)
    2036, 10, 10
  • (D)
    2012, 4, 6

Answer (official key): A

Worked solution: in your report after you take this paper.