Strongly connected component

Graph with strongly connected components marked

In the mathematical theory of directed graphs, a graph is said to be strongly connected if every vertex is reachable from every other vertex. The strongly connected components of a directed graph form a partition into subgraphs that are themselves strongly connected. It is possible to test the strong connectivity of a graph, or to find its strongly connected components, in linear time (that is, Θ(V + E )).

Definitions

A directed graph is called strongly connected if there is a path in each direction between each pair of vertices of the graph. That is, a path exists from the first vertex in the pair to the second, and another path exists from the second vertex to the first. In a directed graph G that may not itself be strongly connected, a pair of vertices u and v are said to be strongly connected to each other if there is a path in each direction between them.

The binary relation of being strongly connected is an equivalence relation, and the induced subgraphs of its equivalence classes are called strongly connected components. Equivalently, a strongly connected component of a directed graph G is a subgraph that is strongly connected, and is maximal with this property: no additional edges or vertices from G can be included in the subgraph without breaking its property of being strongly connected. The collection of strongly connected components forms a partition of the set of vertices of G. A strongly connected component C is called trivial when C consists of a single vertex which is not connected to itself with an edge, and non-trivial otherwise.[1]

The yellow directed acyclic graph is the condensation of the blue directed graph. It is formed by contracting each strongly connected component of the blue graph into a single yellow vertex.

If each strongly connected component is contracted to a single vertex, the resulting graph is a directed acyclic graph, the condensation of G. A directed graph is acyclic if and only if it has no strongly connected subgraphs with more than one vertex, because a directed cycle is strongly connected and every non-trivial strongly connected component contains at least one directed cycle.

Algorithms

DFS-based linear-time algorithms

Several algorithms based on depth-first search compute strongly connected components in linear time.

  • Kosaraju's algorithm uses two passes of depth-first search. The first, in the original graph, is used to choose the order in which the outer loop of the second depth-first search tests vertices for having been visited already and recursively explores them if not. The second depth-first search is on the transpose graph of the original graph, and each recursive exploration finds a single new strongly connected component.[2][3] It is named after S. Rao Kosaraju, who described it (but did not publish his results) in 1978; Micha Sharir later published it in 1981.[4]
  • Tarjan's strongly connected components algorithm, published by Robert Tarjan in 1972,[5] performs a single pass of depth-first search. It maintains a stack of vertices that have been explored by the search but not yet assigned to a component, and calculates "low numbers" of each vertex (an index number of the highest ancestor reachable in one step from a descendant of the vertex) which it uses to determine when a set of vertices should be popped off the stack into a new component.
  • The path-based strong component algorithm uses a depth-first search, like Tarjan's algorithm, but with two stacks. One of the stacks is used to keep track of the vertices not yet assigned to components, while the other keeps track of the current path in the depth-first search tree. The first linear time version of this algorithm was published by Edsger W. Dijkstra in 1976.[6]

Although Kosaraju's algorithm is conceptually simple, Tarjan's and the path-based algorithm require only one depth-first search rather than two.

Reachability-based algorithms

Previous linear-time algorithms are based on depth-first search which is generally considered hard to parallelize. Fleischer et al.[7] in 2000 proposed a divide-and-conquer approach based on reachability queries, and such algorithms are usually called reachability-based SCC algorithms. The idea of this approach is to pick a random pivot vertex and apply forward and backward reachability queries from this vertex. The two queries partition the vertex set into 4 subsets: vertices reached by both, either one, or none of the searches. One can show that a strongly connected component has to be contained in one of the subsets. The vertex subset reached by both searches forms a strongly connected component, and the algorithm then recurses on the other 3 subsets.

The expected sequential running time of this algorithm is shown to be O(n log n), a factor of O(log n) more than the classic algorithms. The parallelism comes from: (1) the reachability queries can be parallelized more easily (e.g. by a breadth-first search (BFS), and it can be fast if the diameter of the graph is small); and (2) the independence between the subtasks in the divide-and-conquer process. This algorithm performs well on real-world graphs,[3] but does not have theoretical guarantee on the parallelism (consider if a graph has no edges, the algorithm requires O(n) levels of recursions).

Blelloch et al.[8] in 2016 shows that if the reachability queries are applied in a random order, the cost bound of O(n log n) still holds. Furthermore, the queries then can be batched in a prefix-doubling manner (i.e. 1, 2, 4, 8 queries) and run simultaneously in one round. The overall span of this algorithm is log2n reachability queries, which is probably the optimal parallelism that can be achieved using the reachability-based approach.

Generating random strongly connected graphs

Peter M. Maurer describes an algorithm for generating random strongly connected graphs,[9] based on a modification of an algorithm for strong connectivity augmentation, the problem of adding as few edges as possible to make a graph strongly connected. When used in conjunction with the Gilbert or Erdős-Rényi models with node relabelling, the algorithm is capable of generating any strongly connected graph on n nodes, without restriction on the kinds of structures that can be generated.

