Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_code-binary-search-and-parametric-search

Binary Search & Parametric Search on the Answer

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Binary Search & Parametric Search on the Answer — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_code-binary-search-and-parametric-search/opengraph-image)](https://archos.sageideas.dev/d/dgm_code-binary-search-and-parametric-search)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-binary-search-and-parametric-search)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-binary-search-and-parametric-search" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Binary Search & Parametric Search on the Answer — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Sorted / Monotonic Input"]
  n1_1["Invariant Bounds"]
  n2a_2["Midpoint Probe"]
  n2b_3["Feasibility Predicate"]
  n3_4["Exact Boundary"]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Init · Bounds"| n1_1
  n1_1 -->|"2a. Compute · O1"| n2a_2
  n1_1 -->|"2b. canFinish · ON"| n2b_3
  n2a_2 -->|"3a. Converge · Olog N"| n3_4
  n2b_3 -->|"3b. Merge · RAM"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • Sorted / Monotonic InputSTATELESS
    Array or Answer Space [lo, hi]
  • Invariant BoundsSTATELESS
    lo..hi half-open or closed range
  • Midpoint ProbeSTATELESS
    lo + // 2 overflow-safe
  • Feasibility PredicateSTATELESS
    Monotonic F..F..T..T checker
  • Exact BoundarySTATELESS
    First True / Last False optimum
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. Sorted / Monotonic Input → Invariant Bounds (Init)[Bounds]
  2. Invariant Bounds → Midpoint Probe (Compute)[O1]
  3. Invariant Bounds → Feasibility Predicate (canFinish)[ON]
  4. Midpoint Probe → Exact Boundary (Converge)[Olog N]
  5. Feasibility Predicate → Exact Boundary (Merge)[RAM]
  6. Exact Boundary → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →