GATE 2014 (Session 3) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2014 (Session 3)

65 questions

MCQ 47 · NAT 181-mark 30 · 2-mark 35

Questions 21–25 of 65

Q21Intermediate Code Generation1 markNAT
The minimum number of arithmetic operations required to evaluate the polynomial P(x)=x5+4x3+6x+5P(x)=x^{5}+4x^{3}+6x+5 for a given value of x, using only one temporary variable is _____.

Q22n-ary Tree1 markMCQ−0.33 if wrong
Consider the following rooted tree with the vertex labelled P as the root
PQRSTUVW
The order in which the nodes are visited during an in-order traversal of the tree is

Q23Graph Theory1 markNAT
Suppose depth first search is executed on the graph below starting at some unknown vertex. Assume that a recursive call to visit a vertex is made only after first checking that the vertex has not been visited earlier. Then the maximum possible recursion depth (including the initial call) is _________.

Q24Sorting1 markMCQ−0.33 if wrong
You have an array of n elements. Suppose you implement quick sort by always choosing the central element of the array as the pivot. Then the tightest upper bound for the worst case performance is

Q25Regular Expression1 markNAT
The length of the shortest string NOT in the language (over Σ\Sigma={a,b}) of the following regular expression is _________.
a*b* (ba)* a*