1. Program modules can import other modules. [You have seen this al
ready in the Haskell course.] They can also depend indirectly on mod
ules via some chain of importation, so that for instance
M
depends on
M
±
if
M
imports
M
±
and
M
±
imports
M
±
. The relation ‘depends’ is
the transitive closure of the relation ‘imports’.
2. Two people are related if one is the parent of the other, if they are mar
ried, or if there is a chain of such relationships joining them directly.
We can model this by a universal set
People
, with three relations
Mar
ried
,
Parent
and
Relative
.
The relation
Relative
is deFned using the
transitive closure:
Relative
= ((
Parent
∪
Parent

1
)
∪
Married
)
+
D
EFINITION
3.16 (T
RANSITIVE
C
LOSURE
)
Let
R
be a binary relation on
A
. The
transitive closure
of
R
, written
t
(
R
)
or
R
+
, is
±
n
≥
1
R
n
: that is,
R
∪
R
2
∪
R
3
∪
R
4
∪
. . .
The transitive closure of a binary relation always exists. To cast more light
on
R
+
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '10
 kooskash
 Math, Transitive relation, Haskell, Transitive closure, E C L O S U R

Click to edit the document details