The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+20 votes
1.6k views

Match the following:
$$\begin{array}{|ll|ll|}\hline \text{P.} & \text{Prim's algorithm for minimum spanning tree}  &  \text{i.}   & \text{Backtracking} \\\hline  \text{Q.} & \text{Floyd-Warshall algorithm for all pairs shortest path} & \text{ii.}& \text{ Greedy method} \\\hline  \text{R.} & \text{ Merge sort  } & \text{iii.} & \text{ Dynamic programming} \\\hline  \text{S.}&  \text{Hamiltonian circuit  } & \text{iv.} & \text{  Divide and conquer} \\\hline \end{array}$$

  1. $\text{P-iii, Q-ii, R-iv, S-i}$
  2. $\text{P-i, Q-ii, R-iv, S-iii}$
  3. $\text{P-ii, Q-iii, R-iv, S-i}$
  4. $\text{P-ii, Q-i, R-iii, S-iv}$
in Algorithms by Boss (29.7k points)
edited by | 1.6k views
+12
option c is correct ..
0

Answer C its  Basic General Queston

4 Answers

+11 votes
Best answer
by Active (2.4k points)
edited by
+1 vote
(1) Prim's algo for mst is application of greedy which give optimal solution as mst .

(2) Floyd warshall algo for all pair shortest path is application of dynamic programming because it covers all possibilities from every vertex

(3)merge sort --divide and conquer

(4) Hamiltonian circuit is application of backtracking because we have to find cycle again and again until we didn't get cycle of all vertices without repetition of vertices except source vertex.
by Boss (10.4k points)
0 votes

A)P. Prim's algorithm for minimum spanning tree  ----->ii.  Greedy method

Q. Floyd-Warshall algorithm for all pairs shortest paths------>iii. Dynamic programming

R. Mergesort ----->iv.  Divide and conque.

S. Hamiltonian circuit    ---->i.   Backtracking

by Boss (34.9k points)
0 votes

C is answer

Explanation

Prim's algo. always chooses minimum adj. edge using greedy techneque.

Floyd is a dynamic programming techneque.

Merge is a divide & conqure as we first divide the given array till single element and then merge them in single sorted array.

Hamiltoninan uses back tracking.

P-2

Q-3

R-4

S-1

by (375 points)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,309 questions
55,747 answers
192,248 comments
90,534 users