# 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: