SlideShare a Scribd company logo
Randomized Algorithm
Min-cut Problem and it’s solution using Karger’s Algorithm
Guided By :-
👩 Prof. Sonia Mittal
👦 Gaurang Savaliya (16MCA058)
Nirma University, Ahmedabad,
Gujarat,India
Introduction
2
 A randomized algorithm is an algorithm that receives, in addition to its
input, a stream of random bits which is used to make random choices.
 The random bits are assumed to be independent of the input.
 A salient feature is that repeated runs of a randomized algorithm with
fixed input data will, in general, not produce the same result.
 You might be perplexed that such a lack of definiteness is desirable,
but consider that this feature allows to transform deterministic
algorithms with bad worst case behaviour into randomized algorithms
that perform well with high probability on any input.
 I hope that the next example can convey that randomized algorithms
are often simple and efficient.
“Let G = (V,E) be a connected, undirected, loop free multigraph with n
vertices. A multigraph is like a graph but may contain multiple edges
between two vertices, as the following example shows.
A Min Cut Algorithm
A B
C D E
F
A Min Cut Problem
▸A cut in the multigraph G = (V,E) is a partition of the vertex set V into
two disjoint nonempty sets V = V1∪V2.
▸ An edge with one end in V1 and the other in V2 is said to cross the cut.
The cut is often identified with the multiset of crossing edges.
▸The term cut is chosen because the removal of the edges in a cut
partitions the multigraph.
▸example, if we partition V = {A,B,C,D,E,F} into the sets V1 = {A,C} and V2
= {B,D,E,F} in the previous example, then this cut has five crossing edges,
and removing these edges yields the disconnected multigraph:
4
A B
C D E
F
 The size of the cut is given by the number of edges crossing the cut. Our
goal is to determine the minimum size of a cut in a given multigraph G.
 We describe a very simple randomized algorithm for this purpose. If e
is an edge of a loop free multigraph G, then the multigraph G/e is
obtained from G by contracting the edge e = {x,y}, that is, we identify
the vertices x and y and remove all resulting loops.
▸Edge Contraction :-
6
Edge Contraction in Ramdom Inputs
7
Karger’s Min cut algorithm
▸The above figure shows a multigraph G and the multigraph G/{C,D}
resulting from contracting an edge between C and D. We keep the label
of one vertex to avoid cluttered notations, but keep in mind that a node D
in the graph G/{C,D} really represents the set of all nodes that are
identified with D.
A B
C D E
F
A B
D E
F
A Min Cut Algorithm
▸The size of the minimum cut of G/e is at least the size of the minimum
cut of G, because all edges are kept. Thus we can use successive
contractions to estimate the size of the minimum cut of G. This is the
basic idea of the following randomized algorithm.
▸Contract(G)
▸Input: A connected loop free multigraph G = (V,E) with at least 2
vertices.
▸1: while |V | > 2 do
▸2: Select e ∈ E uniformly at random;
▸3: G := G/e;
▸4: od;
▸5: return |E|.
▸Output: An upper bound on the minimum cut of G.
Two different runs of the
Contract algorithm. The
algorithm does not always
produce the correct result.
The run shown in the left
column correctly determines
the minimum cut size to be 3.
The run shown in the right
column fails to produce the
correct result; here the
algorithm will claim that the
size of the minimum cut is 6.
Analysis
▸It is not difficult to show that the correct size of a minimum cut will be
found by the algorithm Contract with probability Ω(n), where n denotes
the number of vertices of the multigraph.
▸ Repeating the algorithm O(n2 logn) times and choosing the smallest
value returned by the runs yields the correct size of the minimum cut
with high probability.
Analysis
 The beauty of this scheme is its simplicity.
 If G is represented as a labeled graph, where the labels denote
the multiplicity of the edges, then Contract can be implemented
with O(n2) operations; running the algorithm repeatedly, as
suggested before, yields at total of O(n4 logn) operations.
Remarks
 The running time of the best deterministic minimum cut
algorithm is O(nm + n2 logn), where m denotes the number of
edges, that is, in the labeled graph representation the running
time is at most O(n3), see for instance [2]. It turns out that size
of the minimum cut can be determined with high probability in
O(n2 log3 n) steps using a refined version of the contraction
algorithm, see [1].
14
THANKS!

