GraphLecture1

GraphLecture1 - UMass Lowell Computer Science 91.404...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: UMass Lowell Computer Science 91.404 Analysis of Algorithms Prof. Karen Daniels Fall, 2011 Chapter 22: Graph Algorithms Chapter 23: Minimum Spanning Trees Chapter 24: Shortest Paths [Source: Cormen et al . textbook except where noted] Overview: Graph Algorithms Chapter 22: Elementary Graph Algorithms Introductory Concepts Graph Traversals: Depth-First Search Breadth-First Search Topological Sort Chapter 23: Minimum Spanning Trees Kruskal Prim Chapter 24: Shortest Paths Dijkstra Chapter 22 Graph Algorithms Introductory Concepts Depth-First Search Breadth-First Search Topological Sort [Source: Cormen et al. textbook except where noted] Introductory Graph Concepts G= (V,E) Vertex Degree Self-Loops Edges may have weights (see Chapters 23-24) B E C F D A B E C F D A Directed Graph (digraph) Degree: in/out Self-Loops allowed Undirected Graph No Self-Loops Adjacency is symmetric This treatment follows 91.503 textbook Cormen et al. Some definitions differ slightly from other graph literature. Introductory Graph Concepts: Motivation Networks are often modeled using graphs. Introductory Graph Concepts: Representations B E C F D A B E C F D A Undirected Graph Directed Graph (digraph) 1 1 1 1 1 1 1 1 1 A B C D E F A B C D E F 1 1 1 1 1 1 1 1 1 1 1 1 1 1 A B C D E F A B C D E F A BC B ACEF C AB D E E BDF F BE A BC B CEF C D D E BD F E Adjacency Matrix Adjacency List Adjacency Matrix Adjacency List This treatment follows textbook Cormen et al. Some definitions differ slightly from other graph literature. Introductory Graph Concepts: Paths, Cycles Path: length: number of edges simple: all vertices distinct Cycle: Directed Graph: <v ,v 1 ,...,v k > forms cycle if v =v k and k>=1 simple cycle: v 1 ,v 2 ..,v k also distinct self-loop is cycle of length 1 Undirected Graph: <v ,v 1 ,...,v k > forms (simple) cycle if v =v k and k>=3 simple cycle: v 1 ,v 2 ..,v k also distinct B E C F D A path <A,B,F> B E C F D A simple cycle <E,B,F,E> This treatment follows 91.503 textbook Cormen et al. Some definitions differ slightly from other graph literature. B E C F D A simple cycle <A,B,C,A>= <B,C,A,B> Introductory Graph Concepts: Connectivity Undirected Graph: connected every pair of vertices is connected by a path one connected component connected components: equivalence classes under is reachable from relation Directed Graph: strongly connected every pair of vertices is reachable from each other one strongly connected component strongly connected components: equivalence classes under mutually reachable relation maximal sized vertex subset inducing strongly connected subgraph B E C F D A B E C F D A connected 2 connected components not strongly connected strongly connected component B E C F D A B E C F D A This treatment follows 91.503 textbook Cormen et al. Some definitions differ slightly from other graph literature. Depth-First Search (DFS)...
View Full Document

This note was uploaded on 02/13/2012 for the course CS 91.404 taught by Professor Dr.karendaniels during the Fall '09 term at UMass Lowell.

Page1 / 131

GraphLecture1 - UMass Lowell Computer Science 91.404...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online