graph LR subgraph "Fault-tolerance group" F1["f-TSV 1"] --> MUX["MUX"] F2["f-TSV 2"] --> MUX F3["f-TSV 3"] --> MUX MUX --> S["s-TSV"] end style F1 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style F2 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style F3 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style MUX fill:#fff9c4,stroke:#f57f17,stroke-width:3px style S fill:#ffccbc,stroke:#bf360c,stroke-width:3px
graph TD A["Feasible Flow"] --> B["Build Residual G(x)"] B --> C{Any Negative Cycle?} C -->|Yes| D["Cancel Cycle"] D --> B C -->|No| E["OPTIMAL"] style A fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style B fill:#fff9c4,stroke:#f57f17,stroke-width:3px style C fill:#fff9c4,stroke:#f57f17,stroke-width:3px style D fill:#fff9c4,stroke:#f57f17,stroke-width:3px style E fill:#ffccbc,stroke:#bf360c,stroke-width:3px
graph LR subgraph "digraphx" MCF["mcf.py"] --> NCQ["neg_cycle_q.py"] NCQ --> NC["neg_cycle.py"] MCF --> PARAM["parametric.py"] end style MCF fill:#fff9c4,stroke:#f57f17,stroke-width:3px style NCQ fill:#fff9c4,stroke:#f57f17,stroke-width:3px style NC fill:#fff9c4,stroke:#f57f17,stroke-width:3px style PARAM fill:#fff9c4,stroke:#f57f17,stroke-width:3px
graph TD subgraph "VALID" A1[src1] --> B["node X"] --> C1[dst1] B --> C2[dst2] end subgraph "INVALID" D1[src1] --> E["node Y"] D2[src2] --> E E --> F1[dst1] E --> F2[dst2] end style B fill:#a5d6a7,stroke:#1b5e20,stroke-width:3px style E fill:#ffcdd2,stroke:#c62828,stroke-width:3px