We consider class of M-ary runlength-limited codes that achieve capacity and have the fewest number of encoder states. The codes apply to all M-ary (d,k) constraints with rational capacity. The codes have finite state encoders and sliding block with sliding block window size d plus 1.
Steven W. McLaughlin,
"Capacity-achieving M-ary runlength-limited codes", Proc. SPIE 2605, Coding and Signal Processing for Information Storage, (8 December 1995); doi: 10.1117/12.228235; https://doi.org/10.1117/12.228235