Chapter 4: Directed Graphs Guy Even Moti Medina - TAU

10
Digital Logic Design: a rigorous approach c Chapter 4: Directed Graphs Guy Even Moti Medina School of Electrical Engineering Tel-Aviv Univ. March 18, 2020 Book Homepage: http://www.eng.tau.ac.il/ ~ guy/Even-Medina 1 / 27

Transcript of Chapter 4: Directed Graphs Guy Even Moti Medina - TAU

Page 1: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU

Digital Logic Design: a rigorous approach c�Chapter 4: Directed Graphs

Guy Even Moti Medina

School of Electrical Engineering Tel-Aviv Univ.

March 18, 2020

Book Homepage:http://www.eng.tau.ac.il/~guy/Even-Medina

1 / 27

Page 2: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU

rooted trees

In the following de�nition we consider a directed acyclic graphG = (V ,E ) with a single sink called the root.

De�nition

A DAG G = (V ,E ) is a rooted tree if it satis�es the followingconditions:

1 There is a single sink in G .

2 For every vertex in V that is not a sink, the out-degree equalsone.

The single sink in rooted tree G is called the root, and we denotethe root of G by r(G ).

23 / 27

Page 3: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU
Page 4: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU

paths to the root

De�nition

A DAG G = (V ,E ) is a rooted tree if it satis�es the followingconditions:

1 There is a single sink in G .

2 For every vertex in V that is not a sink, the out-degree equalsone.

Theorem

In a rooted tree there is a unique path from every vertex to theroot.

24 / 27

Page 5: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU
Page 6: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU
Page 7: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU
Page 8: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU

composition & decomposition of rooted trees

G1 G2

r(G1) r(G2)

r(G)r

r1 r2

Figure: A decomposition of a rooted tree G into two rooted trees G1 andG2.

25 / 27

Page 9: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU

Terminology

each the rooted tree Gi = (Vi ,Ei ) is called a tree hangingfrom r(G ).

Leaf : a source node.

interior vertex : a vertex that is not a leaf.

parent : if u �� v , then v is the parent of u.

Typically maximum in-degree= 2.

26 / 27

Page 10: Chapter 4: Directed Graphs Guy Even Moti Medina - TAU

Applications

The rooted trees hanging from r(G ) are ordered. Important inparse trees.

Arcs are oriented from the leaves towards the root. Useful formodeling circuits:

leaves = inputsroot = output of the circuit.

27 / 27