Skip to Main Content
The first-order moment of (d, k)-constrained codes is investigated in this paper. A generalized moment balancing template is proposed to encode a (d, k) sequence into a single insertion or deletion correcting codeword without losing the constraint property. By relocating 0's in moment balancing runs, which appear in a pairwise manner of a (d, k) sequence, the first-order moment of this sequence can be modified to satisfy the Varshamov-Tenengolts construction. With a reasonably large base in the modulo system introduced by the Varshamov-Tenengolts construction, this generalized moment balancing template can be applied to run-length limited sequences. The asymptotic bound of the redundancy introduced by the template for (d, k) sequences is of the same order as the universal template for random sequences and, therefore, the redundancy is small and suitable for long sequences of practical interest.