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:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Not all graphs are simple:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (5)

Properties & Relations  (8)

Possible Issues  (2)

See Also

Graph  DirectedEdges  LoopFreeGraphQ  AdjacencyMatrix

Introduced in 2010
(8.0)