Applications

Algorithms for finding strongly connected components may be used to solve 2-satisfiability problems (systems of Boolean variables with constraints on the values of pairs of variables): as Aspvall, Plass & Tarjan (1979) showed, a 2-satisfiability instance is unsatisfiable if and only if there is a variable v such that v and its negation are both contained in the same strongly connected component of the implication graph of the instance.[10]

Strongly connected components are also used to compute the Dulmage–Mendelsohn decomposition, a classification of the edges of a bipartite graph, according to whether or not they can be part of a perfect matching in the graph.[11]

A directed graph is strongly connected if and only if it has an ear decomposition, a partition of the edges into a sequence of directed paths and cycles such that the first subgraph in the sequence is a cycle, and each subsequent subgraph is either a cycle sharing one vertex with previous subgraphs, or a path sharing its two endpoints with previous subgraphs.

According to Robbins' theorem, an undirected graph may be oriented in such a way that it becomes strongly connected, if and only if it is 2-edge-connected. One way to prove this result is to find an ear decomposition of the underlying undirected graph and then orient each ear consistently.[12]

See also

References

  1. ^ Nuutila, Esko; Soisalon-Soininen, Eljas (1994), "On finding the strongly connected components in a directed graph", Information Processing Letters, 49 (1): 9–14, doi:10.1016/0020-0190(94)90047-7
  2. ^ Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Section 22.5, pp. 552–557.
  3. ^ a b Hong, Sungpack; Rodia, Nicole C.; Olukotun, Kunle (2013), "On fast parallel detection of strongly connected components (SCC) in small-world graphs" (PDF), Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis - SC '13, pp. 1–11, doi:10.1145/2503210.2503246, ISBN 9781450323789, S2CID 2156324
  4. ^ Sharir, Micha (1981), "A strong-connectivity algorithm and its applications in data flow analysis", Computers & Mathematics with Applications, 7: 67–72, doi:10.1016/0898-1221(81)90008-0
  5. ^ Tarjan, R. E. (1972), "Depth-first search and linear graph algorithms", SIAM Journal on Computing, 1 (2): 146–160, doi:10.1137/0201010, S2CID 16467262
  6. ^ Dijkstra, Edsger (1976), A Discipline of Programming, NJ: Prentice Hall, Ch. 25.
  7. ^ Fleischer, Lisa K.; Hendrickson, Bruce; Pınar, Ali (2000), "On Identifying Strongly Connected Components in Parallel" (PDF), Parallel and Distributed Processing, Lecture Notes in Computer Science, vol. 1800, pp. 505–511, doi:10.1007/3-540-45591-4_68, ISBN 978-3-540-67442-9
  8. ^ Blelloch, Guy E.; Gu, Yan; Shun, Julian; Sun, Yihan (2016), "Parallelism in Randomized Incremental Algorithms" (PDF), Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures - SPAA '16, pp. 467–478, doi:10.1145/2935764.2935766, hdl:1721.1/146176, ISBN 9781450342100.
  9. ^ Maurer, P. M. (February 2018), Generating strongly connected random graphs (PDF), Int'l Conf. Modeling, Sim. and Vis. Methods MSV'17, CSREA Press, ISBN 978-1-60132-465-8, retrieved December 27, 2019
  10. ^ Aspvall, Bengt; Plass, Michael F.; Tarjan, Robert E. (1979), "A linear-time algorithm for testing the truth of certain quantified boolean formulas", Information Processing Letters, 8 (3): 121–123, doi:10.1016/0020-0190(79)90002-4.
  11. ^ Dulmage, A. L. & Mendelsohn, N. S. (1958), "Coverings of bipartite graphs", Can. J. Math., 10: 517–534, doi:10.4153/cjm-1958-052-0, S2CID 123363425.
  12. ^ Robbins, H. E. (1939), "A theorem on graphs, with an application to a problem on traffic control", American Mathematical Monthly, 46 (5): 281–283, doi:10.2307/2303897, JSTOR 2303897.

Read other articles:

Untuk serial Comedy Central, lihat This Is Not Happening (serial TV). This is Not HappeningEpisode The X-FilesNomor episodeMusim 8Episode 14SutradaraKim MannersPenulisChris CarterFrank SpotnitzKode produksi8ABX14Tanggal siar25 Februari 2001Durasi44 menitKronologi episode ← SebelumnyaPer Manum Selanjutnya →Deadalive This Is Not Happening adalah episode keempat belas dari musim kedelapan dan episode ke-175 secara keseluruhan dari serial televisi fiksi ilmiah The X-Files. Epis...

 

 

