June 2015 - Paper 3

31:  

The travelling salesman problem can be solved in :

A.

Polynomial time using dynamic programming algorithm

B.

Polynomial time using branch-and-bound algorithm

C.

Exponential time using dynamic programming algorithm or branch-and-bound algorithm

D.

Polynomial time using backtracking algorithm

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



32:  

Which of the following is asymptotically smaller?

A.

lg(lg*n)

B.

lg*(lgn)

C.

lg(n!)

D.

lg*(n!)

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



33:  

Consider a hash table of size m = 100 and the hash function h(k) = floor (m(kA mod 1)) for ugc net computer science.Compute the location to which the key k = 123456 is placed in has table

 

A.

77

B.

82

C.

88

D.

89

 
 

Option: C

Explanation :

h(k) = ↳m(kA mod 1)↵,
A=(√5 − 1)/2=0.618033.
given K = 123456, m=100.
h(k) = ↳100(123456 x 0.618033 mod 1)↵ = ↳100(76299.88204 mod 1)↵
= ↳100 x 0.882048)↵
= ↳88.2048 ↵ =88

Click on Discuss to view users comments.

Write your comments here:



34:  

Let f (n) and g(n) be asymptotically non-negative functions. Which of the following is correct?

A.

0(f(n)*g(n)) = min(f(n), g(n))

B.

0(f(n)*g(n)) = max(f(n), g(n))

C.

0(f(n)+g(n)) = min(f(n), g(n))

D.

0(f(n)+g(n)) = max(f(n), g(n))

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



35:  

The number of nodes of height h in any n - h element heap is ___________.

A.

h

B.

zh

C.

ugc net computer science

D.

ugc net computer science

 
 

Option: D

Explanation :

The number of nodes of height h in any n - element heap is ceil(n/z^h + 1.

Click on Discuss to view users comments.

Write your comments here: