Manuscript Offprint
arXiv:2610.09998Probabilistic GC-Constraints for Composite DNA
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Humeyra Bodur*, Frederik Walter*, and Antonia Wachter-Zeh*
*School of Computation, Information and Technology, Technical University of Munich, Germany, Emails: {humeyra.bodur, frederik.walter, antonia.wachter-zeh}@tum.de
Abstract—This paper addresses the challenge of encoding biochemical GC-content constraints in composite DNA-based data storage. Previous deterministic models impose high rate penalties by avoiding any possibility for a strand to fall outside the allowed range. To account for the stochastic nature of composite DNA, we introduce an -probabilistic constraint framework, and derive capacity bounds for global constraints using composition types and for local sliding-window constraints via finite-state Markov chains. Furthermore, we propose a capacity-achieving multi-type enumerative encoder.
Index Terms—DNA-based data storage, composite DNA, constrained coding, GC-content, channel capacity
I. INTRODUCTION
In today's information-driven world, efficiently storing large amounts of data for long periods is a significant challenge. DNA-based data storage has recently emerged as a promising solution for this [1], [2]. It takes advantage of the natural ability of DNA molecules to encode vast amounts of information in an extremely compact form.
The classical approach to storing information in DNA, without error correction, maps a binary alphabet to the four nucleotides , thereby encoding information directly into DNA sequences. However, commonly used DNA synthesis does not produce only a single copy of the sequence. Instead, the synthesis process inherently generates multiple copies of the same strand [3]. Many DNA-based data storage schemes treat this multiplicity primarily as redundancy for error correction, which reduces the effective information density per synthesized position [1], [4].
Composite DNA has been proposed as an alternative encoding strategy to exploit the many-copy nature of DNA synthesis [4]. In composite DNA, each position in a DNA strand represents a probabilistic composition of nucleotides instead of encoding a single, fixed base. Specifically, a composite symbol at position i can be represented as a tuple , where each denotes the relative proportion of nucleotide and . Figure 1 illustrates a side-by-side comparison of classical and composite DNA encoding schemes, highlighting the structural differences between the two approaches.
While composite DNA offers gains in theoretical information density, it also introduces fundamental challenges to ensure that synthesized sequences satisfy essential biochemical constraints. To secure reliable chemical processing,