Riho Abiru Riho Abiru (阿比留李帆; lahir 17 Juli 1993) adalah seorang penyanyi dan idol Jepang. Ia adalah mantan anggota grup J-pop SKE48.[1] Ia sekarang berafiliasi dengan Starray Production. Riwayat Tim SKE48 Kenkyuusei → Tim KII → Tim S → Tim KII → Kelulusan Masuk SKE48 sebagai Kenkyuusei pada Maret 2009 (Generasi ke-2) Dipromosikan ke Tim KII pada 6 Desember 2010 Ditransfer ke Tim S pada 13 April 2013 (Perombakan Tim SKE48) Ditransfer ke Tim KII pada 24 Februari 2014 ...

 

 

This article does not cite any sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Papua New Guinea–United Kingdom relations – news · newspapers · books · scholar · JSTOR (December 2015) (Learn how and when to remove this template message) Bilateral relationsPapua New Guinea – United Kingdom relations Papua New Guinea United Kingdom Papua New Guinea high ...

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 April 2017. Osmar Aparecido de AzevedoInformasi pribadiTanggal lahir 23 Juli 1980 (umur 43)Tempat lahir BrasilPosisi bermain PenyerangKarier senior*Tahun Tim Tampil (Gol)2006 Oita Trinita * Penampilan dan gol di klub senior hanya dihitung dari liga domestik Osm...

 

 

Japanese carrier-based dive bomber D4Y Suisei Yokosuka D4Y3 Model 33 Suisei Role Dive bomber, reconnaissance, night fighterType of aircraft National origin Japan Manufacturer Yokosuka First flight December 1940 Introduction 1942 Retired 1945 Status Retired Primary user Imperial Japanese Navy Air Service Produced 1942–1945 Number built 2,038 The Yokosuka D4Y Suisei (彗星, Suisei, Comet, Allied reporting name Judy) is a two-seat carrier-based dive bomber developed by the Yokosuka Naval...

 

 

أندرس دبليو. بيرثيلسن معلومات شخصية الميلاد 28 سبتمبر 1969 (55 سنة)[1][2]  مواطنة مملكة الدنمارك  الحياة العملية المهنة ممثل،  وممثل أفلام،  ومؤدي أصوات،  ومخرج أفلام  اللغات الدنماركية  الجوائز جائزة روبرت لأفضل ممثل في دور رئيسي (عن عمل:A Lucky Man) (2023)  ا...

Association football league in England This article uses citations that link to broken or outdated sources. Please improve the article by addressing link rot or discuss this issue on the talk page. (August 2021) (Learn how and when to remove this message) Football leagueBrighton, Worthing & District Football LeagueFounded2014Country EnglandDivisions1Number of teams16Level on pyramidLevel 14Feeder toWest Sussex Football League Championship SouthDomestic cup(s)Brighton College CupPresi...

 

 

HartwellStasiun komuter PTVLokasiGeorgina Parade, CamberwellMelbourne, VictoriaAustraliaKoordinat37°50′39″S 145°04′32″E / 37.8441°S 145.0756°E / -37.8441; 145.0756Koordinat: 37°50′39″S 145°04′32″E / 37.8441°S 145.0756°E / -37.8441; 145.0756PemilikVicTrackOperatorMetro TrainsJalur  AlameinJumlah peron2Jumlah jalur2KonstruksiJenis strukturTanahInformasi lainZona tarifMyki Zona 1Situs webPublic Transport VictoriaSe...

 

 

Alphabet used for writing the Gothic language For other uses, see Gothic script. GothicScript type Alphabet Time periodFrom c. 350, in decline by 600DirectionLeft-to-right LanguagesGothicRelated scriptsParent systemsGreek script augmented with Latin and possibly Runic (questionable)GothicISO 15924ISO 15924Goth (206), ​GothicUnicodeUnicode aliasGothicUnicode rangeU+10330–U+1034F This article contains phonetic transcriptions in the International Phonetic Alphabet (IPA).&...

Athletics at the1970 Summer UniversiadeTrack events100 mmenwomen200 mmenwomen400 mmenwomen800 mmenwomen1500 mmen5000 mmen10,000 mmen100 m hurdleswomen110 m hurdlesmen400 m hurdlesmen3000 msteeplechasemen4×100 m relaymenwomen4×400 m relaymenField eventsHigh jumpmenwomenPole vaultmenLong jumpmenwomenTriple jumpmenShot putmenwomenDiscus throwmenwomenHammer throwmenJavelin throwmenwomenCombined eventsPentathlonwomenDecathlonmenvte The men's javelin throw event at the 1970 Summer Universiade wa...

 

 

يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر موثوق بها. أي معلومات غير موثقة يمكن التشكيك بها وإزالتها. (يناير 2020) التنافس بين تونس ومصر في كرة القدمالفرق المتنافسة الجزائر ليبياأول لقاءالجزائر 2–1 ليبيا، مباراة ود...

 

 

