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

Slides:



Advertisements
Similar presentations
CS16: Introduction to Data Structures & Algorithms
Advertisements

Depth-First Search1 Part-H2 Depth-First Search DB A C E.
CSC401 – Analysis of Algorithms Lecture Notes 14 Graph Biconnectivity
CSC 213 – Large Scale Programming Lecture 27: Graph ADT.
CSC 213 Lecture 23: Shortest Path Algorithms. Weighted Graphs Each edge in weighted graph has numerical weight Weights can be distances, building costs,
CSC 213 ORD DFW SFO LAX Lecture 20: Graphs.
© 2004 Goodrich, Tamassia Graphs1 ORD DFW SFO LAX
1 Graphs ORD DFW SFO LAX Many slides taken from Goodrich, Tamassia 2004.
1 Graphs: Concepts, Representation, and Traversal CSC401 – Analysis of Algorithms Lecture Notes 13 Graphs: Concepts, Representation, and Traversal Objectives:
Graphs1 Part-H1 Graphs ORD DFW SFO LAX
Graphs1 ORD DFW SFO LAX Graphs2 Outline and Reading Graphs (§6.1) Definition Applications Terminology Properties ADT Data structures.
Graphs1 ORD DFW SFO LAX Graphs2 Outline and Reading Graphs (§6.1) Definition Applications Terminology Properties ADT Data structures.
CSC311: Data Structures 1 Chapter 13: Graphs I Objectives: Graph ADT: Operations Graph Implementation: Data structures Graph Traversals: DFS and BFS Directed.
© 2004 Goodrich, Tamassia Shortest Paths1 C B A E D F
ECE669 L10: Graph Applications March 2, 2004 ECE 669 Parallel Computer Architecture Lecture 10 Graph Applications.
Lecture20: Graph IV Bohyung Han CSE, POSTECH CSED233: Data Structures (2014F)
1 Graph Algorithms Lecture 09 Asst. Prof. Dr. Bunyarit Uyyanonvara IT Program, Image and Vision Computing Lab. School of Information and Computer Technology.
Lecture 13 Graphs. Introduction to Graphs Examples of Graphs – Airline Route Map What is the fastest way to get from Pittsburgh to St Louis? What is the.
Graphs – ADTs and Implementations ORD DFW SFO LAX
Graphs Chapter 12.
CSC 213 – Large Scale Programming. Today’s Goals  Discuss what is NOT meant by term “Graph”  Why no bar charts, scatter plots, & pie charts mentioned.
Graphs Part 1. Outline and Reading Graphs (§13.1) – Definition – Applications – Terminology – Properties – ADT Data structures for graphs (§13.2) – Edge.
Graphs1 Definitions Examples The Graph ADT LAX PVD LAX DFW FTL STL HNL.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
Graphs. Data Structure for Graphs. Graph Traversals. Directed Graphs. Shortest Paths. 2 CPSC 3200 University of Tennessee at Chattanooga – Summer 2013.
Graphs CSE 2011 Winter June Graphs A graph is a pair (V, E), where  V is a set of nodes, called vertices  E is a collection of pairs.
Spring 2007Graphs1 ORD DFW SFO LAX
GRAPHS 1. Outline 2  Undirected Graphs and Directed Graphs  Depth-First Search  Breadth-First Search.
1 prepared from lecture material © 2004 Goodrich & Tamassia COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material.
Graph A graph G is a set V(G) of vertices (nodes) and a set E(G) of edges which are pairs of vertices. abcd e i fgh jkl V = { a, b, c, d, e, f, g, h, i,
October 21, Graphs1 Graphs CS 221 (slides from textbook author)
Lecture19: Graph III Bohyung Han CSE, POSTECH CSED233: Data Structures (2014F)
CSE 373: Data Structures and Algorithms
Graphs Quebec Toronto Montreal Ottawa 449 km 255 km 200 km 545 km Winnipeg 2075 km 2048 km New York 596 km 790 km 709 km.
CHAPTER 13 GRAPH ALGORITHMS ACKNOWLEDGEMENT: THESE SLIDES ARE ADAPTED FROM SLIDES PROVIDED WITH DATA STRUCTURES AND ALGORITHMS IN C++, GOODRICH, TAMASSIA.
CHAPTER 13 GRAPH ALGORITHMS ACKNOWLEDGEMENT: THESE SLIDES ARE ADAPTED FROM SLIDES PROVIDED WITH DATA STRUCTURES AND ALGORITHMS IN C++, GOODRICH, TAMASSIA.
Programming Abstractions Cynthia Lee CS106B. Upcoming Topics Graphs! 1.Basics  What are they? How do we represent them? 2.Theorems  What are some things.
CSC 213 – Large Scale Programming Lecture 31: Graph Traversals.
Graphs ORD SFO LAX DFW Graphs 1 Graphs Graphs
Graphs 10/24/2017 6:47 AM Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and.
Minimum-cost spanning tree
Minimum-Cost Spanning Tree and Kruskal’s Algorithm
Graphs.
Graphs 5/14/ :46 PM Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and.
Shortest Path 6/18/2018 4:22 PM Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia,
Graphs 7/18/2018 7:39 AM Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and.
Graphs ORD SFO LAX DFW Graphs Graphs
Graphs ORD SFO LAX DFW Graphs Graphs
Shortest Paths C B A E D F
Graphs Part 1.
CMSC 341 Lecture 21 Graphs (Introduction)
Biconnectivity SEA PVD ORD FCO SNA MIA 11/16/2018 2:31 AM
Graphs ORD SFO LAX DFW Graphs Graphs
Graphs.
Graphs.
Connected Components Minimum Spanning Tree
Graphs ORD SFO LAX DFW Graphs Graphs
Graphs CSE 2011 Winter November 2018.
Shortest Paths C B A E D F Shortest Paths
Chapter 13 Graph Algorithms
CSE 373: Data Structures and Algorithms
Minimum Spanning Tree Section 7.3: Examples {1,2,3,4}
Graphs ORD SFO LAX DFW Graphs Graphs
Graphs ORD SFO LAX DFW Graphs Graphs
Graphs 4/29/15 01:28:20 PM Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia,
CSE 373 Data Structures and Algorithms
Graphs ORD SFO LAX DFW /15/ :57 AM
Shortest Paths.
Biconnectivity SEA PVD ORD FCO SNA MIA 5/6/2019 5:08 PM Biconnectivity
Biconnectivity SEA PVD ORD FCO SNA MIA 5/23/ :21 PM
Presentation transcript:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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