1 / 18

Directed Graphs

Directed Graphs. Normal Person’s Graph. y = f(x). y. x. Computer Scientist’s Graph. b. a. c. d. f. e. Digraphs. a set, V , of vertices a ka “nodes” a set, E ⊆ V × V of directed edges ( v,w ) ∈ E. notation: v → w. v. w. Relations and Graphs. a. b. d. c.

vaughn
Télécharger la présentation

Directed Graphs

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Directed Graphs

  2. Normal Person’s Graph y = f(x) y x

  3. Computer Scientist’s Graph b a c d f e

  4. Digraphs • a set, V, of vertices aka “nodes” • a set, E⊆V×V of directed edges (v,w)∈ E • notation: v→w v w

  5. Relations and Graphs a b d c V= {a,b,c,d} E = {(a,b), (a,c), (c,b)}

  6. Digraphs Formally, a digraph with vertices V is the same as a binary relation on V.

  7. Walks & Paths Walk: follow successive edges length: 5 edges (not the 6 vertices)

  8. Walks & Paths Path: walk thru vertices without repeat vertex length: 4 edges

  9. Walks & Paths Lemma: The shortest walk between two vertices is a path! Proof:(by contradiction) suppose path from u to vcrossed itself: c v u

  10. Walks & Paths Lemma: The shortest walk between two vertices is a path! Proof:(by contradiction) suppose path from u to vcrossed itself: then path without c---cis shorter! c v u

  11. Walks & Paths Digraph G defines walk relation G+ u G+viff∃walk u to v (the positive walk relation) “+” means 1 or more

  12. Walks & Paths Digraph G defines walk relation G* u G*viffu to v (the walk relation) “*” means “0 or more”

  13. Cycles A cycle is a walk whose only repeat vertex is its start & end. (a single vertex is a length 0 cycle)

  14. v0 v1 v2 vn-1 v0 Cycles vi vi+1 v0

  15. Closed Walks & Cycles Closed walk starts & ends at the same vertex. Lemma:The shortest positive length closed walk containing a vertex is a positive length cycle! Proof: similar

  16. Directed Acyclic Graph DAG has no positive length cycle lec 7M.16

  17. Directed Acyclic Graph DAG examples: < relation on integers ⊊ relation on sets prerequisite on classes

  18. Example: Tournament Graph H H Y Y P P D D DAG => Unique ranking Every team plays every other

More Related