Sequence Counting by Integer Partitioning
Sequence Counting by Integer Partitioning
abc
March 13, 2022
Example
n = 6
` = 4
m = 2
This describes a length-6 noise sequence with noise bursts (111) and (1), separated by zeros. The prototype
sequence is:
111001
We can view this as a sequence of length 4. Let
A = 111
B = 0
C = 1
ABBA
In general, there are n! permutations of a sequence of length n, but, unless all elements of the sequence are
unique, some permutations will be identical to others. The distinct permutations of this sequence are
ABBC
ABC B
AC BB
BABC
..
.
However, the third line represents 1 1 1 1 0 0 which is one burst of length 4 and violates the condition
m = 2. Enumerating all distinct permutations of the sequence, you can see that half of them are not allowed.
Thus we have:
• n!
(n−2) ! = 12 distinct sequences;
• 6 allowed sequences.
(If you haven’t done so yet, try this example now.)
Observation The unallowed subsequences in this example are A C and C A. Each one can occur in three
places (beginning in positions 1, 2, and 3.)
1
Thoughts
• In the example, every unallowed subsequence is of length 2. Since m = 2, we discovered that every
pair of m = 2 bursts must be separated by at least one 0.
• Suppose m = 3. The same rule applies, but the count will be different. For example if the bursts are
A, B, and C, then the rule prohibits AB, BC, CA, and their inverses.
An Algorithm
(Forget most of the above. The following is based on examples in Word document, “Finding Noise Burst
Error Patterns.”) We will talk about (n, `, m) noise sequences or words (or patterns).
Basis for an Algorithm for KTB Case 0
1. Given block length n, select the number ` < n of bit flips to be considered.
2. An integer partition {`1 , `2 , . . . , `m , m < `} of `, together with its permutations, enumerates all the
patterns of bursts of length m, with ` bitflips.
3. Each length-m partition of ` represents itself and all distinct permutations of the order of the compo-
nents.
4. The (n−`) zeros in the sequence are placed between each contiguous pair of bursts and at the beginning
and end of the sequence (Case 0). Thus, we need the integer partitions of (n − `) that contain exactly
(m + 1) elements. The permutations of these will specify the ways in which the zeros are distributed.
5. Claim Total number of bursts with parameters (n, `, m) is the product of the number of ways to specify
the order of the bursts and the number of ways to distribute the zeros (n − `).