Greedy Algorithms
1. Greedy job scheduling with deadlines algorithms’ complexity is defined as
A.  O(N) B.  Ω( n log n) C.  O (n2 log n) D.  O ( n log n)
2. The method which return different solutions from a single point ,which is _________
A.  greedy method B.  branch and bound C.  dynamic programming D.  divide and conquer
3. job sequencing with deadline is based on ____________method
A.  greedy method B.  branch and bound C.  dynamic programming D.  divide and conquer
4. fractional knapsack is based on ____________method
A.  greedy method B.  

branch and bound

C.  dynamic programming D.  divide and conquer
5. The files x1,x2,x3 are 3 files of length 30,20,10 records each. What is the optimal merge pattern value?
A.  110 B.  60 C.  90 D.  50
6. The optimal merge pattern is based on _________ method
A.  Greedy method B.  Dynamic programming C.  Knapsack method D.  Branch and bound
7.

Which of the following standard algorithms is not a Greedy algorithm?

A.  

Dijkstra's shortest path algorithm

B.  

Prim's algorithm

C.  

Kruskal algorithm

D.  

Bellmen Ford Shortest path algorithm

8.

What is the time complexity of Huffman Coding?

A.  

O(N)

B.  

O(NlogN)

C.  

O(N(logN)^2)

D.  

O(N^2)

9.

Which of the following is true about Huffman Coding.

A.  

Huffman coding may become lossy in some cases

B.  

Huffman Codes may not be optimal lossless codes in some cases

C.  

In Huffman coding, no code is prefix of any other code

D.  

All of the above

10.

Consider the undirected graph below: 

primsMST

Using Prim's algorithm to construct a minimum spanning tree starting with node A, which one of the following sequences of edges represents a possible order in which the edges would be added to construct the minimum spanning tree?

A.  

(E, G), (C, F), (F, G), (A, D), (A, B), (A, C)

B.  

(A, D), (A, B), (A, C), (C, F), (G, E), (F, G)

C.  

(A, B), (A, D), (D, F), (F, G), (G, E), (F, C)

D.  

(A, D), (A, B), (D, F), (F, C), (F, G), (G, E)