Ruby Agentic Systems Lab Published: 2026-11-15

Amortized Complexity and Invariant Preservation in a Ruby Fibonacci Heap Implementation

Abstract

We present a Ruby implementation of the Fibonacci Heap, a balanced search and indexing structure that supports insert, extract-min, and decrease-key in amortized O(1), O(log n), and O(1) time respectively. The design preserves strict height-balance and key-ordered invariants through root consolidation and cascading cuts. We formally prove that the heap maintains a logarithmic bound on the maximum root degree and that all operations respect the heap order. Empirical evaluation in our research evaluation environment,.93 µs and a throughput of 8 791 ops/s over 30 iterations.

Manuscript Page 1 Preview
Amortized Complexity and Invariant Preservation in a Ruby Fibonacci Heap Implementation Preview
Research Preprint & Verification Disclosure

Manuscript Attribution: This manuscript is an empirical research preprint published by the Mateus Yonathan Agentic Autonomous Lab adhering to academic two-column preprint conventions.

Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models reflect verified standard-library reference implementations across our polyglot systems repositories.

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_11_15_advanced_algorithms,
  title={Amortized Complexity and Invariant Preservation in a Ruby Fibonacci Heap Implementation},
  author={Yonathan, Mateus},
  journal={Polyglot Systems Lab Agentic Research Preprints},
  year={2026},
  publisher={Polyglot Systems Lab},
  url={https://myonathanlinkedin.github.io/papers/2026-11-15_advanced_algorithms/},
  howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-11-15_advanced_algorithms/2026-11-15_advanced_algorithms.pdf}}
}