SimpleGraphQ

SimpleGraphQ[g]

yields True if the graph g is a simple graph and False otherwise.

Details

  • A graph is simple if it has no self-loops or multiple edges between the same vertices.

Examples

open allclose all

Basic Examples  (2)

Test whether a graph is simple:

Not all graphs are simple:

Scope  (5)

SimpleGraphQ works with undirected graphs:

Directed graphs:

Multigraphs:

Mixed graphs:

SimpleGraphQ works with large graphs:

Properties & Relations  (8)

A graph with self-loops is not simple:

A simple graph can have a cycle:

A simple graph can be bipartite:

A PathGraph is always simple:

The adjacency matrix of a simple graph has zeros on the diagonal:

The incidence matrix of a simple graph has entries -1, 0, or 1:

All vertices of a simple graph have maximum degree less than the number of vertices:

A nontrivial simple graph must have at least one pair of vertices with the same degree:

Possible Issues  (2)

A simple graph can have two edges between the same vertices but with opposite direction:

SimpleGraphQ gives False for non-explicit graphs:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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