More Related Content

What's hot

NAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERNAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIER
Knoldus Inc.
 
Randomized Algorithm
Randomized AlgorithmRandomized Algorithm
Randomized Algorithm
Kanishka Khandelwal
 
Computational Complexity: Complexity Classes
Computational Complexity: Complexity ClassesComputational Complexity: Complexity Classes
Computational Complexity: Complexity Classes
Antonis Antonopoulos
 
Backtracking
BacktrackingBacktracking
Backtracking
subhradeep mitra
 
Graph theory
Graph theoryGraph theory
Graph theory
AparnaKumari31
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
Amey Kerkar
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
Ehtisham Ali
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Data Mining: Outlier analysis
Data Mining: Outlier analysisData Mining: Outlier analysis
Data Mining: Outlier analysis
DataminingTools Inc
 
Machine Learning-Linear regression
Machine Learning-Linear regressionMachine Learning-Linear regression
Machine Learning-Linear regression
kishanthkumaar
 
Data clustering
Data clustering Data clustering
Data clustering
GARIMA SHAKYA
 
Big o notation
Big o notationBig o notation
Big o notation
hamza mushtaq
 
Depth first search [dfs]
Depth first search [dfs]Depth first search [dfs]
Depth first search [dfs]
DEEPIKA T
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
Rajendran
 
Computational Complexity
Computational ComplexityComputational Complexity
Computational Complexity
Kasun Ranga Wijeweera
 
Classification Algorithm.
Classification Algorithm.Classification Algorithm.
Classification Algorithm.
Megha Sharma
 
The Maximum Subarray Problem
The Maximum Subarray ProblemThe Maximum Subarray Problem
The Maximum Subarray Problem
Kamran Ashraf
 
Decision tree
Decision treeDecision tree
Decision tree
R A Akerkar
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
Mohd Arif
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
Manikanta satyala
 

What's hot (20)

NAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERNAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIER
 
Randomized Algorithm
Randomized AlgorithmRandomized Algorithm
Randomized Algorithm
 
Computational Complexity: Complexity Classes
Computational Complexity: Complexity ClassesComputational Complexity: Complexity Classes
Computational Complexity: Complexity Classes
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Data Mining: Outlier analysis
Data Mining: Outlier analysisData Mining: Outlier analysis
Data Mining: Outlier analysis
 
Machine Learning-Linear regression
Machine Learning-Linear regressionMachine Learning-Linear regression
Machine Learning-Linear regression
 
Data clustering
Data clustering Data clustering
Data clustering
 
Big o notation
Big o notationBig o notation
Big o notation
 
Depth first search [dfs]
Depth first search [dfs]Depth first search [dfs]
Depth first search [dfs]
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Computational Complexity
Computational ComplexityComputational Complexity
Computational Complexity
 
Classification Algorithm.
Classification Algorithm.Classification Algorithm.
Classification Algorithm.
 
The Maximum Subarray Problem
The Maximum Subarray ProblemThe Maximum Subarray Problem
The Maximum Subarray Problem
 
Decision tree
Decision treeDecision tree
Decision tree
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 

Similar to Randomized algorithm min cut problem and its solution using karger's algorithm

Data_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.pptData_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.ppt
ISHANAMRITSRIVASTAVA
 
Analysis of Algorithm
Analysis of AlgorithmAnalysis of Algorithm
Analysis of Algorithm
أحلام انصارى
 
Randomized Algorithms
Randomized AlgorithmsRandomized Algorithms
Randomized Algorithms
Ketan Kamra
 
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGAScientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Ahmed Gamal Abdel Gawad
 
Daa chapter 1
Daa chapter 1Daa chapter 1
Daa chapter 1
B.Kirron Reddi
 
Greedy Algorithms
Greedy AlgorithmsGreedy Algorithms
Greedy Algorithms
Amrinder Arora
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptx
vaishnavi339314
 
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhhCh3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
danielgetachew0922
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
appasami
 
ALGO.ppt
ALGO.pptALGO.ppt
ALGO.ppt
PidoonEsm
 
CP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and AlgorithmsCP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and Algorithms
Sheba41
 
Secure Domination in graphs
Secure Domination in graphsSecure Domination in graphs
Secure Domination in graphs
Mahesh Gadhwal
 
