Path (graph theory)

A three-dimensional hypercube graph showing a Hamiltonian path in red, and a longest induced path in bold black

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[1]) 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

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.[2]
  • A path is a trail in which all vertices (and therefore also all edges) are distinct.[2]

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.[2]
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.[2]
  • A directed path is a directed trail in which all vertices are distinct.[2]

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.[3]

See also

Notes

  1. ^ McCuaig 1992, p. 205.
  2. ^ a b c d e f Bender & 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

Read other articles:

Australian racecar driver Geoff BrabhamBrabham at the 2014 Indianapolis 500Nationality AustralianBorn (1952-03-20) 20 March 1952 (age 71)Sydney, AustraliaRetired2001Related toJack Brabham (father)Matthew Brabham (son)Gary Brabham (brother)David Brabham (brother)Sam Brabham (nephew) Lisa Thackwell (sister in law)Australian Super Touring ChampionshipYears active1995–1997TeamsBMW Motorsport AustraliaStarts48Wins9Best finish2nd in 1995 & 1997 Australian Super Touring ChampionshipPrevio...

The German involvement in Abkhazia dates back to the 1870s, when Russian Tsar Alexander II decided to settle German villagers in Abkhazia to civilize the newly conquered Caucasian peoples. The German Empire was briefly involved in a military intervention in 1918. More recently, Germany has been involved in diplomatic and peacekeeping efforts to resolve the dispute between the so-called Republic of Abkhazia and Georgia, Germany's strategic ally.[1] Early Involvement Kress von Kressenst...

Pemuda HitlerHitlerjugendLogo Pemuda HitlerDibentuk4 Juli 1926Negara Jerman NaziTipe unitOrganisasi pemuda, paramiliterJumlah personel8 juta (1940)Divisi HitlerjugendDivisi Hitlerjugend SS Panzer ke-12MotoBlut und Ehre(Darah dan Kehormatan)MarkasKaufhaus Jonaß, BerlinCabang Pemuda Jerman Liga Putri Jerman Dibubarkan10 Oktober 1945TokohReichsjugendführer Baldur von Schirach (pertama) Artur Axmann (terakhir)Stabsführer Karl Nabersberg (pertama) Kurt Petter (terakhir)InsigniaBenderaLamba...

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (يونيو 2019) عائض القحطاني معلومات شخصية الجنسية سعودي الديانة الإسلام منصب • بروفيسور واستشاري جراحات المناظير وجراحات علاج السمنة في كلية الطب، جامعة الملك سعود، الحي

Telephone numbers in Germany8 geographic zonesLocationCountryGermanyContinentEuropeRegulatorFederal Network AgencyTypeOpenNSN length3 to 13[1]Format(xx…) xx…Access codesCountry code49International access00Long-distance0List of Germany dialing codes The regulation of telephone numbers in Germany is the responsibility of the Federal Network Agency (German: Bundesnetzagentur, BNetzA) of the German government. The agency has a mandate to telecommunications in Germany and other infrast...

Protein-coding gene in the species Homo sapiens HSP90B1Available structuresPDBOrtholog search: PDBe RCSB List of PDB id codes4NH9IdentifiersAliasesHSP90B1, ECGP, GP96, GRP94, HEL-S-125m, HEL35, TRA1, heat shock protein 90kDa beta family member 1, heat shock protein 90 beta family member 1External IDsOMIM: 191175 MGI: 98817 HomoloGene: 2476 GeneCards: HSP90B1 Gene location (Human)Chr.Chromosome 12 (human)[1]Band12q23.3Start103,930,107 bp[1]End103,953,931 bp[1]Gene locat...

You can help expand this article with text translated from the corresponding article in Japanese. Click [show] for important translation instructions. Machine translation, like DeepL or Google Translate, is a useful starting point for translations, but translators must revise errors as necessary and confirm that the translation is accurate, rather than simply copy-pasting machine-translated text into the English Wikipedia. Consider adding a topic to this template: there are already 3,676 arti...

Socialist political party in Sweden Left Party VänsterpartietAbbreviationVLeaderNooshi DadgostarFoundersZeth HöglundCarl WinbergFounded1917; 106 years ago (1917)Split fromSwedish Social Democratic PartyHeadquartersKungsgatan 84, StockholmYouth wingYoung LeftMembership (2021) 28,873[1]IdeologySocialism[2]Eco-socialism[3]Feminism[4]Euroscepticism[5]Political positionLeft-wing[6]European affiliationMaintenant le Peuple...

Proposed country Comintern project on Balkan Federation The establishment of a Balkan Federation has been a recurrent topic among the peoples of the Balkans. The concept of a Balkan federation emerged in the late 19th century among left political forces in the region. The central aim was to establish a new political unity: a common federal republic unifying the Balkan Peninsula on the basis of internationalism, socialism, social solidarity, and economic equality. The underlying vision was tha...

2010 Russian action film The Alien GirlFilm posterRussianЧужая Directed byAnton BormatovWritten byVladimir NesterenkoSergei SokolyukProduced byKonstantin ErnstAlexey KucherenkoIgor TolstunovStarringNatalia RomanychevaEvgeniy TkachukKirill PolukhinAnatoliy OtradnovCinematographyAnastasi MikhalovDistributed by20th Century FoxRelease date 17 June 2010 (2010-06-17) Running time100 minsCountryRussiaLanguageRussian The Alien Girl (Russian: Чужая, romanized: Chuzhaya) i...

この記事は検証可能な参考文献や出典が全く示されていないか、不十分です。出典を追加して記事の信頼性向上にご協力ください。(このテンプレートの使い方)出典検索?: レオポルト・フォン・ブーフ – ニュース · 書籍 · スカラー · CiNii · J-STAGE · NDL · dlib.jp · ジャパンサーチ · TWL(2011年10月) クリスティアン・レオポル�...

Verlauf und Einzugsgebiet der Elbe Elbquelle: Wappen der Elbstädte am Wasserloch Die folgende Liste von Städten und Orten an der Elbe soll mal alle Regionen, Städte und Orte an der Elbe von der Quelle in Tschechien bis zur Mündung in die Nordsee auflisten, aktuell macht sie das aber noch nicht. Inhaltsverzeichnis 1 Wichtige Regionen und Großstädte 1.1 Regionen 1.2 Großstädte 2 Städte und Orte 2.1 Tschechien 2.2 Deutschland Wichtige Regionen und Großstädte Regionen Metropolregion Ha...

Questa voce sugli argomenti comunismo e Unione Sovietica è solo un abbozzo. Contribuisci a migliorarla secondo le convenzioni di Wikipedia. Segui i suggerimenti del progetto di riferimento. Il Politburo del Comitato centrale del PCUS (in russo Политическое бюро (Политбюро) ЦК КПСС?, Političeskoe bjuro (Politbjuro) CК KPSS, lett. Ufficio politico del CC del PCUS) era l'organismo dirigente del Partito Comunista dell'Unione Sovietica nei periodi fra le riun...

This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (December 2012) (Learn how and when to remove this template message) 1st Marine Infantry Parachute Regiment1er Régiment de Parachutistes d'Infanterie de MarineRegimental beret badgeActiveSeptember 15, 1940 – presentCountry FranceBranch French ArmyTypeSpecial ForcesSize865 authorized personnel (2017)Part&#...

1990 Indian filmThangathin ThangamDirected bySirajScreenplay bySirajStory byRadha BharathiProduced byK. PrabhakaranStarringRamarajanRagasudhaCinematographyB. S. LokanathEdited byL. KesavanMusic byS. A. RajkumarProductioncompanyAnbalaya FilmsRelease date 14 April 1990 (1990-04-14) CountryIndiaLanguageTamil Thangathin Thangam is a 1990 Indian Tamil-language action drama film directed by Siraj, starring Ramarajan and Ragasudha. It was released on 14 April 1990.[1] Plot Thi...

Johan Bure, 1568–1652.You can help expand this article with text translated from the corresponding article in Swedish. (May 2022) Click [show] for important translation instructions. Machine translation, like DeepL or Google Translate, is a useful starting point for translations, but translators must revise errors as necessary and confirm that the translation is accurate, rather than simply copy-pasting machine-translated text into the English Wikipedia. Consider adding a topic to this...

Anna Friel Friel en 2015Información personalNombre de nacimiento Anna Louise FrielNacimiento 12 de julio de 1976 (47 años)Rochdale (Inglaterra)Nacionalidad BritánicaFamiliaPareja David Thewlis (2001-2010)Rhys Ifans (2011-2014)Hijos 1EducaciónEducada en Holy Cross College, UK Información profesionalOcupación Actriz, actriz de teatro y actriz de cine Años activa desde 1986Sitio web www.annafriel.orgPremios artísticosPremios Emmy Mejor Actuación de una Actriz2017 MarcellaDistincion...

Defunct United States railroad Southern RailwayA Southern Railway train in 1969OverviewHeadquartersWashington, D.C., U.S.Key people J.P. MorganPrimary financier (1894-1913) Fairfax HarrisonPresident (1913-1937) FoundersCharles H. CosterSamuel SpencerFrancis Lynde StetsonReporting markSOULocaleWashington, D.C., Virginia, North Carolina, South Carolina, Georgia, Florida, Alabama, Mississippi, Tennessee, Kentucky, Ohio, Illinois, Indiana, Missouri and LouisianaDates of operation1894–1982Su...

政府統計處Census and Statistics Department  香港特別行政區政府機構政府統計處標誌處長余振強副處長周錦添助理處長余司帆 吳品慧 劉國信 蕭惠芬 陳麗珊部門資訊成立日期1967年12月所屬部門財經事務及庫務局總部 香港香港島灣仔港灣道12號灣仔政府大樓16至22及25樓聯絡資訊網站www.censtatd.gov.hk/home/index_tc.jsp 政府統計處(簡稱統計處;英語:Census and Statistics Department,C&S...

Dua patung makam keramik dari Dinasti Han Timur (25–220 M) digambarkan sednag memainkan liubo Liubo (Hanzi: 六博 atau 陸博; Pinyin: liù bó; Wade–Giles: liu po; harfiah: 'enam batang') adalah sebuah permainan papan Tiongkok kuno yang dimainkan oleh dua pemain. Permainan tersebut ditemukan tak lebih dari pertengahan milenium ke-1 SM, dan populer pada zaman dinasti Han (202 SM – 220 M). Pranala luar Wikimedia Commons memiliki media mengenai Liubo. Liubo Illustrated ar...