Computer Science (GATE Exam) 2012 - Previous Question Paper Solution

Description: GATE Exam Previous Year Question Paper Solution Computer Science(CS) - 2012
Number of Questions: 64
Created by:
Tags: Previous Year Paper Computer Science GATE CS
Attempted 0/63 Correct 0 Score 0

Register renaming is done is pipelined processors

  1. as an alternative to register allocation at compile time

  2. for efficient access to function parameters and local variables

  3. to handle certain kinds of hazards

  4. as part of address translation


Correct Option: C
Explanation:

Register renaming is done to eliminate WAR/WAW hazards.

Given the language L = {ab, aa, baa}, which of the following strings are in L*? 1) abaabaaabaa 2) aaaabaaaa 3) baaaaabaaaab 4) baaaaabaa

  1. 1, 2 and 3

  2. 2, 3 and 4

  3. 1, 2 and 4

  4. 1, 3 and 4


Correct Option: C
Explanation:

L = {ab, aa, baa} Let S1 = ab, S2 = aaand S3 = baa abaabaaabaa can be written as S1S2S3S1S2 aaaabaaaa can be written as S1S1S3S1 baaaaabaa can be written as S3S2S1S2

In the IPv4 addressing format, the number of networks allowed under Class C addresses is

  1. 214

  2. 2

  3. 221

  4. 224


Correct Option: C
Explanation:

For class C address, size of network field is 24 bits. But first 3 bits are fixed as 110; hence total number of networks possible is 221.

The amount of ROM needed to implement a 4 bit multiplier is

  1. 64 bits

  2. 128 bits

  3. 1 Kbit

  4. 2 Kbits


Correct Option: D
Explanation:

For a 4 bit multiplier, there are 24 ×24 = 28 = 256 combinations. Output will contain 8 bits. So, the amount of ROM needed is 28 × 8 bits = 2 Kbits.

Which of the following transport layer protocols is used to support electronic mail?

  1. SMTP

  2. IP

  3. TCP

  4. UDP


Correct Option: C
Explanation:

E-mail uses SMTP (an application layer protocol), which in turn uses TCP (a transport layer protocol).

Which of the following problems are decidable? 1) Does a given program ever produce an output? 2) If L is context-free language, then, is L also context-free? 3) If L is regular language, then, is L also regular? 4) If L is recursive language, then, is L also recursive?

  1. 1,2,3,4

  2. 1, 2

  3. 2, 3, 4

  4. 3, 4


Correct Option: D
Explanation:

CFL’s are not closed under complementation. Regular and recursive languages are closed under complementation.

Let W(n) and A(n) denote respectively, the worst case and average case running time of an algorithm executed on an input of size n. Which of the following is ALWAYS TRUE?

  1. A(n) = $\Omega$(W (n))

  2. A(n) =$\odot$(W(n))

  3. A(n) = O(W(n))

  4. None of these


Correct Option: C
Explanation:

If B(n), A(n) and W(n) denote best case, average case and worst case time complexities of an algorithm P respectively then B(n) = O(A(n)) , A(n) = O(W(n))

Consider a random variable X that takes values + 1 and -1 with probability 0.5 each. The values of the cumulative distribution function F(x) at x = -1 and +1 are

  1. 0 and 0.5

  2. 0 and 1

  3. 0.5 and 1

  4. 0.25 and 0.75


Correct Option: C
Explanation:

The cumulative distribution function F(x) = P(X $\le$  x) F(-1) = P(X $\le$ -1) = P(X = -1) = 0.5 F(+1) = P(X $\le$ +1) = P(X = -1)+P(x  =  + 1) = 0.5 + 0.5 = 1

Let G be a simple undirected planar graph on 10 vertices with l5 edges. If G is a connected graph, then the number of bounded faces in any embedding of G on the plane is equal to

  1. 3

  2. 4

  3. 5

  4. 6


Correct Option: D
Explanation:

We have the relation V – E + F = 2, by this we will get the total number of faces, F = 7. Out of 7 faces one is an unbounded face, so total 6 bounded faces.

