lecture 5: graphs. · quick proof. the sum of the vertex degrees is equal to (a) the total number...

269
Lecture 5: Graphs. Graphs!

Upload: others

Post on 03-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Lecture 5: Graphs.

Graphs!

EulerDefinitions: model.Fact!Euler Again!!

Planar graphs.Euler Again!!!!

Page 2: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Lecture 5: Graphs.

Graphs!Euler

Definitions: model.Fact!Euler Again!!

Planar graphs.Euler Again!!!!

Page 3: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Lecture 5: Graphs.

Graphs!EulerDefinitions: model.

Fact!Euler Again!!

Planar graphs.Euler Again!!!!

Page 4: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Lecture 5: Graphs.

Graphs!EulerDefinitions: model.Fact!

Euler Again!!Planar graphs.

Euler Again!!!!

Page 5: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Lecture 5: Graphs.

Graphs!EulerDefinitions: model.Fact!Euler Again!!

Planar graphs.Euler Again!!!!

Page 6: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Lecture 5: Graphs.

Graphs!EulerDefinitions: model.Fact!Euler Again!!

Planar graphs.Euler Again!!!!

Page 7: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Lecture 5: Graphs.

Graphs!EulerDefinitions: model.Fact!Euler Again!!

Planar graphs.

Euler Again!!!!

Page 8: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Lecture 5: Graphs.

Graphs!EulerDefinitions: model.Fact!Euler Again!!

Planar graphs.Euler Again!!!!

Page 9: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 10: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 11: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 12: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 13: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 14: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 15: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 16: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 17: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 18: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?

Yes? No?We will see!

Page 19: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?Yes?

No?We will see!

Page 20: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?Yes? No?

We will see!

Page 21: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Konigsberg bridges problem.

Can you make a tour visiting each bridge exactly once?

“Konigsberg bridges” by Bogdan Giusca - License.

A

B

C

D

Can you draw a tour in the graph where you visit each edge once?Yes? No?We will see!

Page 22: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph:

G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.

For CS 70, usually simple graphs.No parallel edges.

Multigraph above.

Page 23: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).

V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.

For CS 70, usually simple graphs.No parallel edges.

Multigraph above.

Page 24: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.

{A,B,C,D}E ⊆ V ×V - set of edges.{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.

For CS 70, usually simple graphs.No parallel edges.

Multigraph above.

Page 25: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.

For CS 70, usually simple graphs.No parallel edges.

Multigraph above.

Page 26: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V -

set of edges.{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.

For CS 70, usually simple graphs.No parallel edges.

Multigraph above.

Page 27: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.

{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.For CS 70, usually simple graphs.

No parallel edges.Multigraph above.

Page 28: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B}

,{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.For CS 70, usually simple graphs.

No parallel edges.Multigraph above.

Page 29: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B},{A,B}

,{A,C},{B,C},{B,D},{B,D},{C,D}}.For CS 70, usually simple graphs.

No parallel edges.Multigraph above.

Page 30: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B},{A,B},{A,C},

{B,C},{B,D},{B,D},{C,D}}.For CS 70, usually simple graphs.

No parallel edges.Multigraph above.

Page 31: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.

For CS 70, usually simple graphs.No parallel edges.

Multigraph above.

Page 32: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.

For CS 70, usually simple graphs.

No parallel edges.Multigraph above.

Page 33: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.

For CS 70, usually simple graphs.No parallel edges.

Multigraph above.

Page 34: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graphs: formally.

AB C

D

AB C

D

Graph: G = (V ,E).V - set of vertices.{A,B,C,D}

E ⊆ V ×V - set of edges.{{A,B},{A,B},{A,C},{B,C},{B,D},{B,D},{C,D}}.

For CS 70, usually simple graphs.No parallel edges.

Multigraph above.

Page 35: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).

V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 36: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.

{1,2,3,4}E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 37: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 38: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.

{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 39: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),

(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 40: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),

(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 41: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),

