umass lowell computer science 91 404 analysis of algorithms prof karen daniels fall 2001 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
UMass Lowell Computer Science 91.404 Analysis of Algorithms Prof. Karen Daniels Fall, 2001 PowerPoint Presentation
Download Presentation
UMass Lowell Computer Science 91.404 Analysis of Algorithms Prof. Karen Daniels Fall, 2001

Loading in 2 Seconds...

play fullscreen
1 / 5

UMass Lowell Computer Science 91.404 Analysis of Algorithms Prof. Karen Daniels Fall, 2001 - PowerPoint PPT Presentation


  • 120 Views
  • Uploaded on

UMass Lowell Computer Science 91.404 Analysis of Algorithms Prof. Karen Daniels Fall, 2001. Wednesday, 9/26/01 Graph Basics. A. A. B. B. D. F. F. E. E. D. C. C. Introductory Graph Concepts. G= (V,E) Vertex Degree Self-Loops. Undirected Graph No Self-Loops

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'UMass Lowell Computer Science 91.404 Analysis of Algorithms Prof. Karen Daniels Fall, 2001' - mika


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
umass lowell computer science 91 404 analysis of algorithms prof karen daniels fall 2001

UMass Lowell Computer Science 91.404Analysis of AlgorithmsProf. Karen DanielsFall, 2001

Wednesday, 9/26/01

Graph Basics

introductory graph concepts

A

A

B

B

D

F

F

E

E

D

C

C

Introductory Graph Concepts
  • G= (V,E)
  • Vertex Degree
  • Self-Loops
  • Undirected Graph
    • No Self-Loops
    • Adjacency is symmetric
  • Directed Graph (digraph)
    • Degree: in/out
    • Self-Loops allowed

This treatment follows 91.503 textbook Cormen et al. Some definitions differ slightly from other graph literature.

introductory graph concepts representations

A

A

B

B

A B C D E F

A B C D E F

D

A

B

C

D

E

F

A BC

B CEF

C

D D

E BD

F E

A BC

B ACEF

C AB

D E

E BDF

F BE

A

B

C

D

E

F

F

F

E

E

D

C

C

Introductory Graph Concepts:Representations
  • Undirected Graph
  • Directed Graph (digraph)

Adjacency Matrix

Adjacency List

Adjacency List

Adjacency Matrix

This treatment follows 91.503 textbook Cormen et al. Some definitions differ slightly from other graph literature.

introductory graph concepts paths cycles

A

A

B

B

F

A

B

E

E

F

E

C

D

D

D

C

C

F

Introductory Graph Concepts:Paths, Cycles

path <A,B,F>

  • Path:
    • length: number of edges
    • simple: all vertices distinct
  • Cycle:
    • Directed Graph:
      • <v0,v1,...,vk > forms cycle if v0=vk and k>=1
      • simple cycle: v1,v2..,vk also distinct
      • self-loop is cycle of length 1
    • Undirected Graph:
      • <v0,v1,...,vk > forms (simple) cycle if v0=vk and k>=3
      • simple cycle: v1,v2..,vk also distinct

simple cycle <E,B,F,E>

simple cycle <A,B,C,A>= <B,C,A,B>

This treatment follows 91.503 textbook Cormen et al. Some definitions differ slightly from other graph literature.

introductory graph concepts connectivity

A

A

A

A

B

B

B

D

D

F

F

F

E

E

E

D

D

C

C

C

C

B

strongly connected component

F

E

Introductory Graph Concepts:Connectivity

connected

  • 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 stronglyconnected component
    • strongly connected components:
      • equivalence classes under “mutually reachable” relation

2 connected components

not strongly connected

This treatment follows 91.503 textbook Cormen et al. Some definitions differ slightly from other graph literature.