1 / 33

Vocabulary and Representations of Graphs

Explore the world of graphs, vertices, and edges to model relationships and solve problems effectively. Learn about connectivity, adjacency, complete graphs, and various ways to represent graph structures. Practice problems included.

bbonnett
Download Presentation

Vocabulary and Representations of Graphs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Vocabulary and Representations of Graphs

  2. NC Standard Course of Study • Competency Goal 1: The learner will use matrices and graphs to model relationships and solve problems. • Objective 1.02: Use graph theory to model relationships and solve problems.

  3. Graphs • Recall that a graph is a set of points called vertices and a set of line segments called edges. • Often graphs are used to model situations in which the vertices represent objects, and edges are drawn between the vertices on the basis of a particular relationship between the objects. • The important characteristics of a graph will remain unchanged if the edges are curved.

  4. Explore This • Suppose the following diagram represents the starting five players on a high school basketball team, and the edges denote friendships. B A E C D

  5. Exploration (cont’d) • This graph indicates that player C is friends with all of the other players and that E had only two friends, C and B. • Note that edge CE and edge DB intersect in this graph but that their intersection does not create a new vertex.

  6. Graph Questions • Which player has only one friend? • How many friends does E have? Who are they? • Redraw the graph so that A has no friends.

  7. Exploration (cont’d) • Consider the following solutions: • A. • Two, C and B. • The graph shown below. B A E C D

  8. Connected Graphs • The previous graph is not connected. • A graph is connectedif there is a path between each pair of vertices. • In the previous graph, there was no path from point A to any of the other vertices.

  9. Explore This • Let’s say that the graph instead represents rooms in the school. • The vertices are connected if there are direct hallways between two rooms. • According to the graph, a student can get from room C directly to any of the other four rooms. B A E C D

  10. Adjacent Vertices • When two vertices are connected with an edge they are said to be adjacent. • C is adjacent to A, B, D, and E. • Although there is no direct route from D to room A, it is possible to get from room D to room A by going through room C. • Although a path exists between D and A, they are not adjacent.

  11. Redrawing the Graph • Let’s try redrawing the graph so there is direct access from each room to every other room.

  12. Possible Solutions A B A E C D D B C E

  13. Similarities • Even though the graphs appear to be different, they are structurally the same, so they are considered to be the same graph.

  14. Complete Graphs • Graphs in which every pair of vertices is adjacent, are called complete graphs. • Complete graphs are often denoted by KN, where N is the number of vertices in the graph. • The previous graphs are deciptions of a K5 graph.

  15. Other Ways to Represent Graphs • There are other ways to represent graphs besides a diagram. • A second method is to list the set of vertices and the set of edges. This can be illustrated as: Vertices = {A, B, C, D, E} Edges = {AC, CB, CE, CD, BD, BE}

  16. Adjacency Matrix • This is the third type of way to represent a graph. • It is used to represent the vertices and edges of the graph in a computer. • A 5 X 5 matrix is formed by labeling the rows and columns corresponding to the vertices. If an edge exists between vertices, a 1 will appear in the position in the matrix; otherwise a 0 will appear.

  17. Adjacency Matrix (cont’d) A B C D E A B C D E

  18. Adjacency Matrix (cont’d) • The entry in row 2, column 4 is a 1, which indicates that an edge exists between vertices B and D.

  19. Policy Change • From now on, for all practice problems, they need to be written down and completed to be turned in the day after we finish a section. • Please do them on paper which can be turned in (so preferably, not on NOTES!)

  20. Practice Problems • Mr. Butler bought six different types of fish. Some of the fish can live in the same aquarium, but others cannot. Guppies can live with Mollies; Swordtails can live with Guppies; Gold Rams can live only with Plecostomi; and Piranhas cannot live with any of the other fish. Draw a graph to illustrate this.

  21. Practice Problems (cont’d) • Construct a graph for each of the following sets of vertices and edges. Which of the graphs are connected? Which are complete? a. V={A, B, C, D, E} b. V={M, N, O, P, Q, R, S} E={AB, AC, AD, AE, BE}E= {MN, SR, QS, SP, OP} c. V={E, F, G, J, K, M} d. V={W, X, Y, Z} E={EF, KM, FG, JM, EG, KJ} E={WX, XZ, YZ, XY, WZ, WY}

  22. Practice Problems (cont’d) • Draw a diagram representing the graph with vertices= {A, B, C, D, E, F} and edged = {AB, CD, DE, EC, EF}. a. Name two vertices that are not adjacent. b. F, E, C is one possible path from F to C. This path has length of 2, since two edges were traveled to get from F to C. Name a path from F to C with a length of 3. c. Is this graph connected? Why or why not? d. Is this graph complete? Why or why not?

  23. Practice Problems (cont’d) • Draw a graph with 5 vertices in which vertex W is adjacent to Y; X is adjacent to Z and V is adjacent to each of the other vertices. • Construct a graph for each adjacency matrix. Label the Vertices A, B, C, ….

  24. a. b. c. Practice Problems (cont’d)

  25. Practice Problems (cont’d) • Determine an adjacency matrix for each of the following graphs: A B P O R D C M S N

  26. Practice Problems (cont’d) • Give the adjacency matrix for the following graph: W Y V Z X

  27. Practice Problems (cont’d) • What do you notice about the main diagonal of the matrix? • A Matrix may be symmetric with respect to one of its rows, columns or diagonals. Does the matrix above possess symmetry? If so, where? • What would a 1 on the main diagonal indicate? What would a 2 in the second row, first column, indicate?

  28. Practice Problems (cont’d) 8. Using the graph and the adjacency matrix in exercise 7, find the sum of each row of the matrix. What does the sum of the rows tell you about the graph? 9. The number of edges that have a specific vertex as an endpoint is know as the degree or valence of that vertex. In the graph on the next slide, the degree of vertex W, denoted by deg(W) is 4. Find the degree of each of the other vertices.

  29. Practice Problems (cont’d) W Y V X Z

  30. Practice Problems (cont’d) • An edge that connects a vertex to itself is called a loop. If a graph contains a loop or multiple edges (more than one edge between two vertices), the graph is know as a multigraph. a. Give the adjacency matrix for the following multigraph:

  31. Practice Problems (cont’d) A D C E B

  32. Practice Problems (cont’d) • What is the degree of each of the five vertices? • Complete the chart below for the sum of the degrees of the vertices in a complete graph.

  33. Practice Problems (cont’d) Write a recurrence relation that expresses the relationship between the sum of the degrees of all of the vertices for KN and the sum for KN-1.

More Related