Fig. 1. Classical (left) and composite (right) DNA encoding schemes.
DNA sequences must avoid extreme variations in GC content. Excessively GC-rich or AT-rich sequences suffer from skewed melting temperatures, leading to amplification bias, non-uniform read coverage, and sequence dropout [5]–[7].
As in traditional optical recording and communication systems, where physical channel properties restrict allowable sequences, constrained coding provides a general information-theoretic framework for accommodating these biochemical limits [8]. Rather than generating arbitrary sequences and blindly discarding unsuitable ones, this approach ensures that digital data is mapped directly and exclusively to valid, biologically compliant strands.
In classical DNA storage, constraint evaluation is deterministic. The transition to composite symbols introduces a different problem: the physical nucleotide sequence obtained during synthesis is probabilistic. Despite this, constrained coding for composite DNA remains relatively underexplored. Recently, Nguyen et al. [9] investigated both run-length-limited (RLL) and global GC-content constraints in composite DNA, calculating constrained capacities for small composite alphabets using adjacency matrices. Their capacity evaluations and subsequent code constructions relied on a strict, worst-case deterministic framework utilizing sequence replacement and Knuth's algorithm. A theoretical analysis of RLL coding was presented in [10], [11].
A critical limitation of existing deterministic approaches is that enforcing zero-tolerance compliance against worst-case realizations introduces high rate penalties. In this paper, we shift to a probabilistic constraint. This shift is justified by the physical and informational realities unique to the stochastic nature of composite DNA.
By allowing a controlled probability of constraint violation (denoted by ), we are able to expand the admissible code space. In this work, we develop a comprehensive framework for the analysis and encoding of composite DNA sequences
Funded by the European Union (DiDAX, 101115134). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.
subject to -probabilistic GC constraints. We determine the capacity and propose an efficient multi-type arithmetic indexing scheme that achieves it. The remainder of this paper details the constraint formulations (Section II), capacity formulations and analysis (Section III), and the proposed encoding scheme (Section IV). Proofs and examples are deferred to the appendix; short sketches are given for the main theorems.
A. Composite DNA Representation and Probability Bins
The base alphabet for composite DNA consists of the four base nucleotides [4].
Definition 1 (Composite DNA Symbol). A composite DNA symbol S over the alphabet X is defined by the integer counts
where k is called the resolution parameter and represents the count of nucleotide x used to form the composite symbol. Equivalently, S represents an empirical distribution over . We denote the set of all composite symbols with resolution k as the composite alphabet .
The size of the composite alphabet is . For the synthesis, a composite sequence is fed to the synthesizer. For each of the multiple synthesized strands, at position , a nucleotide is chosen at random according to the distribution given by . We emphasize that the synthesis process does not provide control over which specific strand receives which nucleotide. Only the overall composition of nucleotides at each position is specified by the composite symbol. As a result, each nucleotide at position in a strand can be viewed as an independent realization drawn from the distribution associated with .
Assume we sequence M strands from the pool of a synthesized composite DNA sequence of length n. We represent the m-th strand as
where denotes the nucleotide of strand m at position i. In this view, the array of M strands is the matrix D whose m-th row is . Note that each is a realization of a random variable over the distribution given by . To evaluate sequences efficiently, we group symbols by their intrinsic GC probability mass as follows.
Definition 2 (Probability-Mass Binning). For a resolution parameter k, the GC probability mass is defined as . As it takes discrete values in , we partition into disjoint probability bins , where all symbols in bin share the same GC probability mass, meaning .
The cardinality of each bin is determined by the number of ways to independently partition i elements into the bases and elements into the bases, yielding
B. GC-Constraint and the Probabilistic Shift
Let and be indicator functions representing the guaranteed minimum and potential maximum physical GC contributions of a composite symbol :
Using these indicator functions, we define the deterministic GC constraint as follows:
Definition 3 (Deterministic GC Constraint). Let . We say complies with the deterministic GC constraint with limits if
We further say that S complies with the w-windowed deterministic GC constraint with limits if any subsequence for complies with the deterministic GC constraint.
While strict deterministic constraints are necessary for classical DNA storage, applying this worst-case, zero-tolerance approach to composite DNA causes rate loss. This strictness ignores two practical realities of composite synthesis.
(i) Random Chemistry & Redundancy: DNA synthesis is a random process that creates millions of copies of each sequence. A worst-case physical strand is a rare anomaly, not a guaranteed outcome. (ii) Isolated Failures: If a rare, highly biased strand does form and drop out, it is an isolated erasure. It does not corrupt the rest of the molecular pool and can potentially be recovered using suitable error correction codes. The following example illustrates why shifting to a probabilistic threshold is much more practical.
Example 4 (Pessimism of Deterministic Bounds). Let , and let the standard acceptable GC limits for a sequence of length be and . This requires the physical strand to contain between 4 and 6 GC nucleotides. Consider a composite sequence consisting of 4 pure G/C symbols , 3 pure A/T symbols , and 3 mixed symbols biased toward A/T (e.g., 3 adenines and 1 cytosine, yielding ).
Under the deterministic framework, we evaluate the worst-case bounds. The 4 pure G/C symbols guarantee the lower bound ( ). However, the deterministic upper bound assumes all 3 mixed symbols will, in the worst case, manifest as cytosine. This yields a maximum potential weight of . Since 7 > 6, the sequence S is rejected as invalid.
Analyzing the strand probabilistically reveals a different reality. As the pure symbols are fixed, the sequence only violates the upper bound if all three mixed symbols simultaneously manifest as cytosine. The probability of this single worst-case realization is . This means that 98.4% of the millions of physical strands synthesized from this sequence will have exactly 4, 5, or 6 GC nucleotides, perfectly complying with the strict 40%-60% thermodynamic requirements. Discarding this sequence represents a massive loss of coding capacity.
Allowing the sequence, on the other hand, would only slightly bias the composite pool. Therefore, the GC constraint is better evaluated probabilistically, setting the threshold on the probability of violation rather than the worst-case realization.
For a given composite sequence , the physical manifestation of a G or C nucleotide at any position is an independent Bernoulli trial.
Let represent the binary physical GC contribution of the -th symbol. The total physical GC count of the sequence is the sum of these independently distributed random variables, denoted as . Consequently, follows a Poisson binomial distribution, allowing us to enforce a precise error tolerance .
Definition 5 (ε-Probabilistic GC Constraint). Let be a composite sequence of length . Furthermore, let be the random variable depicting the total physical GC count of a DNA strand synthesized from . We say complies with the ε-probabilistic GC constraint with limits and error tolerance if
We further say that S complies with the w-windowed -probabilistic GC constraint if any subsequence for complies with the -probabilistic GC constraint.
Remark 6 (Reduction to Deterministic Case). For a strict error tolerance of , the probabilistic approach exactly reduces to the deterministic worst-case baseline.
III. CAPACITY FORMULATIONS
A. Global Composition Types and Error Compliance
Evaluating the exact probability mass function (PMF) for every possible sequence individually is computationally intractable. We group sequences into composition types that all share the same Poisson binomial PMF.
Definition 7 (Sequence Type [12]). Given a sequence , we define the type of as , where denotes the number of positions of assigned to probability bin as defined in Definition 2. Furthermore, given a vector such that for all and , we denote by
the type-class of type t.
To compute the Poisson binomial distribution for a given type, we use the fact that the sum of independent discrete random variables has a PMF given by the discrete convolution of their individual PMFs [13]. For two independent discrete random variables A and B with PMFs f and g, the PMF of their sum is .
Proposition 8 (Exact PMF via Convolution). For a sequence of type , let denote the binomially distributed GC count contributed by the symbols in bin , and let denote the PMF of . Then the PMF of the total GC count is .
Proposition 9 (Type-Dependent Compliance). For any two composite sequences , complies with the global -probabilistic GC constraint if and only if complies.
Because the violation probability is identical for all sequences within a given type-class, we can define the set of all probabilistically valid types. Let denote the Poisson binomial random variable associated with type t.
Definition 10 (Allowed Type Set). The set of all sequence types that satisfy the global -probabilistic GC constraint is denoted as:
Because probabilistic compliance depends only on a symbol's GC probability rather than the specific nucleotide mixture of the symbol itself, the -probabilistic GC constraint can be equivalently defined and evaluated over sequences of probability bins (e.g., where ).
Proposition 11 (Type-Class Cardinality). For a given sequence type , the total number of composite sequences in the type-class is given by:
Definition 12. Let p be a condition on vectors over and let be the set of all vectors fulfilling that condition. Then we define the capacity for codes constrained by p as
B. Global GC Capacity
Theorem 13 (Global Probabilistic GC Capacity). Given a resolution parameter k and an error tolerance , let denote the empirical bin distribution of type with entropy , where , and let
Then the global -probabilistic GC constrained capacity is
(8)
where is the allowed type set for length , provided that and the limit exists.
Proof sketch. The set of valid sequences is the disjoint union of the type-classes , . Each has size up to a polynomial factor, and there are polynomially many types [12].
Note that is the entropy of the distribution over that assigns mass to bin and is uniform within each bin. Hence , with equality if and only if for all .
Remark 14 (Asymptotic Independence of ). Let denote the expected GC fraction of a sequence with bin distribution . Using Chebyshev's inequality (see Appendix A), for and any fixed , the capacity does not depend on :
In particular, since , the unconstrained maximizer satisfies , and thus whenever . This does not hold for the deterministic case , see Corollary 18 in Appendix B.
C. Sliding-Window GC Capacity
When the GC-content constraint is enforced locally over a sliding window of length , sequence validity depends on overlapping windows. Under the -probabilistic constraint, the probability distribution of the GC count depends on the probability bins of the symbols within each window. We therefore model the constrained sequence as a finite-state Markov chain, where each state stores the recent history needed to determine whether the next window is admissible. An example is given in Appendix C.
Theorem 15 (Probabilistic Sliding-Window GC Capacity). Let be a directed graph whose vertices are the set of all -tuples of probability-mass bins , . An edge from a vertex to a vertex exists if the following two conditions hold: (i) , and (ii) the -tuple satisfies the -probabilistic GC constraint. Each valid edge corresponding to the appended bin is assigned weight . Let denote the resulting weighted transition matrix and let count the valid length- composite sequences whose last bins equal , i.e., with . Then, for , the number of elements in the set of composite sequences fulfilling the -windowed -probabilistic GC constraint is
and, if the largest absolute eigenvalue of is positive, i.e., , the corresponding capacity is
Proof sketch. Valid sequences correspond to weighted walks in G, and the growth rate of is by Gelfand's formula.
Remark 16 (Role of for Sliding Windows). For , , and , evaluating gives normalized capacities for and , and for . In contrast to the global constraint (Remark 14), determines the capacity, since the window length does not grow with . For small , it coincides with the deterministic capacity, see Appendix B.
D. Analysis of Results

