In graph theory, given an (undirected) graph the graph distance is, if it exists, the function that assigns to any subset of 2 vertices the length of the minimum path of edges between them, hence the minimumnumber of consecutive edges needed to connect the two vertices.