You are on page 1of 2

Path (graph theory)

In graph theory, a path in a graph is a finite or infinite sequence of edges which


connect a sequence of vertices which, by most definitions, are all distinct from one
another. In a directed graph, a directed path (sometimes called dipath[1]) is again a
sequence of edges (or arcs) which connect a sequence of vertices, but with the added
restriction that the edges all be directed in the same direction.

Paths are fundamental concepts of graph theory, described in the introductory


sections of most graph theory texts. See e.g. Bondy and Murty (1976), Gibbons
(1985), or Diestel (2005). Korte et al. (1990) cover more advanced algorithmic
topics concerning paths in graphs.

A hypercube graph showing a


Hamiltonian path in red, and a
longest induced path in bold black.
Contents
1 Definitions
2 Examples
3 Finding paths
4 See also
5 References

Definitions
A path is a trail in which all vertices (except possibly the first and last) are distinct. A trail is a walk in which all edges are distinct. A
walk of length in a graph is an alternating sequence of vertices and edges, , which begins
and ends with vertices. If the graph is undirected, then the endpoints of are and . If the graph is directed, then is an arc
from to . An infinite path is an alternating sequence of the same type described here, but with no first or last vertex, and a
semi-infinite path (alsoray) has a first vertex, , but no last vertex. Most authors require that all of the edges and vertices be distinct
from one another. However, some authors do not make this requirement, and instead use the term simple path to refer to a path
which contains no repeated vertices.

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

Examples
A graph is connected if there are paths containing each pair of vertices.
A directed graph is strongly connected if there are oppositely oriented directed paths containing each pair of vertices.
A path such that no graph edges connect two nonconsecutive path vertices is called an induced path.
A path that includes every vertex of the graph is known as aHamiltonian path.
Two paths are vertex-independent (alternatively, internally vertex-disjoint) if they do not have any internal vertex in
common. Similarly, two paths are edge-independent (or edge-disjoint) if they do not have any internal edge in
common. Two internally vertex-disjoint pathsare edge-disjoint, but the converse is not necessarily true.
The distance between two vertices in a graph is the length of a shortest path between them, if one exists, and
otherwise the distance is infinity.
The diameter of a connected graph is the largest distance (defined above) between pairs of vertices of the graph.
Finding paths
Several algorithms exist to find shortest and longest paths in graphs, with the important distinction that the former problem is
computationally much easier than the latter.

Dijkstra's algorithm produces a list of shortest paths from a source vertex to every other vertex in directed and undirected graphs with
non-negative edge weights (or no edge weights), whilst the BellmanFord algorithm can be applied to directed graphs with negative
edge weights. The FloydWarshall algorithm can be used to find the shortest paths between all pairs of vertices in weighted directed
graphs.

See also
Glossary of graph theory
Path graph
Polygonal chain
Shortest path problem
Longest path problem
Dijkstra's algorithm
BellmanFord algorithm
FloydWarshall algorithm
Self-avoiding walk

References
1. Graph Structure Theory: Proceedings of the AMS-IMS-SIAM Joint Summer Research Conference on Graph Minors,
Held June 22 to July 5, 1991,,p.205 (https://books.google.com/books?id=idigH5CTGW
AC&pg=PA205)

Bondy, J. A.; Murty, U. S. R. (1976). Graph Theory with Applications. North Holland. pp. 1221.ISBN 0-444-19451-
7.
Diestel, Reinhard (2005).Graph Theory (3rd ed.). Graduate Texts in Mathematics, vol. 173, Springer-Verlag. pp. 6
9. ISBN 3-540-26182-6.
Gibbons, A. (1985). Algorithmic Graph Theory. Cambridge University Press. pp. 56.ISBN 0-521-28881-9.
Korte, Bernhard; Lovsz, Lszl; Prmel, Hans Jrgen;Schrijver, Alexander (Eds.) (1990). Paths, Flows, and VLSI-
Layout. Algorithms and Combinatorics 9, Springer-V erlag. ISBN 0-387-52685-4.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Path_(graph_theory)&oldid=784719355


"

This page was last edited on 9 June 2017, at 18:44.

Text is available under theCreative Commons Attribution-ShareAlike License ; additional terms may apply. By using this
site, you agree to the Terms of Use and Privacy Policy. Wikipedia is a registered trademark of theWikimedia
Foundation, Inc., a non-profit organization.

You might also like