Manuscript Offprint
arXiv:2611.01064Maximal input entropy for binary two-deletion and two-insertion channels
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Under uniform transmission, we determine the received binary words that maximize input entropy for two-deletion and two-insertion channels. For two deletions the maximizers are exactly the two alternating words at every positive received length. For two insertions the same conclusion holds from received length five onward; we give all smaller cases and exact maximal values. The proof combines an embedding-count identity organized by runs with strict convexity estimates, and a grouping of two-position deletion masks. For every insertion radius we give the complete positive embedding histogram of an alternating received word. We also determine its three-deletion histogram for every length, and certify all three-deletion maximizers through received length twelve and all three-insertion maximizers through length eighteen by exact integer comparison. These computations give precise three-error conjectures with their small-length exceptions.
Keywords: binary words; subsequence embeddings; deletion channel; insertion channel; conditional entropy.
Mathematics Subject Classification (2020): 68R15, 94A17, 05A05.
1 Introduction
We determine which received binary words maximize the posterior input entropy for exactly two deletions or exactly two insertions. The posterior uncertainty depends on subsequence embedding multiplicities. Even with a uniform input distribution, the posterior is generally far from uniform: different index sets can produce the same word. Extremizing this conditional entropy therefore requires the full distribution of these multiplicities.
The posterior-entropy problem was investigated by Atashpendar, Roscoe and Ryan [3], who observed constant and alternating extremizers in their study of information leakage. Atashpendar et al. [1] subsequently studied the posterior distribution by clustering supersequences and using run lengths, and describe the conjecture that constant words minimize the entropy and alternating words maximize it. The related asymptotic work [2] proves entropy minimization when the received length is fixed and the transmitted length tends to infinity. Following their ITW paper [6], Singhvi, Sabary, Bar-Lev and Yaakobi [7] give embedding formulas for both channels, settle the one-error
*ORCID: 0009-0008-4944-977X.
†Corresponding author: e1327962@u.nus.edu. ORCID: 0009-0005-2414-7968.
extrema, and determine the two-deletion minimum and the general insertion minimum. In the latest arXiv version, Section VII-A, first unnumbered bullet, they state:
“Maximal Input Entropy for . While we provide a complete characterization of the sequences that minimize input entropy, the precise identification of the sequences that maximize input entropy for the 2-deletion and 2-insertion channels is still unresolved. Determining these sequences and the associated maximal entropy values remains an important open direction.”
This is arXiv:2407.10026v2, p. 16, of the work published as [7]. Their next bullet asks for extensions to higher radii.
We answer the two-error question completely. Alternating received words uniquely maximize the two-deletion input entropy. For two insertions they uniquely maximize it from length five onward, with an exceptional maximizing pair at length four. The deletion proof rearranges the run and alternating-segment enumeration of [7, Theorem 3] into a form suited to a strict lower bound for the entropy correction. We give a self-contained derivation by adding the first symbol. For insertion, grouping masks gives a lower bound sufficient for a comparison even without classifying every possible coincidence between subsequences.
Embedding histograms also arise in the enumeration of words with a prescribed number of occurrences of a fixed subsequence. Menon and Singh [5] obtain host-word counts for multiplicities one through four; their formulas recover four rows of our three-deletion histogram. Bruda [4] proves eventual polynomial enumeration for a fixed nonconstant pattern and fixed positive occurrence count, and gives a run-based embedding bound sharp when both words are alternating.
For higher radii we establish complete alternating-word histograms. The positive embedding histogram of an alternating received word has a binomial expression at every insertion radius. At radius three we also enumerate its supersequence multiplicities in closed form. Exact exhaustive comparisons support alternating maximizers for three deletions at all lengths checked, and for three insertions from length seven onward. The all-length optimality assertions at radius three remain conjectures.
Throughout the paper, is the received length. Thus the transmitted length is for deletions and for insertions. In [7], instead denotes transmitted length. All logarithms below have base two.
and
For insertion we assume . The channel chooses an error-position set uniformly, and insertion symbols are independent uniform bits. Uniform transmission means that every input word of the prescribed length has the same prior probability.
Lemma 2.1. The posterior probabilities of input words, given , are and , respectively. Consequently
Proof. For deletion, each embedding of in specifies the retained positions, so the likelihood is . Sum over by choosing the extra positions and their bits; this gives . The uniform prior and Bayes' rule give the first posterior. For insertion, each embedding of in specifies the inserted positions and their required bits. The likelihood is . Summing the embedding counts over counts all deletion masks on , giving the second posterior. Substitute these posteriors into Shannon entropy.
These are the binary specializations of [7, Lemmas 2 and 3].
Theorem 2.2. For every ,
(4)
For every ,
(5)
At received length two every word maximizes, with value zero; at length three exactly the six nonconstant words maximize; at length four exactly 0110 and 1001 maximize.
The maximal insertion entropies at received lengths three and four are, respectively, and , as computed in Section 4.2.
3 The two-deletion comparison
3.1 A run identity
Write the positive run lengths of as . List those at least two, in their original order, as . Put , and let count the singleton runs before, between and after these runs. If , define
Also put
Lemma 3.1. For q > 0,
For the value is .
Proof. We derive the identity through an exact first-symbol recurrence. Fix a tail run list of total length . Let be the number of its initial singleton runs plus the length of its first nonsingleton run; set if all runs are singleton, including . Let denote for a word with first run of length followed by ; at the first run is removed. Complementation makes the choice of first bit immaterial. We claim
for every integer .
Write runWord for the binary word with first bit and successive run lengths , taking the empty word when . To see the recurrence, let and let be with its first symbol removed. For words of length , put and . Those with have the following joint counts:
| number of distinct words | ||
|---|---|---|
| 1 | ||
| 1 for each tail run | ||
| 1 | ||
| 1 | 1 |
For completeness, every one-symbol supersequence is obtained either by extending a run (the first two rows), or by inserting the other symbol inside a run or at an end. The latter placements yield distinct words with . In all but one of them, deleting the leading leaves embeddings of . The exceptional word is runWord( ), obtained by inserting immediately before the final of the first run. In this word, the position omitted before the tail can move successively through its initial singleton runs and into its first nonsingleton run, giving additional embeddings. This also describes the empty-tail case, where the last two rows happen to have equal weights. Thus the table covers every distinct one-symbol supersequence once.
Separating the leading bit of a two-symbol supersequence gives
Hence . Terms with vanish. The sum of is . Substitution of the table and gives (8).
Now let denote the proposed right side of (7), with the stated all-singleton convention and . We verify the same increment. For , the singleton contribution changes by four per singleton tail run; each nonsingleton tail run contributes . The first-run term changes by
The two affected weights in (6) contribute
which gives (8). At , adding a singleton contributes , four per singleton tail run, per nonsingleton tail run, and . At , turning the first singleton into a run of length two contributes, apart from the tail increments,
These are exactly the and instances of (8). Induction on word length, starting from the empty word, proves the identity.
3.2 Strict minimization of the correction
Put . The exact inequalities and give
Let . We first show
At this is equality. For , convexity gives . It also gives
because the increment is increasing in and its value at is . Apply this with and . Expanding the difference of the terms yields
The second inequality uses and . This proves (10) by induction.
Suppose now is not alternating, so and . By (6),
All weights are positive, and is increasing for . Jensen's inequality and (10) give
Since , , and ,
Thus the right side of (11) exceeds by at least
using (9). Lemma 3.1 gives . Therefore only and its complement minimize . Lemma 2.1 proves (4).
4 The two-insertion comparison
4.1 Grouping two-position masks
The same-run, nonadjacent-run and alternating-segment cases are enumerated in [7, Theorem 4]. Here we group adjacent masks into components to obtain a lower bound sufficient for the strict extremal estimates below. For run lengths , a mask removing two positions in run has total weight , and masks removing one position in each of distinct runs have total weight . For adjacent pairs begin with edges of weights . Join successive edges exactly when their shared run is singleton, and denote the component sums by . Deleting that shared singleton allows the removed position in the neighboring run to slide from one edge to the next, so every component produces a single subsequence. Since
any further coincidences between the resulting subsequences can only increase their contribution. Consequently
For an alternating word all adjacent edges belong to one component of weight . Every nonadjacent mask gives a different subsequence of multiplicity one: its two removed positions are recovered from the two resulting equal-symbol adjacencies, or from the affected endpoint. Equivalently the case of Theorem 5.1 below gives the same histogram. Hence
Let . We prove two complementary bounds:
For (14), first unmerge adjacent edges in (12). Since , the resulting sum is
For every integer , convexity implies and
The latter is direct for . For apply , valid for , to and , and expand . The resulting lower bound is . These inequalities give (14).
For (15), the nonadjacent term satisfies
Also : sum over edges. Only an internal nonsingleton run separates edge components, so . For we have , and Jensen yields
Here the monotonicity of for justifies replacing the total edge weight by . Drop the nonnegative same-run term and substitute to obtain (15).
4.2 The comparison and the finite initial cases
Suppose and is not alternating. Then . If , necessarily , and (15) is strictly larger than . Otherwise (14) gives
To verify the last inequality, for integers . Indeed, at , and induction follows from for . Finally
Together with (12) and (13), this proves the strict comparison for .
The remaining cases are finite exact comparisons. For any channel with integer embedding counts, minimizing the correction is equivalent to minimizing
where for deletion and for insertion. In fact . The following table results from enumerating the words and all masks on each word.
| n | minimizing words | min Q | number |
|---|---|---|---|
| 2 | all words | 1 | 4 |
| 3 | all nonconstant words | 4 | 6 |
| 4 | 0110,1001 | 16 | 2 |
| 5 | 256 | 2 | |
| 6 | 3125 | 2 | |
| 7 | 46656 | 2 | |
| 8 | 823543 | 2 |
The exact finite algorithm and its completeness justification are in Section 6. In particular, the two cases have , respectively. At the counts for the possible length-two inputs 00,01,10,11 are for 0110, versus for 0101. The advantage is . The table, the strict comparison and Lemma 2.1 finish the proof of Theorem 2.2.
5 Higher radii: exact alternating-word formulas
We use the convention when or , for nonnegative integer . A positive embedding histogram lists each multiplicity together with the number of distinct words attaining it. If displayed multiplicities coincide, their counts are added.
5.1 All insertion radii
Theorem 5.1. Let , , and . The positive embedding histogram of over is
Rows with are omitted. In particular,
When m = 0, there is one possible input, the empty word, and the entropy is zero.
Proof. Fix , write , and let be the number of equal adjacent pairs in . The earliest possible first embedding position in is . The earliest increment between consecutive selected positions is one if the corresponding symbols differ, and two if they agree. Thus the earliest last position is .
All other embeddings are obtained uniquely by adding an even nonnegative increment to the first position and to the th gap, . With , the requirement is . There are no embeddings if ; otherwise stars and bars gives embeddings. For each initial bit , there are choices of with equal adjacent pairs: specify exactly which adjacent pairs are equal. Therefore the number of words with is
The words producing a fixed nonnegative have or . Their total number is , proving (18). Equation (19) follows from Lemma 2.1.
As a consistency identity, summing multiplicity times count gives
This also follows from the generating function .
Corollary 5.2. For , the three-insertion histogram of has multiplicity with count , and multiplicity one with count . Hence
Proof. In (18) take . The rows and give the two stated multiplicities and counts.
For example, radius four has one word of multiplicity , words of multiplicity , and words of multiplicity one. The formulas describe the alternating word's entropy; optimality is a separate comparison problem.
5.2 Three deletions
For , the multiplicity-one, -two, -three and -four counts below also follow from [5, Propositions 3.2, 3.4, 3.8 and 3.11]: take the pattern , with singleton runs, and host length . The four counts specialize to and . We give a direct proof of the complete histogram, including all smaller lengths.
Theorem 5.3. For every , the positive embedding histogram of over is the following table, with coincident rows combined:
| multiplicity | count | multiplicity | count | multiplicity | count |
|---|---|---|---|---|---|
| 1 | 4 | 2 | 3n | 3 | 2n |
| 4 | 6 | 8 | |||
| 2n | n | 2n+1 | 2 | n+1 | 2 |
Thus, with
we have
Proof. Write and let be the number of runs of . Put and let be its first bit. An alternating subsequence uses at most one position in each run. It starts in a run of index congruent to modulo two, and consecutive chosen run indices differ by an odd positive integer. A necessary and sufficient condition for a positive count is . Consequently .
If , then and only is possible. Every run is selected, and the multiplicity is the product of the run lengths. Distributing the three extra symbols gives one run of length four, one of length three and one of length two, or three runs of length two. The multiplicities and counts are respectively
If , then . For exactly the first runs are selected; for exactly the last are selected. For either initial bit, distributing two extra symbols gives multiplicity one once (both extras in the excluded run), multiplicity two times (one extra in the excluded run), multiplicity three times (both extras in one selected run), and multiplicity four times (extras in two selected runs).
If , there is one run of length two among runs. For , the selected runs are exactly : the multiplicity is one for the two boundary choices of the doubled run and two for its interior choices. For , any run-selection pattern omits exactly one adjacent pair among pairs. Each boundary run is included in patterns and each interior run in patterns. Doubling a boundary run therefore changes the total from to , while doubling an interior run changes it to . Their respective counts are two and .
Finally, gives the two alternating words of length . Each has embeddings of , as follows either by the gap argument in Theorem 5.1, with pattern length and radius three, or directly by counting the run selections. Adding the disjoint cases gives the table and (21). The entropy formula follows from Lemma 2.1.
6 Exact finite results and open comparisons
6.1 Enumeration and certificates
No numerical logarithm is needed to compare entropies. If a histogram has distinct words of embedding multiplicity , then is an integer and . At fixed received length and radius, normalization is constant, so integer ordering of gives exact entropy ordering, including all ties.
For insertion, enumerate every received word and every -position deletion mask on it. Count how often each resulting input occurs, and then form its histogram. For deletion, enumerate every and every -position deletion mask on . For each resulting received word , accumulate the frequency into 's histogram. Each index set occurs exactly once in these loops. The former therefore computes exactly ; the latter computes exactly , and every possible word is represented. This proves soundness and completeness of the finite enumeration.
The ancillary C++ enumerator performs these mask counts using integers. A Python checker verifies the normalization of every histogram, computes arbitrary-precision integer products, and compares every candidate against the minimum. It also checks the alternating histograms against the formulas in Theorem 5.1 and Theorem 5.3. The saved outputs list all maximizers and their histograms, together with a strict runner-up whenever one exists.
Proposition 6.1. The following finite statements hold by exhaustive exact comparison.
-
For three deletions and , the maximizers are exactly and .
-
For three insertions and , the maximizers are exactly and . The earlier cases are listed below.
| n | three-insertion maximizing received words | minimum Q |
|---|---|---|
| 3 | all words | 1 |
| 4 | the six words of weight two | |
| 5 | 01010, 01110, 10001, 10101 | |
| 6 | 011001, 100110 | |
| 7–18 |
Proof. Apply the exhaustive algorithm above and compare (17) for every received word. The ancillary results contain the exact comparisons for every length, including the initial cases used in Theorem 2.2. The three-deletion sweep covers received words; the three-insertion sweep covers received words. The programs use no symmetry reduction or floating-point filtering, so tied or exceptional words cannot be omitted by a preliminary numerical selection.
For , the three-insertion histogram of 011001 has two occurrences of each multiplicity 1, 2, 3, 4. That of has four occurrences of each multiplicity 1, 4. Thus
since . Its entropy advantage is exactly . This is a concrete obstruction to extending the two-insertion maximizing statement without adjusting the initial lengths.
6.2 Three-error conjectures
Conjecture 6.2. For every , the only maximizers of are and . For every , the only maximizers of are and .
The first part is the radius-three instance of the alternating-maximizer question discussed in [1, 7]. The second part incorporates the exact exceptions above. If these conjectures hold, their maximal values are (22) and (20), respectively. Theorems 5.1 and 5.3 establish those alternating-word values at every length, independently of optimality. The remaining step is a strict comparison for arbitrary nonalternating words. The two-error proof suggests organizing this comparison by run excess and coincidences between masks, but at radius three these coincidences involve more than adjacent pairs.
Acknowledgement
We thank Shubhransh Singhvi for his interest in a full account of the two-error techniques and for encouraging investigation of higher radii.
Data and code availability
The enumeration code, exact outputs, reproduction instructions and Lean companion are supplied as arXiv ancillary files. The maximizer characterizations and maximal-value formulas in Theorem 2.2 are formalized in the corresponding Lean source. The higher-radius results and computations have the proofs and finite scope stated above.
Funding
This research received no specific funding.
Competing interests
The authors declare no competing interests.
Use of AI tools
Haobo Ma and Wenlin Zhang used AI tools, namely ChatGPT Pro (GPT-6 Pro), Codex (gpt-6.1-sol) and Claude Opus 5.5 (via Claude Code), for literature search, computation and double-checking, including formal verification in Lean of Theorem 2.2. All proofs can be checked by hand, and the computations can be reproduced from the ancillary files. H. Ma and W. Zhang take full responsibility for their contributions.
References
[1] Arash Atashpendar, Marc Beunardeau, Aisling Connolly, Rémi Géraud, David Mestel, A. W. Roscoe, and Peter Y. A. Ryan, From clustering supersequences to entropy minimizing subsequences for single and double deletions, arXiv:1802.00703v2, 2019.
[2] Arash Atashpendar, David Mestel, A. W. Roscoe, and Peter Y. A. Ryan, A proof of entropy minimization for outputs in deletion channels via hidden word statistics, arXiv:1807.11609v1, 2018.
[3] Arash Atashpendar, A. W. Roscoe, and Peter Y. A. Ryan, Information leakage due to revealing randomly selected bits, Security Protocols XXIII, Springer, 2015, doi:10.1007/978-3-319-26096-9_33, pp. 325–341.
[4] Glenn Bruda, Enumerating binary words restricted by subsequence frequency, arXiv:2607.02578v1, 2026.
[5] Krishna Menon and Anurag Singh, Subsequence frequency in binary words, Discrete Mathematics 347 (2024), no. 5, 113928, doi:10.1016/j.disc.2024.113928.
[6] Shubhransh Singhvi, Omer Sabary, Daniella Bar-Lev, and Eitan Yaakobi, The input and output entropies of the k-deletion/insertion channel with small radii, 2022 IEEE Information Theory Workshop (ITW), 2022, doi:10.1109/ITW54588.2022.9965878, pp. 564–569.
[7] ______, Conditional entropies of k-deletion/insertion channels, IEEE Transactions on Information Theory 71 (2025), no. 9, 6503–6516, The open questions are in Section VII-A of arXiv:2407.10026v2. doi:10.1109/TIT.2025.3581849.