The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with n discs is

  1. T(n) = 2T(n - 2) + 2

  2. T(n) = 2T(n - 1) + n

  3. T(n) = 2T(n/2) + 1

  4. T(n) = 2T(n -1) + 1


Correct Option: D
Explanation:

Let the three pegs be A, B and C, the goal is to move n pegs from A to C using peg B The following sequence of steps are executed recursively 1.move n - i discs from A to B. This leaves disc n alone on peg A --- T(n - 1) 2.move disc n from A to C 1 3.move n - i discs from B to C so they sit on disc n T(n - 1) So, T(n) = 2T(n - 1) + 1

Given the basic ER and relational models, which of the following is INCORRECT?

  1. An attribute of an entity can have more than one value.

  2. An attribute of an entity can be composite.

  3. In a row of a relational table, an attribute can have more than one value.

  4. In a row of a relational table, an attribute can have exactly one value or a NULL value.


Correct Option: C
Explanation:

In a row of a relational table, an attribute cannot have more than one value.

Which of the following statements are TRUE about an SQL query? P: An SQL query can contain a HAVING clause even if it does not have a GROUP BY clauseQ: An SQL query can contain a HAVING clause only if it has GROUP BY clause R: All attributes used in the GROUP BY clause must appear in the SELECT clauseS: Not all attributes used in the GROUP BY clause need to appear in the SELECT clause

  1. P and R

  2. P and S

  3. Q and R

  4. Q and S


Correct Option: A
Explanation:

We use a HAVING clause without a GROUP BY clause, the HAVING condition applies to all rows that satisfy the search condition. In other words, all rows that satisfy the search condition make up a single group. So, option P is true and Q is false. Function of GROUP BY clause is to group the result obtained using one or more attributes. If attribute name is not present in SELECT clause then GROUP BY cannot find the attribute name in the result according to which result is supposed to be grouped. So, option R is true and S is false.

Let A be the $ 2 × 2 $ matrix with elements $a_{11} = a_{12} = a_{21} = +1 $ and $ a_{22} = −1 $ . Then the eigenvalues of the matrix $A^{19}$ are

  1. $1024$ and $−1024$

  2. $1024\sqrt{2}$ and $−1024 \sqrt{2}$

  3. $4 \sqrt{2}$ and $−4 \sqrt{2}$

  4. $512 \sqrt{2}$ and $−512 \sqrt{2}$


Correct Option: D
Explanation:

What is the complement of the language accepted by the NFA shown below? Assume $\Sigma = {a}$ and $\epsilon$ is the empty string.

  1. $\phi$

  2. $\{\epsilon\}$

  3. $a^*$

  4. $\{a , \epsilon\}$


Correct Option: B
Explanation:

Language accepted by NFA is a+, so complement of this language is $\{\epsilon\}$

The decimal value 0.5 in IEEE single precision floating point representation has

  1. fraction bits of 000...000 and exponent value of 0

  2. fraction bits of 000...000 and exponent value of -i

  3. fraction bits of 100.000 and exponent value of 0

  4. no exact representation


Correct Option: B
Explanation:

(O.5)10 = (1.O)2 × 2-1 So, exponent = -1 and fraction is 000 - - - 000

The protocol data unit (PDU) for the application layer in the Internet stack is

  1. Segment

  2. Datagram

  3. Message

  4. Frame


Correct Option: C
Explanation:

The PDU for Datalink layer, Network layer, Transport layer and Application layer are frame, datagram, segment and message respectively.

What is the correct translation of the following statement into mathematical logic?

“Some real numbers are rational”

  1. $\exists x (real(x) \lor rational(x))$

  2. $\forall x (real(x) \to rational(x))$

  3. $\exists x (real(x) \wedge rational(x))$

  4. $\exists x (rational(x) \to real(x))$


Correct Option: C
Explanation:

1: There exists x which is either real or rational and can be both. 2: All real numbers are rational 3: There exists a real number which is rational. 4: There exists some number which is not rational or which is real.

Which of the following is TRUE?

  1. Every relation is 3NF is also in BCNF.

  2. A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R.

  3. Every relation in BCNF is also in 3NF.

  4. No relation can be in both BCNF and 3NF.


Correct Option: C
Explanation:

