Computer Science Gate 2016 Set 2 Questions



Ques 1Aptitude

All hill-stations have a lake. Ooty has two lakes. Which of the statement(s) below is/are logically valid and can be inferred from the above sentences?

(i) Ooty is not a hill-station.
(ii) No hill-station can have more than one lake.

a) (i) only
b) (ii) only
c) both (i) and (ii)
d) neither (i) nor (ii)


Apititude is the correct answer.




Ques 2Aptitude

Computers were invented for performing only high-end useful computations. However, it is no understatement that they have taken over our world today. The internet, for example, is ubiquitous. Many believe that the internet itself is an unintended consequence of the original invention. With the advent of mobile computing on our phones, a whole new dimension is now enabled. One is left wondering if all these developments are good or, more importantly, required. Which of the statement(s) below is/are logically valid and can be inferred from the above paragraph?

(i) The author believes that computers are not good for us.
(ii) Mobile computers and the internet are both intended inventions

a) (i) only
b) (ii) only
c) both (i) and (ii)
d) neither (i) nor (ii)


Apititude is the correct answer.




Ques 3Aptitude

Among 150 faculty members in an institute, 55 are connected with each other through Facebook ® and 85 are connected through WhatsApp ® . 30 faculty members do not have Facebook ® or WhatsApp ® accounts. The number of faculty members connected only through Facebook ® accounts is ______________.

a) 35
b) 45
c) 65
d) 90


Apititude is the correct answer.




Ques 4Aptitude

Pick the odd one from the following options.

a) CADBE
b) JHKIL
c) XVYWZ
d) ONPMQ


Apititude is the correct answer.




Ques 5Aptitude

Find the odd one in the following group of words.

mock, deride, praise, jeer

a) mock
b) deride
c) jeer
d) praise


Apititude is the correct answer.




Ques 6Aptitude

Nobody knows how the Indian cricket team is going to cope with the difficult and seamer-friendly wickets in Australia.

Choose the option which is closest in meaning to the underlined phrase in the above sentence.

a) put up with
b) put in with
c) put down to
d) put up against


Apititude is the correct answer.




Ques 7Aptitude

The man who is now Municipal Commissioner worked as ______________.

a) the security guard at a university
b) a security guard at the university
c) a security guard at university
d) the security guard at the university


Apititude is the correct answer.




Ques 8Automata

The number of states in the minimum sized DFA that accepts the language defined by the regular expression

(0+1)*(0+1)(0+1)*


is __________________


a is the correct answer.




Ques 9Automata

A student wrote two context-free grammars G1 and G2 for generating a single C-like array declaration. The dimension of the array is at least one. For example,

int a[10][3];
The grammars use D as the start symbol, and use six terminal symbols int ; id [ ] num.

Grammar G1
D → int L;
L → id [E
E → num]
E → num] [E

Grammar G2
D → int L;
L → id E
E → E[num]
E → [num]

Which of the grammars correctly generate the declaration mentioned above?

a) Both G1 and G2
b) Only G1
c) Only G2
d) Neither G1 nor G2


CFG is the correct answer.




Ques 10Automata

Which one of the following grammars is free from left recursion?

a) S → AB
A → Aa | b
B → c
b) S → Ab | Bb | c
A → Bd | ε
B → e
c) S → Aa | B
A → Bb | Sc | ε
B → d
d) S → Aa | Bb | c
A → Bd | ε
B → Ae | ε


Grammar is the correct answer.




Ques 11Automata

Consider the following languages.

L1 = {(M) | M takes at least 2016 steps on some input},
L2 = {(M) | M takes at least 2016 steps on all inputs} and
L3 = {(M) | M accepts ε},

where for each Turing machine M, denotes a specific encoding of M. Which one of the following is TRUE?

a) L1 is recursive and L2, L3 are not recursive
b) L2 is recursive and L1, L3 are not recursive
c) L1, L2 are recursive and L3 is not recursive
d) L1, L2,L3 are recursive


Turing Machine is the correct answer.




Ques 12Automata

Consider the following languages:

L1= {anbmcn+m : m, n >= 1}
L2= {anbnc2n : n >= 1}

