ConnectedQ[g]
yields True if undirected graph g is connected. If g is directed, the function returns True if the underlying undirected graph is connected.
ConnectedQ[g,Strong]
yields True if the directed graph g is strongly connected.
ConnectedQ[g,Weak]
yields True if the directed graph g is weakly connected.


ConnectedQ
ConnectedQ[g]
yields True if undirected graph g is connected. If g is directed, the function returns True if the underlying undirected graph is connected.
ConnectedQ[g,Strong]
yields True if the directed graph g is strongly connected.
ConnectedQ[g,Weak]
yields True if the directed graph g is weakly connected.
Details and Options
- ConnectedQ functionality is now available in the built-in Wolfram Language function ConnectedGraphQ.
- To use ConnectedQ, you first need to load the Combinatorica Package using Needs["Combinatorica`"].
Examples
Basic Examples (2)
ConnectedQ has been superseded by ConnectedGraphQ:
Tech Notes
Related Guides
-
▪
- Cycles and Connectivity ▪
- Graphs & Networks ▪
- Graph Visualization ▪
- Computation on Graphs ▪
- Graph Construction & Representation ▪
- Graphs and Matrices ▪
- Graph Properties & Measurements ▪
- Graph Operations and Modifications ▪
- Statistical Analysis ▪
- Social Network Analysis ▪
- Graph Properties ▪
- Mathematical Data Formats ▪
- Discrete Mathematics
Text
Wolfram Research (2012), ConnectedQ, Wolfram Language function, https://reference.wolfram.com/language/Combinatorica/ref/ConnectedQ.html.
CMS
Wolfram Language. 2012. "ConnectedQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/Combinatorica/ref/ConnectedQ.html.
APA
Wolfram Language. (2012). ConnectedQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/Combinatorica/ref/ConnectedQ.html
BibTeX
@misc{reference.wolfram_2025_connectedq, author="Wolfram Research", title="{ConnectedQ}", year="2012", howpublished="\url{https://reference.wolfram.com/language/Combinatorica/ref/ConnectedQ.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_connectedq, organization={Wolfram Research}, title={ConnectedQ}, year={2012}, url={https://reference.wolfram.com/language/Combinatorica/ref/ConnectedQ.html}, note=[Accessed: 13-August-2025]}