1 is false since BCNF is stricter than 3NF. 2 is false since the definition given here is of 2NF. 3 is true, since BCNF is stricter than 3NF, every relation in BCNF satisfies all the properties of 3NF.

Consider the following logical inferences. I1 : If it rains then the cricket match will not be played. The cricket match was played. Inference: There was no rain. I2 : If it rains then the cricket match will not be played. It did not rain. Inference: The cricket match was played.

Which of the following is TRUE?

  1. Both I1 and I2 are correct inferences.

  2. I1 is correct but I2is not a correct inference.

  3. I1 is not correct but I2 is a correct inference.

  4. Both I1 and I2 are not correct inferences.


Correct Option: B
Explanation:

A process executes the code fork ( ); fork ( ); fork ( ); The total number of child processes created is

  1. 3

  2. 4

  3. 7

  4. 8


Correct Option: C
Explanation:

If fork is called n times, there will be total 2 running processes including the parent process. So, there will be 2i child processes.

The below given truth table represents the Boolean function

X Y f(X, Y)
0 0 0
0 1 0
1 0 1
1 1 1
  1. X

  2. X + Y

  3. X $\oplus$ Y

  4. Y


Correct Option: A
Explanation:

XY’ + XY = X(Y’ + Y) = X . 1 = X

Consider an instance of TCP's Additive Increase Multiplicative decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission.

  1. 8MSS

  2. 14MSS

  3. 7MSS

  4. 12MSS


Correct Option: C
Explanation:

Consider the function f(x) = sin(x) in the interval x $\in$[$\pi$/4, 7$\pi$/4]. The number and location(s) of the local minima of this function are

  1. One; at $\pi$/2

  2. One; at 3$\pi$/2

  3. Two; at $\pi$/2 and 3$\pi$/2

  4. Two; at $\pi$/4 and 3$\pi$/2


Correct Option: B
Explanation:

The worst case running time to search for an element in a balanced binary search tree with n2n elements is

  1. $\theta$(n log n)

  2. $\theta$(n2n)

  3. $\theta$(n)

  4. $\theta$(log n)


Correct Option: C
Explanation:

The worst case search time in a balanced BST on 'x' nodes is logx. So, if x = n2n, then log(n2n) = logn + log(2n) = logn + n = $\theta$(n)

Consider the set of strings on {0, 1} in which, every substring of 3 symbols has at most two zeros. For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially compelled DFA that accepts this language is shown below.


Correct Option: D
Explanation:

Consider the virtual page reference string: 1, 2, 3, 2, 4, 1, 3, 2, 4, 1 on a demand paged virtual memory system running on a computer system that has main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. Then

  1. OPTIMAL < LRU < FIFO

  2. OPTIMAL < FIFO < LRU

  3. OPTIMAL = LRU

  4. OPTIMAL = FIFO


Correct Option: B
Explanation:

What will be the output of the following C program segment?

Char inChar = ‘A’ switch (inChar ) { case ‘A’ : printf (“Choice A n”); case ‘B’ case ‘C’ : print f(”Choice B”); case ‘D’ case ‘E’ default : printf (“No Choice”) ; }

  1. No choice

  2. Choice A

  3. Choice A, Choice B No choice

  4. Program gives no output as it is erroneous


Correct Option: C
Explanation:

Since there is no ‘break’ statement, the program executes all the subsequent case statements after printing “choice A”

How many onto (or subjective) functions are there from an n-element (n $\ge$ 2) set to a 2-element set?

  1. 2n

  2. 2n – 1

  3. 2n – 2

  4. 2(2n-2)


Correct Option: C
Explanation:

Total number of functions is 2n, out of which there will be exactly two functions where all elements map to exactly one element, so total number of onto functions is 2n – 2.

Consider a source computer (S) transmitting a file of size 106 bits to a destination computer (D) over a network of two routers (R1 and R2) and three links (L1, L2, and L3). L1 connects S to R1 L2 connects R1 to R2 and L3 connects R2 to D. Let each link be of length 100 km. Assume signals travel over each line at a speed of 108 meters per second. Assume that the link bandwidth on each link is 1 Mbps. Let the file be broken down into 1000 packets each of size 1000 bits. Find the total sum of transmission and propagation delays in transmitting the file from S to D.

  1. 1005 ms

  2. 1010 ms

  3. 3000 ms

  4. 3003 ms