Which one of the following is TRUE?

a) Both L1 and L2 are context-free.
b) L1 is context-free while L2 is not context-free.
c) L2 is context-free while L1 is not context-free.
d) Neither L1 nor L2 is context-free.


CFG is the correct answer.




Ques 13Automata

Consider the following two statements:

I. If all states of an NFA are accepting states then the language accepted by the NFA is Σ* .
II. There exists a regular language A such that for all languages B, A ∩ B is regular.

Which one of the following is CORRECT?

a) Only I is true
b) Only II is true
c) Both I and II are true
d) Both I and II are false


DFA is the correct answer.




Ques 14Automata

Consider the following types of languages:

L1 Regular,
L2: Context-free,
L3: Recursive,
L4: Recursively enumerable.

Which of the following is/are TRUE?

I. L3' U L4 is recursively enumerable
II. L2 U L3 is recursive
III. L1* U L2 is context-free
IV. L1 U L2' is context-free

a) I only
b) I and III only
c) I and IV only
d) I, II and III only


Languages is the correct answer.




Ques 15Automata

Language L1 is defined by the grammar:
S1 -> aS1b | ε
Language L2 is defined by the grammar:
S2 -> abS2 | ε
Consider the following statements:

P: L1 is regular
Q: L2 is regular

Which one of the following is TRUE?

a) Both P and Q are true
b) P is true and Q is false
c) P is false and Q is true
d) Both P and Q are false


Regular Grammar is the correct answer.




Ques 16C

Consider the following program:

int f(int *p, int n)
{
    if (n <= 1) return 0;
    else return max(f(p+1,n-1),p[0]-p[1]);
}
int main()
{
    int a[] = {3,5,2,6,4};
    printf("%d", f(a,5));
}


Note: max(x,y) returns the maximum of x and y.

The value printed by this program is_________-


a is the correct answer.




Ques 17C

The value printed by the following program is____________

void f(int* p, int m)
{
    m = m + 5;
    *p = *p + m;
    return;
}
void main()
{
    int i=5, j=10;
    f(&i, j);
    printf("%d", i+j);
}


a is the correct answer.




Ques 18C

The following function computes XY for positive integers X and Y.

int exp(int X, int Y)
{
    int res = 1, a = X, b = Y;
    while ( b != 0 )
    {
        if ( b%2 == 0)
        {
            a = a*a;
            b = b/2;
        }
        else
        {
            res = res*a;
            b = b-1;
        }
    }
    return res;
}

Which one of the following conditions is TRUE before every iteration of the loop

a) XY= ab
b) (res ∗ a) Y = (res ∗ X) b
c) XY = res ∗ ab
d) XY = (res ∗ a) b


C Code is the correct answer.




Ques 19COA

Consider a 3 GHz (gigahertz) processor with a three-stage pipeline and stage latencies τ1, τ2, and τ3 such that τ1 = 3τ2/4 = 2τ3. If the longest pipeline stage is split into two pipeline stages of equal latency, the new frequency is _________ GHz, ignoring delays in the pipeline registers.


a is the correct answer.




Ques 20COA

Suppose the functions F and G can be computed in 5 and 3 nanoseconds by functional units UF and UG , respectively. Given two instances of UF and two instances of UG , it is required to implement the computation F(G(Xi )) for 1 <= i <= 10. ignoring all other delays, the minimum time required to complete this computation is ________________ nanoseconds


a is the correct answer.




Ques 21COA

A processor has 40 distinct instructions and 24 general purpose registers. A 32-bit instruction word has an opcode, two register operands and an immediate operand. The number of bits available for the immediate operand field is ____________


a is the correct answer.




Ques 22Compiler

Match the following

(P) Lexical analysis (i)Leftmost derivation
(Q) Top down parsing (ii) Type checking
(R) Semantic analysis (iii) Regular expressions
(S) Runtime environments (iv) Activation records

a) P ↔ i, Q ↔ ii, R ↔ iv, S ↔ iii
b) P ↔ iii, Q ↔ i, R ↔ ii, S ↔ iv
c) P ↔ ii, Q ↔ iii, R ↔ i, S ↔ iv
d) P ↔ iv, Q ↔ i, R ↔ ii, S ↔ iii


