Swift Agentic Systems Lab Published: 2026-10-17

Height-Balanced Invariant Preservation in a Swift Aho-Corasick Multi-Pattern Autom...

Abstract

The Aho-Corasick automaton is a canonical solution for simultaneous pattern matching, yet its practical deployment in modern systems demands rigorous guarantees on structural balance and failure-link propagation. We present a Swift implementation that constructs a height-balanced trie and computes failure links while preserving a strict height-balanced invariant. The design guarantees that each node's depth is bounded by O(log N), where N is the number of patterns, and that the failure-link graph remains a directed acyclic graph with bounded fan-in. Formal invariants are proven using automated AST inspection and static analysis on an AMD EPYC 9V45 platform. The resulting automaton achieves linear-time construction and O(|T|) search, with verified asymptotic bounds and a concise

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_aho_corasick_multi_pattern_string_s,
  title={Height-Balanced Invariant Preservation in a Swift Aho-Corasick Multi-Pattern Autom...},
  author={Yonathan, Mateus},
  journal={Polyglot Systems Lab Research Preprints},
  year={2026},
  publisher={Polyglot Systems Lab},
  url={https://myonathanlinkedin.github.io/papers/2026-10-17_aho_corasick_multi_pattern_string_s/},
  howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-10-17_aho_corasick_multi_pattern_string_s/2026-10-17_aho_corasick_multi_pattern_string_s.pdf}}
}