Correct Option: A
Explanation:

Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted.


Correct Option: D
Explanation:

Access link is defined as link to activation record of closest lexically enclosing block in program text, so the closest enclosing blocks respectively for Al, A2 and A21 are main, main and A2.

Consider the directed graph shown in the figure below. There are multiple shortest paths between vertices S and T. Which one will be reported by Dijkstra's shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex v is updated only when a strictly shorter path to v is discovered.

  1. SDT

  2. SBDT

  3. SACDT

  4. SACET


Correct Option: D
Explanation:

Suppose a fair six-sided die is rolled once. If the value on the die is 1, 2, or 3, the die is rolled a second time. What is the probability that the sum total of values that turn up is at least 6?

  1. 10/21

  2. 5/12

  3. 2/3

  4. 1/6


Correct Option: B
Explanation:

Suppose a circular queue of capacity (n - 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are

  1. full: (REAR+l) mod n == FRONT empty: REAR ==FRONT

  2. full:(REAR+l)mod n == FRONT empty: (FRONT+l)mod n==REAR

  3. full: REAR == FRONT empty: (REAR+l) mod n == FRONT

  4. full:(FRONT+ l)mod n == REAR empty: REAR == FRONT


Correct Option: A
Explanation:

Suppose $R_{1} (\underline{A}, B)$ and $R_{2} (\underline{C}, D) $ are two relation schemas. Let $r_{1}$ and $r_{2}$ be the corresponding relation instances. $B$ is a foreign key that refers to $C$ in $R_{2}$. If data in $r_{1}$ and $r_{2}$ satisfy referential integrity constraints, which of the following is ALWAYS TRUE?

  1. $\prod_{B}(r_{1})- \prod_{C}(r_{2})= \varnothing$

  2. $\prod_{C}(r_{2})- \prod_{B}(r_{1})= \varnothing$

  3. $\prod_{B}(r_{1}) = \prod_{C}(r_{2})$

  4. $\prod_{B}(r_{1}) - \prod_{C}(r_{2}) \neq \varnothing$


Correct Option: A
Explanation:

Since B is a foreign key referring C, $ \prod_{B}(r_{1}) \subseteq \prod_{C}(r_{2} \Rightarrow \prod_{B}(r_{1})- \prod_{C}(r_{2})= \varnothing$

A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is

  1. 3 Kbytes

  2. 35 Kbytes

  3. 280 Kbytes

  4. dependent on the size of the disk


Correct Option: B
Explanation:

An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of address to A and B?

  1. 245.248.136.0/21 and 245.248.128.0/22

  2. 245.248.128.0/21 and 245.248.128.0/22

  3. 245.248.132.0/22 and 245.248.132.0/21

  4. 245.248.136.0/24 and 245.248.132.0/21


Correct Option: A
Explanation:

Since half of 4096 host addresses must be given to organization A, we can set 12th bit to 1 and include that bit into network part of organization A, so the valid allocation of addresses to A is 245.248.136.0/21 Now for organization B, 12th bit is set to '0' but since we need only half of 2048 addresses, 13th bit can be set to '0' and include that bit into network part of organization B so the valid allocation of addresses to B is 245.248.128.0/22

A list of n stings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is

  1. O(nlogn)

  2. O(n2 logn)

  3. O(n2 +logn)

  4. O(n2)


Correct Option: B
Explanation:

The height of the recursion tree using merge sort is logn and n2 comparisons are done at each level, where at most n pairs of strings are compared at each level and n comparisons are required to compare any two strings, So the worst case running time is O(n2 logn)

Assuming P$\ne$NP, which of the following is TRUE?

  1. NP-complete = NP

  2. NP-complete $\cap$P = $\phi$

  3. NP-hard = NP

  4. P = NP-complete


Correct Option: B
Explanation:

If P! = NP, then it implies that no NP-Complete problem can be solved in polynomial time which implies that the set P and the set NPC are disjoint.

What is the minimal form of the Karnaugh map shown below? Assume that X denotes a don't care term.

  1. $\bar{b} \bar{d}$

  2. $ \bar { b } \bar { d } + \bar{b} \bar{c} $

  3. $ \bar{b} \bar{d} + {a} \bar{b} \bar{c} {d}$

  4. $ \bar{b} \bar{d} + \bar{b} \bar{c} + \bar{c} \bar{d} $


Correct Option: B
Explanation:

Fetch_And_Add (X, i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value corresponds to the lock being not available. AcquireLock(L){ While (Fetch_And_Add(L,1)) L = 1; } Release Lock (L){ L = 0; } This implementation

  1. fails as L can overflow

  2. fails as L can take on a non-zero value when the lock is actually available

  3. works correctly but may starve some processes

  4. works correctly without starvation


Correct Option: B
Explanation:

Let G be a weighted graph with edge weights greater than one and G' be the graph constructed by squaring the weights of edges in G. Let T and T' be the minimum spanning trees of G and G' respectively, with total weights t and t'. Which of the following statements is TRUE?

  1. T' = T with total weight t' = t2

  2. T' = T with total weight t' < t2

  3. T'$\ne$ T but total weight t' = t2

  4. None of these


Correct Option: D
Explanation:

Graph G is counter example for options (2) and (3) and Graph G1 is counter example for option (1)

The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudocode below is invoked as height (root) to compute the height of a binary tree rooted at the tree pointer root. int height (treeptr n) The appropriate expressions for the two boxes B1 and B2 are

  1. B1: (1 + height (n$\rightarrow$right)) B2: (1 - max (h1, h2))

  2. B1: (height (n$\rightarrow$right)) B2: (1 - max (h1, h2))

  3. B1: height (n$\rightarrow$right) B2: max (h1, h2)

  4. B1: (1 + height (n$\rightarrow$right)) B2: max (h1, h2)


Correct Option: A
Explanation:

Which of the following graph is isomorphic to


Correct Option: B
Explanation:

The graph in option (1) has a 3 length cycle whereas the original graph does not have a 3 length cycle. The graph in option (3) has a vertex with degree 4 whereas the original graph does not have a vertex with degree 4. The graph in option (4) has a 4 length cycle whereas the original graph does not have a 4 length cycle.

The bisection method is applied to compute a zero of the function f(x) = x4 - x3 - x2 - 4 in the interval [1, 9]. The method converges to a solution after ________ iteration(s).

  1. 1

  2. 3

  3. 5

  4. 7


Correct Option: B
Explanation:

Consider the following transactions with data items P and Q initialized to zero: T1: read (P); read (Q); if P = 0 them Q: = Q + 1; write (Q). T2: read (Q); read (P) if Q = 0 then P: = P + 1; write (P). Any non - serial interleaving of T1 and T2 for concurrent execution leads to

  1. a serializable schedule

  2. a schedule that is not conflict serializable

  3. a conflict seriallzable schedule

  4. a schedule for which precedence graph cannot be drawn


Correct Option: B
Explanation:

Let S be a non-serial schedule, without loss of generality assume that T1 has started earlier than T2. The first instruction of T1 is read(P) and the last instruction of T2 is write(P), so the precedence graph for S has an edge from T1 to T2, now since S is a non-serial schedule the first instruction of T2 (read(Q)) should be executed before last instruction of T1 (write(Q)) and since read and write are conflicting operations, the precedence graph for S also contains an edge from T2 to T1, So we will have a cycle in the precedence graph which implies that any non serial schedule with T1 as the earliest transaction will not be conflict serializable. In a similar way we can show that if T2 is the earliest transaction then also the schedule is not conflict serializable.

How many tuples does the result of the following relational algebra expression contain? Assume that the schema of A$\cup$B is the same as that of A. (A$\cup$5)$\bowtie$A.Id>40 v C.Id<15 C

  1. 7

  2. 4

  3. 5

  4. 9


Correct Option: A
Explanation:

The final table is

What output will be generated by the given code segment if: Line 1 is replaced by auto int a = 1; Line 2 is replaced by register int a = 2;

  1. 3 1 4 1 4 2

  2. 4 2 6 1 6 1

  3. 4 2 6 2 2 0

  4. 4 2 4 2 2 0


Correct Option: D
Explanation:

Static local variables: Scope is limited to function/block but life time is entire program. Automatic local variables: Storage allocated on function entry and automatically deleted or freed when the function is exited. Register variables: Same as automatic variables except that the register variables will not have addresses. Hence, may not take the address of a register variable.

The cost function for a product in a firm is given by 5q2 where q is the amount of production. The firm can sell the product at a market price of Rs. 50 per unit. The number of units to be produced by the firm such that the profit is maximised is

  1. 5

  2. 10

  3. 15

  4. 25


Correct Option: A
Explanation:

Direction: A computer has a 256 KByte, 4-way set associative, write back data cache with block size of 32 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.

The size of the cache tag directory is

  1. 160 Kbits

  2. 136 Kbits

  3. 40 Kbits

  4. 32 Kbits


Correct Option: A
Explanation:

TAG controller maintains 16 + 4 = 20 bits for every block Hence, size of cache tag directory = 20 × 213 bits =160 Kbits

Choose the most appropriate alternative from the options given below to complete the following sentence. Suresh’s dog is the one ________ was hurt in the stampede.

  1. that

  2. which

  3. who

  4. whom


Correct Option: A
Explanation:

Correct Answer: that With indefinite pronouns 'that' is used. Here 'one' is the indefinite pronoun. 

Choose the most appropriate alternative from the options given below to complete the following sentence: Despite several_________the mission succeeded in its attempt to resolve the conflict.

  1. attempts

  2. setbacks

  3. meetings

  4. delegations


Correct Option: B
Explanation:

Correct Answer: setbacks 'Despite' is the key word as it suggests that in spite of something negative the mission succeeded. Here only 'setbacks' is negative and fits the context. Other options are out of context.

Choose the grammatically INCORRECT sentence.

  1. They gave us the money back less the service charges of three hundred rupees.

  2. This country's expenditure is not less than that of Bangladesh.

  3. This country’s expenditure on educational reforms is very less.

  4. The committee initially asked for a funding of Fifty Lakh rupees, but later settled for a lesser sum.


Correct Option: D
Explanation:

Correct Answer: The committee initially asked for a funding of Fifty Lakh rupees, but later settled for a lesser sum.

The use of the word 'lesser' is incorrect here as lesser means inferior in quality or less in inportance - insignificant. Here we have to use 'less' which means the committee settled for an amount which was less than the one initially asked for.

Which one of the following options is the closest in meaning to the word given below? Mitigate

  1. Diminish

  2. Divulge

  3. Dedicate

  4. Denote


Correct Option: A
Explanation:

Correct Answer: DiminishMitigate means to lessen or make less severe. Only diminish has the same meaning and hence, is the synonym.

What output will be generated by the given code segment?

  1. 3 1 4 1 4 2

  2. 4 2 6 1 6 1

  3. 4 2 6 2 2 0

  4. 3 1 5 2 5 2


Correct Option: C
Explanation:

Wanted Temporary, Part-time persons for the post of Field Interviewer to conduct personal interviews to collect and collate economic data. Requirements: High School-pass, must be available for Day, Evening and Saturday work. Transportation paid, expenses reimbursed. Which one of the following is the best inference from the above advertisement?

  1. Gender-discriminatory

  2. Xenophobic

  3. Not designed to make the post attractive

  4. Not gender-discriminatory


Correct Option: C
Explanation:

Gender is not mentioned in the advertisement and (2) clearly eliminated.

Consider the 3 process, P1, P2 and P3 shown in the table.

Process Arrival Time Time units Requied
P1 0 5
P2 1 7
P3 3 4

The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are

  1. FCFS: P1, P2, P3 RR2: P1, P2, P3

  2. FCFS: P1, P3, P2 RR2: P1, P3, P2

  3. FCFS: P1, P2, P3 RR2: P1, P3, P2

  4. FCFS: P1, P3, P2 RR2: P1, P2, P3


Correct Option: C
Explanation:

Direction: A computer has a 256 KByte, 4-way set associative, write back data cache with block size of 32 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.

The number of bits in the tag field of an address is

  1. 11

  2. 14

  3. 16

  4. 27


Correct Option: C
Explanation:

How many tuples does the result of the following SQL query contain? SELECT A.Id FROM A WHERE A.Age > ALL (SELECT B.Age FROM B Where B.Name = ‘Arun’)

  1. 4

  2. 3

  3. 0

  4. 1


Correct Option: B
Explanation:

As the result of subquery is an empty table, ‘>ALL’ comparison is true. Therefore, all the three row id’s of A will be selected from table A.

Which of the following assertions are CORRECT? P: Adding 7 to each entry in a list adds 7 to the mean of the list. Q: Adding 7 to each entry in a list adds 7 to the standard deviation of the list. R: Doubling each entry in a list doubles the mean of the list. S: Doubling each entry in a list leaves the standard deviation of the list unchanged.

  1. P, Q

  2. Q, R

  3. P, R

  4. R, S


Correct Option: C
Explanation:

P and R always hold true. Otherwise, consider a sample set {1, 2, 3, 4} and check accordingly.

Direction: For the grammar below, a partial LL(1) parsing table is also presented along with the grammar. Entries that need to be filled are indicated as El, E2, and E3. is the empty string, $ indicates end of input, and I separates alternate right hand sides of productions.

The First and Follow sets for the non-terminals A and B are

  1. FIRST(A) = {a, b,$\in$} = FIRST (B) FOLLOW(A) = {a, b} FOLLOW(B) = {a, b, \$}

  2. FIRST(A) = {a, b, \$} FIRST(B) = {a, b,$\in$} FOLLOW(A) = {a, b} FOLLOW(B) ={\$}

  3. FIRST(A) = {a, b,$\in$} = FIRST(B) FIRST(A) = {a, b} FOLLOW(B) = $\phi$

  4. FIRST(A) = {a, b,} = FIRST(B) FIRST(A) = {a, b} FOLLOW(B) = {a, b}


Correct Option: A
Explanation:

First(A) = First(S) = First(aAbB) $\cup$First(bAaB) $\cup$First($\in$) = {a}$\cup${b}$\cup${$\in$} = {$\in$,a, b} First(B)I = First(S) = {$\in$,a, b} Follow (A) = First(bB) $\cup$ First(aB) = {a, b} Follow (B) = Follow(S) = {\$} $\cup$ Follow(A) = {$, a, b}

Given the sequence of terms, AD CG FK JP, the next term would be

  1. OV

  2. OW

  3. PV

  4. PW


Correct Option: A
Explanation:

A political party orders an arch for the entrance to the ground in which the annual convention is being held. The profile of the arch follows the equation y = 2x — 0.1x2 where y is the height of the arch in meters. The maximum possible height of the arch is

  1. 8 meters

  2. 10 meters

  3. 12 meters

  4. 14 meters


Correct Option: B
Explanation:

Direction: For the grammar below, a partial LL(1) parsing table is also presented along with the grammar. Entries that need to be filled are indicated as El, E2, and E3. 8 is the empty string, $ indicates end of input, and I separates alternate right hand sides of productions.

The appropriate entries for El, E2, and E3 are

  1. E1: S$\rightarrow$aAbB, A$\rightarrow$S E2: S $\rightarrow$ bAaB, B$\rightarrow$S E3: B $\rightarrow$ S

  2. E1: S $\rightarrow$ aAbB, S $\rightarrow$$\epsilon$ E2: S$\rightarrow$ bAaB, S $\rightarrow$$\epsilon$ E3: S $\rightarrow$$\epsilon$

  3. E1: S $\rightarrow$aAbB, S$\rightarrow$$\epsilon$ E2: S$\rightarrow$ bAaB, S $\rightarrow$$\epsilon$ E3: B $\rightarrow$S

  4. E1: A$\rightarrow$S, S$\rightarrow$$\epsilon$ E2: B$\rightarrow$S, S$\rightarrow$$\epsilon$ E3: B$\rightarrow$S


Correct Option: C
Explanation:

- Hide questions