Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Let us call a vertex from which all other vertices are reachable, a vista vertex. If the graph has a vista vertex, then it must have only one source SCC (since two source SCCs are not reachable from each other), which must contain the vista vertex (if its in any other SCC, there is no path from the vista vertex to the source SCC). Moreover, in this case every vertex in the source SCC will be a vista vertex. The algorithm is then simply to a DFS starting from any node and mark the vertex with the highest finishing time. This must be in a source SCC. We now again run a DFS from this vertex to check if we can reach all nodes. Since the algorithm just uses decomposition into SCCs and DFS, the running time is linear. This algorithm is correct. Note that a vista vertex will exist if and only if there is only one source SCC. Any vertex in a source SCC is only reachable by other vertices in the same SCC, so no vertex can reach vertices in two distinct source SCCs. Furthermore, if there is only one source SCC, any vertex in that SCC is a vista vertex as they are all reachable from each other. Note that a DFS that starts in any particular SCC will not finish until all of the SCCs reachable from it have been explored. This implies that the last node to finish is in a SCC that is not reachable from any other SCCs, i.e. a source SCC. Thus in the first part of our algorithm we find a node in a source SCC. By performing DFS, we will correctly determine whether or not it is a vista vertex, and if it is not a vista vertex, we know that none exist in our graph.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload