{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 29 - 1 Program modules can import other modules[You have...

This preview shows page 1. Sign up to view the full content.

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 defined 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 + , we now examine an alternative way of building the transitive clo- sure. Let R
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern