Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Path (graph theory)

From Wikipedia, the free encyclopedia
Sequence of edges which join a sequence of nodes on a given graph
For the family of graphs known as paths, seePath graph.
A three-dimensionalhypercube graph showing aHamiltonian path in red, and alongest induced path in bold black

Ingraph theory, apath in agraph is a finite or infinitesequence ofedges which joins a sequence ofvertices which, by most definitions, are all distinct (and since the vertices are distinct, so are the edges). Adirected path (sometimes calleddipath[1]) in adirected graph is a finite or infinite sequence of edges which joins a sequence of distinct vertices, but with the added restriction that the edges be all 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 & Murty (1976),Gibbons (1985), orDiestel (2005).Korte et al. (1990) cover more advancedalgorithmic topics concerning paths in graphs.

Definitions

[edit]

Walk, trail, and path

[edit]
LetG = (V,E,Φ) be a graph. A finite walk is a sequence of edges(e1,e2, ...,en − 1) for which there is a sequence of vertices(v1,v2, ...,vn) such thatΦ(ei) = {vi,vi + 1} fori = 1, 2, ...,n − 1.(v1,v2, ...,vn) is thevertex sequence of the walk. The walk isclosed ifv1 =vn, and it isopen otherwise. An infinite walk is a sequence of edges of the same type described here, but with no first or last vertex, and a semi-infinite walk (orray) has a first vertex but no last vertex.
  • Atrail is a walk in which all edges are distinct.[2]
  • Apath is a trail in which all vertices (and therefore also all edges) are distinct.[2]

Ifw = (e1,e2, ...,en − 1) is a finite walk with vertex sequence(v1,v2, ...,vn) thenw is said to be awalk fromv1tovn. Similarly for a trail or a path. If there is a finite walk between twodistinct vertices then there is also a finite trail and a finite path between them.

Some authors do not require that all vertices of a path be distinct and instead use the termsimple path to refer to such a path where all vertices are distinct.

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

Directed walk, directed trail, and directed path

[edit]
  • Adirected walk is a finite or infinitesequence ofedges directed in the same direction which joins a sequence ofvertices.[2]
LetG = (V,E,Φ) be a directed graph. A finite directed walk is a sequence of edges(e1,e2, ...,en − 1) for which there is a sequence of vertices(v1,v2, ...,vn) such thatΦ(ei) = (vi,vi + 1) fori = 1, 2, ...,n − 1.(v1,v2, ...,vn) is thevertex sequence of the directed walk. The directed walk isclosed ifv1 =vn, and it isopen otherwise. An infinite directed walk is a sequence of edges of the same type described here, but with no first or last vertex, and a semi-infinite directed walk (orray) has a first vertex but no last vertex.
  • Adirected trail is a directed walk in which all edges are distinct.[2]
  • Adirected path is a directed trail in which all vertices are distinct.[2]

Ifw = (e1,e2, ...,en − 1) is a finite directed walk with vertex sequence(v1,v2, ...,vn) thenw is said to be awalk fromv1tovn. Similarly for a directed trail or a path. If there is a finite directed walk between twodistinct vertices then there is also a finite directed trail and a finite directed path between them.

A "simple directed path" is a path where all vertices are distinct.

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

Examples

[edit]
  • A graph isconnected if there are paths containing each pair of vertices.
  • A directed graph isstrongly 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 aninduced path.
  • A path that includes every vertex of the graph without repeats is known as aHamiltonian path.
  • Two paths arevertex-independent (alternatively,internally disjoint orinternally vertex-disjoint) if they do not have any internal vertex or edge in common. Similarly, two paths areedge-independent (oredge-disjoint) if they do not have any edge in common. Two internally disjoint paths are edge-disjoint, but the converse is not necessarily true.
  • Thedistance 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

[edit]

Several algorithms exist to findshortest andlongest 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 theBellman–Ford algorithm can be applied to directed graphs with negative edge weights. TheFloyd–Warshall algorithm can be used to find the shortest paths between all pairs of vertices in weighted directed graphs.

The path partition problem

[edit]

Thek-path partition problem is the problem of partitioning a given graph to a smallest collection of vertex-disjoint paths of length at mostk.[3]

See also

[edit]

Notes

[edit]
  1. ^McCuaig 1992, p. 205.
  2. ^abcdefBender & Williamson 2010, p. 162.
  3. ^Chen, Yong; Goebel, Randy; Lin, Guohui; Su, Bing; Xu, Yao; Zhang, An (2019-07-01)."An improved approximation algorithm for the minimum 3-path partition problem".Journal of Combinatorial Optimization.38 (1):150–164.doi:10.1007/s10878-018-00372-z.ISSN 1382-6905.

References

[edit]
National
Other
Retrieved from "https://en.wikipedia.org/w/index.php?title=Path_(graph_theory)&oldid=1314693661"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp