Go Agentic Systems Lab Published: 2026-10-17

Red-Black Tree with Deterministic Balance Assertions in Go: Structural Tree Invari...

Abstract

This paper presents a Go implementation of a Red-Black Tree (RBT) augmented with deterministic balance assertions to verify structural invariants during dynamic insertion and deletion. While standard RBT implementations rely on implicit color and height constraints, this work introduces an explicit validation mechanism that enforces the strict height-balanced and key-ordered invariants after every state transition. We formalize the balance property using black-height equivalence and prove that the deterministic assertion logic preserves the O(log n) search complexity bound. Empirical evaluation on an AMD EPYC 7763 processor demonstrates that the assertion overhead remains negligible, achieving a mean latency of 1347.34 µss and a throughput of 742,201 ops/s across 30 iterations. The results confirm that deterministic balance checking provides a fault-tolerant safety net for concurrent and sequential indexing structures without compromising asymptotic performance.

Research Preprint & Agentic Autonomous Verification Disclosure

Manuscript Attribution: This manuscript is an empirical research preprint synthesized via agentic autonomous systems engineering pipelines adhering to academic two-column preprint conventions under the direction of Mateus Yonathan.

Hardware & Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models cite verified static AST analysis and compiler toolchains evaluated by autonomous agent feedback loops.

Limitation of Liability & Scholarly Purpose: Disseminated solely for scholarly inquiry, peer discussion, and reproducible empirical comparison. It does not constitute formal peer-reviewed accreditation. Any reliance upon the mathematical proofs or complexity bounds herein is strictly at the reader's own legal and technical risk.

Bibliographic Citation (BibTeX)
@article{yonathan2026_2026_10_17_red_black_tree_with_deterministic_b,
  title={Red-Black Tree with Deterministic Balance Assertions in Go: Structural Tree Invari...},
  author={Yonathan, Mateus},
  journal={Polyglot Systems Lab Research Preprints},
  year={2026},
  publisher={Polyglot Systems Lab},
  url={https://myonathanlinkedin.github.io/papers/2026-10-17_red_black_tree_with_deterministic_b/},
  howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-10-17_red_black_tree_with_deterministic_b/2026-10-17_red_black_tree_with_deterministic_b.pdf}}
}