isStronglyConnected -- checks if a digraph is strongly connected

Synopsis

• Usage:
r = isStronglyConnected D
• Inputs:
• D, an instance of the type Digraph,
• Outputs:
• r, ,

Description

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