Skip to main content
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
[![Permutations, Subsets & Combinations (Canonical Tree & Dedup) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_code-permutations-subsets-and-combinations/opengraph-image)](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_5

COMPONENT STACK (6)

  • Input Set SSTATELESS
    Items / Feature Flags
  • Sort & CanonicalizeSTATELESS
    Groups duplicates for O skip
  • Subset / Comb TreeSTATELESS
    Advances start_idx
  • Bitmask / Used FlagsSTATEFUL
    Tracks active picks in int mask
  • Unique CombinatoricsSTATELESS
    Streaming yield RAM)
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. Input Set S → Sort & Canonicalize (Sort input)[ON log N]
  2. Sort & Canonicalize → Subset / Comb Tree (Branch idx)[O2^N]
  3. Sort & Canonicalize → Bitmask / Used Flags (Mask bit)[Bitmask]
  4. Subset / Comb Tree → Unique Combinatorics (Yield path)[Stream]
  5. Bitmask / Used Flags → Unique Combinatorics (Merge)[RAM]
  6. Unique Combinatorics → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →