graph LR MST["1. Minimum\nSpanning Tree"] --> ODD["2. Odd-degree\nvertices"] ODD --> MWPM["3. Min-weight\nperfect matching"] MWPM --> EULER["4. Eulerian\nmultigraph"] EULER --> CIRCUIT["5. Eulerian\ncircuit"] CIRCUIT --> TOUR["6. Shortcut β\nHamiltonian cycle"] style MST fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style ODD fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style MWPM fill:#f8bbd0,stroke:#c2185b,stroke-width:3px style EULER fill:#fff9c4,stroke:#f57f17,stroke-width:3px style CIRCUIT fill:#fff9c4,stroke:#f57f17,stroke-width:3px style TOUR fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px
graph TD Q["Matching on a graph"] Q -->|"bipartite"| H["Hungarian\nO(nΒ³)"] Q -->|"general"| B["Blossom (Edmonds)\nO(nΒ³)"] B --> V["Blossom V (2009)\nstate of the art"] style Q fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style H fill:#fff9c4,stroke:#f57f17,stroke-width:3px style B fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style V fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px
graph LR M0["mask = 0"] -->|"pair (0, j)"| M1["mask = {0, j}"] M1 -->|"pair (1, j')"| M2["mask = {0, j, 1, j'}"] M2 --> DOTS["β¦ always contains 0"] DOTS --> BAD["dp[full β {0, j}] = INF β"] style M0 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style M1 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style M2 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style DOTS fill:#fff9c4,stroke:#f57f17,stroke-width:3px style BAD fill:#f8bbd0,stroke:#c2185b,stroke-width:3px
graph LR SRC["git.jorisvr.nl\nmaximum-weight-matching"] --> HDR["mwmatching.hpp\n+ 2 helper headers"] HDR --> AD["detail/blossom.hpp\nadapter"] AD --> TSP["tsp.hpp\nChristofides"] AD --> HAD["hadlock.hpp\nMAX-CUT"] style SRC fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style HDR fill:#d1c4e9,stroke:#6a1b9a,stroke-width:3px style AD fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style TSP fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style HAD fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px
graph TD Q["A fast heuristic can still be wrong"] --> A["greedy: no 3/2 bound β οΈ"] Q --> B["DP: right table, broken reconstruction π"] Q --> C["blossom: exact + polynomial β "] C --> D["verify against a brute-force oracle π§ͺ"] style Q fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style A fill:#f8bbd0,stroke:#c2185b,stroke-width:3px style B fill:#f8bbd0,stroke:#c2185b,stroke-width:3px style C fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style D fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px