Abstract
DNA-based data storage in living organisms requires codes that can correct tandem duplication mutations. This paper introduces the first efficient, polynomial-time algorithms for encoding and decoding data into $k$-irreducible words. By deriving recursive formulas based on suffix properties, the authors present a near-optimal finite-state encoder and an exact ranking/unranking scheme that reaches the theoretical capacity of these codes.
Introduction
As the field of DNA data storage matures, researchers are looking beyond ex vivo storage in test tubes toward in vivo storage within living organisms. Unlike the synthesis and sequencing errors typical of ex vivo environments, in vivo storage must contend with biological mutations. A primary concern is tandem duplication, where a DNA segment is copied and inserted immediately adjacent to its original position (e.g., AGTCTGC becoming AGTAGTCTGC).
To mitigate these errors, codes are constructed using irreducible words—sequences that do not contain any tandem repeats of length up to $k$. While the existence and capacity of such codes were previously established, practical implementation was hindered by the lack of efficient encoding and decoding algorithms. This paper bridges that gap by providing polynomial-time solutions.
Algorithmic Framework
The authors' approach centers on three key contributions that transform theoretical existence into practical utility.
1. Recursive Enumeration
The foundation of the work is the derivation of exact recursive formulas to count $k$-irreducible words. The authors discovered that these words can be partitioned into classes based on their suffixes. For example, in the case of $k=2$, the irreducibility of a word depends on its last few symbols to ensure no new square (like $aa$ or $abab$) is formed when appending a character.
2. Finite State Encoder
Building on the suffix-based recursion, the authors proposed an $(\ell, m)$-finite state encoder. This mechanism uses a sliding window to process input bits and output irreducible segments. By carefully selecting the window parameters, the encoding rate can be made to approach the theoretical limit within any desired $\epsilon$.
3. Ranking and Unranking
For applications requiring exact capacity, the authors developed a ranking and unranking scheme. This technique creates a mathematical bijection between a data integer and a specific irreducible codeword. By indexing every possible irreducible word of length $n$, data can be mapped directly to the code space without any density loss.
Performance and Results
The proposed algorithms are highly efficient, with both ranking and unranking operating in $O(n^2)$ time and space complexity, where $n$ is the codeword length. This is a significant improvement over the exponential complexity of naive lookup tables.
Furthermore, the finite state encoder achieves rates very close to the asymptotic capacity. As shown in the table below, the rate increases with the alphabet size $q$, which corresponds to the four bases of DNA ($q=4$) or larger symbolic systems.
Conclusion
This work provides the necessary constructive tools to implement tandem-duplication-correcting codes in real-world DNA storage systems. By achieving polynomial complexity and near-optimal rates, these algorithms make in vivo data storage more viable. Future research will focus on integrating these methods with error-correction for point mutations and optimizing the algorithms toward linear time complexity.
Summary updated