ICML2013読み会 Large-Scale Learning with Less RAM via Randomization
ICML2013読み会 Large-Scale Learning with Less RAM via RandomizationICML2013読み会 Large-Scale Learning with Less RAM via Randomization
ICML2013読み会 Large-Scale Learning with Less RAM via Randomization
Hidekazu Oiwa
 
Dynamic programmng2
Dynamic programmng2Dynamic programmng2
Dynamic programmng2
debolina13
 
An Analysis of Graph Cut Size for Transductive Learning
An Analysis of Graph Cut Size for Transductive LearningAn Analysis of Graph Cut Size for Transductive Learning
An Analysis of Graph Cut Size for Transductive Learning
butest
 
A Branch And Bound Algorithm For The Maximum Clique Problem
A Branch And Bound Algorithm For The Maximum Clique ProblemA Branch And Bound Algorithm For The Maximum Clique Problem
A Branch And Bound Algorithm For The Maximum Clique Problem
Sara Alvarez
 
Daa chapter11
Daa chapter11Daa chapter11
Daa chapter11
B.Kirron Reddi
 
Presentation.pdf
Presentation.pdfPresentation.pdf
Presentation.pdf
Chiheb Ben Hammouda
 
Perimetric Complexity of Binary Digital Images
Perimetric Complexity of Binary Digital ImagesPerimetric Complexity of Binary Digital Images
Perimetric Complexity of Binary Digital Images
RSARANYADEVI
 
Unit3_1.pdf
Unit3_1.pdfUnit3_1.pdf
Unit3_1.pdf
Pratimakumari213460
 

Similar to Randomized algorithm min cut problem and its solution using karger's algorithm (20)

Data_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.pptData_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.ppt
 
Analysis of Algorithm
Analysis of AlgorithmAnalysis of Algorithm
Analysis of Algorithm
 
Randomized Algorithms
Randomized AlgorithmsRandomized Algorithms
Randomized Algorithms
 
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGAScientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
 
Daa chapter 1
Daa chapter 1Daa chapter 1
Daa chapter 1
 
Greedy Algorithms
Greedy AlgorithmsGreedy Algorithms
Greedy Algorithms
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptx
 
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhhCh3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
 
ALGO.ppt
ALGO.pptALGO.ppt
ALGO.ppt
 
CP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and AlgorithmsCP4151 ADSA unit1 Advanced Data Structures and Algorithms
CP4151 ADSA unit1 Advanced Data Structures and Algorithms
 
Secure Domination in graphs
Secure Domination in graphsSecure Domination in graphs
Secure Domination in graphs
 
ICML2013読み会 Large-Scale Learning with Less RAM via Randomization
ICML2013読み会 Large-Scale Learning with Less RAM via RandomizationICML2013読み会 Large-Scale Learning with Less RAM via Randomization
ICML2013読み会 Large-Scale Learning with Less RAM via Randomization
 
Dynamic programmng2
Dynamic programmng2Dynamic programmng2
Dynamic programmng2
 
An Analysis of Graph Cut Size for Transductive Learning
An Analysis of Graph Cut Size for Transductive LearningAn Analysis of Graph Cut Size for Transductive Learning
An Analysis of Graph Cut Size for Transductive Learning
 
A Branch And Bound Algorithm For The Maximum Clique Problem
A Branch And Bound Algorithm For The Maximum Clique ProblemA Branch And Bound Algorithm For The Maximum Clique Problem
A Branch And Bound Algorithm For The Maximum Clique Problem
 
Daa chapter11
Daa chapter11Daa chapter11
Daa chapter11
 
Presentation.pdf
Presentation.pdfPresentation.pdf
Presentation.pdf
 
Perimetric Complexity of Binary Digital Images
Perimetric Complexity of Binary Digital ImagesPerimetric Complexity of Binary Digital Images
Perimetric Complexity of Binary Digital Images
 
Unit3_1.pdf
Unit3_1.pdfUnit3_1.pdf
Unit3_1.pdf
 

Recently uploaded

The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
heathfieldcps1
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
سمير بسيوني
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
 

Recently uploaded (20)

The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
 
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdfمصحف القراءات العشر   أعد أحرف الخلاف سمير بسيوني.pdf
مصحف القراءات العشر أعد أحرف الخلاف سمير بسيوني.pdf
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
 

