graph TD subgraph System Nodes direction TD N1; N2; N3; N4; N5; N6; N7; end subgraph Quorum A direction LR N1; N2; N4; end subgraph Quorum B direction LR N2; N3; N5; end N2 -- Intersection --- N2 style N2 fill:#f9f,stroke:#333,stroke-width:2px style N1 fill:#bbdefb,stroke:#1565c0 style N3 fill:#bbdefb,stroke:#1565c0 style N4 fill:#bbdefb,stroke:#1565c0 style N5 fill:#bbdefb,stroke:#1565c0 style N6 fill:#e0e0e0,stroke:#757575 style N7 fill:#e0e0e0,stroke:#757575
graph LR A["Start with\nempty set"] --> B["Pick next\nnumber"] B --> C{"Partial solution\nstill valid?"} C -- Yes --> D{"Goal\nReached?"} C -- No --> E["Backtrack:\nUndo pick"] D -- No --> B D -- Yes --> F["Solution Found! ๐"] E --> B style A fill:#e3f2fd,stroke:#1565c0 style B fill:#bbdefb,stroke:#1565c0 style C fill:#fff9c4,stroke:#f9a825 style D fill:#fff9c4,stroke:#f9a825 style E fill:#fce4ec,stroke:#c62828 style F fill:#e8f5e9,stroke:#2e7d32,stroke-width:3px
graph LR subgraph Main["Main Thread"] A["Parse N, D"] --> B["Create ThreadPool\n(hardware_concurrency/2 workers)"] B --> C["Enqueue tasks for\nj = start โฆ end"] end subgraph Worker["Worker Threads"] D["DcGenerator(N, D, j)"] E["DcGenerator(N, D, j+1)"] F["โฏ"] end C --> D C --> E C --> F D --> G["Recursive GenD()\nwith step_forward/\nstep_backward undo"] E --> G F --> G G --> H["Solution Found?\nPrint & Continue"] style Main fill:#e3f2fd style Worker fill:#fce4ec style D fill:#ffcdd2,stroke:#c62828 style E fill:#ffcdd2,stroke:#c62828 style F fill:#ffcdd2,stroke:#c62828 style G fill:#f3e5f5,stroke:#7b1fa2 style H fill:#e8f5e9,stroke:#2e7d32
graph TD subgraph RL Loop State["Current State\n(Chosen numbers,\ncovered differences)"] Agent["๐ค Policy\nNetwork"] Action["Pick a\nNumber"] Reward["๐ How many NEW\ndifferences covered?"] State -- Input --> Agent Agent -- Output --> Action Action -- Update --> State Action -- Generates --> Reward Reward -- Learn --> Agent end style State fill:#e3f2fd,stroke:#1565c0 style Agent fill:#fce4ec,stroke:#c62828 style Action fill:#fff9c4,stroke:#f9a825 style Reward fill:#e8f5e9,stroke:#2e7d32
graph LR A["Input Layer\n2N nodes"]:::input --> B["Hidden Layer 1\n256 nodes, ReLU"]:::hidden1 B --> C["Hidden Layer 2\n128 nodes, ReLU"]:::hidden2 C --> D["Output Layer\nN nodes (logits)"]:::output D --> E["Softmax\nAction Probabilities"]:::softmax classDef input fill:#a6e3a1,stroke:#4a8f3e classDef hidden1 fill:#89b4fa,stroke:#1e66f5 classDef hidden2 fill:#cba6f7,stroke:#8839ef classDef output fill:#f9e2af,stroke:#df8e1d classDef softmax fill:#f38ba8,stroke:#d20f39
graph LR A["Shared Policy\nNetwork"]:::neural --> B["Thread 1\n(Worker)"]:::thread1 A --> C["Thread 2\n(Worker)"]:::thread2 A --> D["Thread โฏ\n(Worker)"]:::threads B --> E["Episodes:\nGradients"]:::episode C --> E D --> E E --> A E --> F{"Solution\nFound?"}:::decision F -->|Yes| G["Stop All ๐"]:::success F -->|No| B classDef neural fill:#89b4fa,stroke:#1e66f5 classDef thread1 fill:#f9e2af,stroke:#df8e1d classDef thread2 fill:#fab387,stroke:#e64553 classDef threads fill:#cba6f7,stroke:#8839ef classDef episode fill:#94e2d5,stroke:#179299 classDef decision fill:#f5c2e7,stroke:#ea76cb classDef success fill:#a6e3a1,stroke:#4a8f3e
graph TD subgraph CPU["CPU: 5 ฮผs"] A1["MatMul\n300ร256"] --> A2["ReLU"] A2 --> A3["MatMul\n256ร128"] A3 --> A4["ReLU"] A4 --> A5["MatMul\n128รN"] end subgraph GPU["GPU: 50 ฮผs (kernel launch overhead)"] B1["Launch\n(10โ50 ฮผs)"] --> B2["Compute\n(<5 ฮผs)"] end style CPU fill:#e3f2fd,stroke:#1565c0 style GPU fill:#fce4ec,stroke:#c62828
graph TD subgraph N112["N=112, d=12 Solution"] S0("39") --- S1("52") S1 --- S2("56") S2 --- S3("62") S3 --- S4("64") S4 --- S5("76") S5 --- S6("81") S6 --- S7("90") S7 --- S8("97") S8 --- S9("108") S9 --- S10("111") S10 --- S11("112") end S0 --> S11 style S0 fill:#e3f2fd,stroke:#1565c0 style S1 fill:#bbdefb,stroke:#1565c0 style S2 fill:#e3f2fd,stroke:#1565c0 style S3 fill:#bbdefb,stroke:#1565c0 style S4 fill:#e3f2fd,stroke:#1565c0 style S5 fill:#bbdefb,stroke:#1565c0 style S6 fill:#e3f2fd,stroke:#1565c0 style S7 fill:#bbdefb,stroke:#1565c0 style S8 fill:#e3f2fd,stroke:#1565c0 style S9 fill:#bbdefb,stroke:#1565c0 style S10 fill:#e3f2fd,stroke:#1565c0 style S11 fill:#bbdefb,stroke:#1565c0 style N112 fill:#f5f5f5
graph LR A["Current\nWork"] --> B["PPO / A3C\nAdvanced RL"] A --> C["GPU\nAcceleration"] A --> D["Better\nPruning Bounds"] B --> E["Larger N\n(N > 200)"] C --> E D --> F["Tighter\nOptimality"] style A fill:#e3f2fd,stroke:#1565c0 style B fill:#fce4ec,stroke:#c62828 style C fill:#fff9c4,stroke:#f9a825 style D fill:#e8f5e9,stroke:#2e7d32 style E fill:#f3e5f5,stroke:#7b1fa2 style F fill:#e8f5e9,stroke:#2e7d32