Phase of Compiler is the correct answer.




Ques 23Computer Network

Consider a 128×103 bits/second satellite communication link with one-way propagation delay of 150 milliseconds. Selective retransmission (repeat) protocol is used on this link to send data with a frame size of 1 kilobyte. Neglect the transmission time of acknowledgment. The minimum number of bits required for the sequence number field to achieve 100% utilization is ___________


a is the correct answer.




Ques 24Computer Network

A network has a data transmission bandwidth of 20 × 106 bits per second. It uses CSMA/CD in the MAC layer. The maximum signal propagation time from one node to another node is 40 microseconds. The minimum size of a frame in the network is _________


a is the correct answer.




Ques 25Computer Network

For the IEEE 802.11 MAC protocol for wireless communication, which of the following statements is/are TRUE?

I. At least three non-overlapping channels are available for transmissions.
II. The RTS-CTS mechanism is used for collision detection.
III. Unicast frames are ACKed.

a) All I, II, and III
b) I and III only
c) II and III only
d) II only


Computer Network is the correct answer.




Ques 26Computer Network

Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted.

a) HTTP GET request, DNS query, TCP SYN
b) DNS query, HTTP GET request, TCP SYN
c) DNS query, TCP SYN, HTTP GET request
d) TCP SYN, DNS query, HTTP GET request


Computer Network is the correct answer.




Ques 27Computer Network

In an Ethernet local area network, which one of the following statements is TRUE ?

a) A station stops to sense the channel once it starts transmitting a frame.
b) The purpose of the jamming signal is to pad the frames that are smaller than the minimum frame size.
c) A station continues to transmit the packet even after the collision is detected.
d) The exponential backoff mechanism reduces the probability of collision on retransmissions


Networking is the correct answer.




Ques 28Computer Network

Anarkali digitally signs a message and sends it to Salim. Verification of the signature by Salim requires

a) Anarkali’s public key.
b) Salim’s public key.
c) Salim’s private key.
d) Anarkali’s private key.


Digital Signature is the correct answer.




Ques 29DAA

Let A1, A2, A3, and A4 be four matrices of dimensions 10 x 5, 5 x 20, 20 x 10, and 10 x 5, respectively. The minimum number of scalar multiplications required to find the product A1 A2A3A4 using the basic matrix multiplication method is______________.


a is the correct answer.




Ques 30DAA

Breadth First Search (BFS) is started on a binary tree beginning from the root vertex. There is a vertex t at a distance four from the root. If t is the n-th vertex in this BFS traversal, then the maximum possible value of n is ________


a is the correct answer.




Ques 31DAA

N items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provided to the record on which the operation is to be performed.

An algorithm performs the following operations on the list in this order: Θ(N) delete, O(log N) insert, O(log N) find, and Θ(N) decrease-key What is the time complexity of all these operations put together

a) O(Log2N)
b) O(N)
c) O(N2)
d) Θ(N2 Log N)


Sorting Searching is the correct answer.




Ques 32DAA

The Floyd-Warshall algorithm for all-pair shortest paths computation is based on

a) Greedy paradigm.
b) Divide-and-Conquer paradigm.
c) Dynamic Programming paradigm.
d) neither Greedy nor Divide-and-Conquer nor Dynamic Programming paradigm.


Graph Theory is the correct answer.




Ques 33DAA

Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following are TRUE ?

I. Quicksort runs in Θ(n2) time
II. Bubblesort runs in Θ(n2) time
III. Mergesort runs in Θ(n) time
IV. Insertion sort runs in Θ(n) time

a) I and II only
b) I and III only
c) II and IV only
d) I and IV only


Complexity is the correct answer.




Ques 34Data Structure

The number of ways in which the numbers 1, 2, 3, 4, 5, 6, 7 can be inserted in an empty binary search tree, such that the resulting tree has height 6, is _____________.
Note: The height of a tree with a single node is 0.


a is the correct answer.




Ques 35Data Structure

A complete binary min-heap is made by including each integer in [1, 1023] exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth 0. The maximum depth at which integer 9 can appear is _____________


