Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture17: Graph I Bohyung Han CSE, POSTECH CSED233: Data Structures (2014F)

Similar presentations


Presentation on theme: "Lecture17: Graph I Bohyung Han CSE, POSTECH CSED233: Data Structures (2014F)"— Presentation transcript:

1 Lecture17: Graph I Bohyung Han CSE, POSTECH bhhan@postech.ac.kr CSED233: Data Structures (2014F)

2 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Graph 2

3 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Graphs Example:  A vertex represents an airport and stores the three‐letter airport code.  An edge represents a flight route between two airports and stores the mileage of the route. 3 ORD PVD MIA DFW SFO LAX LGA HNL 849 802 1387 1743 1843 1099 1120 1233 337 2555 142

4 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Applications Electronic circuits  Printed circuit board  Integrated circuit Transportation networks  Highway network  Flight network Computer networks  Local area network  Internet  Web Databases  Entity‐relationship diagram 4

5 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Applications 5 ImageNet Gene network

6 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Basic Definitions in Graph 6 ORDPVD flight AA 1206 ORDPVD 849 miles

7 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Undirected Graph 7

8 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Directed Graph 8

9 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Terminology 9

10 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Terminology (cont’d) 10

11 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Terminology (cont’d) 11

12 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Terminology in Directed Graph 12

13 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Properties of Graphs 13

14 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Connectivity Connected graph  There is a path from every vertex to every other vertex. Connected component  Maximal connected subgraph Complete graph  There is an edge between every pair of vertices. 14 Connected graph Non connected graph with two connected components Complete graph

15 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Connectivity in Directed Graph Strongly connected graph  There is a path from every vertex to every other vertex. Weakly connected graph  There is a path from every vertex to every other vertex, disregarding the direction of the edges. 15 Strongly connected graph Weakly connected graph

16 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Connectivity 16 Subgraph Spanning subgraph

17 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Trees and Forests A (free) tree is an undirected graph T such that  T is connected  T has no cycles  This definition of tree is different from the one of a rooted tree Forest  A forest is an undirected graph without cycles  The connected components of a forest are trees 17 Tree Forest

18 CSED233: Data Structures by Prof. Bohyung Han, Fall 2014 Spanning Trees and Forests Spanning tree  A spanning subgraph that is a tree  Not unique unless the graph is a tree Spanning forest  A spanning subgraph that is a forest 18 Graph Spanning tree

19 19


Download ppt "Lecture17: Graph I Bohyung Han CSE, POSTECH CSED233: Data Structures (2014F)"

Similar presentations


Ads by Google