• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE-CS-2014-(Set-1)

Question 41

A canonical set of items is given below
S --> L. > R
Q --> R.
On input symbol < the set has
  • a shift-reduce conflict and a reduce-reduce conflict.
  • a shift-reduce conflict but not a reduce-reduce conflict.
  • a reduce-reduce conflict but not a shift-reduce conflict.
  • neither a shift-reduce nor a reduce-reduce conflict.

Question 42

Let L be a language and L\' be its complement. Which one of the following is NOT a viable possibility?
  • Neither L nor L\' is recursively enumerable (r.e.).
  • One of L and L\' is r.e. but not recursive; the other is not r.e.
  • Both L and L\' are r.e. but not recursive.
  • Both L and L\' are recursive

Question 43

Which of the regular expressions given below represent the following DFA? GATECS2014Q45
I) 0*1(1+00*1)*
II) 0*1*1+11*0*1
III) (0+1)*1 
  • I and II only
  • I and III only
  • II and III only
  • I, II, and III

Question 44

There are 5 bags labeled 1 to 5. All the coins in a given bag have the same weight. Some bags have coins of weight 10 gm, others have coins of weight 11 gm. I pick 1, 2, 4, 8, 16 coins respectively from bags 1 to 5. Their total weight comes out to 323 gm. Then the product of the labels of the bags having 11 gm coins is ___.
  • 15
  • 12
  • 8
  • 1

Question 45

Suppose a polynomial time algorithm is discovered that correctly computes the largest clique in a given graph. In this scenario, which one of the following represents the correct Venn diagram of the complexity classes P, NP and NP Complete (NPC)? GATECS2014Q48
  • A
  • B
  • C
  • D

Question 46

The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is ______________.
  • 148
  • 147
  • 146
  • 140

Question 47

Consider the following C function in which size is the number of elements in the array E: The value returned by the function MyX is the C
int MyX(int *E, unsigned int size)
{
    int Y = 0;
    int Z;
    int i, j, k;
    for(i = 0; i < size; i++)
        Y = Y + E[i];
    for(i = 0; i < size; i++)
        for(j = i; j < size; j++)
        {
            Z = 0;
            for(k = i; k <= j; k++)
                Z = Z + E[k];
            if (Z > Y)
                Y = Z;
        }
    return Y;
}
  • maximum possible sum of elements in any sub-array of array E.
  • maximum element in any sub-array of array E.
  • sum of the maximum elements in all possible sub-arrays of array E
  • the sum of all the elements in the array E.

Question 48

Consider the following pseudo code. What is the total number of multiplications to be performed?
D = 2
for i = 1 to n do
   for j = i to n do
      for k = j + 1 to n do
           D = D * 3
  • Half of the product of the 3 consecutive integers.
  • One-third of the product of the 3 consecutive integers.
  • One-sixth of the product of the 3 consecutive integers.
  • None of the above.

Question 49

Consider a hash table with 9 slots. The hash function is ℎ(k) = k mod 9. The collisions are resolved by chaining. The following 9 keys are inserted in the order: 5, 28, 19, 15, 20, 33, 12, 17, 10. The maximum, minimum, and average chain lengths in the hash table, respectively, are
  • 3, 0, and 1
  • 3, 3, and 3
  • 4, 0, and 1
  • 3, 0, and 2

Question 50

Consider a 6-stage instruction pipeline, where all stages are perfectly balanced. Assume that there is no cycle-time overhead of pipelining. When an application is executing on this 6-stage pipeline, the speedup achieved with respect to non-pipelined execution if 25% of the instructions incur 2 pipeline stall cycles is
  • 4
  • 8
  • 6
  • 7

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion