Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

Commit 429b56a

Browse files
feat: Interactive Graph Partitioning Visualizer with Kernighan-Lin algorithm
Add docs/partitioning.html — an interactive balanced graph bisection tool: - Canvas-based visualization with draggable nodes colored by partition (blue/orange) - Kernighan-Lin (KL) algorithm with step-by-step animation and speed control - Random bisection baseline for comparison - Click nodes to manually swap between partitions - 8 preset graphs: Petersen, Grid 4x4, Complete K8, Barbell, Hypercube Q4, Wheel W12, Random 15, Mesh 5x5 - Text input/export for custom adjacency lists - Real-time metrics: cut size, balance ratio, KL pass count - Algorithm comparison table (Random vs KL) - Proactive insights: cut quality rating, balance assessment, convergence info - Cut edges shown as dashed red lines, internal edges as solid gray Usage: Open docs/partitioning.html in a browser, pick a preset or enter a graph, then run KL to minimize the edge cut.
1 parent 5672e17 commit 429b56a

2 files changed

Lines changed: 702 additions & 0 deletions

File tree

docs/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ <h2>GraphVisual</h2>
5050
<a href="dominating-set.html" class="sidebar-link"><span class="icon">👑</span>Dominating Set</a>
5151
<a href="independent-set.html" class="sidebar-link"><span class="icon">🏝️</span>Independent Set</a>
5252
<a href="vertex-cover.html" class="sidebar-link"><span class="icon">🛡️</span>Vertex Cover</a>
53+
<a href="partitioning.html" class="sidebar-link"><span class="icon">✂️</span>Graph Partitioning</a>
5354
<a href="matching.html" class="sidebar-link"><span class="icon">💍</span>Max Matching</a>
5455
<a href="graph-advisor.html" class="sidebar-link"><span class="icon">🧠</span>Graph Advisor</a>
5556
<a href="graph-evolution.html" class="sidebar-link"><span class="icon">🧬</span>Evolution Sim</a>
@@ -165,6 +166,11 @@ <h4>Diffusion Simulator</h4>
165166
<h4>Independent Set Finder</h4>
166167
<p>Find maximum independent sets with greedy, exact backtracking, and complement-clique algorithms. Step-by-step animation with Gallai theorem verification.</p>
167168
</div>
169+
<div class="card">
170+
<div class="icon">✂️</div>
171+
<h4>Graph Partitioning</h4>
172+
<p>Balanced graph bisection with Kernighan-Lin optimization. Interactive node swapping, step-by-step animation, algorithm comparison, and proactive insights.</p>
173+
</div>
168174
</div>
169175

170176
<h2>Relationship Classification</h2>

0 commit comments

Comments
 (0)