The path graph P_n is a tree with two nodes of vertex degree 1, and the other n - 2 nodes of vertex degree 2. A path graph is therefore a graph that can be drawn so that all of its vertices and edges lie on a single straight line. The path graph of length n is implemented in the Wolfram Language as PathGraph[Range[n]], and precomputed properties of path graphs are available as GraphData[{Path, n}