CBSE UGC NET Computer Science Paper III Solved November 2017 - Part 4

31.       Consider a full binary tree with n internal nodes, internal path length i, and external path length e. The internal path length of a full binary tree is the sum, taken over all nodes of the tree, of the depth of each node. Similarly, the external path length is the sum, taken over all leaves of the tree, of the depth of each leaf.
Which of the following is correct for the full binary tree?
(1) e = i + n
(2) e = i + 2n
(3) e = 2i + n
(4) e = 2n + i
Answer: 2
32.       You are given a sequence of n elements to sort. The input sequence consists of n/k subsequences, each containing k elements. The elements in a given subsequence are all smaller than the elements in the succeeding subsequence and larger than the elements in the preceding subsequence. Thus, all that is needed to sort the whole sequence of length n is to sort the k elements in each of the n/k subsequences.
The lower bound on the number of comparisons needed to solve this variant of the sorting problem is:
(1) Ω(n)
(2) Ω(n/k)
(3) Ω(n lg k)
(4) Ω(n/k lg n/k)
Answer: 3
33.       Consider the recurrence relation:
T (n) = 8T(n/2) + Cn, if n > 1
      = b, if n =1
Where b and c are constants.
The order of the algorithm corresponding to above recurrence relation is:
(1) n
(2) n2
(3) n lg n
(4) n3
Answer: 4
34.       Consider the following two sequences :
X = <B, C, D, C, A, B, C>
and Y = <C, A, D, B, C, B>
The length of longest common subsequence of X and Y is:
(1) 5
(2) 3
(3) 4
(4) 2
Answer: 3
35.       A text is made up of the characters a, b, c, d, e each occurring with the probability 0.11, 0.40, 0.16, 0.09 and 0.24 respectively. The optimal Huffman coding technique will have the average length of:
(1) 2.40
(2) 2.16
(3) 2.26
(4) 2.15
Answer: 2
36.       An undirected graph G (V, E) contains n (n > 2) nodes named v1, v2,...,vn. Two nodes vi and vj are connected if and only if 0 < | i – j | ≤ 2. Each edge (vi, vj) is assigned a weight i+j.
The cost of the minimum spanning tree of such a graph with 10 nodes is :
(1) 88
(2) 91
(3) 49
(4) 21
Answer: 2
37.       An XML document that adheres to syntax rules specified by XML 1.0 specification in that it must satisfy both physical and logical structured, is called :
(1) Well - formed
(2) Reasonable
(3) Valid
(4) Sophisticated
Answer: 1
38.       Which of the following statement(s) is/are TRUE regarding Java Servelets?
(a) A Java Servelet is a server-side component that runs on the web server and extends the capabilities of a server.
(b) A Servelet can use the user interface classes like AWT or Swing.
Code :
(1) Only (a) is TRUE.
(2) Only (b) is TRUE.
(3) Both (a) and (b) are TRUE.
(4) Neither (a) nor (b) is TRUE.
Answer: 1
39.       Consider the following HTML table definition :
<table border=1>
<tr>
<td colspan=2> Text A </td>
</tr>
<tr>
<td> Text B </td>
<td> Text C </td>
</tr>
<tr>
<td rowspan=2> Text D </td>
<td> Text E </td>
</tr>
<tr>
<td> Text F </td>
</tr>
</table>
The above HTML code would render on screen as :
Answer: 3
40.    Which of the following statements is/are TRUE?
(a) In HTML, character entities are used to incorporate external content into a web page, such as images.
(b) Once a web server returns a cookie to a browser, the cookie will be included in all future requests from the browser to the same server.
Code :
(1) Only (a) is TRUE.
(2) Only (b) is TRUE.
(3) Both (a) and (b) are TRUE.
(4) Neither (a) nor (b) is TRUE.
Answer: 4

Post a Comment

0 Comments