[ library(grasper) | Third Party Libraries | Reference Manual | Alphabetic Index ]
# strongly_connected(+Graph)

Guarantees that a directed graph Graph is strongly connected.
*Graph*
- A graph.

## Description

Guarantees that a directed graph Graph is strongly connected, i.e., that each vertex is reachable from any other one.
### Fail Conditions

Fails
if Graph is not a directed graph variable or
if Graph can not be constrained to be strongly connected.
## Examples

?- strongly_connected(G).
No.
?- V`::[1,2]..[1,2,3,4], E`::[]..[[1,3],[2,4],[4,1],[4,3]], dirgraph(G,V,E), strongly_connected(G).
No.
?- V`::[]..[1,2,3], E`::[]..[[1,2],[2,1]], dirgraph(G,V,E), strongly_connected(G), graph_labeling(G).
V = []
E = []
G = dirgraph([], [])
Yes ? ;
V = [3]
E = []
G = dirgraph([3], [])
Yes ? ;
V = [2]
E = []
G = dirgraph([2], [])
Yes ? ;
V = [1]
E = []
G = dirgraph([1], [])
Yes ? ;
V = [1, 2]
E = [[1, 2], [2, 1]]
G = dirgraph([1, 2], [[1, 2], [2, 1]])
Yes