Macaulay2 » Documentation
Packages » Graphs :: isEulerian
next | previous | forward | backward | up | index | toc

isEulerian -- determines if a graph or digraph is Eulerian

Synopsis

Description

A graph is Eulerian if it has a path in the graph that visits each vertex exactly once. A digraph is Eulerian if it has a directed path in the graph that visits each vertex exactly once. Such a path is called an Eulerian circuit. Unconnected graphs can be Eulerian, but all vertices of degree greater than 0 of a graph (or all vertices of degree greater than 0 in the underlying graph of a digraph) must belong to a single connected component.

i1 : bridges = graph ({{0,1},{0,2},{0,3},{1,3},{2,3}}, EntryMode => "edges");
i2 : E = isEulerian bridges

o2 = false
i3 : D = digraph(toList(1..4), {{2,3},{3,4},{4,2}});
i4 : E = isEulerian D

o4 = true

See also

Ways to use isEulerian :

For the programmer

The object isEulerian is a method function.