PathGraphQ[g] yields True if the graph g is a path and False otherwise.
Test whether a graph is a path:
The vertex degree is at most 2:
A complete graph is not a path:
The vertex degree is greater than 2:
Graph DirectedGraph TreeGraph PathGraph ConnectedGraphQ LoopFreeGraphQ TreeGraphQ
400+ new features, including the new Wolfram Predictive Interface, social network analysis, enterprise CDF deployment, and more »