recategorized by
3,296 views
1 votes
1 votes

Dijkstra algorithm, which solves the single-source shortest--paths problem, is a _______, and the Floyd-Warshall algorithm, which finds shortest paths between all pairs of vertices, is a ________.

  1. Greedy algorithm, Divide-conquer algorithm
  2. Divide-conquer algorithm, Greedy algorithm
  3. Greedy algorithm, Dynamic programming algorithm
  4. Dynamic programming algorithm, Greedy algorithm 
recategorized by

1 Answer

2 votes
2 votes

Dijkstra algorithm, which solves the single-source shortest--paths problem, is a Greedy algorithm, and the Floyd-Warshall algorithm, which finds shortest paths between all pairs of vertices, is a Dynamic programming algorithm.

C is ans.

Answer:

Related questions

1 votes
1 votes
1 answer
2
makhdoom ghaya asked Jul 28, 2016
3,631 views
We can show that the clique problem is $NP$-hard by proving thatCLIQUE $\leq$ P 3-CNF_SATCLIQUE $\leq$ P VERTEX_COVERCLIQUE $\leq$ P SUBSET_SUMNone of the above
1 votes
1 votes
1 answer
3
makhdoom ghaya asked Jul 28, 2016
2,076 views
Match the following $:$$\begin{array}{} & \textbf{List – I} & & \textbf{List – II} \\ \text{a.} & \text{Bucket sort} & \text{i.} & O(n^3\lg n) \\ \text{b.} & \text...
3 votes
3 votes
2 answers
4
makhdoom ghaya asked Jul 28, 2016
1,912 views
Any decision tree that sorts $n$ elements has height$\Omega(n)$$\Omega(\text{lg}n)$$\Omega(n \text{lg} n)$$\Omega(n^2)$