Optimal Almost-Balanced Sequences
Preprint
Abstract
This paper presents a novel approach to address the constrained coding challenge of generating almost-balanced sequences. While strictly balanced sequences have been well studied in the past, the problem of designing efficient algorithms with small redundancy, preferably constant or even a single bit, for almost balanced sequences has remained unsolved. A sequence is $\varepsilon(n)$-almost balanced if its Hamming weight is between $0.5n\pm \varepsilon(n)$. It is known that for any algorithm with a constant number of bits, $\varepsilon(n)$ has to be in the order of $Θ(\sqrt{n})$, with $O(n)$ average time complexity. However, prior solutions with a single redundancy bit required $\varepsilon(n)$ to be a linear shift from $n/2$. Employing an iterative method and arithmetic coding, our emphasis lies in constructing almost balanced codes with a single redundancy bit. Notably, our method surpasses previous approaches by achieving the optimal balanced order of $Θ(\sqrt{n})$. Additionally, we extend our method to the non-binary case considering $q$-ary almost polarity-balanced sequences for even $q$, and almost symbol-balanced for $q=4$. Our work marks the first asymptotically optimal solutions for almost-balanced sequences, for both, binary and non-binary alphabet.
Keywords
All Related Versions
This publication has 12 references indexed in Scilit:
- Universal Framework for Parametric Constrained CodingIEEE Transactions on Information Theory, 2026
- Portable and Error-Free DNA-Based Data StorageScientific Reports, 2017
- Forward Error Correction for DNA Data StorageProcedia Computer Science, 2016
- Robust Chemical Preservation of Digital Information on DNA in Silica with Error‐Correcting CodesAngewandte Chemie International Edition, 2015
- Knuth's Balanced Codes RevisitedIEEE Transactions on Information Theory, 2010
- Very Efficient Balanced CodesIEEE Journal on Selected Areas in Communications, 2010
- Efficient m-ary balanced codesDiscrete Applied Mathematics, 1999
- Balanced codes with parallel encoding and decodingIEEE Transactions on Computers, 1999
- Design of some new efficient balanced codesIEEE Transactions on Information Theory, 1996
- Efficient balanced codesIEEE Transactions on Information Theory, 1986