Perform a depth-first search on the following graph; whenever theres a choice of vertices, pick the one that is alphabetically first. Classify each edge as a tree edge or back edge, and give the pre and post number of each vertex.
Read moreTextbook Solutions for Algorithms
Chapter 3 Problem 3.30
Question
On page 91, we defined the binary relation “connected” on the set of vertices of a directed graph. Show that this is an equivalence relation (see Exercise 3.29), and conclude that it partitions the vertices into disjoint strongly connected components.
Solution
Step 1 of 2
In relation, when it satisfies all the three properties such that reflexive, symmetric, and transitive is known as equivalence relation.
A binary relation on a set
is said to have the following three properties, when it satisfies the condition:
- Reflexive: If for all
- Symmetric: If implies
- Transitive: If and
implies
Subscribe to view the
full solution
full solution
Title
Algorithms 1
Author
Sanjoy Dasgupta Algorithms, Christos H. Papadimitriou Algorithms, Umesh Vazirani Algorithms
ISBN
9780073523408