



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This is project report for Data Structures course. It was submitted to Gulfaam Hasan at Aliah University. It includes: Simple, Min-Cut, Algorithm, Undirected, Edge-weighted, Graph, maximum, Adjacency, Search, Connectivity
Typology: Study Guides, Projects, Research
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Abstract. We present an algorithm for finding the minimum cut of an undirected edge-weighted graph. It is simple in every respect. It has a short and compact description, is easy to implement, and has a surprisingly simple proof of correctness. Its runtime matches that of the fastest algorithm known. The runtime analysis is straightforward. In contrast to nearly all approaches so far, the algorithm uses no flow techniques. Roughly speaking, the algorithm consists of about u V u nearly identical phases each of which is a maximum adjacency search.
Categories and Subject Descriptors: G.L.2 [ Discrete Mathematics ]: Graph Theory— graph algorithms
General Terms: Algorithms
Additional Key Words and Phrases: Min-Cut
Graph connectivity is one of the classical subjects in graph theory, and has many practical applications, for example, in chip and circuit design, reliability of communication networks, transportation planning, and cluster analysis. Finding the minimum cut of an undirected edge-weighted graph is a fundamental algorithmical problem. Precisely, it consists in finding a nontrivial partition of the graphs vertex set V into two parts such that the cut weight , the sum of the weights of the edges connecting the two parts, is minimum.
A preliminary version of this paper appeared in Proceedings of the 2nd Annual European Symposium on Algorithms. Lecture Notes in Computer Science, vol. 855, 1994, pp. 141–147. This work was supported by the ESPRIT BRA Project ALCOM II. Authors’ addresses: M. Stoer, Televerkets Forskningsinstitutt, Postboks 83, 2007 Kjeller, Norway; e-mail: [email protected].; F. Wagner, Institut fu¨r Informatik, Fachbereich Mathematik und Informatik, Freie Universita¨t Berlin, Takustraße 9, Berlin-Dahlem, Germany; e-mail: [email protected] berlin.de. Permission to make digital / hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery (ACM), Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and / or a fee.
The usual approach to solve this problem is to use its close relationship to the maximum flow problem. The famous Max-Flow-Min-Cut-Theorem by Ford and Fulkerson [1956] showed the duality of the maximum flow and the so-called minimum s - t -cut. There, s and t are two vertices that are the source and the sink in the flow problem and have to be separated by the cut, that is, they have to lie in different parts of the partition. Until recently all cut algorithms were essentially flow algorithms using this duality. Finding a minimum cut without specified vertices to be separated can be done by finding minimum s - t -cuts for a fixed vertex s and all u V u 2 1 possible choices of t [ V \ { s } and then selecting the lightest one. Recently Hao and Orlin [1992] showed how to use the maximum flow algorithm by Goldberg and Tarjan [1988] in order to solve the minimum cut problem in time 2 (u V i E ulog(u V u^2 /u E u), which is nearly as fast as the fastest maximum flow algorithms so far [Alon 1990; Ahuja et al. 1989; Cheriyan et al. 1990]. Nagamochi and Ibaraki [1992a] published the first deterministic minimum cut algorithm that is not based on a flow algorithm, has the slightly better running time of 2 (u V i E u 1 u V u^2 logu V u), but is still rather complicated. In the unweighted case, they use a fast-search technique to decompose a graph’s edge set E into subsets E 1 ,... , E l such that the union of the first k E (^) i ’s is a k -edge-connected spanning subgraph of the given graph and has at most k u V u edges. They simulate this approach in the weighted case. Their work is one of a small number of papers treating questions of graph connectivity by non-flow-based methods [Nishizeki and Poljak 1989; Nagamochi and Ibaraki 1992a; Matula 1992]. Karger and Stein [1993] suggest a randomized algorithm that with high probability finds a minimum cut in time 2 (u V u^2 logu V u). In this context, we present in this paper a remarkably simple deterministic minimum cut algorithm with the fastest running time so far, established in Nagamochi and Ibaraki [1992b]. We reduce the complexity of the algorithm of Nagamochi and Ibaraki by avoiding the unnecessary simulated decomposition of the edge set. This enables us to give a comparably straightforward proof of correctness avoiding, for example, the distinction between the unweighted, integer-, rational-, and real-weighted case. This algorithm was found independently by Frank [1994]. Queyranne [1995] generalizes our simple approach to the minimization of submodular functions. The algorithm described in this paper was implemented by Kurt Mehlhorn from the Max-Planck-Institut, Saarbru¨cken and is part of the algorithms library LEDA [Mehlhorn and Na¨her 1995].
Throughout the paper, we deal with an ordinary undirected graph G with vertex set V and edge set E. Every edge e has nonnegative real weight w ( e ). The simple key observation is that, if we know how to find two vertices s and t , and the weight of a minimum s - t -cut, we are nearly done:
T HEOREM 2.1. Let s and t be two vertices of a graph G. Let G /{ s , t } be the graph obtained by merging s and t. Then a minimum cut of G can be obtained by taking the smaller of a minimum s - t - cut of G and a minimum cut of G /{ s , t }.
We call a vertex v fi a active (with respect to C ) when v and the vertex added just before v are in the two different parts of C. Let w ( C ) be the weight of C , Av the set of all vertices added before v (excluding v ), Cv the cut of Av ¯ { v } induced by C , and w ( Cv ) the weight of the induced cut. We show that for every active vertex v
w ~ Av , v! # w ~ Cv!
by induction on the set of active vertices: For the first active vertex, the inequality is satisfied with equality. Let the inequality be true for all active vertices added up to the active vertex v , and let u be the next active vertex that is added. Then we have
w ~ A (^) u , u! 5 w ~ Av , u! 1 w ~ A (^) u \ Av , u! 5 : a
Now, w ( Av , u ) # w ( Av , v ) as v was chosen as the vertex most tightly connected with Av. By induction w ( Av , v ) # w ( Cv ). All edges between A (^) u \ Av and u connect the different parts of C. Thus they contribute to w ( C (^) u ) but not to w ( Cv ). So
a # w ~ Cv! 1 w ~ A (^) u \ Av , u! # w ~ C (^) u!
As t is always an active vertex with respect to C we can conclude that w ( A (^) t , t ) # w ( C (^) t ) which says exactly that the cut-of-the-phase is at most as heavy as C.
As the running time of the algorithm M INIMUM C UT is essentially equal to the added running time of the u V u 2 1 runs of M INIMUM C UT P HASE , which is called on graphs with decreasing number of vertices and edges, it suffices to show that a single M INIMUM C UT P HASE needs at most 2 (u E u 1 u V u log u V u) time yielding an overall running time of 2 (u V i E u 1 u V u^2 log u V u). The key to implementing a phase efficiently is to make it easy to select the next vertex to be added to the set A , the most tightly connected vertex. During execution of a phase, all vertices that are not in A reside in a priority queue based on a key field. The key of a vertex v is the sum of the weights of the edges connecting it to the current A , that is, w ( A , v ). Whenever a vertex v is added to A we have to perform an update of the queue. v has to be deleted from the queue, and the key of every vertex w not in A , connected to v has to be increased by the weight of the edge vw , if it exists. As this is done exactly once for every edge, overall we have to perform u V u E XTRACT M AX and u E u I NCREASE K EY operations. Using Fibonacci heaps [Fredman and Tarjun 1987], we can perform an E XTRACT M AX operation in 2 (logu V u) amortized time and an I NCREASE K EY operation in 2 (1) amortized time. Thus, the time we need for this key step that dominates the rest of the phase, is 2 (u E u 1 u V ulogu V u).
F IG. 1. A graph G 5 ( V , E ) with edge-weights.
F IG. 2. The graph after the first M INIMUM C UT P HASE ( G , w , a ), a 5 2, and the induced ordering a , b , c , d , e , f , s , t of the vertices. The first cut-of-the-phase corresponds to the partition {1}, {2, 3, 4, 5, 6, 7, 8} of V with weight w 5 5.
F IG. 3. The graph after the second M INIMUM C UT P HASE ( G , w , a ), and the induced ordering a , b , c , d , e , s , t of the vertices. The second cut-of-the-phase corresponds to the partition {8}, {1, 2, 3, 4, 5, 6, 7} of V with weight w 5 5.
F IG. 4. After the third M INIMUM C UT P HASE ( G , w , a ). The third cut-of-the-phase corresponds to the partition {7, 8}, {1, 2, 3, 4, 5, 6} of V with weight w 5 7.
A Simple Min-Cut Algorithm 589
M ATULA , D. W. 1993. A linear time 2 1 e approximation algorithm for edge connectivity. In Proceedings of the 4th ACM–SIAM Symposium on Discrete Mathematics ACM, New York, pp. 500 –504. M EHLHORN , K., AND N¨AHER , S. 1995. LEDA: a platform for combinatorial and geometric comput- ing. Commun. ACM 38 , 96 –102. N AGAMOCHI , H., AND I BARAKI , T. 1992a. Linear time algorithms for finding a sparse k -connected spanning subgraph of a k -connected graph. Algorithmica 7 , 583–596. N AGAMOCHI , H., AND I BARAKI , T. 1992b. Computing edge-connectivity in multigraphs and capaci- tated graphs. SIAM J. Disc. Math. 5 , 54 – 66. N ISHIZEKI , T., AND P OLJAK , S. 1989. Highly connected factors with a small number of edges. Preprint. Q UEYRANNE , M. 1995. A combinatorial algorithm for minimizing symmetric submodular functions. In Proceedings of the 6th ACM–SIAM Symposium on Discrete Mathematics ACM, New York, pp. 98 –101.
RECEIVED APRIL 1995; REVISED FEBRUARY 1997; ACCEPTED JUNE 1997
Journal of the ACM, Vol. 44, No. 4, July 1997.
A Simple Min-Cut Algorithm 591