a is the correct answer.




Ques 36Data Structure

In an adjacency list representation of an undirected simple graph G = (V, E), each edge (u, v) has two adjacency list entries: [v] in the adjacency list of u, and [u] in the adjacency list of v. These are called twins of each other. A twin pointer is a pointer from an adjacency list entry to its twin. If |E| = m and |V| = n, and the memory size is not a constraint, what is the time complexity of the most efficient algorithm to set the twin pointer in each entry in each adjacency list?

a) Θ(n2)
b) Θ(m+n)
c) Θ(m2)
d) Θ(n4)


Graph Theory is the correct answer.




Ques 37Data Structure

Consider the following New-order strategy for traversing a binary tree:

Visit the root;
Visit the right subtree using New-order
Visit the left subtree using New-order

The New-order traversal of the expression tree corresponding to the reverse polish expression 3 4 * 5 - 2 ˆ 6 7 * 1 + - is given by:

a) + - 1 6 7 * 2 ˆ 5 - 3 4 *
b) - + 1 * 6 7 ˆ 2 - 5 * 3 4
c) - + 1 * 7 6 ˆ 2 - 5 * 4 3
d) 1 7 6 * + 2 5 4 3 * - ˆ -


Binary Tree is the correct answer.




Ques 38Data Structure

B+ Trees are considered BALANCED because

a) the lengths of the paths from the root to all leaf nodes are all equal.
b) the lengths of the paths from the root to all leaf nodes differ from each other by at most 1.
c) the number of children of any two non-leaf sibling nodes differ by at most 1.
d) the number of records in any two leaf nodes differ by at most 1.


B+ Tree is the correct answer.




Ques 39DBMS

Consider the following database schedule with two transactions, T1 and T2.

S = r2(X); r1(X); r2(Y); w1(X); r1(Y); w2(X); a1; a2;

where ri(Z) denotes a read operation by transaction Ti on a variable Z, wi(Z) denotes a write operation by Ti on a variable Z and ai denotes an abort by transaction Ti . Which one of the following statements about the above schedule is TRUE?

a) S is non-recoverable
b) S is recoverable, but has a cascading abort
c) S does not have a cascading abort
d) S is strict


Transactions is the correct answer.




Ques 40DBMS

Suppose a database schedule S involves transactions T1, ....Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?

a) Topological order
b) Depth-first order
c) Breadth-first order
d) Ascending order of transaction indices


Transactions is the correct answer.




Ques 41Digital Logic

The width of the physical address on a machine is 40 bits. The width of the tag field in a 512 KB 8-way set associative cache is ____________ bits.


a is the correct answer.




Ques 42Digital Logic

Let X be the number of distinct 16-bit integers in 2’s complement representation. Let Y be the number of distinct 16-bit integers in sign magnitude representation. Then X −Y is _________


a is the correct answer.




Ques 43Digital Logic

Consider an eight-bit ripple-carry adder for computing the sum of A and B, where A and B are integers represented in 2’s complement form. If the decimal value of A is one, the decimal value of B that leads to the longest latency for the sum to stabilize is _____________


a is the correct answer.




Ques 44Digital Logic

Let, x1⊕x2⊕x3⊕x4= 0 where x1, x2, x3, x4 are Boolean variables, and ⊕ is the XOR operator. Which one of the following must always be TRUE ?

a) x1x2x3x4=0
b) x1x3+x4=0
c) x'1⊕x'3=x'2⊕x'4
d) x1+x2+x3+x4=0


Logic Gates is the correct answer.




Ques 45Discrete Mathematics

The minimum number of colours that is sufficient to vertex-colour any planar graph is _______________


a is the correct answer.




Ques 46Discrete Mathematics

Consider the following expressions:

(i) false
(ii) Q
(iii) true
(iv) P ∨ Q
(v) ¬Q ∨ P

The number of expressions given above that are logically implied by P ∧ (P ⇒ Q) is ______________


a is the correct answer.




Ques 47Discrete Mathematics

Consider a set U of 23 different compounds in a Chemistry lab. There is a subset S of U of 9 compounds, each of which reacts with exactly 3 compounds of U. Consider the following statements:

