Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphs Examples on some basic graph concepts and definitions All graphics are taken from the LEDA demos: basic_graph_algorithms, gw_shortest_paths, graphwin.

Similar presentations


Presentation on theme: "Graphs Examples on some basic graph concepts and definitions All graphics are taken from the LEDA demos: basic_graph_algorithms, gw_shortest_paths, graphwin."— Presentation transcript:

1 Graphs Examples on some basic graph concepts and definitions All graphics are taken from the LEDA demos: basic_graph_algorithms, gw_shortest_paths, graphwin Geetika Tewari 252a-al

2 Vertex: The point of intersection of lines
Vertex: The point of intersection of lines. The terminating point of some lines in a figure or curve Several Vertices Edge: Line that connects 2 vertices Loop: an edge that connects the same two vertices

3 Multiple Edges: More than one edge connecting two vertices

4 Undirected Graph: A graph whose edges are all undirected
Directed graph: A graph whose edges are directed

5 Simple Graph: A graph that does not contain any loops or multiple edges

6 Examples 1. Example of a graph: Notice it is undirected, has multiple edges and loops

7 2. Example of a graph: Notice the unconnected components

8 3. Example of a mutigraph (graph with multiple edges)

9 Special Cases of graphs
1. Complete Graph: A full graph where every edge is connected to every other edge Complete graph of 3 vertices Complete graph of 11 vertices

10 2. Bipartite Graphs: A graph whose vertices can be divided into two classes. Edges exist only between vertices that belong to different classes. An example of a complete bipartite graph

11 Paths Path in an directed graph: a series of connected vertices Notice in this example there is a path from vertex 0 to vertex 4: {0, 1, 3, 4}, and a path from vertex 0 to vertex 2:{0, 1, 3, 2}……

12 Path in an undirected graph
In this graph there is a path {11, 5, 7, 13, 10} There are other paths too..

13 Hamilton Path in an Undirected Graph: A path that spans all the vertices in a graph
Hamilton Path in a Directed Graph: A path that spans all the vertices in the digraph Eg: {0, 3, 5, 7, 10, 17, 21, 28}

14 Cycles: In a graph a path {Vo, V1, V2……Vk} forms a cycle if Vo = Vk and if V1, V2….Vk are distinct.
 There is a cycle in this undirected graph: {0, 1, 3, 0}, Cycles in this directed graph: {2, 3, 4, 2}

15 Hamilton Cycles: A Cycle that covers all the vertices in a graph
Hamilton Cycle in a directed graph {0, 1, 3, 2, 4, 5, 6, 7, 0} Hamiltion Cycle in an undirected graph {7, 8, 1, 4, 3, 2, 0, 5, 6, 7}

16 Cyclic and Acyclic Digraphs
A cyclic digraph: a directed graph with cycles: {0, 3, 6, 0}, {0, 1, 2, 4, 5, 3, 6, 0} An acyclic digraph: a directed graph with no cycles

17 Tree: A connected, acyclic undirected graph
Forest: An acyclic undirected graph, i.e. many trees grouped together

18 Articulation Points In an Undirected Graph
An articulation point is a vertex in a graph whose removal disconnects the graph. In the example below, the red vertices are the articulation points.


Download ppt "Graphs Examples on some basic graph concepts and definitions All graphics are taken from the LEDA demos: basic_graph_algorithms, gw_shortest_paths, graphwin."

Similar presentations


Ads by Google