Previous Year Questions
1 paper · 54 questions — organised by subject with solutions and explanations.
🎯 Practice smarter, not harder
Just sign in to unlock everything. Free for all students.
The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with n discs is
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
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
A list of n strings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is
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?
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 E1, E2, and E3. is the empty string, S aAbB|bAaB| A S B S
Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted. Consider the calling chain: Main A1 A2 A21 A1 The correct set of activ
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 E1, E2, and E3. is the empty string, S aAbB|bAaB| A S B S
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
In the IPv4 addressing format, the number of networks allowed under Class C addresses is
Consider a source computer (S) transmitting a file of size 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 connec
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
The protocol data unit (PDU) for the application layer in the Internet stack is
Which of the following transport layer protocols is used to support electronic mail?
The amount of ROM needed to implement a 4 bit multiplier is
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 conta
Register renaming is done in pipelined processors
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 conta
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 clause Q : An SQL query can contain a HAVING clause only
Consider the following transactions with data items P and Q initialized to zero: T1 :read (P); read (Q); if P = 0 then Q := Q + 1 ; write (Q). T2 : read (Q); read (P); if Q = 0 then P := P + 1 ; write
Consider the following relations A, B and C: 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')
Given the basic ER and relational models, which of the following is INCORRECT?
Consider the following relations A, B and C: How many tuples does the result of the following relational algebra expression contain? Assume that the schema of A B is the same as that of A.
Which of the following is TRUE?
Suppose R1(A, B) and R2(C, D) are two relation schemas. Let r1 and r2 be the corresponding relation instances. B is a foreign key that refers to C in R2. If data in r1 and r2 satisfy referential integ
Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph, then the number of bounded faces in any embedding of G on the plane is equal to
Let A be the 2x2 matrix with elements and . Then the eigenvalues of the matrix are
What is the correct translation of the following statement into mathematical logic? "Some real numbers are rational"
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
How many onto (or surjective) functions are there from an n-element ( ) set to a 2-element set?
Let G be a complete undirected graph on 6 vertices. If vertices of G are labeled, then the number of distinct cycles of length 4 in G is equal to
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
Consider the function f(x)=sin(x) in the interval x . The number and location(s) of the local minima of this function are
The bisection method is applied to compute a zero of the function in the interval [1,9]. The method converges to a solution after _____iterations.
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?
Which of the following graphs is isomorphic to
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 s
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 initia
Consider the 3 processes, P1, P2 and P3 shown in the table. The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are
A process executes the code fork(); fork(); fork(); The total number of child processes created is
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 show
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main( ) { static int a = 1; /* Line 1 */ prtFun( ); a += 1; prtFun( ); printf(" %d %d ", a, b); } void prtFun(void) { static
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 va
The worst case running time to search for an element in a balanced binary search tree with elements is
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 roo
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main( ) { static int a = 1; /* Line 1 */ prtFun( ); a += 1; prtFun( ); printf(" %d %d ", a, b); } void prtFun(void) { static
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' : printf ("Choice B") ; case 'D' : case 'E'
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 tha
What is the complement of the language accepted by the NFA shown below? Assume ={a} and is the empty string.
Given the language L = {ab, aa, baa}, which of the following strings are in L*? 1) abaabaaabaa 2) aaaabaaaa 3) baaaaabaaaab 4) baaaaabaa
Which of the following problems are decidable? 1) Does a given program ever produce an output? 2) If L is a context-free language, then, is also context-free? 3) If L is a regular language, then, is a