Macaulay2 » Documentation
Packages » Graphs :: isStronglyConnected
next | previous | forward | backward | up | index | toc

isStronglyConnected -- checks if a digraph is strongly connected



A digraph is said to be strongly connected if for each vertex u of D, any other vertex of D is reachable from u. An equivalent definition is that D is strongly connected if the distance matrix of D has only positive terms in the non-diagonal entries.

i1 : D = digraph({1,2,3,4},{{1,2},{2,3},{3,4},{4,2}});
i2 : isStronglyConnected D

o2 = false
i3 : D' = digraph({1,2,3,4},{{1,2},{2,1},{2,3},{3,4},{4,2}});
i4 : isStronglyConnected D'

o4 = true

See also

Ways to use isStronglyConnected :

For the programmer

The object isStronglyConnected is a method function.