Finally, there are several invariants of graphs which are of particular interest because of the algorithms that compute them.
The shortestpath spanning tree of a grid graph is defined in terms of Manhattan distance, where the distance between points with coordinates and is .
In an unweighted graph there can be many different shortest paths between any pair of vertices. This path between two opposing corners goes all the way to the right, then all the way to the top.
A minimum spanning tree of a weighted graph is a set of edges of minimum total weight which form a spanning tree of the graph. Any spanning tree is a minimum spanning tree when the graphs are unweighted.
ShowGraph[ MinimumSpanningTree[ CompleteGraph[6,6,6] ] ];
The number of spanning trees of a complete graph is , as was proved by Cayley.
The maximum flow through an unweighted complete bipartite graph is the minimum degree .
NetworkFlow[ CompleteGraph[4,4], 1, 8]
A matching in a graph is a set of edges of such that no two of them share a vertex in common. A perfect matching of an even cycle consists of alternating edges in the cycle.
BipartiteMatching[ Cycle ]
Any maximal matching of a is a maximum matching, and perfect if is even.
Planar graphs are graphs which can be embedded in the plane with no pair of edges crossing. and are the basic nonplanar graphs.
PlanarQ[CompleteGraph] || PlanarQ[CompleteGraph[3,3]]
Every planar graph on nine vertices has a nonplanar complement.
PlanarQ[ GraphComplement[GridGraph[3,3]] ]
Combinatorica functions for algorithmic graph theory.