Home▸Articles▸Algorithms & AI

Karger's Randomized Min-Cut Algorithm: A Probabilistic Approach to Graph Partitioning

A fundamental algorithm in graph theory that leverages randomness for efficient solutions.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What is Karger's Randomized Min-Cut Algorithm?

Karger's randomized min-cut algorithm is a powerful method for finding the minimum cut of an undirected graph, which is the smallest set of edges whose removal disconnects the graph. The algorithm works by iteratively contracting random edges until only two vertices remain, and then tracking the size of the final cut.

This approach is particularly interesting because it provides a probabilistic guarantee on its performance: with high probability, it finds the minimum cut in linear time.

How Does Karger's Algorithm Work?

The algorithm begins by selecting an edge at random and contracting it, merging the two vertices into a single vertex. This process is repeated until only two super-vertices remain. The size of the cut corresponding to this final contraction is recorded. By repeating this process multiple times, the best minimum cut found across all trials is selected.

The key insight behind Karger's algorithm lies in its probabilistic nature: each trial has a chance of finding the optimal solution, and by running many trials, the probability of missing the minimum cut decreases exponentially.

live demo · related simulation● LIVE

Why Does It Matter?

Karger’s randomized min-cut algorithm is significant because it provides an efficient way to solve a problem that is NP-hard in deterministic settings. This makes it particularly useful in scenarios where exact solutions are computationally expensive or impractical.

In practical applications, such as network design and analysis, the minimum cut can represent critical points of failure or bottlenecks, making this algorithm invaluable for optimizing robustness and reliability.

Real-World Applications

Karger's algorithm has numerous real-world applications. For instance, in network analysis, it helps identify the most vulnerable points in a network that could be targeted to disrupt communication or data flow.

In computer science, it is used for clustering and community detection in social networks and web graphs, where identifying natural partitions can provide insights into the structure of these complex systems.

Frequently asked questions

How does Karger's algorithm ensure finding the minimum cut?

Karger’s algorithm ensures a high probability of finding the minimum cut by running multiple trials. Each trial contracts edges randomly, and the best result across all trials is selected.

Why is it called 'randomized'?

The term 'randomized' refers to the fact that Karger's algorithm relies on random edge contractions during its execution, which introduces an element of chance but also allows for efficient and effective solutions.

Can Karger's algorithm be used in directed graphs?

Karger’s algorithm is primarily designed for undirected graphs. For directed graphs, modifications or alternative algorithms are typically required to handle the directionality of edges.

What is the time complexity of Karger's algorithm?

The expected time complexity of Karger’s algorithm is O(n^2), where n is the number of vertices in the graph. This makes it highly efficient for large graphs compared to other exact algorithms.

Try it live

Everything above runs in your browser — open Karger's Randomized Min-Cut Algorithm (2D) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Karger's Randomized Min-Cut Algorithm (2D) simulation

What did you find?

Add reproduction steps (optional)