Você está na página 1de 54

A Proof Involving Graphs

csc104ta@gmail.com

Consider a problem

Let G = (V, E) be a loop free connected undirected graph

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

Note we are not removing a and b from the set of vertices

Just removing {a,b} from the set of edges

(This is problem 11.1.9 from Pg. 519)

First glance at the problem

The first thing to notice is that this problem fits a template: PROVE {Something} IF AND ONLY IF {something else}

First glance at the problem

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

First glance at the problem

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}

Recall that ( ) is the same as (( ) ( ))

This approach works for all such proofs, not just graphs!
8

Review Why Does This Template Work?

Recall that ( ) is the same as (( ) ( ))

If you dont recall this, how could you check?

Review Why Does This Template Work?

Recall that ( ) is the same as (( ) ( ))

A truth table, of course!

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

So what do we need to show here?

Lets just use our template and plug in

Who can finish this?

1.

2.

11

So what do we need to show here?

Lets just use our template and plug in

Who can finish this?


, ,

1.

2.

12

So what do we need to show here?

Lets just use our template and plug in

Who can finish this?


, ,

1.

2.

13

Great!

We can now just prove each of these implications one-at-a-time

Two smaller problems are usually easier to solve than one large one!

But each of these two statements are still tricky

Lets review a few graph concepts

14

Graph Concepts

A graph is a collection of ?

15

Graph Concepts

A graph is a collection of vertices and ?

16

Graph Concepts

A graph is a collection of vertices and edges

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

A loop is an edge from one vertex to itself

Often we ignore loops for simplicity

21

Walks

Consider the types of walks we can have

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

This is table 11.1 from page 516

22

Walks

Consider the types of walks we can have

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

This is table 11.1 from page 516

23

Walks

Likewise for open walks...

Any path is also a trail which is also an open walk

But an open walk is not necessarily also a trail


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

This is table 11.1 from page 516

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

Consider the following closed walk (starting from vertex a)

26

Walks

How can we turn this closed walk into a circuit?

27

Walks

How can we turn this closed walk into a circuit?

Lets just remove this part!

28

Walks

How can we turn this circuit into a cycle?

29

Walks

How can we turn this circuit into a cycle?

Lets just remove this part! All of this also applies to undirected graphs the pointed arrows were simply shown for clarity

30

Walks

We are left with a cycle

More importantly, now we have enough understanding to tackle our proof

31

Um, what were we proving again?

Recall we need to show the two statements below are true


. , ,

32

Um, what were we proving again?

Recall we need to show the two statements below are true


. , ,

Personally, I find the second statement more intuitive

So lets start by showing that one

33

Proving one of the implications


,

Consider the graph below

34

Proving one of the implications


,

For now, simply consider {a,b} as a way to get from a to b

35

Proving one of the implications


,

For now, simply consider {a,b} as a way to get from a to b

Note that if {a,b} is part of a cycle then

36

Proving one of the implications


,

For now, simply consider {a,b} as a way to get from a to b

Note that if {a,b} is part of a cycle then there must also be another way to get from a to b!

37

Proving one of the implications


,

For now, simply consider {a,b} as a way to get from a to b

Note that if {a,b} is part of a cycle then there must also be another way to get from a to b!

All of this also applies to a way to get from b to a

38

Proving one of the implications


,

How does this notion relate to our implication above?

39

Proving one of the implications


,

A connected graph must have at least one path between all vertices Some of these paths might include {a,b}

Such as the one below from I to C

40

Proving one of the implications


,

If we remove {a,b}, this path from I to C no longer exists

41

Proving one of the implications


,

If we remove {a,b}, this path from I to C no longer exists

But since it is part of a cycle, we can always get from a to b a different way

42

Proving one of the implications


,

If we remove {a,b}, this path from I to C no longer exists

But since it is part of a cycle, we can always get from a to b a different way

Meaning there will still be a path from I to C!

We just replace {a,b} in the original path with the remainder of the cycle

43

Proving one of the implications


,

Thus the implication above is true

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

Now for the other implication


If removing {a,b} does not disconnect graph, what do we know about the relationship(s) between a and b?

45

Now for the other implication


If removing {a,b} does not disconnect graph, what do we know about the relationship(s) between a and b?

There must be a path from a to b that does not include {a, b}

Otherwise, our graph would be disconnected after removing {a, b}

46

Now for the other implication


So consider:
1. A path from a to b that does not include {a, b} 2. {a, b}

What can we do with these?

47

Now for the other implication


So consider:
1. A path from a to b that does not include {a, b} 2. {a, b}

What can we do with these?

Walk from a to b using 1 Then walk from b to a using 2

What is this called?

48

Now for the other implication


So consider:
1. A path from a to b that does not include {a, b} 2. {a, b}

What can we do with these?

Walk from a to b using 1 Then walk from b to a using 2

What is this called? A closed walk!

And what can we form if we have a closed walk?

49

Now for the other implication


So consider:
1. A path from a to b that does not include {a, b} 2. {a, b}

What can we do with these?

Walk from a to b using 1 Then walk from b to a using 2

What is this called? A closed walk!

A cycle (using the methodology shown earlier)

50

Now for the other implication


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

That was really long!

That was a very long proof

But only because I broke it out into very gradual slides :)

What would I expect in a homework?

Consider the following slide, which contains an informal write-up:

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

The textbook answer key showed !

instead of

This is equivalent, but a bit terse and confusing Nevertheless Id accept it

Shown below for reference

(Yuck)

54

Você também pode gostar