Audience NetworkDiluncurkan25 November 1999 (1999-11-25)PemilikDirecTVFormat gambar720p HDTV(downscaled to letterboxed 480i for the SDTV feed)NegaraAmerika SerikatBahasaInggrisKantor pusatEl Segundo, CaliforniaNama sebelumnyaFreeview (1999–2005)The 101 Network (2005–11)Audience Network (2011–16) Audience Network (lebih dikenal sebagai Audience dari 2016 hingga 2020)[1] adalah saluran televisi berbayar Amerika yang dimiliki oleh AT&T. Ini menampilkan campuran serial asli...

City in Kampong Cham, CambodiaSkuon ស្គន់CityNickname: SpidervilleSkuonLocation within CambodiaCoordinates: 12°3′4″N 105°4′15″E / 12.05111°N 105.07083°E / 12.05111; 105.07083Country CambodiaProvinceKampong ChamDistrictCheung Prey Fried spiders for sale at the market in SkuonSkuon (Khmer: ស្គន់) is the district capital of Cheung Prey District, in Kampong Cham Province, Cambodia. This busy market town has grown up around the inte...

 

 

In this Chinese name, the family name is Zhou. Zhou Xiaoxuan周晓璇Zhou in 2022Born1992 or 1993 (age 30–31)WuhanOccupation(s)screenwriter, activistKnown forRole in Chinese Me Too movementZhou Xiaoxuan (Chinese: 周晓璇; pinyin: Zhōu Xiǎoxuán; born c. 1993), better known by her pen name Xianzi (Chinese: 弦子; pinyin: Xiánzi), is a Chinese screenwriter and leading advocate in the Chinese Me Too movement.[1][2][3] Bi...

 

 

Women's 800 metres at the European Athletics Championships 1969 EuropeanAthletics ChampionshipsTrack events100 mmenwomen200 mmenwomen400 mmenwomen800 mmenwomen1500 mmenwomen5000 mmen10,000 mmen100 m hurdleswomen110 m hurdlesmen400 m hurdlesmen3000 msteeplechasemen4 × 100 m relaymenwomen4 × 400 m relaymenwomenRoad eventsMarathonmen20 km walkmen50 km walkmenField eventsHigh jumpmenwomenPole vaultmenLong jumpmenwomenTriple jumpmenShot putmenwomenDiscus throwmenwomenHammer throwmenJavelin...

Artikel utama: Pemilihan umum Presiden Indonesia 2019 Pemilihan umum Presiden Indonesia di Maluku 20192014202417 April 2019 (2019-04-17)Jajak pendapatTerdaftar1.266.034[1]Suara terhitung100%per 26/05/19, 07:00 WIBKandidat   Calon Joko Widodo Prabowo Subianto Partai PDI-P Gerindra Aliansi Koalisi Indonesia Kerja[2] Koalisi Indonesia Adil Makmur[2] Pendamping Ma'ruf Amin Sandiaga Uno Suara popular 599.457 392.940 Persentase 60,40% 39,60% Presiden...

 

 

Una taza de té con mantequilla tibetano El té de mantequilla (denominado también de forma local Po cha - བོད་ཇ་ - o Sutschia, a veces también como su you cha 酥油茶; pinyin: sū yóu chá) o goor goor en términos locales de Ladakh es un té tradicional del Tíbet y de las minorías chinas del sudoeste de China, que se elabora con mantequilla de leche de yak y al que se le añade un poco de sal. El té con mantequilla es parte indispensable de la vida de los tibetanos, ya q...

 

 

2024年 3月(弥生) 日 月 火 水 木 金 土 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 日付の一覧 各月 1 2 3 4 5 6 7 8 9 10 11 12 3月30日(さんがつさんじゅうにち)は、グレゴリオ暦で年始から89日目(閏年では90日目)にあたり、年末まであと276日ある。 できごと 正十七角形が定規とコンパスだけで作図可能と発見(1796) パリ条約(1856)が締結されクリミア戦�...

У этого термина существуют и другие значения, см. Юань-ди. Лю Ши 11-й император эпохи Хань Дата рождения 75 до н. э.(-075) Место рождения Чанъань, Китайская империя[вд] Дата смерти 33 до н. э.(-033) Место смерти Чанъань, Китайская империя[вд] Время царствования 48-33 гг. до н.э. Предшестве�...

 

 

この項目では、2009年まで百貨店「そごう」を運営していた企業について説明しています。 2009年以降そごう・西武が運営する「そごう」ブランドの店舗については「そごうの店舗一覧」をご覧ください。 その他の用法については「十合」をご覧ください。 フォートレス・インベストメント・グループ > そごう・西武 > そごう この項目には、一部のコンピュ...