1. DFS: discovery time/finish time on each vertexRules to follow to simplify the execution of the algorithm:a. Start from vertex (3,3) assuming indexing the vertices with (1,1) – (8.8) in this particular sample graph for your testing purpose.b. At every vertex, process its outgoing adjacent vertices in an arbitraty order c. Whenever we need to restart, do it from the white vertex with the smallest index value.Input: take an input graph in the form of adjacency matrix.0 1 0 0 0 0 0 00 0 1 0 1 1 0 00 0 0 1 0 0 1 00 0
OR
OR