Escolar Documentos
Profissional Documentos
Cultura Documentos
csc104ta@gmail.com
Consider a problem
Consider a problem
Let G = (V, E) be a loop free connected undirected graph Let {a, b} be an edge in G
Consider a problem
Let G = (V, E) be a loop free connected undirected graph Let {a, b} be an edge in G Prove
{a,b} is part of a cycle if and only if its removal does not disconnect G
Consider a problem
Let G = (V, E) be a loop free connected undirected graph Let {a, b} be an edge in G Prove
{a,b} is part of a cycle if and only if its removal does not disconnect G
The first thing to notice is that this problem fits a template: PROVE {Something} IF AND ONLY IF {something else}
The first thing to notice is that this problem fits a template: PROVE {Something} IF AND ONLY IF {something else}
Usually the easiest way to prove such a problem is to show that both:
{Something} implies {something else}
And also
The first thing to notice is that this problem fits a template: PROVE {Something} IF AND ONLY IF {something else}
Usually the easiest way to prove such a problem is to show that both:
{Something} implies {something else}
And also
{Something else} implies {something}
This approach works for all such proofs, not just graphs!
8
Notice the truth values are the same for both statements
A T T F F
B T F T F
AB T F T T
BA T T F T
(AB) (B A) A B T F F T T F F T
10
1.
2.
11
1.
2.
12
1.
2.
13
Great!
Two smaller problems are usually easier to solve than one large one!
14
Graph Concepts
A graph is a collection of ?
15
Graph Concepts
16
Graph Concepts
17
Graph Concepts
In a connected graph, ?
18
Graph Concepts
In a connected graph, every vertex can be reached from every other one
19
Graph Concepts
A loop is ?
20
Graph Concepts
21
Walks
Name Open Walk Closed Walk Trail (Open) Circuit (Closed) Path (Open) Cycle (Closed)
22
Walks
Note that any cycle is also a circuit which is also a closed walk, but not visa versa
Name Open Walk Closed Walk Trail (Open) Circuit (Closed) Path (Open) Cycle (Closed) May have repeated vertices Yes Yes Yes Yes No No May have repeated edges Yes Yes No No No No Must start and end on same vertex No Yes No Yes No Yes
23
Walks
24
More on Walks
More interestingly, note that we can turn any less specific walk into a shorter, more specific walk
25
More on Walks
More interestingly, note that we can turn any less specific walk into a shorter, more specific walk
26
Walks
27
Walks
28
Walks
29
Walks
Lets just remove this part! All of this also applies to undirected graphs the pointed arrows were simply shown for clarity
30
Walks
31
32
33
34
35
36
Note that if {a,b} is part of a cycle then there must also be another way to get from a to b!
37
Note that if {a,b} is part of a cycle then there must also be another way to get from a to b!
38
39
A connected graph must have at least one path between all vertices Some of these paths might include {a,b}
40
41
But since it is part of a cycle, we can always get from a to b a different way
42
But since it is part of a cycle, we can always get from a to b a different way
We just replace {a,b} in the original path with the remainder of the cycle
43
Since any two vertices connected via a path that uses {a,b}
Are also connected via another path that uses the remainder of the cycle
44
If removing {a,b} does not disconnect graph, what do we know about the relationship(s) between a and b?
45
If removing {a,b} does not disconnect graph, what do we know about the relationship(s) between a and b?
46
So consider:
1. A path from a to b that does not include {a, b} 2. {a, b}
47
So consider:
1. A path from a to b that does not include {a, b} 2. {a, b}
48
So consider:
1. A path from a to b that does not include {a, b} 2. {a, b}
49
So consider:
1. A path from a to b that does not include {a, b} 2. {a, b}
50
Thus if removing {a,b} does not disconnect the graph, then there must be some cycle that includes {a,b} Weve now shown both implications are true, and thus our original equivalence statement (aka if and only if) is true.
51
52
A Shorter Write-up
To prove this equivalence, we must first show that [{a,b} is part of a cycle] -> [removal of {a,b} does not disconnect graph] Note that a cycle on a through {a,b} can be divided into two parts: - {a,b} - and a path from a to b that does not contain {a,b} So any path connecting two vertices x and y that includes {a,b} can be replaced by another path that instead uses the other path from a to b that does not contain {a,b} Thus removing {a,b} does not disconnect the graph
We must also show that [removal of {a,b} does not disconnect graph] -> [{a,b} is part of a cycle] Note that if the graph is still connected after removing {a,b} then we know that - There must be a path from b to a that does not contain {a,b} If we take this path starting at b and ending at a, and then travel along {a,b} to return to b, we have formed a closed path. We can always form a cycle from a closed path by eliminating redundant edges. QED
53
Another approach
instead of
(Yuck)
54