• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CS 2011

Question 31

Consider a database table T containing two columns X and Y each of type integer. After the creation of the table, one record (X=1, Y=1) is inserted in the table. Let MX and My denote the respective maximum values of X and Y among all records in the table at any point in time. Using MX and MY, new records are inserted in the table 128 times with X and Y values being MX+1, 2*MY+1 respectively. It may be noted that each time after the insertion, values of MX and MY change. What will be the output of the following SQL query after the steps mentioned above are carried out?
SELECT Y FROM T WHERE X=7;
  • 127
  • 255
  • 129
  • 257

Question 32

Consider a finite sequence of random values X = { x1, x2,..., xn}. Let μx be the mean and σx be the standard deviation of X. Let another finite sequence Y of equal length be derived from this as yi = a*xi + b, where a and b are positive constants. Let μy be the mean and σy be the standard deviation of this sequence. Which one of the following statements is INCORRECT?
  • Index position of mode of X in X is the same as the index position of mode of Y in Y.
  • Index position of median of X in X is the same as the index position of median of Y in Y.
  • μy = aμx+b
  • σy = aσx+b

Question 33

Consider the following table of arrival time and burst time for three processes P0, P1 and P2.
Process   Arrival time   Burst Time
P0            0 ms          9 ms
P1            1 ms          4 ms
P2            2 ms          9 ms
The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?
  • 5.0 ms
  • 4.33 ms
  • 6.33
  • 7.33

Question 34

Consider evaluating the following expression tree on a machine with load-store architecture in which memory can be accessed only through load and store instructions. The variables a, b, c, d and e initially stored in memory. The binary operators used in this expression tree can be evaluate by the machine only when the operands are in registers. The instructions produce results only in a register. If no intermediate results can be stored in memory, what is the minimum number of registers needed to evaluate this expression?   gate2011Q26
  • 2
  • 9
  • 5
  • 3

Question 35

Which of the given options provides the increasing order of asymptotic complexity of functions f1, f2, f3 and f4? f1(n) = 2^n f2(n) = n^(3/2) f3(n) = nLogn f4(n) = n^(Logn)
  • f3, f2, f4, f1
  • f3, f2, f1, f4
  • f2, f3, f1, f4
  • f2, f3, f4, f1

Question 36

Four matrices M1, M2, M3 and M4 of dimensions pxq, qxr, rxs and sxt respectively can be multiplied is several ways with different number of total scalar multiplications. For example, when multiplied as ((M1 X M2) X (M3 X M4)), the total number of multiplications is pqr + rst + prt. When multiplied as (((M1 X M2) X M3) X M4), the total number of scalar multiplications is pqr + prs + pst. If p = 10, q = 100, r = 20, s = 5 and t = 80, then the number of scalar multiplications needed is:
  • 248000
  • 44000
  • 19000
  • 25000

Question 37

Consider a relational table r with sufficient number of records, having attributes A1, A2,…, An and let 1 <= p <= n. Two queries Q1 and Q2 are given below. GATE2011DBMS1 The database can be configured to do ordered indexing on Ap or hashing on Ap. Which of the following statements is TRUE?
  • Ordered indexing will always outperform hashing for both queries
  • Hashing will always outperform ordered indexing for both queries
  • Hashing will outperform ordered indexing on Q1, but not on Q2
  • Hashing will outperform ordered indexing on Q2, but not on Q1.

Question 38

Consider an instruction pipeline with four stages (S1, S2, S3 and S4) each with combinational circuit only. The pipeline registers are required between each stage and at the end of the last stage. Delays for the stages and for the pipeline registers are as given in the figure: GATECS2011Q41 What is the approximate speed up of the pipeline in steady state under ideal conditions when compared to the corresponding non-pipeline implementation?
  • 4.0
  • 2.5
  • 1.1
  • 3.0

Question 39

Definition of a language L with alphabet {a} is given as following.

             L={|ank|k>0, and n is a positive integer constant}

What is the minimum number of states needed in DFA to recognize L?

  • k+1

  • n+1

  • 2(n+1)

  • 2[Tex](k+1)[/Tex]

Question 40

An 8KB direct-mapped write-back cache is organized as multiple blocks, each of size 32-bytes. The processor generates 32-bit addresses. The cache controller maintains the tag information for each cache block comprising of the following. 1 Valid bit 1 Modified bit As many bits as the minimum needed to identify the memory block mapped in the cache. What is the total size of memory needed at the cache controller to store meta-data (tags) for the cache?
  • 4864 bits
  • 6144 bits
  • 6656 bits
  • 5376 bits

There are 64 questions to complete.

Last Updated :
Take a part in the ongoing discussion