Upcoming SlideShare
×

Like this presentation? Why not share!

# Graph theory

## on Feb 08, 2013

• 441 views

### Views

Total Views
441
Views on SlideShare
430
Embed Views
11

Likes
0
3
0

### Report content

• Comment goes here.
Are you sure you want to

## Graph theoryPresentation Transcript

• Graph Theory
• Objectives• Understand the terms: – Graph • Vertex • Arc – Simple Graph – Directed Graph – Adjacency Matrix – Adjacency List
• 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 4 Money 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 x 1 2 3 4 51 3 1 - 1 1 1 0 5 2 1 - 0 1 0 3 1 0 - 1 22 4 4 1 1 1 - 1 5 0 0 2 1 -
• Adjacency List Vertex Adjacent Vertices1 3 1 2,3,4 5 2 1,42 4 3 1,4,5 4 1,2,3,5 5 3,4
• Objectives• Understand the terms: – Graph • Vertex • Arc – Simple Graph – Directed Graph – Adjacency Matrix – Adjacency List