Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  In the following table, the left column conta... Start Learning for Free
In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.
1. Bellman-Ford algorithm
2. Kruskal’s algorithm
3. Floyd-Warshall algorithm
4. Topological sorting
A : O(m log n)
B : O(n3)
C : O(nm)
D : O(n + m)
  • a)
    1→ C, 2 → A, 3 → B, 4 → D
  • b)
    1→ B, 2 → D, 3 → C, 4 → A
  • c)
    1→ C, 2 → D, 3 → A, 4 → B
  • d)
    1→ B, 2 → A, 3 → C, 4 → D
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
In the following table, the left column contains the names of standard...
  • Bellman-Ford algorithm: Time complexity: O(VE)
  • Kruskal’s algorithm:Time Complexity: O(ElogE) or O(ElogV). Sorting of edges takes O(ELogE) time. After sorting, we iterate through all edges and apply find-union algorithm. The find and union operations can take atmost O(LogV) time. So overall complexity is O(ELogE + ELogV) time. The value of E can be atmost V^2, so O(LogV) are O(LogE) same. Therefore, overall time complexity is O(ElogE) or O(ElogV)
  • Floyd-Warshall algorithmTime Complexity: O(V^3)
  • Topological sortingTime Complexity: The above algorithm is simply DFS with an extra stack. So time complexity is same as DFS which is O(V+E).
View all questions of this test
Most Upvoted Answer
In the following table, the left column contains the names of standard...
Explanation:

The time complexities of the given graph algorithms are as follows:

- Bellman-Ford algorithm: O(nm)
- Kruskal's algorithm: O(m log n)
- Floyd-Warshall algorithm: O(n^3)
- Topological sorting: O(n + m)

Matching the algorithms with their time complexities:

1. Bellman-Ford algorithm: O(nm)
2. Kruskal's algorithm: O(m log n)
3. Floyd-Warshall algorithm: O(n^3)
4. Topological sorting: O(n + m)

Matching the algorithms with their time complexities:

1. Bellman-Ford algorithm: O(nm) - matches with option C
2. Kruskal's algorithm: O(m log n) - matches with option A
3. Floyd-Warshall algorithm: O(n^3) - matches with option B
4. Topological sorting: O(n + m) - matches with option D

Therefore, the correct answer is option A: 1 C, 2 A, 3 B, 4 D.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer?
Question Description
In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer?.
Solutions for In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice In the following table, the left column contains the names of standard graph algorithms and the right column contains the time complexities of the algorithms. Match each algorithm with its time complexity.1. Bellman-Ford algorithm2. Kruskal’s algorithm3. Floyd-Warshall algorithm4. Topological sortingA : O(m log n)B : O(n3)C : O(nm)D : O(n + m)a)1→ C, 2 → A, 3 → B, 4 → Db)1→ B, 2 → D, 3 → C, 4 → Ac)1→ C, 2 → D, 3 → A, 4 → Bd)1→ B, 2 → A, 3 → C, 4 → DCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev