In graph theory, an Eulerian trail (or Eulerian path) is a trail in a finite graph that visits every edge exactly once (allowing for revisiting vertices). Similarly, an Eulerian circuit or Eulerian cycle is an Eulerian trail that starts and ends on the same vertex. They were first discussed by Leonhard Euler while solving the famous Seven Bridges of Königsberg problem in 1736. The problem can be stated mathematically like this:
Given the graph in the image, is it possible to construct a path (or a cycle; i.e., a path starting and ending on the same vertex) that visits each edge exactly once?
Euler proved that a necessary condition for the existence of Eulerian circuits is that all vertices in the graph have an evendegree, and stated without proof that connected graphs with all vertices of even degree have an Eulerian circuit. The first complete proof of this latter claim was published posthumously in 1873 by Carl Hierholzer.[1] This is known as Euler's Theorem:
A connected graph has an Euler cycle if and only if every vertex has even degree.
The term Eulerian graph has two common meanings in graph theory. One meaning is a graph with an Eulerian circuit, and the other is a graph with every vertex of even degree. These definitions coincide for connected graphs.[2]
For the existence of Eulerian trails it is necessary that zero or two vertices have an odd degree; this means the Königsberg graph is not Eulerian. If there are no vertices of odd degree, all Eulerian trails are circuits. If there are exactly two vertices of odd degree, all Eulerian trails start at one of them and end at the other. A graph that has an Eulerian trail but not an Eulerian circuit is called semi-Eulerian.
Definition
An Eulerian trail,[note 1] or Euler walk, in an undirected graph is a walk that uses each edge exactly once. If such a walk exists, the graph is called traversable or semi-eulerian.[3]
An Eulerian cycle,[note 1] also called an Eulerian circuit or Euler tour, in an undirected graph is a cycle that uses each edge exactly once. If such a cycle exists, the graph is called Eulerian or unicursal.[4] The term "Eulerian graph" is also sometimes used in a weaker sense to denote a graph where every vertex has even degree. For finite connected graphs the two definitions are equivalent, while a possibly unconnected graph is Eulerian in the weaker sense if and only if each connected component has an Eulerian cycle.
The definition and properties of Eulerian trails, cycles and graphs are valid for multigraphs as well.
An Eulerian orientation of an undirected graph G is an assignment of a direction to each edge of G such that, at each vertex v, the indegree of v equals the outdegree of v. Such an orientation exists for any undirected graph in which every vertex has even degree, and may be found by constructing an Euler tour in each connected component of G and then orienting the edges according to the tour.[5] Every Eulerian orientation of a connected graph is a strong orientation, an orientation that makes the resulting directed graph strongly connected.
Properties
An undirected graph has an Eulerian cycle if and only if every vertex has even degree, and all of its vertices with nonzero degree belong to a single connected component.[6]
An undirected graph can be decomposed into edge-disjoint cycles if and only if all of its vertices have even degree. So, a graph has an Eulerian cycle if and only if it can be decomposed into edge-disjoint cycles and its nonzero-degree vertices belong to a single connected component.
An undirected graph has an Eulerian trail if and only if exactly zero or two vertices have odd degree, and all of its vertices with nonzero degree belong to a single connected component[6]
A directed graph has an Eulerian cycle if and only if every vertex has equal in degree and out degree, and all of its vertices with nonzero degree belong to a single strongly connected component. Equivalently, a directed graph has an Eulerian cycle if and only if it can be decomposed into edge-disjoint directed cycles and all of its vertices with nonzero degree belong to a single strongly connected component.[6]
A directed graph has an Eulerian trail if and only if at most one vertex has (out-degree) − (in-degree) = 1, at most one vertex has (in-degree) − (out-degree) = 1, every other vertex has equal in-degree and out-degree, and all of its vertices with nonzero degree belong to a single connected component of the underlying undirected graph.[6]
Constructing Eulerian trails and circuits
Fleury's algorithm
Fleury's algorithm is an elegant but inefficient algorithm that dates to 1883.[7] Consider a graph known to have all edges in the same component and at most two vertices of odd degree. The algorithm starts at a vertex of odd degree, or, if the graph has none, it starts with an arbitrarily chosen vertex. At each step it chooses the next edge in the path to be one whose deletion would not disconnect the graph, unless there is no such edge, in which case it picks the remaining edge left at the current vertex. It then moves to the other endpoint of that edge and deletes the edge. At the end of the algorithm there are no edges left, and the sequence from which the edges were chosen forms an Eulerian cycle if the graph has no vertices of odd degree, or an Eulerian trail if there are exactly two vertices of odd degree.
While the graph traversal in Fleury's algorithm is linear in the number of edges, i.e. , we also need to factor in the complexity of detecting bridges. If we are to re-run Tarjan's linear time bridge-finding algorithm[8] after the removal of every edge, Fleury's algorithm will have a time complexity of . A dynamic bridge-finding algorithm of Thorup (2000) allows this to be improved to , but this is still significantly slower than alternative algorithms.
Hierholzer's algorithm
Hierholzer's 1873 paper provides a different method for finding Euler cycles that is more efficient than Fleury's algorithm:
Choose any starting vertex v, and follow a trail of edges from that vertex until returning to v. It is not possible to get stuck at any vertex other than v, because the even degree of all vertices ensures that, when the trail enters another vertex w there must be an unused edge leaving w. The tour formed in this way is a closed tour, but may not cover all the vertices and edges of the initial graph.
As long as there exists a vertex u that belongs to the current tour but that has adjacent edges not part of the tour, start another trail from u, following unused edges until returning to u, and join the tour formed in this way to the previous tour.
Since we assume the original graph is connected, repeating the previous step will exhaust all edges of the graph.
By using a data structure such as a doubly linked list to maintain the set of unused edges incident to each vertex, to maintain the list of vertices on the current tour that have unused edges, and to maintain the tour itself, the individual operations of the algorithm (finding unused edges exiting each vertex, finding a new starting vertex for a tour, and connecting two tours that share a vertex) may be performed in constant time each, so the overall algorithm takes linear time, .[9]
This algorithm may also be implemented with a deque. Because it is only possible to get stuck when the deque represents a closed tour, one should rotate the deque by removing edges from the tail and adding them to the head until unstuck, and then continue until all edges are accounted for. This also takes linear time, as the number of rotations performed is never larger than (intuitively, any "bad" edges are moved to the head, while fresh edges are added to the tail)
Counting Eulerian circuits
Complexity issues
The number of Eulerian circuits in digraphs can be calculated using the so-called BEST theorem, named after de Bruijn, van Aardenne-Ehrenfest, Smith and Tutte. The formula states that the number of Eulerian circuits in a digraph is the product of certain degree factorials and the number of rooted arborescences. The latter can be computed as a determinant, by the matrix tree theorem, giving a polynomial time algorithm.
BEST theorem is first stated in this form in a "note added in proof" to the Aardenne-Ehrenfest and de Bruijn paper (1951). The original proof was bijective and generalized the de Bruijn sequences. It is a variation on an earlier result by Smith and Tutte (1941).
Counting the number of Eulerian circuits on undirected graphs is much more difficult. This problem is known to be #P-complete.[10] In a positive direction, a Markov chain Monte Carlo approach, via the Kotzig transformations (introduced by Anton Kotzig in 1968) is believed to give a sharp approximation for the number of Eulerian circuits in a graph, though as yet there is no proof of this fact (even for graphs of bounded degree).
Eulerian trails are used in bioinformatics to reconstruct the DNA sequence from its fragments.[13] They are also used in CMOS circuit design to find an optimal logic gate ordering.[14] There are some algorithms for processing trees that rely on an Euler tour of the tree (where each edge is treated as a pair of arcs).[15][16] The de Bruijn sequences can be constructed as Eulerian trails of de Bruijn graphs.[17]
In infinite graphs
In an infinite graph, the corresponding concept to an Eulerian trail or Eulerian cycle is an Eulerian line, a doubly-infinite trail that covers all of the edges of the graph. It is not sufficient for the existence of such a trail that the graph be connected and that all vertex degrees be even; for instance, the infinite Cayley graph shown, with all vertex degrees equal to four, has no Eulerian line. The infinite graphs that contain Eulerian lines were characterized by Erdõs, Grünwald & Weiszfeld (1936). For an infinite graph or multigraph G to have an Eulerian line, it is necessary and sufficient that all of the following conditions be met:[18][19]
Removing any finite subgraph S from G leaves at most two infinite connected components in the remaining graph, and if S has even degree at each of its vertices then removing S leaves exactly one infinite connected component.
Undirected Eulerian graphs
Euler stated a necessary condition for a finite graph to be Eulerian as all vertices must have even degree. Hierholzer proved this is a sufficient condition in a paper published in 1873. This leads to the following necessary and sufficient statement for what a finite graph must have to be Eulerian: An undirected connected finite graph is Eulerian if and only if every vertex of G has even degree.[20]
The following result was proved by Veblen in 1912: An undirected connected graph is Eulerian if and only if it is the disjoint union of some cycles.[20]
Hierholzer developed a linear time algorithm for constructing an Eulerian tour in an undirected graph.
Directed Eulerian graphs
It is possible to have a directed graph that has all even out-degrees but is not Eulerian. Since an Eulerian circuit leaves a vertex the same number of times as it enters that vertex, a necessary condition for an Eulerian circuit to exist is that the in-degree and out-degree are equal at each vertex. Obviously, connectivity is also necessary. König proved that these conditions are also sufficient. That is, a directed graph is Eulerian if and only if it is connected and the in-degree and out-degree are equal at each vertex.[20]
In this theorem it doesn't matter whether "connected" means "weakly connected" or "strongly connected" since they are equivalent for Eulerian graphs.
Hierholzer's linear time algorithm for constructing an Eulerian tour is also applicable to directed graphs.[20]
Mixed Eulerian graphs
All mixed graphs that are both even and symmetric are guaranteed to be Eulerian. However, this is not a necessary condition, as it is possible to construct a non-symmetric, even graph that is Eulerian.[20]
Ford and Fulkerson proved in 1962 in their book Flows in Networks a necessary and sufficient condition for a graph to be Eulerian, viz., that every vertex must be even and satisfy the balance condition, i.e. for every subset of vertices S, the difference between the number of arcs leaving S and entering S must be less than or equal to the number of edges incident with S.[20]
The process of checking if a mixed graph is Eulerian is harder than checking if an undirected or directed graph is Eulerian because the balanced set condition concerns every possible subset of vertices.
Route inspection problem, search for the shortest path that visits all edges, possibly repeating edges if an Eulerian path does not exist.
Veblen's theorem, which states that graphs with even vertex degree can be partitioned into edge-disjoint cycles regardless of their connectivity
Notes
^ abSome people reserve the terms path and cycle to mean non-self-intersecting path and cycle. A (potentially) self-intersecting path is known as a trail or an open walk; and a (potentially) self-intersecting cycle, a circuit or a closed walk. This ambiguity can be avoided by using the terms Eulerian trail and Eulerian circuit when self-intersection is allowed.
Menit busurIlustrasi ukuran menit busur (bukan skala). Sebuah bola sepak standar (dengan diameter 22 cm atau 8,7 inci) membentuk sudut 1 menit busur pada jarak kira-kira 756 m (827 yard).Informasi umumSistem satuanSatuan non-SI yang disebutkan dalam SIBesaranSudutSimbol′ or arcminDalam satuanTanpa dimensi dengan panjang busur kira-kira. ≈ 0.29091000 dari jari-jari, yakni 0.2909 mmmKonversi 1 ′ dalam ...... sama dengan ... derajat 160° = …
Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Januari 2023. Kawata adalah nama Jepang. Tokoh-tokoh dengan nama Jepang ini antara lain: Pemain sepak bola Jepang Atsushi Kawata Kazuhiro Kawata Kento Kawata Kohei Kawata Shuhei Kawata Halaman-halaman lainnya Semua halaman dengan Kawata Semua halaman dengan judul …
Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Oktober 2022. Ismail GasprinskiLahir20 Maret [K.J.: 8 Maret] 1851Meninggal24 September [K.J.: 11 September] 1914 (usia 63)KebangsaanTatar KrimeaPekerjaanintelektual, pengajar, penerbit dan politikus Ismail bey Gasprinsky (juga ditulis sebagai Gaspirali dan Gasprinski: …
Stoner rockSleep tampil langsung di bulan Maret 2018. Dari kiri ke kanan: Al Cisneros, Jason Roeder, dan Matt Pike.Nama lain Stoner metal stoner doom Sumber aliranRok psikedelisacid rockdoom metalSumber kebudayaanAwal 1990-an, California, Amerika SerikatAlat musik yang biasa digunakanGitar listrikbassdrumvokalSubgenreDesert rock[1]Versi regionalKancah Palm DesertTopik lainnya Blues rock budaya ganja garage punk[2] hard rock sludge metal grunge Stoner rock, juga dikenal sebagai st…
Questa voce o sezione sull'argomento isole della Spagna non cita le fonti necessarie o quelle presenti sono insufficienti. Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Isole ChafarinasIslas ChafarinasGeografia fisicaLocalizzazioneMar Mediterraneo Coordinate35°11′N 2°26′W / 35.183333°N 2.433333°W35.183333; -2.433333Coordinate: 35°11′N 2°26′W / 35.183333°N 2.433333°W35.183333…
Artikel ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi yang layak. Tulisan tanpa sumber dapat dipertanyakan dan dihapus sewaktu-waktu.Cari sumber: Taman Impian Jaya Ancol – berita · surat kabar · buku · cendekiawan · JSTOR Taman Impian Jaya AncolLokasiJakarta Utara, IndonesiaKoordinat6°07′22″S 106°49′54″E / 6.122743°S 106.83…
Chronologies Rue de l'Ancienne-Comédie à Paris le 14 juillet, jour de la fête nationale.Données clés 1927 1928 1929 1930 1931 1932 1933Décennies :1900 1910 1920 1930 1940 1950 1960Siècles :XVIIIe XIXe XXe XXIe XXIIeMillénaires :-Ier Ier IIe IIIe Chronologies géographiques Afrique Afrique du Sud, Algérie, Angola, Bénin, Botswana, Burkina Faso, Burundi, Cameroun, Cap-Vert, République centrafricaine, Comores, République du …
Leone Traverso a Urbino Leone Traverso (Bagnoli di Sopra, 10 aprile 1910 – Urbino, 28 agosto 1968) è stato un traduttore italiano. Indice 1 Biografia 2 Omaggi 3 Note 4 Voci correlate 5 Altri progetti Biografia Era l'undicesimo dei dodici figli di una famiglia di agiati agricoltori. Dopo aver conseguito la maturità classica presso il liceo Tito Livio di Padova, con voti eccellenti in greco e latino, si iscrisse al corso di lettere antiche dell'Università di Firenze, passando poi al corso di …
American college football team St. Thomas (Minnesota) Tommies football2023 St. Thomas Tommies football team First season1904Athletic directorPhil EstenHead coachGlenn Caruso 14th season, 144–25 (.852)StadiumO'Shaughnessy Stadium(capacity: 5,025)Field surfaceTurfLocationSaint Paul, MinnesotaConferencePioneer Football LeagueAll-time record593–239–24 (.707)Conference titles22Division III: 21Division I: 1RivalriesSaint John's (MN)ColorsPurple and gray[1] …
Archie Thompson Thompson bermain untuk Melbourne Victory pada 2012Informasi pribadiNama lengkap Archie Gerald Thompson[1]Tanggal lahir 23 Oktober 1978 (umur 45)Tempat lahir Ōtorohanga, Selandia BaruTinggi 1,74 m (5 ft 8+1⁄2 in)[2]Posisi bermain PenyerangKarier junior Lithgow Rangers Twin City Wanderers1994–1995 NSWISKarier senior*Tahun Tim Tampil (Gol)1995–1996 Bathurst '75 16 (9)1996–1999 Gippsland Falcons 43 (10)1999–2000 Carlton SC 53 (23)200…
Village in Tehran, IranTalun طالون or تالونvillageTalunCoordinates: 35°54′17″N 51°15′58″E / 35.90472°N 51.26611°E / 35.90472; 51.26611Country IranProvinceTehranCountyTehranBakhshKanRural DistrictSulqanElevation2,180 m (7,150 ft)Population (2006) • Total196Time zoneUTC+3:30 (IRST) • Summer (DST)UTC+4:30 (IRDT) Talun (Persian: تالون or طالون, also Romanized as Ţālūn or Tālūn)[1] is a vi…
British low-wing monoplane For the similar named American aircraft, see Martin MB-1. MB 1 Martin-Baker MB1 during testing Role Light aircraftType of aircraft Manufacturer Martin-Baker Designer James Martin First flight April 1935 Status Experimental Number built 1 Variants Martin-Baker MB 2 The Martin-Baker MB 1 was a British low-wing light aircraft, designed and constructed in the 1930s, the first aircraft design of the Martin-Baker company to be built. While not a fighter itself, the design wo…
Pakistani newspaper Daily TimesFront Page for 1 January 2015TypeDaily newspaperFormatBroadsheetOwner(s)Shehryar Taseer[citation needed]Founder(s)Salman TaseerPublisherMedia Times Limited[1][2]EditorAli Kazam Waheed[3]Founded2002Political alignmentLiberal, secularLanguageEnglishHeadquartersM.M. Alam Road, Gulberg, LahoreCityLahoreIslamabadCountryPakistanWebsitedailytimes.com.pkFree online archivesdailytimes.com.pk/e-paper/Media of PakistanList of newspapers The Dai…
Pura Taman AyunPintu masuk bangunan ke pusatInformasi umumGaya arsitekturCandi HinduAlamatMengwi, Kabupaten Badung, BaliNegaraIndonesiaMulai dibangun1632Rampung1634Desain dan konstruksiArsitekTan Hu Cin Jin Situs Warisan Dunia UNESCONama resmiLanskap kultur Provinsi Bali: Sistem subak sebagai perwujudan dari filosofi Tri Hita KaranaJenisBudayaKriteriaii, iii, v, viDitetapkan2012 (sesi ke- 36)No. referensi1194NegaraIndonesiaKawasanAsia-Pasifik Pura Taman Ayun merupakan Pura Paibon/Pedarman R…
Gulf of the Red Sea separating African Egypt from the Sinai Peninsula Gulf of SuezVisible bodies are the Gulf of Suez (west, left in photo), the Gulf of Aqaba (east, right in photo), and the Red Sea (south, bottom left in photo). Photo dated February 2009.LocationNorth Africa and West AsiaCoordinates28°45′N 33°00′E / 28.750°N 33.000°E / 28.750; 33.000Basin countriesEgyptMax. length314 km (195 mi)Max. width32 km (20 mi)Average depth40 …
Chemical compound 3-MeO-PCMoLegal statusLegal status CA: Schedule I DE: NpSG (Industrial and scientific use only) UK: Under Psychoactive Substances Act Identifiers IUPAC name 4-[1-(3-methoxyphenyl)cyclohexyl]morpholine CAS Number138873-80-0PubChem CID132605908ChemSpider58191437UNII96QW73BA62Chemical and physical dataFormulaC17H25NO2Molar mass275.392 g·mol−13D model (JSmol)Interactive image SMILES COC1=CC(C2(N3CCOCC3)CCCCC2)=CC=C1 InChI InChI=1S/C17H25NO2/c1-19-16-7-5-6-15(…
Rumah Sakit Mount Sinai, TorontoSistem Kesehatan SinaiBagian luar Rumah Sakit Mount Sinai, TorontoGeografiLokasi600 University Avenue, Toronto, Ontario, KanadaOrganisasiAsuransi kesehatanMedicareJenisUmumAfiliasi dengan universitasFakultas Kedokteran Universitas TorontoPelayananUnit Gawat DaruratYesRanjang pasien442SejarahDibuka1923 dengan nama Hebrew Maternity and Convalescent Hospital Mount Sinai sekitar 1924 1953-hingga saat iniPranala luarSitus webwww.mountsinai.on.ca Rumah Sakit Mount Sinai…