Randomized algorithm min cut problem and its solution using karger's algorithm

  • 1. Randomized Algorithm Min-cut Problem and it’s solution using Karger’s Algorithm Guided By :- 👩 Prof. Sonia Mittal 👦 Gaurang Savaliya (16MCA058) Nirma University, Ahmedabad, Gujarat,India
  • 2. Introduction 2  A randomized algorithm is an algorithm that receives, in addition to its input, a stream of random bits which is used to make random choices.  The random bits are assumed to be independent of the input.  A salient feature is that repeated runs of a randomized algorithm with fixed input data will, in general, not produce the same result.  You might be perplexed that such a lack of definiteness is desirable, but consider that this feature allows to transform deterministic algorithms with bad worst case behaviour into randomized algorithms that perform well with high probability on any input.  I hope that the next example can convey that randomized algorithms are often simple and efficient.
  • 3. “Let G = (V,E) be a connected, undirected, loop free multigraph with n vertices. A multigraph is like a graph but may contain multiple edges between two vertices, as the following example shows. A Min Cut Algorithm A B C D E F
  • 4. A Min Cut Problem ▸A cut in the multigraph G = (V,E) is a partition of the vertex set V into two disjoint nonempty sets V = V1∪V2. ▸ An edge with one end in V1 and the other in V2 is said to cross the cut. The cut is often identified with the multiset of crossing edges. ▸The term cut is chosen because the removal of the edges in a cut partitions the multigraph. ▸example, if we partition V = {A,B,C,D,E,F} into the sets V1 = {A,C} and V2 = {B,D,E,F} in the previous example, then this cut has five crossing edges, and removing these edges yields the disconnected multigraph: 4
  • 5. A B C D E F  The size of the cut is given by the number of edges crossing the cut. Our goal is to determine the minimum size of a cut in a given multigraph G.  We describe a very simple randomized algorithm for this purpose. If e is an edge of a loop free multigraph G, then the multigraph G/e is obtained from G by contracting the edge e = {x,y}, that is, we identify the vertices x and y and remove all resulting loops.
  • 7. Edge Contraction in Ramdom Inputs 7
  • 8. Karger’s Min cut algorithm ▸The above figure shows a multigraph G and the multigraph G/{C,D} resulting from contracting an edge between C and D. We keep the label of one vertex to avoid cluttered notations, but keep in mind that a node D in the graph G/{C,D} really represents the set of all nodes that are identified with D. A B C D E F A B D E F
  • 9. A Min Cut Algorithm ▸The size of the minimum cut of G/e is at least the size of the minimum cut of G, because all edges are kept. Thus we can use successive contractions to estimate the size of the minimum cut of G. This is the basic idea of the following randomized algorithm. ▸Contract(G) ▸Input: A connected loop free multigraph G = (V,E) with at least 2 vertices. ▸1: while |V | > 2 do ▸2: Select e ∈ E uniformly at random; ▸3: G := G/e; ▸4: od; ▸5: return |E|. ▸Output: An upper bound on the minimum cut of G.
  • 10. Two different runs of the Contract algorithm. The algorithm does not always produce the correct result. The run shown in the left column correctly determines the minimum cut size to be 3. The run shown in the right column fails to produce the correct result; here the algorithm will claim that the size of the minimum cut is 6.
  • 11. Analysis ▸It is not difficult to show that the correct size of a minimum cut will be found by the algorithm Contract with probability Ω(n), where n denotes the number of vertices of the multigraph. ▸ Repeating the algorithm O(n2 logn) times and choosing the smallest value returned by the runs yields the correct size of the minimum cut with high probability.
  • 12. Analysis  The beauty of this scheme is its simplicity.  If G is represented as a labeled graph, where the labels denote the multiplicity of the edges, then Contract can be implemented with O(n2) operations; running the algorithm repeatedly, as suggested before, yields at total of O(n4 logn) operations.
  • 13. Remarks  The running time of the best deterministic minimum cut algorithm is O(nm + n2 logn), where m denotes the number of edges, that is, in the labeled graph representation the running time is at most O(n3), see for instance [2]. It turns out that size of the minimum cut can be determined with high probability in O(n2 log3 n) steps using a refined version of the contraction algorithm, see [1].