I am looking at the proof that $G$ has an Euler tour iff in-degree($v$)=out-degree($v$), that I found at this site: www.cs.duke.edu/courses/fall09/cps230/hws/hw3/headsol.pdf  (Problem 2)

A simple cycle is a path in a graph that starts and ends at the same vertex without passing through the same vertex more than once.

A complex cycle is a cycle that passes through the same vertex more than once. We can easily decompose a complex cycle to a set of simple cycles by breaking up the cycle at those points where the cycle passes through the same vertex more than once.

As the first part of our proof, we will prove that if $G$ has an Euler tour, in-degree($v$)=out-degree($v$) for each vertex $v \in V$.

We have already established that a complex cycle can be decomposed to a collection of simple cycles. However vertices on a simple cycle have in-degree($v$)=out-degree($v$)=1.

Since each vertex in a complex cycle, and therefore in an Euler tour, is part of one or more simple cycles it will have in-degree($v$)=out-degree($v$).


Could you give me an example of a complex cycle that is decomposed to a set of simple cycles, where we can see that in-degree($v$)=out-degree($v$)?


The second part of our proof requires us to prove that if in-degree($v$)=out-degree($v$) for each vertex $v \in V$, $G$ has an Euler-tour.

Let $C$ be the complex cycle involving the most edges in $G$.

In order for $G$ not to be an Euler tour, there must be some vertices that $C$ passes through ( since the graph is connected ) but does not exhaust all edges. We have already established that the vertices of a complex cycle have the property that in-degree($v$)=out-degree($v$). Therefore $G'=G-C$ will also have that property. If a connected component in a graph has in-degree($v$)=out-degree($v$) then it contains at least one cycle $C'$. However this contradicts our initial hypothesis that $C$ is the cycle involving the most edges in $G$ since we would construct a larger cycle by starting at some common vertex of $C$ and $C'$, traversing all of $C$s edges and then $C'$s edges. Therefore $C$ is an Euler tour.


First of all, it says that "In order for $G$ not to be an Euler tour, there must be some vertices that $C$ passes through ( since the graph is connected ) but does not exhaust all edges. " 


I haven't understood why we have to show that $G$ does not exhaust all edges. In order for $G$ not to be an Euler tour, couldn't it also hold that  $G$ traverses an edge more than once?

Then it says that "We have already established that the vertices of a complex cycle have the property that in-degree($v$)=out-degree($v$). Therefore $G'=G-C$ will also have that property."

Why will $G'=G-C$ be a complex cycle, although $G$ isn't necessarily?

Also, could you explain me why it holds that: " If a connected component in a graph has in-degree($v$)=out-degree($v$) then it contains at least one cycle $C'$."

Finally, could you explain me the contradiction?

EDIT: I also want to describe an algorithm that runs in time $O(E)$ and finds an Euler tour of $G$, if it exists. (Hint: Merge edge-disjoint cycles.) 
If we apply DFS, we will get a set of cycles formed by disjoint sets of edges, right? But how can we know if it holds that in-degree(v)=out-degree(v), for all vertices in $V$?

Do we have to do something like that?  algorithm


Question: Clicking "Add comment" fails review audit
Answer: I understand the purpose of positive audits but I think the system is flawed. The good way to review is take time, read the post and understand it. When doing that, I find myself having all sorts off thoughts around the topic mentioned in the post. Sometimes I would like to add something. Sometimes I know a good link that would add to the post. Sometimes I would like to see clarification of some point which I believe could be expanded on. Comments are all suitable for that. I still think the post is good and I just want to comment on it so that it can become better.

Yet the system tries to stop me from doing that. It encourages me to only post comments on bad posts. My understanding is that comments don't work this way outside of the review system. We end up having to follow 2 sets of rules: one when reviewing and one outside of the review queue.

The same applies to edits in much lesser extend - edits of good posts are less warranted then comments (of the type mentioned above).