BUILT-IN MATHEMATICA SYMBOL

# PathGraph

PathGraph[{v1, v2, ...}]
yields a path with vertices and edges between and .

PathGraph[{e1, e2, ...}]
yields a path with edges .

PathGraph[{v1, v2, ...}, {e1, e2, ...}]
yields a path with vertices and edges .

PathGraph[{..., wi[vi, ...], ...}, {..., wj[ej, ...], ...}]
yields a path with vertex and edge properties defined by the symbolic wrappers .

## Details and OptionsDetails and Options

• PathGraph generates a Graph object.
• PathGraph supports the same vertices, edges, wrappers, and options as Graph.
• An undirected path graph is a connected graph where each vertex has at most degree two.
• A directed path graph is a connected graph where each vertex has at most in-degree one and at most out-degree one.
• PathGraph can only represent self-avoiding paths, except for cycles.

## ExamplesExamplesopen allclose all

### Basic Examples (2)Basic Examples (2)

A path constructed from a list of vertices:

 Out[1]=
 Out[2]=

A list of edges:

 Out[1]=