120 likes | 305 Vues
Graph Theory. Objectives. Understand the terms: Graph Vertex Arc Simple Graph Directed Graph Adjacency Matrix Adjacency List. Have a first look at GraphDraw. Definitions. Graph is a finite number of points connected by lines. Points are normally called vertices or nodes
E N D
Objectives • Understand the terms: • Graph • Vertex • Arc • Simple Graph • Directed Graph • Adjacency Matrix • Adjacency List Have a first look at GraphDraw
Definitions • Graph is a finite number of points connected by lines. Points are normally called vertices or nodes • Lines are called edges or arcs Edge/Arc Vertex Node
Network or weighted graph • Each edge/arc has an associated number 5 Time Distance Money 4 3 3
“Connected” • Vertices are connected if there is a edge joining them • A graph is connected if all pairs of vertices are connected • A Simple Graph is one in which there are no loops and at most one edge connects any pair of vertices • A degree (or order) of a vertex is the number of edges connected to the vertex
Worked examples • Simple Graph G has six vertices and their degrees are 2d,2d,2d+1,2d+1,2d+1,3d-1 – where d is an integer • Show that d is even • Use the fact that the graph is simple to show that d < 3 and find a value for d • Draw a possible graph G
Directed graphs • Graph that has directed edges, eg: arrows on the edges 8 12 10 15
Complete Graph • Every vertex is connected by an edge to each of the other vertices. 5 vertices 4+ 3+ 2+ 1 edges
Question • Graph G has four vertices and edges of length 7,8, 8 and 9 • Explain why G is not a complete graph • Stat the number of edges that must be added to G to make it complete • Draw a directed graph for a round-robin tournament involving three teams - A, B and C
Adjacency Matrix 1 3 5 2 4
Adjacency List 1 3 5 2 4
Objectives • Understand the terms: • Graph • Vertex • Arc • Simple Graph • Directed Graph • Adjacency Matrix • Adjacency List Have a first look at GraphDraw