We examine a class of binary strings arising from considerations about stream cipher encryption: to what degree can one guarantee that the number of pairs of entries distance k apart that disagree is equal to the number that agree, for all small k? In a certain sense, a keystream with such a property achieves a degree of unpredictability. The problem is also restated combinatorially in terms of seating arrangements. We examine sequences s of length 2n in which this property holds for all k ≤ Mn, where Mn is the largest number for which this is possible among strings of length 2n. We give upper and lower bounds for Mn, and give optimal sequences of all lengths up to n = 26. We also show how to obtain classes of special orthogonal arrays and balanced sign graphs from such sequences.
Richard Low, Mark Stamp, R. Craigen, and G. Faucher. "Unpredictable Binary Strings" Congressus Numerantium (2005): 65-75.