Path (graph theory)

From Free net encyclopedia

In mathematics, a path in a graph is a sequence of vertices such that from each of its vertices there is an edge to the successor vertex. The first vertex is called the start vertex and the last vertex is called the end vertex. Both of them are called end or terminal vertices of the path. The other vertices in the path are internal vertices. A cycle is a path such that the start vertex and end vertex are the same. Notice however that unlike with paths, any vertex of a cycle can be chosen as the start, so the start is often not specified.

The same concepts apply in a directed graph, with the edges being directed from each vertex to its successor. Often the terms directed path and directed cycle are used in this case.

Image:Directed cycle.png

A path with no repeated vertices is called a simple path, and similarly with simple cycle (except that the start and end vertices of a cycle are the same by definition). In modern graph theory, most often "simple" is implied; i.e., "cycle" means "simple cycle" and "path" means "simple path", but this convention is not observed in many application areas of graph theory.

Two paths are independent (alternatively, internally vertex-disjoint) if they do not have any internal vertex in common.

The length of a path is the number of edges that the path uses, counting multiple edges multiple times. In the graph shown, (1, 2, 5, 1, 2, 3) is a path of length 5, and (5, 2, 1) is a simple path of length 2.

A weighted graph associates a value (weight) with every edge in the graph. The weight of a path in a weighted graph is the sum of the weights of the traversed edges. Sometimes the words cost or length are used instead of weight.

See also

he:מסלול בגרף th:วิถี (ทฤษฎีกราฟ)