(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 42: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 43: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.

Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 44: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament:

1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 45: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2,

...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 46: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence:

1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 47: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2,

..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 48: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 49: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network:

Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 50: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed?

Undirected?Friends. Undirected.Likes. Directed.

Page 51: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?

Friends. Undirected.Likes. Directed.

Page 52: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends.

Undirected.Likes. Directed.

Page 53: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.

Likes. Directed.

Page 54: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes.

Directed.

Page 55: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 56: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Graphs

12 3

4

G = (V ,E).V - set of vertices.{1,2,3,4}

E ordered pairs of vertices.{(1,2),(1,3),(1,4),(2,4),(3,4)}

One way streets.Tournament: 1 beats 2, ...Precedence: 1 is before 2, ..

Social Network: Directed? Undirected?Friends. Undirected.Likes. Directed.

Page 57: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 58: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 59: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10?

1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 60: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,

5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 61: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,

7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 62: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7,

8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 63: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.

u is neighbor of v if (u,v) ∈ E .Edge (10,5) is incident to vertex 10 and vertex 5.

Edge (u,v) is incident to u and v .Degree of vertex 1? 2

Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 64: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 65: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to

vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 66: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1?

2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 67: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2

Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 68: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.

Equals number of neighbors in simple graph.Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 69: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 70: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph:

In-degree of 10? 1 Out-degree of 10? 3

Page 71: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10?

1 Out-degree of 10? 3

Page 72: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1

Out-degree of 10? 3

Page 73: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10?

3

Page 74: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 75: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Graph Concepts and Definitions.Graph: G = (V ,E)

neighbors, adjacent, degree, incident, in-degree, out-degree

1 2

3

4

5

6

7

8

910

11

1 2

3

4

5

6

7

8

910

11

Neighbors of 10? 1,5,7, 8.u is neighbor of v if (u,v) ∈ E .

Edge (10,5) is incident to vertex 10 and vertex 5.Edge (u,v) is incident to u and v .

Degree of vertex 1? 2Degree of vertex u is number of incident edges.Equals number of neighbors in simple graph.

Directed graph: In-degree of 10? 1 Out-degree of 10? 3

Page 76: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 77: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.

(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 78: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.

(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 79: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 80: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)!

Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 81: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 82: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)!

Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 83: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 84: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 85: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What?

For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 86: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 87: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...

2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 88: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..

or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 89: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?

How many incidences does each edge contribute? 2.2|E | incidences are contributed in total!

What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 90: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute?

2.2|E | incidences are contributed in total!

What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 91: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 92: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!

What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 93: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v?

incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 94: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !

sum of degrees is total incidences ... or 2|E |.Thm: Sum of vertex degress is 2|E |.

Page 95: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences

... or 2|E |.Thm: Sum of vertex degress is 2|E |.

Page 96: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 97: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Quick Proof.The sum of the vertex degrees is equal to

(A) the total number of vertices, |V |.(B) the total number of edges, |E |.(C) What?

Not (A)! Triangle.

Not (B)! Triangle.

What? For triangle number of edges is 3, the sum of degrees is 6.

Could it always be...2|E |? ..or 2|V |?How many incidences does each edge contribute? 2.

2|E | incidences are contributed in total!What is degree v? incidences contributed to v !sum of degrees is total incidences ... or 2|E |.

Thm: Sum of vertex degress is 2|E |.

Page 98: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 99: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path?

{1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 100: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ?

No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 101: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!

Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).

Quick Check! Length of path? k vertices or k −1 edges.Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 102: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path?

{1,10}, {10,5}, {5,4}, {4,11}? Yes!Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).

Quick Check! Length of path? k vertices or k −1 edges.Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 103: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}?

Yes!Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).

Quick Check! Length of path? k vertices or k −1 edges.Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 104: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 105: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).

Quick Check! Length of path? k vertices or k −1 edges.Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 106: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check!

Length of path? k vertices or k −1 edges.Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 107: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path?

k vertices or k −1 edges.Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 108: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices

or k −1 edges.Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 109: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 110: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk .

Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 111: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle?

k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 112: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!

Path is usually simple. No repeated vertex!Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 113: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple.

No repeated vertex!Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 114: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 115: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.

Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 116: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.

Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 117: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 118: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 119: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!

Path is to Walk as Cycle is to ?? Tour!

Page 120: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ??

Tour!

Page 121: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 122: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Paths, walks, cycles, tour.

1 2

3

4

5

6

7

8

910

11

A path in a graph is a sequence of edges.

Path? {1,10}, {8,5}, {4,5} ? No!Path? {1,10}, {10,5}, {5,4}, {4,11}? Yes!

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Quick Check! Length of path? k vertices or k −1 edges.

Cycle: Path with v1 = vk . Length of cycle? k −1 vertices and edges!Path is usually simple. No repeated vertex!

Walk is sequence of edges with possible repeated vertex or edge.Tour is walk that starts and ends at the same node.

Quick Check!Path is to Walk as Cycle is to ?? Tour!

Page 123: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Paths, walks, cycles, tours ... are analagous to undirected now.

Page 124: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).

Paths, walks, cycles, tours ... are analagous to undirected now.

Page 125: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).

Paths, walks, cycles, tours ... are analagous to undirected now.

Page 126: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).

