Vertex Edge Graphs What is a vertexedge graph

  • Slides: 19
Download presentation
Vertex Edge Graphs

Vertex Edge Graphs

What is a vertex-edge graph? A collection of points, some of which are joined

What is a vertex-edge graph? A collection of points, some of which are joined by line segments or curves Examples:

Vertex A point on the graph.

Vertex A point on the graph.

Edge A line segment or curve connecting the vertices of a graph.

Edge A line segment or curve connecting the vertices of a graph.

In the Real-World Vertices may represent things such as people or places. Edges may

In the Real-World Vertices may represent things such as people or places. Edges may represent connections such as roads or relationships. What are the edges, and what do they represent? What about the vertices?

Complete Graph A graph in which every vertex is adjacent to every other vertex.

Complete Graph A graph in which every vertex is adjacent to every other vertex. Which A of these is complete? B

Digraph A directed vertex edge graph

Digraph A directed vertex edge graph

Degree of the Vertex The number of edges that enter a vertex. What is

Degree of the Vertex The number of edges that enter a vertex. What is the degree of vertex A? 2 What is the degree of vertex C? 4

Real World Example The vertex edge graph below represents five people: Bob (B), Dustin

Real World Example The vertex edge graph below represents five people: Bob (B), Dustin (D), Mike (M), Sue (S) and Tammy (T). An edge connecting two vertices indicates that those two people have a class together.

Who has a class with Mike? Tammy & Sue

Who has a class with Mike? Tammy & Sue

Who does not have a class with Bob? Tammy & Mike

Who does not have a class with Bob? Tammy & Mike

Using Matrices to Represent a Vertex-Edge Graph We can use an adjacency matrix to

Using Matrices to Represent a Vertex-Edge Graph We can use an adjacency matrix to represent the vertex-edge graph. Step 1: Create a matrix listing all vertices in the row and column. Step 2: Fill in the matrix listing the number of relationships between the two points. If they share an edge, there will be a “ 1” If there is no relationship, there will be a “ 0”

Create a Matrix using the following Vertex-Edge Graph:

Create a Matrix using the following Vertex-Edge Graph:

Create a Matrix using the following Vertex-Edge Graph: R S V T U

Create a Matrix using the following Vertex-Edge Graph: R S V T U

Drawing a Vertex-Edge Graph Use the following matrix to create the vertexedge graph that

Drawing a Vertex-Edge Graph Use the following matrix to create the vertexedge graph that corresponds.

Drawing a Vertex-Edge Graph Use the following matrix to create the vertexedge graph that

Drawing a Vertex-Edge Graph Use the following matrix to create the vertexedge graph that corresponds.

Extended Relationships A railway serves four cities: Harrisburg, Baltimore, Philadelphia and Atlantic City. Trains

Extended Relationships A railway serves four cities: Harrisburg, Baltimore, Philadelphia and Atlantic City. Trains travel between Harrisburg and Baltimore, Harrisburg and Philadelphia, and Philadelphia and Atlantic City. Draw a vertex edge graph and it’s adjacency matrix to represent this situation.

Railway Continued…

Railway Continued…

Summary 3 -2 -1 On 3 a separate sheet of paper to turn in,

Summary 3 -2 -1 On 3 a separate sheet of paper to turn in, list: vocabulary words you have learned and their relationship to the vertex-edge graph 2 reasons to use a vertex-edge graph 1 real-world example of a vertex-edge graph