Graphs and relations

Download Report

Transcript Graphs and relations

Digraphs and Relations
7/12/2016
1
Walks in digraph G
walk from u to v and
from v to w
u
v
w
implies walk from u to w
7/12/2016
2
Walks in digraph G
walk from u to v and
from v to w, implies
walk from u to w:
+
+
u G v AND v G w
+
IMPLIES u G w
7/12/2016
3
Walks in digraph G
transitive relation R:
u R v AND v R w
IMPLIES u R w
+
G is transitive
7/12/2016
4
transitivity
Theorem:
R is a transitive iff
R = G+ for some
digraph G
7/12/2016
5
Transitive Closure
G+ is the transitive
closure of the
binary relation G
7/12/2016
6
reflexivity
relation R on set A
is reflexive iff
a R a for all a A
≤ on numbers and ⊆ on
sets are reflexive
7/12/2016
7
reflexivity
For any digraph G,
*
G is reflexive
7/12/2016
8
Reflexive Transitive
Closure
G* is the reflexive
transitive closure
of the binary
relation G
7/12/2016
9
two-way walks
If there is a walk from
u to v and a walk back
from v to u then u and v
are strongly connected.
u
7/12/2016
*
G v AND
*
vG u
10
symmetry
relation R on set A
is symmetric iff
a R b IMPLIES b R a
7/12/2016
11
Paths in DAG D
path from u to v implies
no path from v to u
unless u=v
*
u D v and u≠v
*
IMPLIES NOT(v D u)
7/12/2016
12
antisymmetry
antisymmetric relation R:
u R v IMPLIES NOT(v R u)
for any u v
If D is a DAG then
*
D
7/12/2016
is antisymmetric
13
(weak) partial orders
Reflexive, Transitive,
and Antisymmetric
examples:
•⊆ is (weak) p.o. on sets
•  is (weak) p.o. on
7/12/2016
14
weak partial orders
Theorem:
R is a WPO iff
R = D* for some
DAG D
7/12/2016
15
equivalence relations
transitive,
symmetric &
reflexive
7/12/2016
16
equivalence relations
Theorem:
R is an equiv rel iff
R = the strongly
connected relation
of some digraph
7/12/2016
17
equivalence relation
examples:
• =
(equality)
• same size
• sibling (same parents)
7/12/2016
18
Equivalence Relation
An equivalence relation decomposes the
domain into subsets called equivalence
classes where aRb iff a and b are in the
same equivalence class
In the digraph of an equivalence relation, all
the members of an equivalence class are
reachable from each other but not from
any other equivalence class
7/12/2016
19
Graphical Properties of Relations
Reflexive
Symmetric
Transitive Equivalence Relation
7/12/2016
20
Finis
7/12/2016
21