Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
20.8. Pseudo Code for Warshall’s Algorithm
This section
Practice test
11 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
2 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is the time complexity of Warshall's Algorithm?
Hint
Consider the number of nodes involved and the operations performed.
- 2.
Define what an intermediate node is.
Hint
Think about the structure of the paths in a directed graph.
- 3.
What is the output of Warshall's Algorithm?
- The original matrix.
- The transitive closure matrix.
- The adjacency list of the graph.
Hint
Consider what the transitive closure represents.
- 4.
In Warshall's Algorithm, how do we handle a path when the entry is 0 in the previous matrix?
- True
- False
Hint
Focus on the update rules for transitioning between matrices.
- 5.
Given a directed graph with edges A-B, B-C, and C-D, write the matrices for W(0), W(1), and W(2).
Hint
Start with the original edges and follow the definitions for intermediate paths.
- 6.
Construct the W(k) matrices from a given relationship and illustrate any new paths formed due to an intermediate node.
Hint
Consider the role of each node added as an intermediate in the paths.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
1 more question available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting