Graph Theory - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Graph Theory

Description:

Graph Theory Graph theory is the study of the properties of graph structures. It provides us with a language with which to talk about graphs. – PowerPoint PPT presentation

Number of Views:269
Avg rating:3.0/5.0
Slides: 16
Provided by: bob4202
Category:
Tags: graph | theory

less

Transcript and Presenter's Notes

Title: Graph Theory


1
Graph Theory
  • Graph theory is the study of the properties of
    graph structures. It provides us with a language
    with which to talk about graphs.

2
Degree
  • The degree of a vertex is the number of edges
    incident upon it.
  • The sum of the vertex degrees in any undirected
    graph is even (twice the number of edges).
  • Every graph contains an even number of odd-degree
    vertices.

3
Connectivity
  • A graph is connected if there is an undirected
    path between every pair of vertices.
  • The existence of a spanning tree is sufficient to
    prove connectivity.
  • The vertex (edge) connectivity is the smallest
    number of vertices (edges) which must be deleted
    to disconnect the graph.

4
Some terms
  • articulation vertex ?? biconnected
  • bridge ?? edge-biconnected
  • Testing for articulation vertices or bridges is
    easy via brute force.

5
Cycles
  • Eulerian cycle (path) a tour which visits every
    edge of the graph exactly once.
  • Actually, it is a circuit, not a cycle, because
    it may visit vertices more than once.
  • A mailmans route is ideally an Eulerian cycle,
    so he can visit every street (edge) in the
    neighborhood once before returning home.

6
  • An undirected graph contains an Eulerian cycle if
    it is connected and every vertex is of even
    degree.
  • A Hamiltonian cycle is a tour which visits every
    vertex of the graph exactly once.
  • The traveling salesman problem asks for the
    shortest such tour on a weighted graph.

7
Planer Graph
  • Eulers formulan-mf2
  • n of vertices
  • m of edges
  • f of faces
  • Trees mn-1, f1
  • Cubes n8, m12, f6

8
MST
  • Kruskals algorithmstarting from a minimal
    edge
  • Prims algorithmstarting from a given vertex
  • How about maximum spanning tree
  • and Minimum Product spanning tree

9
Kruskals Algorithm
  • Algorithm Kruskal(G)
  • InputG(V, E)??????(undirected weighted
    graph),??Vv0,,vn-1
  • OutputG??????(minimum spanning tree, MST)
  • T?? //T?MST,????????
  • while T????n-1?? do
  • ???(u, v),??(u, v)?E,?(u, v)???(weight)??
  • E?E-(u, v)
  • if ( (u, v)??T?????(cycle) ) then ?(u, v)??
  • else T?T?(u, v)
  • return T

10
Kruskals Algorithm -Construct MST
11
Prims algorithm
  • Algorithm Prim(G)
  • InputG(V, E)??????(undirected weighted
    graph),??Vv0,,vn-1
  • OutputG??????(minimum spanning tree, MST)
  • T?? //T?MST,????????
  • X?vx //????????vx????X?
  • while T????n-1?? do
  • ??(u, v)?E,??u?X?v?V-X,?(u, v)???(weight)??
  • T?T?(u, v)
  • X?X?v
  • return T

12
(No Transcript)
13
(No Transcript)
14
One-to-all shorted path
  • Dijkstra??? Dijkstra???????????(source)?????(dest
    ination)??????(one-to-all)???????

15
All-pair shortest path
  • Floyd-Warshall??????????(all-pair shortest
    path)???
Write a Comment
User Comments (0)
About PowerShow.com