18
Graph Theory Graphs, Paths & Circuits

Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Embed Size (px)

Citation preview

Page 1: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Graph Theory

Graphs, Paths & Circuits

Page 2: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

WHAT YOU WILL LEARN

• Graphs, paths and circuits• The Königsberg bridge problem

Page 3: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

History This was developed by Leonhard Euler (pronounced

“oiler”) to study the Konigsberg Bridge problem. Konigsberg was situated on both banks of the Prigel

River in Eastern Prussia with a series of seven bridges connecting the banks via two islands.

The people of Konigsberg wanted to know if it was possible to cross all seven of the bridges without crossing any twice.

Page 4: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Definitions

A graph is a finite set of points called vertices (singular form is vertex) connected by line segments (not necessarily straight) called edges.

A loop is an edge that connects a vertex to itself.

A B

C D

Loop

Edge

Vertex

Not a vertex

Page 5: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Example: Map

The map shows the states that make up part of the Midwest states from Weather Underground, Inc. Construct a graph to show the states that share a common border.

Michigan

Ohio

Indiana

Kentucky

West Virginia

Page 6: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Solution

Each vertex will represent one of the states.

If two states share a common border, connect the respective vertices with an edge.

Page 7: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Solution (continued)

Michigan

Ohio

Indiana

Kentucky

West Virginia

MI

OHIN

KY WV

Page 8: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Definitions

The degree of a vertex is the number of edges that connect to that vertex.

A vertex with an even number of edges connected to it is an even vertex.

A vertex with an odd number of edges connected to it is an odd vertex.

MI, OH, and WV are even vertices

IN, KY are odd vertices

MI

OH

IN

KY WV

Page 9: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Definitions

A path is a sequence of adjacent vertices and edges connecting them.

C, D, A, B is an example of a path.

A circuit is a path that begins and ends at the same vertex.

A, C, B, D, A forms a circuit.

A B

C D E

A B

C D E

Page 10: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Definitions

A graph is connected if, for any two vertices in the graph, there is a path that connects them.

Examples of disconnected graphs.

A

B C

D

G H

JK

Page 11: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Definitions (continued)

A bridge is an edge that if removed from a connected graph would create a disconnected graph.

A

B C

D

bridge G H

JK

bridge

Page 12: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Select the graph with six vertices, a bridge, and a loop.

a.

c.

b.

d.

Page 13: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Select the graph with six vertices, a bridge, and a loop.

a.

c.

b.

d.

Page 14: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Represent the floor plan below as a graph where each vertex represents a room and each edge represents a doorway between rooms.

Page 15: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

a.

c.

b.

d.

Page 16: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

a.

c.

b.

d.

Page 17: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Draw a connected graph with all even vertices.

a.

c.

b.

d.

Page 18: Graph Theory Graphs, Paths & Circuits. WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem

Draw a connected graph with all even vertices.

a.

c.

b.

d.