⇐ Uniqueness Proofs | Contents ⇒ |

To prove this equivalence we have to show the implication inGhas an Euler circuit ⇐⇒ every vertex inGhas even degree.

(which we did in Example 2 of the Indirect Proofs section) and we need to show thatGhas an Euler circuit ⇒ every vertex inGhas even degree.

Every vertex in(this we will show later, when we look at loop invariants). If we did not prove this second direction, it is possible that there is a graph where every vertex has even degree, but the graph does not have an Euler circuit. It is very tempting to take a short cut and prove both directions of an equivalence proof at the same time. This almost always leads to disaster.Ghas even degree ⇒Ghas an Euler circuit.

Another common pitfall in equivalence proofs is to prove the same direction
twice. Since we can use a direct or an indirect proof for either the "if"
or the "only if" direction, there are 4 possible ways we can write an
equivalence proof. To prove that *p* ⇐⇒ *q*, we
can use any of the following 4 methods:

- Show
*p*⇒*q*and*q*⇒*p*. - Show
*p*⇒*q*and ¬*p*⇒ ¬*q*. - Show ¬
*q*⇒ ¬*p*and*q*⇒*p*. - Show ¬
*q*⇒ ¬*p*and ¬*p*⇒ ¬*q*.

then we would have actually shown the same direction twice and have neglected to show thatp⇒qand ¬q⇒ ¬p

Sometimes a theorem establishes the equivalence of several propositions
*p*_{1}, *p*_{2}, *p*_{3}, ...,
*p*_{n}. In this case, we do not need to prove
the equivalence between every pair of statements. All we need to show is:

Hypothetical syllogism then guarantees that every pair of propositions is equivalent.p_{1}⇒p_{2}

p_{2}⇒p_{3}

p_{3}⇒p_{4}

...

p_{n-1}⇒p_{n}

p_{n}⇒p_{1}

Claim:LetGbe a connected undirected graph withnvertices andeedges. Then, the following statements are equivalent:

Gdoes not contain any cycles.e=n− 1.- there is a unique path between every pair of vertices in
G.

Proof:

(I ⇒ II) Suppose thatGdoes not contain any cycles. We first argue thatGmust have a vertex with degree 1 as long asGhas at least 2 vertices. (We do this because when we remove a degree 1 vertex, we do not disconnect the graph and we reduce the number of vertices and edges by 1.) To see this, we explore the graph along a path. We start at any vertex and move along an edge to another vertex. We keep moving along edges but we do not reuse the edge that we used to arrive at the current vertex. If we revisit a vertex at any point, then we have discovered a cycle. SinceGdoes not have any cycles, this is impossible. Thus, each vertex we visit must be a new vertex. Since there are onlynvertices inG, after at mostnsteps we cannot discover any more new vertices. That means, the last vertex, the one we stopped at, must have degree 1. If there is an edge other than the one that we just used to arrive at the last vertex, then that edge would either lead to a previously visited vertex (creating a cycle) or to a new vertex (which implies thatGhas more thannvertices) — either of which leads to a contradiction.Now, remove the degree 1 vertex we found from

G. The resulting graph is still a connected graph without any cycles, which by the argument above, must have a degree 1 vertex. We keep removing the degree 1 vertices until all we have is a single vertex and no edges. Each time we removed a degree 1 vertex, we reduce the number vertices by 1 and the number of edges by 1. Letmbe the number of degree 1 vertices we removed in the process. Then,emust equalmandnmust equalm+ 1, since the removal process took away all of the edges and all but one of the vertices. Thus,e=n− 1.

(II ⇒ III) We prove this indirectly. That is, we show that ¬III ⇒ ¬II. In other words, we will show that if there are two paths inGbetween some pair of verticesuandv, thene≠n- 1. So, suppose that there are two pathsπ_{1}andπ_{2}fromutov:As we proved in Example 2 of the Uniqueness Proofs section, there must be a cycle from xback to itself going throughy,wandz. Herex,y,zandware vertices onπ_{1}andπ_{2}shown in the figure above. We note that every vertex in this cycle has degree at least 2.As before, we keep removing degree 1 vertices from

Guntil there are no more degree 1 vertices. Now, we are not allowed to assume thatGdoes not have any cycles, since in proving II ⇒ III we are not allowed to assume I. So, it might be the case thatGdoes not have degree 1 vertices, but that's OK. This argument takes a different route. Suppose thatmvertices are removed when we remove degree 1 vertices. (It is possible thatm= 0.) LetG'be the resulting graph.Consider the cycle from

xto itself that we found above — the one going throughy,wandz. None of the vertices in this cycle was removed. Why is this? Suppose some vertexais the first vertex from the cycle to be removed. But, ifawas first, thenawas still connected to two vertices in the cycle. That means,astill had degree 2 and should not have been removed — a contradiction. Thus, the process of removing degree 1 vertices will leave at least 4 vertices inG'.Let

n'ande'be respectively the number of vertices and edges inG'. Every vertex inG'has degree at least 2, so we have:and

2 e'=∑ degree( v)v∈G'We know summing the degrees always gives us twice the number of edges. That accounts for the first equation. The second comes from every vertex in

∑ degree( v) ≥ 2n'.v∈G'G'having degree at least 2. Thus, 2e'≥ 2n'which implies thate'≥n'. Finally, in terms of the number of verticesnand the number of edgesein the original graphG, we havee=e'+mandn=n'+mbecausemdegree 1 vertices were removed fromGto formG'. Thus,Therefore,e=e'+m≥n'+m=n.eis at leastn(thus cannot be equal ton− 1) and we have shown that ¬III ⇒ ¬II.

(III ⇒ I) We prove this indirectly and and show that ifGhas a cycle then the path between some pair of verticesuandvis not unique. So, suppose thatGhas a cyclex_{1},x_{2},x_{3}, ...,x,_{k}x_{1}. Then, letu=x_{1}andv=x_{2}. The edge betweenx_{1}andx_{2}constitutes a path fromutov. Furthermore, the reversal of the portion of the cycle fromx_{2}toxback to_{k}x_{1}is also a path fromutov. Thus, there are two paths inGfromutov.QED

⇐ Uniqueness | Contents ⇒ |

Last Modified: 12 Feb 2009 12:59:57 EST by Richard Chang to Spring 2009 CMSC 203 Homepage