Working with graphs in Julia
Graphs are mathematical structures that represent the relationship between objects. A graph is a tuple of two sets; the first contains the vertices representing the objects, while the second contains the edges describing the relationship between vertex pairs. We can also refer to graphs as networks, especially when they depict real-world systems. In that case, we can call vertices nodes and edges links. As networks represent real objects, it is common to have attributes; for example, labels for their nodes and links. We usually plot graphs using dots to represent the vertices and lines to represent the edges; therefore, it is also common to refer to vertices as points and edges as lines.
We can define different graph types according to the number and direction of the represented relationship between vertices. A simple graph has no more than one edge between vertex pairs. A graph with more than one edge between vertices – for example, one that...