Enumerating Binary Strings Without K-Runs of Ones Implementations of the enumeration algorithm for counting numbers of N-long binary strings without K-runs of ones. See my blog post for a detailed explanation of the algorithm and the intuition behind it. :)