path

\xyoption

all

A path in a graph is a finite sequencePlanetmathPlanetmath of alternating vertices and edges, beginning and ending with a vertex, v1⁢e1⁢v2⁢e2⁢v3⁢…⁢en-1⁢vn such that every consecutive pair of vertices vx and vx+1 are adjacent and ex is incidentPlanetmathPlanetmath with vx and with vx+1. Typically, the edges may be omitted when writing a path (e.g., v1⁢v2⁢v3⁢…⁢vn) since only one edge of a graph may connect two adjacent vertices. In a multigraphMathworldPlanetmath, however, the choice of edge may be significant.

The length of a path is the number of edges in it.

Consider the following graph:

\xymatrix⁢A⁢\ar⁢@-[r]⁢&⁢B⁢\ar⁢@-[d]⁢D⁢\ar⁢@-[u]⁢&⁢C⁢\ar⁢@-[l]

Paths include (but are certainly not limited to) A⁢B⁢C⁢D (length 3), A⁢B⁢C⁢D⁢A (length 4), and A⁢B⁢A⁢B⁢A⁢B⁢A⁢B⁢A⁢D⁢C⁢B⁢A (length 12). A⁢B⁢D is not a path since B is not adjacent to D.

In a digraphMathworldPlanetmath, each consecutive pair of vertices must be connectedPlanetmathPlanetmath by an edge with the proper orientationPlanetmathPlanetmath; if e=(u,v) is an edge, but (v,u) is not, then u⁢e⁢v is a valid path but v⁢e⁢u is not.

Consider this digraph:

\xymatrix⁢G⁢\ar⁢[r]⁢\ar⁢[d]⁢&⁢H⁢\ar⁢[d]⁢\ar⁢[l]⁢J⁢&⁢I⁢\ar⁢[l]

G⁢H⁢I⁢J, G⁢J, and G⁢H⁢G⁢H⁢G⁢H are all valid paths. G⁢H⁢J is not a valid path because H and J are not connected. G⁢J⁢I is not a valid path because the edge connecting I to J has the opposite orientation.

Title path
Canonical name Path1
Date of creation 2013-03-22 12:16:49
Last modified on 2013-03-22 12:16:49
Owner CWoo (3771)
Last modified by CWoo (3771)
Numerical id 8
Author CWoo (3771)
Entry type Definition
Classification msc 05C38
Related topic ClosedPath
Defines path length