graph TD A[Symmetric Matrix A] --> B{Choose method} B --> C[Cholesky A = LL^T] B --> D[LDLT A = LDL^T] C --> E[L: lower triangular] C --> F[+ sqrt operations] D --> G[L: unit diagonal] D --> H[D: diagonal matrix] D --> I[No sqrt needed] style A fill:#fff3e0,stroke:#e65100,stroke-width:3px style B fill:#ffcdd2,stroke:#c62828,stroke-width:3px style C fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style D fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style E fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style F fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style G fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style H fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style I fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px
graph LR subgraph Cholesky C1[p^3/2 FLOPs] --> C2[sqrt ops] C2 --> C3[A = LL^T] end subgraph LDLT L1[p^3/2 FLOPs] --> L2[No sqrt] L2 --> L3[A = LDL^T] end style C3 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style L3 fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style C1 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style C2 fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style L1 fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style L2 fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px
graph TD A[Start factorization] --> B{diag > 0?} B -->|Yes| C[Continue next row] B -->|No| D[Stop at row p] D --> E[Construct witness v] E --> F[v^T A v < 0 proven] C --> G[Complete factorization] style A fill:#fff3e0,stroke:#e65100,stroke-width:3px style B fill:#ffcdd2,stroke:#c62828,stroke-width:3px style C fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style D fill:#ffcdd2,stroke:#c62828,stroke-width:3px style E fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px style F fill:#ffcdd2,stroke:#c62828,stroke-width:3px style G fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px