EulerianGraphQ
Examples
open all close allBasic Examples (2)
Scope (5)
EulerianGraphQ works with undirected graphs:
EulerianGraphQ[[image]]EulerianGraphQ[[image]]EulerianGraphQ[[image]]EulerianGraphQ gives False for expressions that are not graphs:
EulerianGraphQ[x]EulerianGraphQ works with large graphs:
GridGraph[{10, 10, 10, 10}];EulerianGraphQ[%] // TimingApplications (3)
Find if the seven bridges of the city of Königsberg over the river Pregel can all be traversed in a single trip without doubling back, with the additional requirement that the trip end in the same place it began:
graph = \!\(\*GraphicsBox[«6»]\);EulerianGraphQ[graph]Test whether the figure of an envelope can be traced without lifting the pen and without going over the same line twice:
EulerianGraphQ[[image]]A scheduling of a conference room and the corresponding graph of participants with edges between attendees of the same meeting:
Test whether two consecutive meetings can share a participant:
EulerianGraphQ[[image]]Properties & Relations (7)
An Eulerian cycle can be found using FindEulerianCycle:
GraphData[{"DutchWindmill", {2, 4}}]FindEulerianCycle[%]A connected undirected graph is Eulerian iff every graph vertex has an even degree:
g = GraphData[{"Antiprism", 4}]VertexDegree[g]EulerianGraphQ[g]A connected undirected graph is Eulerian if it can be decomposed into edge disjoint cycles:
g = Graph[{12, 23, 31, 34, 45, 53}]Subgraph[g, #]& /@ {{1, 2, 3}, {3, 4, 5}}The graphs are cycles if they are connected and have an equal number of edges and vertices:
ConnectedGraphQ[#] && VertexCount[#] == EdgeCount[#]& /@ %EulerianGraphQ[g]For connected directed graphs:
g = Graph[{12, 23, 31, 34, 45, 53}]Subgraph[g, #]& /@ {{1, 2, 3}, {3, 4, 5}}ConnectedGraphQ[#] && VertexCount[#] == EdgeCount[#]& /@ %EulerianGraphQ[g]The line graph of an undirected Eulerian graph is Eulerian:
g = CompleteGraph[{2, 4}]EulerianGraphQ[g]EulerianGraphQ[LineGraph[g]]The line graph of an Eulerian graph is Hamiltonian:
g = CompleteGraph[5]EulerianGraphQ[g]HamiltonianGraphQ[LineGraph[g]]A connected directed graph is Eulerian iff every vertex has equal in-degree and out-degree:
g = Graph[{12, 23, 31, 34, 41, 13}]VertexInDegree[g] == VertexOutDegree[g]{ConnectedGraphQ[g], EulerianGraphQ[g]}CycleGraph[7]EulerianGraphQ[%]Related Guides
History
Text
Wolfram Research (2010), EulerianGraphQ, Wolfram Language function, https://reference.wolfram.com/language/ref/EulerianGraphQ.html.
CMS
Wolfram Language. 2010. "EulerianGraphQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/EulerianGraphQ.html.
APA
Wolfram Language. (2010). EulerianGraphQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EulerianGraphQ.html
BibTeX
@misc{reference.wolfram_2026_euleriangraphq, author="Wolfram Research", title="{EulerianGraphQ}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/EulerianGraphQ.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_euleriangraphq, organization={Wolfram Research}, title={EulerianGraphQ}, year={2010}, url={https://reference.wolfram.com/language/ref/EulerianGraphQ.html}, note=[Accessed: 13-June-2026]}