- Computer Science Engineering (CSE)
- Design and Analysis of Algorithms
- Which of the following is true?

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). |

View all MCQs in:
Design and Analysis of Algorithms

- 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?

Login to Continue

It will take less than 2 minutes

Report MCQ