arXiv:2610.39941cs.FLOct 2026

Manuscript Offprint

arXiv:2610.39941

Block-exchange descent for insertion: commuting projections and minimum masks

Haobo Ma, Wenlin Zhang, Charles E. Hughes

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

For fixed nonempty words u, v, the minimum insertion degree of a shuffle is the least number of inserted-source runs among its representations. We prove that, after a block exchange from a minimum mask of degree r, the minimum over masks with commuting source projections is exactly r−1r - 1; a larger decrease occurs precisely when a noncommuting mask has fewer runs. If either source is unary, every such exchange is exact. We prove an explicit repair for an infinite periodic degree-three family. Computer-assisted results establish first-mask descent through combined length seventeen over every alphabet, degree-three first-mask descent through length thirty, and a uniform repair of all degree-three failures through length thirty, including all further letter identifications. Counterexamples to arbitrary, first, and last minimum-mask choices explain the need for alternative masks. Finally, we prove that minimum iteration depths have no gaps for arbitrary languages. General block-exchange descent and Singleton No-Gap remain open.

1 Introduction

Insertion and shuffle are fundamental operations on words and formal languages. Both combine two sources while preserving the order of the symbols within each source, but they differ in how freely the symbols may be interleaved. In this paper, we investigate a natural question arising from that distinction: how many separate blocks of one word do we need to insert into another to produce a target word, and which minimum numbers of blocks can arise as the target word varies?

Let u and v be nonempty words over an alphabet Σ\Sigma. We regard u as the inserted word and v as the base word. A single insertion places all of u at one position in v, without changing the order of the letters of either word. More generally, a k-insertion divides u into at most k nonempty consecutive factors and distributes them into positions in v, again preserving the order of both sources. The formal definition permits empty factors, so that increasing the bound k never removes an output.

If we set the insertion position to be the beginning of v, the result is the concatenation of u and v, uv. If the number of inserted factors is unrestricted, the resulting words are precisely the shuffles of u and v: all interleavings that preserve the relative order of the letters originating in each source. Thus, bounded insertion provides a hierarchy between single-block insertion, such as concatenation, and unrestricted shuffle.

An important subtlety is that an output word may have several different representations as a shuffle of the same two sources. When letters occur in both source words, their origins may be ambiguous. Consequently, the number of inserted blocks in one representation need not be the smallest possible number for that output. We call the least positive number of inserted blocks required to produce an output w its minimum insertion degree, denoted du,v(w)d_{u,v}(w).

For example, take u = 00 and v = 11. The word 0011 has minimum degree 1, because the two zeros can be inserted together. In contrast, 0110 has minimum degree 2, since its zeros are separated by the base letters, so two inserted blocks are necessary. Both words are shuffles of the same sources. This simple example illustrates how minimum insertion degree measures the amount of separation required between inserted-source letters. The source mask of 0110 is UVVU: the two zeros carry label U and the two ones carry label V. Its two maximal U-runs correspond to the two inserted blocks.

For fixed sources u, v, consider the set of minimum degrees attained by all their shuffle outputs:

D(u,v)={du,v(w):w∈Sh(u,v)}.D(u,v)=\{d_{u,v}(w):w\in\mathrm{Sh}(u,v)\}.

Degree 1 is always attained: the concatenation uv is a shuffle in which the entire inserted word u forms a single block. The Singleton No-Gap problem asks whether this spectrum always consists of consecutive positive integers, from 1 through some maximum. In other words, if an output requires at least r inserted blocks, must there also be outputs whose minimum degrees are 1, 2, ..., r - 1?

This question arises from Hughes’s investigation of bounded insertion and adjacent equality in hierarchies of language operations [7, Section 11]. For singleton source languages, the No-Gap property would imply that the bounded-insertion hierarchy cannot skip an attainable minimum degree. For general languages, additional ambiguity arises because an output may be produced by different source-word pairs. We distinguish this broader insertion-degree problem from the singleton case considered here.

Our approach studies the representations of a shuffle directly. A source mask labels each output position according to whether its letter came from u or v. The number of maximal runs labeled by the inserted source equals the number of inserted blocks in that mask. A minimum mask is one attaining the minimum insertion degree.

Suppose a minimum mask has r>1r > 1 inserted-source runs. Two consecutive inserted runs are separated by a block of base-source letters. Exchanging that separating block with either neighboring inserted run merges the two runs while preserving the order of letters within each source. The resulting output therefore has a representation with r−1r - 1 inserted runs. However, it may admit another representation with fewer than r−1r - 1 runs. This is the principal obstacle to obtaining a degree- (r−1)(r - 1) predecessor.

We ask whether, for every shuffle output of minimum degree r>1r > 1, some minimum mask admits a block exchange whose resulting output has minimum degree exactly r−1r - 1. An affirmative answer would establish Singleton No-Gap by repeated descent.

Our principal structural result characterizes the obstruction to an exact block exchange. We prove that transporting an alternative mask back through the exchange preserves both source words precisely when the corresponding projected factors commute. Here two words commute when concatenating them in either order gives the same word. Among these commuting masks, the minimum run count after the exchange is exactly r−1r - 1; any larger reduction in the output's minimum insertion degree must arise from a noncommuting mask (Theorem 3). This yields an exact obstruction criterion and a dynamic-programming test.

We then establish that every block exchange from every minimum mask is exact whenever either source word is unary, meaning that it consists of repetitions of a single letter (Theorem 4). We also prove an exact repair theorem for an infinite periodic family of degree-three obstructions (Theorem 9). Explicit counterexamples show why an arbitrary minimum mask, or even the lexicographically first or last minimum mask, cannot always be selected.

Computer-assisted results establish additional bounded cases over arbitrary alphabets and identify the limitations of several natural mask-selection rules. Their precise length and degree bounds are stated in Section 8. Separately, we prove that the spectrum of minimum iteration depths has no gaps for arbitrary source languages (Theorem 15), extending the finite-language result of Hughes [7, Section 10]. Here iteration depth counts successive insertion steps; insertion degree counts blocks within one step.

The paper develops the relevant background, proves the structural and unary results, examines the counterexamples and periodic repair, presents the computational certificates, and concludes with the remaining open questions. The general existence of an exact block-exchange predecessor and the general Singleton No-Gap conjecture both remain open.