McqMate

Q. |
## Which of the following is true? |

A. | prim’s algorithm initialises with a vertex |

B. | prim’s algorithm initialises with a edge |

C. | prim’s algorithm initialises with a vertex which has smallest edge |

D. | prim’s algorithm initialises with a forest |

Answer» A. prim’s algorithm initialises with a vertex | |

Explanation: steps in prim’s algorithm: (i) select any vertex of given graph and add it to mst (ii) add the edge of minimum weight from a vertex not in mst to the vertex in mst; (iii) it mst is complete the stop, otherwise go to step (ii). |

641

0

Do you find this helpful?

1

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- Which of the following statement is true about stack?
- Consider the graph M with 3 vertices. Its adjacency matrix is shown below. Which of the following is true?
- Which of the following is true?
- Which of the following is true about the time complexity of the recursive solution of the subset sum problem?
- Which of the following is not true about subset sum problem?
- Which of the following is true about the time complexity of the recursive solution of set partition problem?
- Consider the expression T & F ∧ T. What is the number of ways in which the expression can be parenthesized so that the output is T (true)?
- What is the maximum number of ways in which a boolean expression with n + 1 terms can be parenthesized, such that the output is true?
- Is it true that every complete bipartite graph is a modular graph.
- Suppose you have coins of denominations 1,3 and 4. You use a greedy algorithm, in which you choose the largest denomination coin which is not greater than the remaining sum. For which of the following sums, will the algorithm produce an optimal answer?