LondonEdinburghManchesterDubin KnockParisRomeMadridDefine the relationR+bya R+bif and only if there is a trip fromatob. Then clearlya R+bif and only if there is some path fromatobin thedirected graph. For instance, there is a path from Manchester to Rome, butno path from Rome to Manchester.We would like to calculateR+fromR.Such a relation is called thetransitive closureofR, since it is clearlytransitive, and is in fact a special relation in the sense that it is the smallesttransitive relation containingR.We can express the relationR+in terms ofRusing relational composi-tion:a R+bif and only if there is a path of lengthn
This is the end of the preview.
access the rest of the document.