Fig. 2. Global and sliding-window finite-length rates as a function of strand length , for , , and . The rates are shown for error tolerances and sliding-window lengths . (SW: Sliding Window, Unc.: Unconstrained Limit)
Figure 2 evaluates the global and sliding-window finite-length rates as a function of strand length for a resolution parameter of . The global rate increases with strand length and converges toward the unconstrained capacity if . Conversely, the sliding-window rate strictly decreases as strand length grows since each newly appended symbol must simultaneously satisfy the GC bounds across multiple shifting, overlapping windows.
IV. MULTI-TYPE ARITHMETIC INDEXING FOR THE PROBABILISTIC GC-CONSTRAINT
To achieve the theoretical capacity limits derived in Section III-B for the global -probabilistic GC constraint, we leverage the global composition types to implement a capacity-achieving multi-type arithmetic encoder.
Our approach adapts the arithmetic coding architecture used in constant-composition [14] and multi-composition [15] distribution matching. Our objective, however, is not to shape a distribution, but to use all sequences whose composition types belong to the probabilistically valid set . We therefore utilize the multi-composition arithmetic coding framework as a capacity-achieving enumerative indexer.
To formalize this for the probabilistic GC constraint, we rely on standard interval-partitioning machinery [14], [15]. A binary input data sequence b of length is converted into a target fraction via its natural binary code (NBC) representation, . The arithmetic encoder recursively partitions this interval such that every valid composite sequence corresponds to a disjoint subinterval of strictly equal length . This equal-length partitioning guarantees that the maximum number of messages can be uniquely mapped and recovered [14], [15].
Applying this continuous interval-partitioning to our discrete constrained channel requires two problem-specific ingredients: (i) a defined lexicographic ordering over our composite alphabet to consistently assign interval boundaries, and (ii) a method to dynamically compute the conditional branching probability that a valid sequence continues with symbol , given an existing prefix .
To maintain equal-length final intervals, the branching probability must exactly reflect the fraction of valid codewords that extend the current prefix. Specifically, let represent the number of complete valid codewords that share the prefix . The conditional probability of appending symbol is given by the ratio [15]. To compute this ratio dynamically without storing the massive multi-type codebook, we introduce the unified prefix-completion count.
Proposition 17 (Unified Prefix-Completion Count). Let be a prefix of length . For any allowed type , let denote the number of symbols currently in that belong to probability bin . The remaining number of symbols required from bin to complete type is . The total number of valid length-n sequences extending the prefix is:
where the per-type continuation count is given by the multinomial extension:
Using the prefix-completion counts derived from Proposition 17, the encoder recursively narrows the initial interval around the target fraction d. This symbol-by-symbol mapping process is formalized in Algorithm A. A worked example is given in Appendix C.
To decode the codeword, the receiver applies arithmetic compression on the received sequence c using the same branching model . The decoder recursively partitions the interval I symbol by symbol to reconstruct the final valid sub-interval . Retrieving the original binary sequence b is performed by extracting the unique data point d contained within , and reversing the binary mapping via [15].
To measure the practical efficiency of this encoding scheme, we calculate its normalized achieved information rate, defined as the fraction of the unconstrained composite-symbol capacity achieved by the practical encoder:
Algorithm A: Multi-Type Arithmetic-Indexing Encoder
Input: Binary message b, strand length n, allowed types . Output: Admissible composite codeword c.
1: {Target fraction} 2: {Current interval} 3: {Initialize prefix} 4: for to n do 5: For each valid candidate a, compute multi-type paths: 6: 7: Partition I into sub-intervals proportional to . 8: Select symbol whose sub-interval contains d. 9: {Update interval} 10: {Append to prefix} 11: end for 12: return

