Algorithms MCQ - Algorithm Design Techniques

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

Given: A complete graph on n vertices?
To find: Time complexity of Bellman-Ford Single source shortest path.
Analysis: Time complexity of Bellman-ford algorithm on a graph with n vertices and m edges is O(nm) For a complete graph, m = nC2 = 0(n2) (Since, there is an edge between all pair of vertices)
∴ Time Complexity = 0(n2.n) = 0(n3)
∴ Solution is (C)
Note : Include vertex of degree zero in even degree vertices.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

The problem can be solved using matrix chain multiplication. we get minimum number of multiplication using ((M1 × M2 ) × M3 ) × M4 )
= 100 × 20 × 5 + 10 × 100 × 5 + 10 × 5 × 80
= 19000.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
Share this question
Share:

The question is asking about the time complexity so it does not depends on storage scheme.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption A
Rate difficulty Rate difficulty:
Choose a difficulty.

Using matrix chain multiplication the optional way to multiply is
A1 × (A2 × A3 ) × A4
= (5 × 20 × 10) + (5 × 10 × 5) + (10 × 5 × 5)
= 1500.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption A
Rate difficulty Rate difficulty:
Choose a difficulty.

All pair shortest path Algorithm is Application of Dynamic Programming
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Why Practice with Avatto?
High Quality MCQsExam-focused questions with accurate answers
Detailed ExplanationsStep-by-step explanations to enhance learning
Latest Exam PatternBased on updated syllabus and pattern
Performance AnalyticsTrack performance and improve weak areas
100% Free PracticePractice unlimited questions for free
Boost Your PreparationAttempt mock tests, previous year papers and topic-wise quizzes.Explore All Tests →