graph LR NPHD["NPO-hard\nGeneral TSP, SAT\nNo approximation possible"] -->|"hardest"| APX["APX-hard\nVertex Cover, Metric TSP\nConstant-factor approx"] APX -->|"hard"| PTAS["PTAS\nPlanar Vertex Cover\n(1+ฮต)-approx"] PTAS -->|"easier"| FPTAS["FPTAS\nKnapsack\nPoly in n and 1/ฮต"] FPTAS -->|"easiest"| P["P\nShortest Path, MST\nExact solution"] style NPHD fill:#f44336,color:#fff style APX fill:#ff9800,color:#fff style PTAS fill:#2196f3,color:#fff style FPTAS fill:#4caf50,color:#fff style P fill:#4caf50,color:#fff
graph TB subgraph "Steiner Tree (Single)" S1["sโ"] === T1["tโ"] S2["sโ"] === T2["tโ"] S3["sโ"] === T3["tโ"] end subgraph "Steiner Forest (Multiple)" S1a["sโ"] --- T1a["tโ"] S2a["sโ"] --- T2a["tโ"] S3a["sโ"] --- T3a["tโ"] end
graph LR A(("A")) ---|"10"| B(("B")) A ---|"15"| C(("C")) A ---|"12"| D(("D")) B ---|"8"| C B ---|"9"| D C ---|"11"| D style A fill:#f44336,color:#fff style B fill:#2196f3,color:#fff style C fill:#4caf50,color:#fff style D fill:#ff9800,color:#fff
flowchart LR A["Complete Graph"] --> B["๐ฒ MST"] B --> C["๐ข Odd-degree nodes"] C --> D["๐ Min Perfect Matching"] B --> E["๐ MST โช Matching"] D --> E E --> F["๐ Eulerian Circuit"] F --> G["โ๏ธ Shortcut โ Tour"] G --> H["โ โค 1.5ร OPT"] style A fill:#ffd style H fill:#cfc,stroke-width:3px
graph LR subgraph S["Set S"] A(("A")) B(("B")) end subgraph VS["Set V \ S"] C(("C")) D(("D")) end A ===|"5 โ"| C A -..-|"3 โ"| D B ===|"7 โ"| C B -..-|"2 โ"| D linkStyle 0 stroke:#4caf50,stroke-width:3px linkStyle 1 stroke:#4caf50,stroke-width:3px linkStyle 2 stroke:#4caf50,stroke-width:3px linkStyle 3 stroke:#4caf50,stroke-width:3px style A fill:#e3f2fd,stroke:#1565c0 style B fill:#e3f2fd,stroke:#1565c0 style C fill:#fce4ec,stroke:#c62828 style D fill:#fce4ec,stroke:#c62828
graph LR A["Planar Graph\nwith MAX-CUT\nNP-hard in general"] --> B["Construct\nDual Graph\n๐บ๏ธ"] B --> C["Identify\nOdd Faces ๐ข"] C --> D["All-Pairs\nShortest Paths\nin Dual ๐ฃ๏ธ"] D --> E["Min-Weight\nPerfect Matching\non Odd Faces ๐"] E --> F["Recover\nMaximum Cut\nโ Polynomial!"] style A fill:#f44336,color:#fff style B fill:#2196f3,color:#fff style C fill:#ff9800,color:#fff style D fill:#9c27b0,color:#fff style E fill:#4caf50,color:#fff style F fill:#4caf50,color:#fff