### 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: Aliensbrain Bot | |

Tags: Previous Year Paper Computer Science GATE CS |

Register renaming is done is pipelined processors

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

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

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

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

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?

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?

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

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

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

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

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

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

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

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

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

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

“Some real numbers are rational”

Which of the following is TRUE?

Consider the following logical inferences.
I_{1} : If it rains then the cricket match will not be played.
The cricket match was played.
Inference: There was no rain.
I_{2} : 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?

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

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 |

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.

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

The worst case running time to search for an element in a balanced binary search tree with n2^{n} elements is

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.

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

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”) ; }

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

Consider a source computer (S) transmitting a file of size 10^{6} bits to a destination computer (D) over a network of two routers (R_{1} and R_{2}) and three links (L_{1}, L_{2}, and L_{3}). L1 connects S to R_{1} L_{2} connects R_{1} to R_{2} and L_{3} connects R_{2} to D. Let each link be of length 100 km. Assume signals travel over each line at a speed of 10^{8} 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.

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

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.

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?

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

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?

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

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?

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

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

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

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

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?

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

Which of the following graph is isomorphic to

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

Consider the following transactions with data items P and Q initialized to zero:
T_{1}: read (P);
read (Q);
if P = 0 them Q: = Q + 1;
write (Q).
T_{2}: 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

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

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;

The cost function for a product in a firm is given by 5q^{2 }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

** 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

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.

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.

Choose the grammatically INCORRECT sentence.

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

What output will be generated by the given code segment?

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?

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

** 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

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’)

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.

** 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

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

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.1x^{2} where y is the height of the arch in meters. The maximum possible height of the arch is

** 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