Fig. 3. Capacity and coding efficiency comparison as a function of strand length n, for , , and . Rates are shown for error tolerances .
As illustrated in Figure 3, the multi-type arithmetic indexing (MTAI) approach consistently converges to the theoretical GC-constrained channel capacity already at short strand lengths across all evaluated error tolerances .
V. CONCLUSION
This paper introduced a probabilistic framework for GC-content constraints in composite DNA storage. By grouping composite symbols into probability bins, we formulated exact capacity bounds for global constraints using composition types, and for local sliding-window constraints via finite-state transfer matrices. Furthermore, we proposed a capacity-achieving multi-type enumerative encoder that efficiently utilizes this expanded code space by directly indexing the probabilistically valid codebook. Future work will explore adapting this arithmetic indexing scheme directly for sliding-window constraints.
ACKNOWLEDGEMENTS
The authors used the AI system Gemini (Google) to assist in improving the code for the simulations and generate the figures in this manuscript. All AI-generated content was checked for accuracy and revised by the authors, who take full responsibility for the content of this paper.
REFERENCES
[1] G. M. Church, Y. Gao, and S. Kosuri, "Next-generation digital information storage in dna," Science, vol. 337, no. 6102, pp. 1628–1628, 2012. [Online]. Available: https://www.science.org/doi/abs/10.1126/science.1226355
[2] N. Goldman, P. Bertone, S. Chen, C. Dessimoz, E. M. LeProust, B. Sipos, and E. Birney, "Towards practical, high-capacity, low-maintenance information storage in synthesized dna," Nature, vol. 494, no. 7435, pp. 77–80, 2013. [Online]. Available: https://doi.org/10.1038/nature11875
[3] O. Sabary, A. Yucovich, G. Shapira, and E. Yaakobi, “Reconstruction algorithms for dna-storage systems,” Scientific Reports, vol. 14, no. 1, p. 1951, 2024.
[4] L. Anavy, I. Vaknin, O. Atar, R. Amit, and Z. Yakhini, “Data storage in dna with fewer synthesis cycles using composite dna letters,” Nature Biotechnology, vol. 37, no. 10, pp. 1229–1236, 2019. [Online]. Available: https://doi.org/10.1038/s41587-019-0240-x
[5] Y. Erlich and D. Zielinski, “Dna fountain enables a robust and efficient storage architecture,” Science, vol. 355, no. 6328, pp. 950–954, 2017.
[6] R. Heckel, G. Mikutis, and R. N. Grass, “A characterization of the dna data storage channel,” Scientific Reports, vol. 9, no. 1, p. 9663, 2019.
[7] S. H. T. Yazdi, H. M. Kiah, E. Garcia-Ruiz, J. Ma, H. Zhao, and O. Milenkovic, “Dna-based storage: Trends and methods,” IEEE Transactions on Molecular, Biological, and Multi-Scale Communications, vol. 1, no. 3, pp. 230–248, 2016.
[8] K. A. S. Immink, P. H. Siegel, and J. K. Wolf, Codes for digital recorders (invited paper). IEEE Press, 2000, p. 216–255.
[9] T. T. Nguyen, C. Wang, K. Cai, Y. Zhang, and Z. Yakhini, “Constrained coding for composite dna: Channel capacity and efficient constructions,” in 2025 IEEE International Symposium on Information Theory (ISIT), 2025, pp. 1–6.
[10] F. Walter and Y. Yehezkeally, “Coding for strand breaks in composite dna,” in 2025 IEEE International Symposium on Information Theory (ISIT), 2025, pp. 1–6.
[11] D. H. Dang and S. Kim, “A theoretical framework for run-length-limited coding in composite dna,” IEEE Transactions on Molecular, Biological, and Multi-Scale Communications, 2026.
[12] T. M. Cover, Elements of information theory. John Wiley & Sons, 1999.
[13] C. M. Grinstead and J. Laurie Snell, “Sums of Discrete Random Variables,” sep 13 2025, [Online; accessed 2026-09-15].
[14] P. Schulte and G. Böcherer, “Constant composition distribution matching,” IEEE Transactions on Information Theory, vol. 62, no. 1, pp. 430–434, 2016.
[15] M. Pikus and W. Xu, “Arithmetic coding based multi-composition codes for bit-level distribution matching,” in 2019 IEEE Wireless Communications and Networking Conference (WCNC), 2019, pp. 1–6.
APPENDIX A PROOFS
Proof of Proposition 8. A type-t sequence contains symbols from . Their GC contributions are independent Bernoulli trials with success probability , so . Since the variables are mutually independent and , the PMF of is the convolution of their individual PMFs [13].
Proof of Proposition 9. As established in Proposition 8, the exact Poisson binomial PMF of a sequence's total physical GC count Y is determined entirely by the convolution of the binomial distributions associated with each probability bin. These binomial distributions depend exclusively on the bin counts specified by the type t. Since and belong to the same type-class , their total GC counts are identically distributed. Consequently, their tail violation probabilities are exactly equal.
Proof of Proposition 11. Constructing a sequence of type t is a two-step process. First, we must assign each of the n sequence positions to one of the probability bins such that exactly positions are assigned to bin . The number of distinct ways to partition these positions is given by the multinomial coefficient .
Second, for each of the positions assigned to bin , we must select a specific composite symbol from that bin. Since there are distinct symbols in bin , there are possible symbol combinations for those positions and the proposition follows.
Proof of Theorem 13. Let denote the set of valid sequences satisfying the global probabilistic GC constraint. A sequence satisfies the constraint if and only if its type belongs to . Consequently, forms the disjoint union of valid type-classes, . We obtain the total number of valid sequences by summing their cardinalities via Proposition 11.
From [12, Theorem 11.1.3], applied to the sequence of probability bins over an alphabet of size , we know that
Since , Proposition 11 gives
Let . As the number of types is at most [12, Theorem 11.1.1], we have
Taking , both bounds differ from by at most as , which proves the claim.
Proof of Remark 14. The Poisson binomial variable has mean and variance at most . By Chebyshev's inequality, every type with
belongs to , while for any fixed and sufficiently large , no type with or does. Since is continuous, the claim follows from Theorem 13.
Proof of Theorem 15. By construction, counts valid length-w sequences, while extends them through valid weighted transitions, with each transition weight accounting for the number of composite symbols in the appended bin. Hence
Since sequences shorter than are unconstrained, every length- prefix is valid, which gives . Let and let be the sum of all entries of . As for all , we have . Since is nonnegative, , where is the maximum row sum and is the number of states. By Gelfand's formula, , and since and do not depend on , we obtain .
Proof of Proposition 17. Because the type-classes of the allowed types in are mutually disjoint, the total number of valid extensions is exactly the sum of the extensions belonging to each valid type, .
To evaluate the extensions for a specific type t, observe that the prefix of length has already consumed symbols from each bin . Therefore, completing a sequence of exactly type t requires filling the remaining positions such that exactly positions are assigned to bin for every .
If for any bin, the prefix has already exceeded the allowed count for that type, yielding 0 valid extensions. Otherwise, applying the combinatorial logic established in Proposition 11 to the remaining positions yields the product of the multinomial partition coefficient and the independent symbol combinations .
APPENDIX B DETERMINISTIC BASELINE CAPACITIES
Corollary 18 (Deterministic Global GC Capacity). Let , , and let denote the number of mixed symbols, i.e., symbols in . With , define
(14)
For , the capacity is
If and , the maximum is attained at the boundary, i.e., .
Proof. Since every symbol in always and every symbol in possibly manifests as G or C, the smallest and largest values of with nonzero probability are and . Hence, , in accordance with Definition 3. The constraint does not distinguish between the bins , so for a fixed total mass on these bins, is maximized by the uniform distribution over all mixed symbols. Together with and the continuity of , Theorem 13 yields (14). The objective is the entropy of a distribution over that is uniform within the pure A/T, pure G/C, and mixed symbols, and is therefore concave. At , , the stated conditions require the per-symbol probability of both constrained groups to be at least that of the mixed symbols, which is exactly the Karush–Kuhn–Tucker condition for both constraints to be active.
For example, for , and , the conditions hold and bits, i.e., 84% of , whereas for every by Remark 14.
Corollary 19 (Deterministic Worst-Case Baseline). Under the deterministic baseline ( ), intermediate probabilities are irrelevant: a window is admissible if and only if it contains at least pure G/C symbols and at most symbols that are not pure A/T. It is therefore sufficient to partition the composite alphabet into three bins: pure A/T , pure G/C , and mixed with as in Corollary 18. The state space reduces to states, and , where is the weighted transition matrix over this 3-bin partition.
Note that whenever is smaller than the smallest nonzero violation probability of any length-w window, in which case the probabilistic and deterministic sliding-window capacities coincide. For the parameters of Remark 16 and , this minimum is 1/16, attained, e.g., by a window with one symbol from , two from , and two from . Hence, yields the same capacity as .
APPENDIX C EXAMPLES
Intuitively, as the window shifts by one position, the oldest symbol leaves the window and a new symbol enters. The state therefore records the overlapping portion between consecutive windows, while each transition corresponds to appending a new probability bin. A transition is allowed whenever the resulting window satisfies the local -probabilistic GC constraint.
Example 20. Figure 4 illustrates the state transitions for a window of length w = 3 using an alphabet partitioned into three bins. Because w = 3, each state is defined by a length-2 sequence of bins (representing the w - 1 overlap). If the system is currently in state , appending a new bin creates a temporary length-3 window. The transition is

