ARCHOS 525 BLUEPRINT · /d/dgm_code-permutations-subsets-and-combinations
Permutations, Subsets & Combinations (Canonical Tree & Dedup)
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_code-permutations-subsets-and-combinations) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-permutations-subsets-and-combinations)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-permutations-subsets-and-combinations" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Permutations, Subsets & Combinations (Canonical Tree & Dedup) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Input Set S"]
n1_1["Sort & Canonicalize"]
n2a_2["Subset / Comb Tree"]
n2b_3[("Bitmask / Used Flags")]
n3_4["Unique Combinatorics"]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Sort input · ON log N"| n1_1
n1_1 -->|"2a. Branch idx · O2^N"| n2a_2
n1_1 -->|"2b. Mask bit · Bitmask"| n2b_3
n2a_2 -->|"3a. Yield path · Stream"| n3_4
n2b_3 -->|"3b. Merge · RAM"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Input Set SSTATELESSItems / Feature Flags
- Sort & CanonicalizeSTATELESSGroups duplicates for O skip
- Subset / Comb TreeSTATELESSAdvances start_idx
- Bitmask / Used FlagsSTATEFULTracks active picks in int mask
- Unique CombinatoricsSTATELESSStreaming yield RAM)
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Input Set S → Sort & Canonicalize (Sort input)[ON log N]
- Sort & Canonicalize → Subset / Comb Tree (Branch idx)[O2^N]
- Sort & Canonicalize → Bitmask / Used Flags (Mask bit)[Bitmask]
- Subset / Comb Tree → Unique Combinatorics (Yield path)[Stream]
- Bitmask / Used Flags → Unique Combinatorics (Merge)[RAM]
- Unique Combinatorics → Downstream & OTel (Emit /)[OTLP/API]