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. |
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. |
Consider a hash table of size m = 100 and the hash function h(k) = floor (m(kA mod 1)) for .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)↵, Click on Discuss to view users comments. |
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. |