Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Add edges to a graph to make it Eulerian
ResourceFunction["EulerizeGraph"][graph] adds edges to a connected graph to make it Eulerian. |
Create the bridges of Königsberg graph:
| In[1]:= | ![]() |
| Out[3]= | ![]() |
Eulerize the Königsberg graph:
| In[4]:= |
| Out[4]= | ![]() |
Eulerize the graph corresponding to the modern-day bridges of Königsberg (some of the original bridges are no longer present):
| In[5]:= | ![]() |
| Out[6]= | ![]() |
Show the Pappus graph and its Eulerized counterpart:
| In[7]:= |
| Out[8]= | ![]() |
If a graph is already Eulerian, the graph remains unchanged:
| In[9]:= |
| Out[9]= | ![]() |
Check that it is Eulerian:
| In[10]:= |
| Out[10]= |
Check that the original and Eulerized graphs are identical:
| In[11]:= |
| Out[11]= |
This work is licensed under a Creative Commons Attribution 4.0 International License