Fig. 4. State transition logic for a sliding-window constraint with w = 3 and three probability bins . From the current state , appending a new bin creates a length-3 window. Only the addition of satisfies the GC constraint, permitting a valid transition to the next overlapping state .
permitted if and only if this resulting window satisfies the -probabilistic GC bounds. Assume that appending or violates the constraint, while appending forms a valid window. Consequently, the oldest bin is discarded, and the system successfully transitions to the new state .
Intuitively, this process can be viewed as a dynamic dictionary lookup. Imagine all probabilistically valid composite sequences sorted lexicographically and laid out uniformly across a continuous line from 0 to 1. A binary message simply acts as a specific coordinate on this line. Instead of generating and storing this massive dictionary beforehand, the encoder constructs the target sequence symbol by symbol, recursively narrowing its search window based on the proportion of valid sequences that remain. Figure 5 visualizes the interval partitioning logic described in Section IV.

Fig. 5. Conceptual tree and interval partitioning of the Multi-Type Arithmetic Encoder. Extending the prefix by one additional step recursively subdivides the corresponding sub-interval proportional to the multi-type continuation counts .
Example 21 (Multi-Type Encoding Trace). To illustrate the step-by-step mechanics of Algorithm A, consider a simplified scenario where not all possible compositions are present and the -probabilistic constraint allows exactly two valid composition types for a strand of length : , where and .
As shown in Figure 6, the composite alphabet is partitioned into three probability bins containing 2, 2, and 3 symbols, respectively. Note that this is a toy example: the bin sizes are chosen for illustration and do not correspond to a full composite alphabet , for which would hold.
By Proposition 11, we evaluate the cardinality of each allowed type-class:
• sequences.
• sequences.
The total valid codebook size is valid sequences. Thus, the encoder can map bits.
Suppose we wish to encode the binary message . The target fraction is computed as .
The encoder initializes the interval and evaluates the candidate symbols for the first position. For candidate , we must compute the unified prefix-completion count by summing the continuations from both types via Proposition 17:
• For , the remaining requirement is . The continuations are .
• For , the remaining requirement is . The continuations are .
Thus, the total valid continuations are .
The corresponding interval width for is proportional to this sum: . Because our target fraction falls within the sub-interval , the encoder successfully selects . This process recurses, dynamically pruning types when their requirements drop below zero, until the final length-3 codeword is isolated.

Fig. 6. A numerical trace of the multi-type arithmetic encoder for a target fraction .