edited by
412 views
2 votes
2 votes

Match the following:
$\begin{array}{|l|l|l|l|} \hline (1) & \text{Multistage graph} & (P) & \text{Divide and conquer}\\ \hline (2) & \text{Convex hull } & (Q) & \text{Depth first search} \\ \hline (3) & \text{Bi-connected components} & (R) & \text{Greedy method} \\ \hline (4) & \text{Knapsack problem} & (S) & \text{Dynamic programming} \\ \hline (5) & \text{All pairs shortest path} & \text{}\\\hline \end{array}$    

  1. 1 – Q, 2 – P, 3 – Q,  4– R,  5 – S
  2. 1 - Q,  2 - R, 3 - Q,  4 - P,  5 – S
  3. 1 - S,  2 – R, 3 - Q,  4– R,  5 – S
  4. 1 - S,  2 - P,  3 – Q,  4– R,  5 – S
edited by

2 Answers

Best answer
2 votes
2 votes

Multistage graph  :Dynamic Programming as it needs to see all the possibilities from each vertex to mark the vertex as source or sink

Convex hull  :Divide and Conquer as its algorithm divides the problem in upper convex and lower convex

Bi-connected components :Depth first search as Idea is to store visited edges in a stack while DFS on a graph and keep looking for Articulation Points(highlighted in above figure). As soon as an Articulation Point u is found, all edges visited while DFS from node u onwards will form one biconnected component. When DFS completes for one connected component, all edges present in stack will form a biconnected component.If there is no Articulation Point in graph, then graph is biconnected and so there will be one biconnected component which is the graph itself.

Knapsack problem :Greedy method as the knapsack needs to be filled with maximum profit possible.

All pairs shortest path: Dynamic programming as it needs to check all the possibilities from each vertex for shortest path

therefore Option D is correct

selected by
0 votes
0 votes
I am confused between C and D

all pair shortest path --dynamic programming

knapsack -- greedy

connected component--dfs

multistage graph=dynamic programming

what is meant by hull
Answer:

Related questions

0 votes
0 votes
1 answer
1
Bikram asked May 26, 2017
486 views
The cost of optimal binary search tree for the identifier set $(a1, a2, a3) =$ (do, if, while) with $p(1) = 0.3, \ p(2) = 0.2, $ $p(3) = 0.15, q (0) = 0.05, q(1) = 0.15...
2 votes
2 votes
2 answers
3
Bikram asked May 26, 2017
367 views
Assume Dijkstra's Algorithm is used to find the shortest paths from node G in the above graph. The total number of edges which are not included in any of the shortest pat...
1 votes
1 votes
2 answers
4
Bikram asked May 26, 2017
486 views
The total number of LCS (Longest Common Subsequences) of $P = abcd123$ and $Q= badc321$ that can be formed are ______.