Paths, walks, cycles, tours ... are analagous to undirected now.

Page 127: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).

Paths, walks, cycles, tours ... are analagous to undirected now.

Page 128: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Paths,

walks, cycles, tours ... are analagous to undirected now.

Page 129: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Paths, walks,

cycles, tours ... are analagous to undirected now.

Page 130: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Paths, walks, cycles,

tours ... are analagous to undirected now.

Page 131: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Paths, walks, cycles, tours

... are analagous to undirected now.

Page 132: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Directed Paths.

1 2

3

4

5

6

7

8

910

11

Path: (v1,v2),(v2,v3), . . .(vk−1,vk ).Paths, walks, cycles, tours ... are analagous to undirected now.

Page 133: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 134: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 135: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.

Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 136: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected?

Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 137: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes?

No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 138: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 139: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof:

Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 140: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 141: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 142: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!

Either modify definition to walk.Or cut out cycles. .

Page 143: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.

Or cut out cycles. .

Page 144: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles.

.

Page 145: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 146: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Connectivity

1 2

3

4

5

6

7

8

910

11

u and v are connected if there is a path between u and v .

A connected graph is a graph where all pairs of vertices areconnected.

If one vertex x is connected to every other vertex.Is graph connected? Yes? No?

Proof: Use path from u to x and then from x to v .

May not be simple!Either modify definition to walk.Or cut out cycles. .

Page 147: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected?

Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 148: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 149: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now?

No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 150: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 151: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components?

{1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 152: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.

Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 153: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.

Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 154: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 155: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 156: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component?

No.

Not maximal.

Page 157: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 158: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Understanding Definition.

1 2

3

4

5

6

7

8

910

11

Is graph above connected? Yes!

How about now? No!

Connected Components? {1},{10,7,5,8,4,3,11},{2,9,6}.Connected component - maximal set of connected vertices.

Quick Check: Is {10,7,5} a connected component? No.

Not maximal.

Page 159: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 160: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 161: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.

Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 162: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.

Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 163: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.

Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 164: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit.

Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 165: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.

Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 166: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 167: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 168: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 169: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter,

you leave.For starting node, tour leaves first ....then enters at end.

Page 170: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.

For starting node, tour leaves first ....then enters at end.

Page 171: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.

For starting node, tour leaves first ....then enters at end.

Page 172: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.

For starting node, tour leaves first ....then enters at end.

Page 173: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node,

tour leaves first ....then enters at end.

Page 174: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first

....then enters at end.

Page 175: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 176: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finally..back to Euler!

An Eulerian Tour is a tour that visits each edge exactly once.

Theorem: Any undirected graph has an Eulerian tour if and only if allvertices have even degree and is connected.

Proof of only if: Eulerian =⇒ connected and all even degree.Eulerian Tour is connected so graph is connected.Tour enters and leaves vertex v on each visit.Uses two incident edges per visit. Tour uses all incident edges.Therefore v has even degree.

When you enter, you leave.For starting node, tour leaves first ....then enters at end.

Page 177: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm.

First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 178: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 179: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges

... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 180: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges

... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 181: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges

... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 182: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges

... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 183: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges

... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 184: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges

... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 185: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .

2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 186: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.

3. Let G1, . . . ,Gk be connected components.Each is touched by C.

Why? G was connected.Let vi be (first) node in Gi touched by C.

Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 187: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 188: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.

Why? G was connected.Let vi be (first) node in Gi touched by C.

Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 189: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why?

G was connected.Let vi be (first) node in Gi touched by C.

Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 190: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 191: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.

Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 192: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1,

v2 = 10, v3 = 4, v4 = 2.4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 193: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10,

v3 = 4, v4 = 2.4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 194: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4,

v4 = 2.4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 195: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 196: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi

5. Splice together.1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 197: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi

5. Splice together.1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 198: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 199: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10

,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 200: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10

,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 201: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4

,3,11,4 5,2,6,9,2 and to 1!

Page 202: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4

5,2,6,9,2 and to 1!

Page 203: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2

,6,9,2 and to 1!

Page 204: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2

and to 1!

Page 205: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Finding a tour!

Proof of if: Even + connected =⇒ Eulerian Tour.We will give an algorithm. First by picture.

1 2

3

4

5

6

7

8

910

11

1. Take a walk starting from v (1) on “unused”edges... till you get back to v .2. Remove tour, C.3. Let G1, . . . ,Gk be connected components.

Each is touched by C.Why? G was connected.

Let vi be (first) node in Gi touched by C.Example: v1 = 1, v2 = 10, v3 = 4, v4 = 2.

4. Recurse on G1, . . . ,Gk starting from vi5. Splice together.

1,10,7,8,5,10 ,8,4,3,11,4 5,2,6,9,2 and to 1!

Page 206: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 207: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !

Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 208: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree.

If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 209: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave

except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 210: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 211: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 212: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.

Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 213: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)

Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 214: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .

