1. Introduction
Driven by the needs of the data storage industry, innovations in practical code design have evolved alongside a rigorous mathematical framework for constrained systems. Among these, run-length-limited (RLL) constraints play a key role and are widely employed in magnetic and optical recording systems.
Given any two non-negative integers d and k with , a binary sequence is said to be -constrained if every run of zeros has length at most k and any two successive ones are separated by a run of zeros of length at least d. A -constrained system (also called -constrained code) is defined to be the set of all finite-length -constrained binary sequences. The above definition can be extended to the case by not imposing an upper bound on the lengths of zero-runs.
The history of constrained coding dates back to 1948, when Shannon [
1] represented a constrained sequence via a finite state transition diagram (FSTD) and derived the capacity under a constraint. run-length-limited (RLL) codes were introduced by Tang and Bahl [
2] in 1970 to support the evolution of magnetic recording at that time. As it is well known, the Shannon capacity plays a major role in the research of
-RLL systems [
3]; in fact, the Shannon capacity is the topological entropy of shift on a
-RLL system. Shannon capacity and topological entropy are usually used to characterize the topological complexity of systems. Following from [
1], the Shannon capacity
C of a discrete channel is given by
where
is the number of allowed signals of duration
T. In the language of symbolic dynamical systems,
is just the number of allowed
T-length codes. R. Adler, A. Konheim and M. McAndrew [
4] introduced the concept of topological entropy via open covers in 1965. Later, R. Bowen [
5] gave the definition of metric entropy, which coincides with the definition of topological entropy on compact metric spaces. Furthermore, the definition of entropy in symbolic dynamical systems is mathematically identical to that of Shannon entropy (see Definition 4.1.1 in [
6]).
Constrained systems, or constrained codes, are widely applied and have also advanced considerably in theory. They have been extensively employed in one-dimensional
magnetic recording devices, including both early peak-detection-based devices and modern sequence-detection-based devices [
7,
8]. S. Zheng, Y. Liu, and P. Siegel in [
9] also found that the constrained codes can be combined with robust signal detection through machine learning frameworks. Driven by the increasing demand for high-density storage in smaller size and with recent developments in page-oriented storage systems, multidimensional constraints are also concerned. Numerous studies have focused on magnetic recording (e.g., [
10,
11]). Recently, some authors have considered the theory of RLL systems such as the convergence to the capacity as well as the lower and upper bounds on the capacity [
12,
13,
14].
Y. Ma and B. Hou [
15] considered a special kind of constrained systems named “double upper bound
-constrained systems”, which are similar to but different from run-length-limited constrained systems. They determinated the topological entropy (Shannon capacity)
of all
-DUB systems and consequently ordered all
-DUB systems according to the size of topological entropy. The
-DUB system is the full two-shift, a bilateral
-DUB system is a
-RLL system for every positive integer
p, a bilateral
-DUB system is a
-RLL system for every positive integer
q, and other
-DUB systems are not RLL systems.
In this article, we consider a more general case, that is, the “n-tuple upper bound -constrained systems” for , or briefly n-TUB systems. An n-TUB system is the set of all n-tuple upper bound -constrained bilateral or unilateral sequences and the shift on it. Given n positive integers (may be ∞) , we say that a bilateral or unilateral -sequence is n-tuple upper bound -constrained if the run length of k is no more than for . In particular, the -TUB system of n symbols is the full n-shift.
Let
be a bilateral or unilateral
n-TUB system,
. Denote by
the topological entropy or Shannon capacity of
. Let
be the number of
p-length codes in
. Then,
Our main results are as follows.
Main Theorem
For
n-TUB system
and
-TUB system
, we have
For
-TUB system
and
-TUB system
, if
, then
where the equality only holds in case 1.
.
For two
n-TUB systems
and
, if
for
and
, then
where the equality only holds in case 3.
This Main Theorem extends the results in [
15] from DUB systems to general
n-TUB systems. As
n grows, the algebraic derivations and analysis on the related equations required for the proof become substantially more complex than in the case of
. In addition, it is not easy to find the equality conditions for
n-TUB systems from the identity
in DUB systems. For example, the relationship between
and
is far from obvious.
In the next section, we will give the proof of the Main Theorem which is divided into several propositions. More precisely, Item 1 is proved by Proposition 3; Item 2 is proved by Propositions 3 and 4; Item 3 is proved by Proposition 5; and Item 4 is proved by Propositions 5 and 6.
2. Proof of the Main Results
To prove the Main Theorem, let us do some preliminary work first.
For a bilateral or unilateral
n-TUB system
, let
be the set of all
M-length codes in
, where
. Consider
as a finite symbol set, denoted by
. We can define the transition matrix
as follows. For any two codes
and
in
, define
if
and
is an
-length code in
; otherwise, define
. The transition matrix
B completely describes whether
and
could be adjacent. Then, we obtain a subshift of finite type
with transition matrix
B, where
and
is the shift on
. As is well known in symbolic dynamic systems,
is topologically conjugate to the
n-TUB systems
. Furthermore, if
is the spectral radius of
B, then
Remark 1.
Let ; define the map by and for any . Then ϕ induces a map which puts each symbol k in to . One can see h is a continuous surjective and . Therefore, h is a topological semi-conjugate from to . By [15], . By Remark 1, we have except for .
To determinate the topological entropy of n-TUB systems, let us review some conclusions in Perron–Frobenius theory. We begin with the definition of a primitive matrix.
Definition 1
(see [
6]).
Let A be a non-negative matrix. For any index i, the period of state i, denoted by , is defined as the greatest common divisor of those integers for which , i.e.,If for every index i, the matrix A is called an aperiodic matrix. If, for each ordered pair of indices , there exists some integer such that , the matrix A is called an irreducible matrix. Furthermore, the matrix A is said to be primitive if A is irreducible and aperiodic. The following characterization of primitive matrices is useful.
Lemma 1
([
16]).
Let be a square matrix. Then for some positive integer N if and only if B is primitive. Let be the number of p-length codes in ; denote by the number of p-length codes ending with k in ; then .
Lemma 2
([
17]).
Suppose that B is a primitive non-negative square matrix. Let λ be the spectral radius of B. Thenwhere r and l are the right and left eigenvectors for B normalized so that . Proposition 1.
The transition matrix B defined as above is primitive. Furthermore, the limit exists for .
Proof. Since the square matrix
B is a
-matrix, let
; we will prove that
. For any two
M-length codes
and
, if
and
where
,
, let
where
m is equal to neither
y nor
l; then
is an
-length code from
to
in
and hence
. Notice that
is the sum of all elements in
and
represents the sum of elements in some certain columns of
; then, by Lemma 2, the limits
exist for
. □
Denote
; then
. In addition, if
is the spectral radius of
B, then
For
, we have, for each
,
As
,
By Remark 1, it is easy to see
except for
; here we just consider the cases except for
since we know
. Therefore,
Since
, we have
If
, similarly we have
and
As
,
and
. Therefore,
In general, for
, where
,
satisfies the following equation:
Proposition 2.
For , there exists one and only one root λ of the characteristic Equation (1) or (2) in the open interval and . Proof. For
,
is a strictly decreasing function since
for
. Then
is a strictly decreasing function in
.
For a fixed
, let
we have
and
(see [
15], page 310). Then
Notice that
holds for every
; when
, we have
Therefore, the characteristic Equation (
1) has a unique root in the open interval
. Similarly, the characteristic Equation (
2) has a unique root in the open interval
since
for
. It follows from the discussions before this theorem that the unique root is the spectral radius of
B corresponding to
and hence
□
Now, let us consider the assertions of the Main Theorem.
Proposition 3.
For n-TUB system and -TUB system we have Proof. For the
n-TUB system
, its characteristic equation is
then
.
For the
-TUB system
, its characteristic equation is
then the spectral radius is
. Therefore,
□
Proposition 4.
For any , we have Proof. The proof is similar to Proposition
in [
15]. Let
with
and
. Let
for finite positive integer
and
. For
, one can see
and
Notice that
belongs to
and satisfies Equation (
1), i.e.,
Then, if
,
and, if
,
Since the functions
and
are strictly decreasing on
, we have
. In conclusion,
□
Proposition 5.
For , .
Proof. Denote
and
. Then,
satisfies the following equation:
which is equivalent to
Similarly,
satisfies the following equation:
which is equivalent to
Then, both
and
satisfy the equation
. Notice that
. It follows from Proposition 2 that
and hence
□
Proposition 6.
For any integer and satisfyingwe have Proof. For
, we have
which is equivalent to
and, furthermore, is equivalent to
For
, we have
which is equivalent to
and, furthermore, is equivalent to
Let
and
denote the functions of the left side in Equations (
5) and (
6), respectively. Then,
Assume that
is the only solution of Equation (
5) in the interval
, that is,
. Then
Consequently, we have
; this implies
. Therefore, the only root
of (
5) is bigger than
. □
Proof (Proof of the Main Theorem)
. By Propositions 2, 3, 4, 5 and 6, we complete the proof of the Main Theorem. Actually, we can order all the
n-TUB systems by their topology entropy as follows:
□
3. Experimental Validation
We present an algorithm to compute the transition matrices and eigenvalues of the
n-TUB systems. Numerical examples are then provided to validate the derived theorems. Our code is available at
https://github.com/HeJiaxing-hjx/N_tuple_UB.git (accessed on 30 December 2025).
To compute the topological entropy, we employ the power iteration method to find the spectral radius of the transition matrix. Since B is non-negative, the Perron–Frobenius theorem guarantees that the largest eigenvalue is real and positive, representing the exponential growth rate of the number of admissible words.
Let n denote the cardinality of the alphabet and L be the target sequence length. The total number of generated admissible sequences is denoted by . During the sequence generation stage, the backtracking tree contains nodes, with each node requiring time, thus leading to a time complexity of for this step. In the primitive matrix construction stage, initializing the primitive matrix B takes time, while the string matching and constraint verification within the loop require time. Consequently, the time complexity of this stage is . Let I denote the number of iterations required by the power iteration method. When using the power iteration method to calculate the maximum eigenvalue of the matrix B, each dense matrix–vector multiplication requires time. Therefore, the total time required is . The overall time complexity is .
By applying Algorithms 1 and 2, the topological entropy for the following example is computed as follows.
Example 1.
Then we havewhich validates our Main Theorem. In Example 1, the computation time for
with a length of 3 is 9 ms, whereas that for
with a length of 4 is approximately 365 ms. It can be observed that, when the length of code equals the alphabet cardinality, the computation time increases significantly as the alphabet cardinality grows. Furthermore, the computation times for
are 13 ms at a length of 4 and 409 ms at a length of 5. This indicates that, given the same alphabet cardinality, a longer length of code leads to a longer computation time.
| Algorithm 1: Generate Admissible Sequences |
![Entropy 28 00801 i001 Entropy 28 00801 i001]() |
| Algorithm 2: Construction of the Transition Matrix B and Calculating Its Topological Entropy |
![Entropy 28 00801 i002 Entropy 28 00801 i002]() |