/\ / \ /____\ |\ /| | \/ | | /\ | |/__\|
Look at all the vertices in the pattern. Count how many lines meet at each vertex, and note whether the number is even or odd. Count how many vertices have an odd number of lines going into them. If there are more than two of these "odd" vertices, then the figure cannot be drawn without lifting one's pen; otherwise, it can. For example, in the figure above, there are only two odd vertices (the bottom corners, which each have three lines going into them), so we know it's possible to draw in one stroke.
A couple more interesting facts: the number of odd vertices is always even (it can be zero, but zero's an even number as far as most mathematicians are concerned). If there are no odd vertices in the figure, then you may begin drawing at any point in the pattern. If there are two odd vertices, then you must begin drawing at one of them and end at the other (so for the picture above, every method of drawing it (and there are many) involves beginning at one of the bottom corners and ending at the other).
The advantage of using all this jargon is that we'll be able to say we're proving an important theorem in graph theory (rather than mucking about with drawing stick figures on the blackboard).
What jt and Euler are saying is that a graph may be drawn in one stroke (sorry, is covered by a single path which repeats no edge twice) iff (if and only if) it has precisely 0 or 2 vertices of odd degree. To show this, we have to show that if a graph can be drawn in one stroke then there are 0 or 2 vertices of odd degree, and conversely that if there are 0 or 2 vertices of odd degree then the graph may be drawn in one stroke.
Now, if the path is closed, it has one "first" vertex, which is also its last vertex. All other edges of the path are of even degree. But we could equally have chosen any other vertex of the path to be "first", so we've shown that all vertices have even degree (if the graph has just one vertex, this argument does not work; but then the graph just contains loops around that vertex, and every loop adds 2 to the degree). So if the path is closed all vertices have even degree.
Otherwise, the path has distinct first and last vertices. The above argument shows that except for the first edge of the path, which leaves the first vertex, the number of edges at the first vertex is even. So counting that first edge, we have that the degree of the first vertex is odd. And the same argument "in reverse" shows that the degree of the last vertex is odd, too.
If the graph has exactly 1 edge, then it must look like this:
*---*
Now suppose the graph has more than one edge.
printable version chaos
Everything2 Help
cooled by jessicapierce