Let vi be first vertex of C that is in Gi .Why is there a vi in C?

G was connected =⇒a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 215: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 216: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?

G was connected =⇒a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 217: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 218: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 219: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 220: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree

and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 221: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.

Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 222: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 223: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 224: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi

starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 225: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi .

Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 226: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.

4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 227: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 228: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C

exactly once.By induction for all edges in each Gi .

Page 229: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.

By induction for all edges in each Gi .

Page 230: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 231: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Recursive/Inductive Algorithm.1. Take a walk from arbitrary node v , until you get back to v .

Claim: Do get back to v !Proof of Claim: Even degree. If enter, can leave except for v .

2. Remove cycle, C, from G.Resulting graph may be disconnected. (Removed edges!)Let components be G1, . . . ,Gk .Let vi be first vertex of C that is in Gi .

Why is there a vi in C?G was connected =⇒

a vertex in Gi must be incident to a removed edge in C.

Claim: Each vertex in each Gi has even degree and is connected.Prf: Tour C has even incidences to any vertex v .

3. Find tour Ti of Gi starting/ending at vi . Induction.4. Splice Ti into C where vi first appears in C.

Visits every edge once:Visits edges in C exactly once.By induction for all edges in each Gi .

Page 232: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 233: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 234: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework.

Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 235: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!

Should do homework. No need to write up.Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 236: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework.

No need to write up.Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 237: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 238: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework.

Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 239: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 240: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 241: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth:

mostly test, both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 242: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test,

both options!Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 243: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!

Variance mostly in exams for A/B range.most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 244: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.

most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 245: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.

most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 246: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.

most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 247: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.

most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 248: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

Administration Time!

Well admin time!

Must choose homework option or test only: soon after recieving hw 1scores.

Test Option: don’t have to do homework. Yes!!Should do homework. No need to write up.

Homework Option: have to do homework. Bummer!

The truth: mostly test, both options!Variance mostly in exams for A/B range.

most homework students get near perfect scores on homework.

How will I do?

Mostly up to you.

Page 249: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

A few details.

Welcome to turn in homework in test-only option.

Changes:80% max on homework.Test Only Reflection.

Professor Rao. What should I do?

Whatever you think best for you.

Page 250: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

A few details.

Welcome to turn in homework in test-only option.

Changes:

80% max on homework.Test Only Reflection.

Professor Rao. What should I do?

Whatever you think best for you.

Page 251: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

A few details.

Welcome to turn in homework in test-only option.

Changes:80% max on homework.

Test Only Reflection.

Professor Rao. What should I do?

Whatever you think best for you.

Page 252: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

A few details.

Welcome to turn in homework in test-only option.

Changes:80% max on homework.Test Only Reflection.

Professor Rao. What should I do?

Whatever you think best for you.

Page 253: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

A few details.

Welcome to turn in homework in test-only option.

Changes:80% max on homework.Test Only Reflection.

Professor Rao.

What should I do?

Whatever you think best for you.

Page 254: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

A few details.

Welcome to turn in homework in test-only option.

Changes:80% max on homework.Test Only Reflection.

Professor Rao. What should I do?

Whatever you think best for you.

Page 255: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

A few details.

Welcome to turn in homework in test-only option.

Changes:80% max on homework.Test Only Reflection.

Professor Rao. What should I do?

Whatever you think best for you.

Page 256: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 257: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework!

Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 258: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.

Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 259: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework!

It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 260: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.

Even if it makes little difference on test performance.E.g. One test prep method: grind through old exams.

You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 261: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 262: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.

You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 263: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.

Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 264: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.

Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 265: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 266: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....

Page 267: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....

like a gourmet meal vs. fast-food (cramming for test-only)....

Page 268: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food

(cramming for test-only)....

Page 269: Lecture 5: Graphs. · Quick Proof. The sum of the vertex degrees is equal to (A) the total number of vertices, jVj. (B) the total number of edges, jEj. (C) What? Not (A)! Triangle

TA/Professor Ramchandran opinion

Do your homework! Darnit.Make them do their homework! It is good for them.Even if it makes little difference on test performance.

E.g. One test prep method: grind through old exams.You still learn.Tests not necessarily a measure of learning.Indispensable learning tool: go toe-to-toe with problems!

HWs force learning depth and discipline....like a gourmet meal vs. fast-food (cramming for test-only)....