ArticleslgStudy

science

Path (graph theory)

Path (graph theory) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Path (graph theory) rather than just read about it. In short: In graph theory, a path in a graph is a finite or infinite sequence of edges which joins a sequence of vertices which, by most definitions, are all distinct (and since the vertices are distinct, so are the edges). A directed path (sometimes called dipath) in a directed 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 dir…

Path (graph theory) — main illustration
Path (graph theory) — illustration

Key takeaways

  • Path (graph theory) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Path (graph theory) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Path (graph theory) from memory before moving on to harder problems.

Reference excerpt

In graph theory, a path in a graph is a finite or infinite sequence of edges which joins a sequence of vertices which, by most definitions, are all distinct (and since the vertices are distinct, so are the edges). A directed path (sometimes called dipath) in a directed 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), or Diestel (2005). Korte et al. (1990) cover more advanced algorithmic topics concerning paths in graphs.

Definitions

Walk, trail, and path

A walk is a finite or infinite sequence of edges which joins a sequence of vertices. Let G = (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} for i = 1, 2, ..., n − 1. (v1, v2, ..., vn) is the vertex sequence of the walk. The walk is closed if v1 = vn, and it is open 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 (or ray) has a first vertex but no last vertex. A trail is a walk in which all edges are distinct. A path is a trail in which all vertices (and therefore also all edges) are distinct. If w = (e1, e2, ..., en − 1) is a finite walk with vertex sequence (v1, v2, ..., vn) then w is said to be a walk from v1 to vn. Similarly for a trail or a path. If there is a finite walk between two distinct 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 term simple path to refer to such a path where all vertices are distinct. A weighted graph associates a value (weight) with every edge in the graph. The weight of a walk (or trail or 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.

Directed walk, directed trail, and directed path A directed walk is a finite or infinite sequence of edges directed in the same direction which joins a sequence of vertices. Let G = (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) for i = 1, 2, ..., n − 1. (v1, v2, ..., vn) is the vertex sequence of the directed walk. The directed walk is closed if v1 = vn, and it is open 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 (or ray) has a first vertex but no last vertex. A directed trail is a directed walk in which all edges are distinct. A directed path is a directed trail in which all vertices are distinct. If w = (e1, e2, ..., en − 1) is a finite directed walk with vertex sequence (v1, v2, ..., vn) then w is said to be a walk from v1 to vn. Similarly for a directed trail or a path. If there is a finite directed walk between two distinct 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. A weighted directed graph associates a value (weight) with every edge in the directed graph. The weight 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 words cost 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 without repeats is known as a Hamiltonian path. Two paths are vertex-independent (alternatively, internally disjoint or internally vertex-disjoint) if they do not have any internal vertex or edge in common. Similarly, two paths are edge-independent (or edge-disjoint) if they do not have any edge in common. Two internally disjoint paths are 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 Bellman–Ford algorithm can be applied to directed graphs with negative edge weights. The Floyd–Warshall algorithm can be used to find the shortest paths between all pairs of vertices in weighted directed graphs.

The path partition problem The k-path partition problem is the problem of partitioning a given graph to a smallest collection of vertex-disjoint paths of length at most k.

See also Glossary of graph theory Path graph Polygonal chain Shortest path problem Longest path problem Dijkstra's algorithm Bellman–Ford algorithm Floyd–Warshall algorithm Self-avoiding walk Shortest-path graph

Notes

References

Illustrations

Path (graph theory): A three-dimensional hypercube graph showing a Hamiltonian path in red, and a longest induced path in bold black
A three-dimensional hypercube graph showing a Hamiltonian path in red, and a longest induced path in bold black
Path (graph theory) illustration

Worked examples

Example 1 — a first encounter with Path (graph theory)

Start with the simplest possible case. Write down what Path (graph theory) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Path (graph theory) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Path (graph theory) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Path (graph theory)

In research
Path (graph theory) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Path (graph theory) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Path (graph theory) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Graph connectivity, Graph theory objects, so understanding it makes those chapters shorter.
In everyday life
Look for Path (graph theory) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Path (graph theory) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Path (graph theory) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Path (graph theory) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Path (graph theory) in simple terms?

In graph theory, a path in a graph is a finite or infinite sequence of edges which joins a sequence of vertices which, by most definitions, are all distinct (and since the vertices are distinct, so are the edges). A directed path (sometimes called dipath) in a directed graph is a finite or infinite…

Why does Path (graph theory) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Path (graph theory)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Path (graph theory).

Tags

  • Graph connectivity
  • Graph theory objects

Keep exploring