WeaklyConnectedGraphQ

WeaklyConnectedGraphQ[g]

yields True if the graph g is weakly connected, and False otherwise.

Details

  • WeaklyConnectedGraphQ works for any graph object.
  • A graph is weakly connected if there is a sequence of edges joining every pair of vertices.
  • A graph is weakly connected if there is a sequence of edges joining every pair of vertices when the graph is considered undirected.

Examples

open allclose all

Basic Examples  (2)

Test whether a graph is weakly connected:

A graph with isolated vertices is not weakly connected:

Scope  (6)

Test undirected graphs:

Directed graphs:

Multigraphs:

Mixed graphs:

WeaklyConnectedGraphQ gives False for anything that is not a weakly connected graph:

WeaklyConnectedGraphQ works with large graphs:

Properties & Relations  (3)

A tree graph is weakly connected:

A path graph is weakly connected:

The minimum number of edges in a weakly connected graph with vertices is :

A path graph with vertices has exactly edges:

Wolfram Research (2012), WeaklyConnectedGraphQ, Wolfram Language function, https://reference.wolfram.com/language/ref/WeaklyConnectedGraphQ.html.

Text

Wolfram Research (2012), WeaklyConnectedGraphQ, Wolfram Language function, https://reference.wolfram.com/language/ref/WeaklyConnectedGraphQ.html.

CMS

Wolfram Language. 2012. "WeaklyConnectedGraphQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WeaklyConnectedGraphQ.html.

APA

Wolfram Language. (2012). WeaklyConnectedGraphQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WeaklyConnectedGraphQ.html

BibTeX

@misc{reference.wolfram_2024_weaklyconnectedgraphq, author="Wolfram Research", title="{WeaklyConnectedGraphQ}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/WeaklyConnectedGraphQ.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_weaklyconnectedgraphq, organization={Wolfram Research}, title={WeaklyConnectedGraphQ}, year={2012}, url={https://reference.wolfram.com/language/ref/WeaklyConnectedGraphQ.html}, note=[Accessed: 21-December-2024 ]}