LoopFreeGraphQ

LoopFreeGraphQ[g]

yields True if the graph g has no self-loops, and False otherwise.

Details

  • A self-loop in a graph is an edge that connects a vertex to itself.

Examples

open allclose all

Basic Examples  (2)

Test whether a graph has no self-loops:

LoopFreeGraphQ gives False for a graph with self-loops:

Scope  (6)

LoopFreeGraphQ works with undirected graphs:

Directed graphs:

Multigraphs:

Mixed graphs:

LoopFreeGraphQ gives False for anything that is not a graph without self-loops:

LoopFreeGraphQ works with large graphs:

Properties & Relations  (5)

A bipartite graph has no self-loops:

A TreeGraph has no self-loops:

A typical PathGraph has no self-loops:

The adjacency matrix of a graph without self-loops has a zero diagonal:

The incidence matrix of a graph without self-loops has no entries greater than 1:

Possible Issues  (1)

LoopFreeGraphQ gives False for non-explicit graphs:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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