I. Each compound in U S reacts with an odd number of compounds.
II. At least one compound in U S reacts with an odd number of compounds.
III. Each compound in U S reacts with an even number of compounds.

Which one of the above statements is ALWAYS TRUE?

a) Only I
b) Only II
c) Only III
d) None


Graph Theory is the correct answer.




Ques 48Discrete Mathematics

Which one of the following well-formed formulae in predicate calculus is NOT valid?

a) (∀x p(x) ⇒ ∀x q(x)) ⇒ (∃x¬p(x) ∨ ∀x q(x))
b) (∃x p(x) ∨ ∃x q(x)) ⇒ ∃x (p(x) ∨ q(x))
c) ∃x (p(x) ∧ q(x)) ⇒ (∃x p(x) ∧ ∃x q(x))
d) ∀x (p(x) ∨ q(x)) ⇒ (∀x p(x) ∨ ∀x q(x))


Pridicate Calculus is the correct answer.




Ques 49Discrete Mathematics

A binary relation R on N x N is defined as follows:

(a, b) R (c, d) if a <= c or b <= d.

Consider the following propositions:

P: R is reflexive
Q: R is transitive

Which one of the following statements is TRUE?

a) Both P and Q are true.
b) P is true and Q is false.
c) P is false and Q is true.
d) Both P and Q are false.


Set Theory is the correct answer.




Ques 50Mathematics

Suppose that the eigenvalues of matrix A are 1, 2, 4. The determinant of (A−1)T is _________.


a is the correct answer.




Ques 51Mathematics

Suppose that a shop has an equal number of LED bulbs of two different types. The probability of an LED bulb lasting more than 100 hours given that it is of Type 1 is 0.7, and given that it is of Type 2 is 0.4. The probability that an LED bulb chosen uniformly at random lasts more than 100 hours is_________.


a is the correct answer.




Ques 52Mathematics

Let f (x) be a polynomial and g(x) = f^^(x) be its derivative. If the degree of (f(x) + f(−x)) is 10, then the degree of (g(x) − g(−x)) is ___________ .


a is the correct answer.




Ques 53Mathematics

The value of the expression 1399(mod 17), in the range 0 to 16, is

a) 4
b) 13
c) 8
d) 16


Number System is the correct answer.




Ques 54Mathematics

Consider the systems, each consisting of m linear equations in n variables.

I. If m < n, then all such systems have a solution
II. If m > n, then none of these systems has a solution
III. If m = n, then there exists a system which has a solution

Which one of the following is CORRECT?

a) I, II and III are true
b) Only II and III are true
c) Only III is true
d) None of them is true


Linear Algebra is the correct answer.




Ques 55OS

Consider a non-negative counting semaphore S. The operation P(S) decrements S, and V(S) increments S. During an execution, 20 P(S) operations and 12 V(S) operations are issued in some order. The largest initial value of S for which at least one P(S) operation will remain blocked is ________.


a is the correct answer.




Ques 56OS

Consider the following processes, with the arrival time and the length of the CPU burst given in milliseconds. The scheduling algorithm used is preemptive shortest remaining-time first.

Process Arrival Time Burst Time
P1 0 10
P2 3 6
P3 7 1
P3 8 3

The average turn around time of these processes is ___________ milliseconds.


a is the correct answer.




Ques 57OS

Consider the following two-process synchronization solution.

Process 0
---------
Entry: loop while (turn == 1);
(critical section)
Exit: turn = 1;

Process 1
----------
Entry: loop while (turn == 0);
(critical section)
Exit: turn = 0;

The shared variable turn is initialized to zero. Which one of the following is TRUE?

a) This is a correct two-process synchronization solution.
b) This solution violates mutual exclusion requirement.
c) This solution violates progress requirement.
d) This solution violates bounded wait requirement.


process synchronization is the correct answer.




Ques 58OS

In which one of the following page replacement algorithms it is possible for the page fault rate to increase even when the number of allocated frames increases?

a) LRU (Least Recently Used)
b) OPT (Optimal Page Replacement)
c) MRU (Most Recently Used)
d) FIFO (First In First Out)


Page Replacement Algorithm is the correct answer.