By following the relation, we could start by saying Al is in Calculus, and Calculus is taken by Al, so Al is related to Al. But also , Calculus is taken by Bob, so now Al is also related to Bob. Is Bob related to Al as well? Yes, since Bob is taking Calculus and Calculus is taken by Al.
The composition is telling us which pairs of students have at least one class in common. Thatβs almost all pairs of students, except that Dirk is not related to Bob or Eva, since they donβt take Statistics, and that is the only class he takes.
Instead of writing out the relation (which will almost be all of ), here is the graph representation.
While we drew a directed multigraph here, the arrows going both ways mean that we really could have drawn just a multigraph.