graph TD subgraph "Partition A" A1[Vertex A1] A2[Vertex A2] A3[Vertex A3] end subgraph "Partition B" B1[Vertex B1] B2[Vertex B2] end A1 ---|cut| B1 A2 ---|cut| B2 A3 --- A2 B1 --- B2 style A1 fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style A2 fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style A3 fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style B1 fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px style B2 fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px
graph LR INIT[Initialize Gains] --> BUCKET[Gain Buckets] BUCKET --> SELECT[Select Best Unlocked Vertex] SELECT --> MOVE[Move Vertex] MOVE --> UPDATE[Update Neighbor Gains] UPDATE --> LOCK[Lock Vertex] LOCK --> CHECK{"All vertices moved\n or no improvement?"} CHECK -->|No| SELECT CHECK -->|Yes| RESTORE[Restore Best Partition] RESTORE --> PASS{Further improvement?} PASS -->|Yes| INIT PASS -->|No| DONE[Done] style INIT fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px style BUCKET fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style SELECT fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px style MOVE fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px style UPDATE fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style LOCK fill:#f3e5f5,stroke:#7b1fa2,color:#2e3440,stroke-width:3px style CHECK fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px style RESTORE fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px style PASS fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px style DONE fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px
graph TD H0[Original Hypergraph G0] --> C1[Coarsen G1] C1 --> C2[Coarsen G2] C2 --> Ck[Coarsest Gk] Ck --> IP[Initial Partition] IP --> U1[Uncoarsen + Refine Gk-1] U1 --> U2[Uncoarsen + Refine Gk-2] U2 --> U0[Final Partition G0] style H0 fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style C1 fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px style C2 fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px style Ck fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px style IP fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px style U1 fill:#f3e5f5,stroke:#7b1fa2,color:#2e3440,stroke-width:3px style U2 fill:#f3e5f5,stroke:#7b1fa2,color:#2e3440,stroke-width:3px style U0 fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px
graph TD G[Original Graph] --> MATCH[Find Maximum Matching] MATCH --> PAIR[Pair Connected Nodes] PAIR --> CLUSTER[Construct Clustered Nodes] CLUSTER --> UPDATE[Update Connections & Weights] UPDATE --> SIMPLE{Simplified enough?} SIMPLE -->|No| MATCH SIMPLE -->|Yes| DONE[Coarsened Graph] style G fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style MATCH fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px style PAIR fill:#fff3e0,stroke:#e65100,color:#2e3440,stroke-width:3px style CLUSTER fill:#f3e5f5,stroke:#7b1fa2,color:#2e3440,stroke-width:3px style UPDATE fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px style SIMPLE fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px style DONE fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px