I would like to know when I can draw a graph, without lifting the pencil and passing once for each edge? What theory is behind that?
Thanks for your time
I would like to know when I can draw a graph, without lifting the pencil and passing once for each edge? What theory is behind that?
Thanks for your time
Copyright © 2021 JogjaFile Inc.
This is called an eulerian graph, the famous example is the one of Königsberg bridges.
Basically, you can draw the graph without lifting the pencil if all vertices (except maybe two) have even degree (and they are all connected). The proof of this is not hard: you must enter and leave each vertex the same number of time, except maybe the starting and end point of your path, if you don't loop. The converse is a little more difficult but not too hard, it is a nice exercice.
See this page for all the details: http://en.wikipedia.org/wiki/Eulerian_path