Directed Graphs y = f(x) y (Digraphs) x Albert R Meyer March - - PowerPoint PPT Presentation

directed graphs
SMART_READER_LITE
LIVE PREVIEW

Directed Graphs y = f(x) y (Digraphs) x Albert R Meyer March - - PowerPoint PPT Presentation

MathematicsforComputerScience NormalPersonsGraph MIT6.042J/18.062J Directed Graphs y = f(x) y (Digraphs) x Albert R Meyer March 15, 2013 digraphs.1 Albert R Meyer March 15, 2013 digraphs.2 ComputerScientistsGraph


slide-1
SLIDE 1

Mathematics for Computer Science

Normal Person’s Graph

MIT 6.042J/18.062J

y = f(x)

Directed Graphs

y

(Digraphs)

x

Albert R Meyer March 15, 2013

digraphs.1

Albert R Meyer March 15, 2013

digraphs.2

Computer Scientist’s Graph

Digraphs

a b

  • a set, V, of vertices

c

  • a set, E ⊆ V×V
  • f directed edges

d f

(v,w) ∈ E notation: v→w

v w

e

Albert R Meyer March 15, 2013

digraphs.3

Albert R Meyer March 15, 2013

digraphs.4

1

slide-2
SLIDE 2

Relations and Graphs Digraphs

a b d c

V= {a,b,c,d} E = {(a,b), (a,c), (c,b)}

Albert R Meyer March 15, 2013

digraphs.5

Walks & Paths

Walk: follow successive edges length: 5 edges (not the 6 vertices)

Albert R Meyer March 15, 2013

digraphs.7

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

Albert R Meyer March 15, 2013

digraphs.6

Walks & Paths

Path: walk thru vertices

without repeat vertex

length: 4 edges

stuck!

Albert R Meyer March 15, 2013

digraphs.8

2

slide-3
SLIDE 3
  • • • •
  • • • •
  • • • •
  • • • •

Matrix representation Matrix representation

      1

         

    

     

              

     

       

                            

Albert R Meyer March 15, 2013

digraphs.9

Albert R Meyer March 15, 2013

digraphs.10

Matrix representation

Adjacency Matrix

 

 

  1 1

 1 1

 

 

1 1

 

  

1

1

                        

 

 1  

                          1 

Albert R Meyer March 15, 2013

digraphs.11

Albert R Meyer March 15, 2013

digraphs.12

3

slide-4
SLIDE 4
  • • • •

Adjacency Matrix

 

 0 1 1  

  •  0

1 1   

  •  0

1   

  •  0

1  

 0 1  

                          0 1 

Albert R Meyer March 15, 2013

digraphs.14

4

slide-5
SLIDE 5

MIT OpenCourseWare http://ocw.mit.edu

6.042J / 18.062J Mathematics for Computer Science

Spring 2015 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.