betaFeedback

WorksComputer Science

Optimal Codes for the Coverage Depth Problem and the Performance of Random Codes

Abstract

DNA storage systems retrieve information by randomly sampling synthesized DNA strands, making the number of reads required for successful recovery a fundamental performance measure. This motivates the coverage depth problem: for given code parameters, determine a linear code that minimizes the expected number of randomly sampled columns required to span the entire information space. While MDS codes are known to be optimal whenever they exist, identifying optimal codes in parameter regimes where MDS codes do not exist remains largely open. In this work, we derive a general formula for the expectation in the coverage depth setting, and apply this result to establish the optimality of the qq-ary simplex code for the parameters that allow its existence. Moreover, we show the optimality of the qq-ary Hamming code by relating coverage depth to independent sets in the dual code and exploiting log-concavity properties of matroid basis-generating polynomials. We further analyze random linear codes, derive an exact expression for their expected coverage depth, and show that, in the constant-rate regime, their additive gap from the MDS benchmark remains bounded independently of the code length.

Introduction

DNA-based storage systems represent a promising solution for addressing the unprecedented growth of digital information that needs to be stored globally [1]. Extreme compactness (orders of magnitude denser than any traditional storage medium), durability under suitable conditions, and low maintenance costs [2], [3] are distinctive characteristics that make DNA-based systems particularly attractive for long-term data storage.

The DNA storage pipeline involves multiple steps: After encoding data into sequences over the DNA alphabet {A,C,G,T}\{A,C,G,T\} and dividing them into blocks, these blocks are synthesized into artificial DNA molecules known as strands. Current limitations restrict the length of the synthesized strands [4]; furthermore, copies of each strand are produced that may contain errors. The resulting molecules are then stored in a container in an unordered manner. The process required to retrieve the stored information is sequencing, during which the strands are translated into digital sequences, called reads, which are noisy copies of the stored strands. The reads are then decoded back into the original information. A key feature of this process is that the DNA sequences are randomly read to decode the original information.

Although various works have demonstrated the potential of DNA as a storage medium [5, 6, 7, 8, 9, 10, 11], critical issues related to the efficiency of DNA sequencers [2], [12], [13] remain, resulting in slow throughput and high costs compared to other storage technologies. This bottleneck is closely related to the notion of coverage depth [14], defined as the ratio between the number of reads that are sequenced and the number of designed DNA strands. Thus, an opportunity to improve efficiency and reduce costs consists of reducing the coverage depth by reducing the number of reads needed for successful recovery.

In a recent paper [15], various problems aimed at enhancing the reliability and effectiveness of data retrieval were introduced and analyzed for the first time, with special emphasis on the random access coverage depth problem; in this model, the user’s data is represented by kk information strands, which are encoded into nn strands through a matrix G∈Fqk×nG \in\mathbb{F}_q^{k \times n}, typically referred to as a generator matrix of an error-correcting code. The goal is to compute, and possibly minimize, the expected number of columns to draw to recover a specific information strand among the kk that have been stored. A similar version is represented by the DNA coverage depth problem, where all the kk information strands must be retrieved.

Both problems have been studied primarily under the assumptions of error-free synthesis and sequencing, and uniform distribution when drawing the columns of the matrix. The random access model has attracted growing interest in different directions, such as identifying the structural properties of generator matrices that are advantageous [16], providing optimal constructions for specific cases [17], [18], and extending this model at the file level [19]. Furthermore, [20], [21] improved upon these constructions, deriving bounds and computing asymptotic performances, while [22] focused on the optimization problem in an asymptotic regime in the binary case.

On the other hand, the DNA coverage depth problem was addressed in [15], where the authors proved that MDS codes achieve the best result in minimizing the expected number of reads by drawing connections to the classical coupon collector’s problem [23, 24, 25, 26]. Moreover, in [27], real DNA storage experimental data were used to extend the problem to noisy channels with log-normal distribution. Building on the framework presented in [15], the DNA coverage depth problem was studied in [28], [29] in regimes where MDS codes do not exist. More specifically, closed-form expressions were derived for the expected value of columns for qq-ary simplex codes, Hamming codes, first-order Reed-Muller codes, and also for ternary Golay codes.

In the first part of this paper, we address an open problem presented in [29]: Our goal is to identify codes that minimize the expected number of reads required to retrieve all the information (i.e., optimal codes) for specific choices of parameters, none of which admits the existence of MDS codes. More specifically, we establish the optimality of various code families: qq-ary simplex codes, first-order qq-ary Reed-Muller codes, and qq-ary Hamming codes.

Concurrently with the preparation of this manuscript, Kong et al. [30] independently established the same optimality result for the qq-ary simplex code in the coverage depth problem.

The second part is inspired by a recent paper by Wang and Yaakobi [21], where random matrices were used to obtain bounds on the optimal coverage depth, showing in particular that, at constant rate, its additive gap from the MDS bound remains bounded. In this work, we study the random-code ensemble itself and derive an exact expression for its average coverage depth, which enables us to tighten the upper bound on the additive gap from the MDS coverage time by a factor of two compared to the bound established in [21]. While [21] established that the gap is linear in nn within the constant redundancy regime, we demonstrate that our approach yields the same result.

The remainder of this paper is organized as follows. In § 2, we introduce the notation and definitions used throughout the paper. § 3 presents a general formula for the expectation and an application of it to the first-order qq-ary Reed-Muller codes. § 4, § 5, and Section VI establish the optimality of the qq-ary Simplex code, the first-order qq-ary Reed-Muller code, and the qq-ary Hamming code, respectively. Finally, in Section VII, we analyze the coverage depth of random linear codes.

Preliminaries

Throughout the paper, kk and nn are positive integers with 2≤k≤n2 \le k \le n, qq denotes a prime power, Fq\mathbb{F}_q denotes the finite field of order qq, and [n]={1,…,n}[n] = \{1,\ldots,n\}. We denote the nn-th harmonic number by Hn=∑j=1n1/jH_n = \sum_{j=1}^{n} 1/j. For a matrix G∈Fqk×nG \in\mathbb{F}_q^{k \times n}, we denote its columns by g1,…,gng_1,\ldots,g_n. For S⊆[n]S \subseteq[n], the matrix GSG_S is the submatrix of GG formed by the columns indexed by SS. We use span⁡(GS)\operatorname{span}(G_S) for the subspace spanned by these columns and rank⁡(GS)\operatorname{rank}(G_S) for its dimension.

In a DNA-based storage system, the data is stored as a vector of length kk whose entries are themselves vectors (called strands) of length ℓ\ell over the DNA alphabet Σ={A,C,G,T}\Sigma= \{A,C,G,T\}. We embed Σℓ\Sigma^\ell into a finite field Fq\mathbb{F}_q and use a linear block code C⊆FqnC \subseteq\mathbb{F}_q^n of dimension kk to encode an information vector (x1,…,xk)∈Fqk(x_1,\ldots,x_k) \in\mathbb{F}_q^k to an encoded vector (y1,…,yn)∈Fqn(y_1,\ldots,y_n) \in\mathbb{F}_q^n.

Since the kk information strands are encoded using a generator matrix G∈Fqk×nG \in\mathbb{F}_q^{k \times n}, there is a one-to-one correspondence between the encoded strands and the columns of GG; therefore, recovering the ii-th information strand is equivalent to recovering the ii-th standard basis vector, that is, it must be in the span of the already recovered columns of GG, since we can see these columns as vectors in Fqk\mathbb{F}_q^k.

As already mentioned, a full-rank matrix G∈Fqk×nG \in\mathbb{F}_q^{k \times n} whose row space is CC is called a generator matrix of CC, and we write CGC_G for the code generated by GG. The dual code of CC is

C⊥={x∈Fqn:⟨x,c⟩=0 for every c∈C}.C^\perp= \{x \in\mathbb{F}_q^n : \langle x,c\rangle= 0 \text{ for every } c \in C\}.

A generator matrix of C⊥C^\perp is a parity-check matrix of CC. Given a generator matrix GG, we use G⊥G^\perp to denote a generator matrix of CG⊥C_G^\perp; in particular, ker⁡(G⊥)=CG\ker(G^\perp) = C_G.

We now define the coverage process studied in this paper. Let G∈Fqk×nG \in\mathbb{F}_q^{k \times n} have rank kk, and suppose that the columns of GG are drawn uniformly at random with repetition. The coverage time of GG, denoted by TGT_G, is the minimum number of columns of GG needed to span Fqk\mathbb{F}_q^k, and the coverage depth of GG is its expected coverage time, namely

E[G]=E[TG].\mathbb{E}[G] = \mathbb{E}[T_G].

As an example, the coverage process of an MDS code terminates as soon as kk distinct column indices have been sampled, since every kk columns of an MDS matrix are linearly independent.

The value of E[G]\mathbb{E}[G] is invariant under elementary row operations. It therefore depends only on the code generated by GG. This means that the quantity E[C]\mathbb{E}[C] is well defined for a linear code C⊆FqnC \subseteq\mathbb{F}_q^n as E[G]\mathbb{E}[G], where GG is any generator matrix of CC. We then use E[G]\mathbb{E}[G] and E[C]\mathbb{E}[C] interchangeably.

A primary motivation for the study of coverage depth comes from DNA-based data storage. During DNA readout, individual molecules are sampled from a pool, and direct random access to the encoded symbols is generally unavailable. As a result, recovery requires collecting samples until they jointly provide sufficient information to reconstruct the stored data. From a coding-theoretic perspective, it is therefore natural to seek codes that minimize the expected number of samples required for recovery.

The main problem addressed in this paper, which has been introduced in [28], is defined below.

Problem 1 (The optimal coverage depth problem). For given values of nn, kk and qq, compute the value

Eopt[n,k]q≜min⁡{E[C]:C⊆Fqn is a code of dimension k},\mathbb{E}_{\mathrm{opt}}[n,k]_q \triangleq\min\{\mathbb{E}[C] : C \subseteq\mathbb{F}_q^n \text{ is a code of dimension } k\},

and construct a code CC attaining the minimum.

The first fundamental result about Problem 1 was obtained in [15].

Theorem II.1 (see [15 Corollary 2]). For any code C⊆FqnC \subseteq\mathbb{F}_q^n of dimension kk, we have

E[C]≥∑i=0k−1nn−i=n(Hn−Hn−k).\mathbb{E}[C] \geq\sum_{i=0}^{k-1} \frac{n}{n-i} = n(H_n-H_{n-k}).

Furthermore, the lower bound is attained with equality if and only if CC is an MDS code.

Remark 1. Theorem II.1 provides a lower bound on the expectation and solves Problem 1 for any choice of parameters nn, kk and qq for which there exists an [n,k]q[n,k]_q MDS code. In particular, assuming that the MDS conjecture holds, we can write

Eopt[n,k]q=n(Hn−Hn−k) when q≥n−1.\mathbb{E}_{\mathrm{opt}}[n,k]_q = n(H_n-H_{n-k}) \text{ when } q \geq n-1.

In [29], the authors studied several code families and derived closed formulas for their expected number of reads. We mention the most important results for our purposes.

Theorem II.2 (see [29 Theorem 3.1]). Let C⊆Fqn\mathcal{C} \subseteq\mathbb{F}_q^n be the qq-ary simplex code of dimension kk, where n=(qk−1)/(q−1)n = (q^k - 1)/(q - 1). We have

E[C]=k+∑i=1kqi−1−1qk−qi−1.\mathbb{E}[\mathcal{C}] = k + \sum_{i=1}^{k} \frac{q^{i-1}-1}{q^k-q^{i-1}}.

Theorem II.3 (see [29 Theorem 5.1]). Let C⊆Fqn\mathcal{C} \subseteq\mathbb{F}_q^n be the qq-ary Hamming code of redundancy rr, where n=(qr−1)/(q−1)n = (q^r - 1)/(q - 1). We have

E[C]=nHn−∑ℓ=1r1(nℓ)∏i=0ℓ−1qr−qiq−1ℓ!.\mathbb{E}[\mathcal{C}] = nH_n - \sum_{\ell=1}^{r} \frac{1}{\binom{n}{\ell}} \frac{\prod_{i=0}^{\ell-1}\frac{q^r-q^i}{q-1}}{\ell!}.

Furthermore, a conjecture on the optimality of the qq-ary simplex code has also been formulated [29 Conjecture 3.2]. In this work, we establish this conjecture and prove that the qq-ary Hamming code is optimal as well.

A General Formula for the Expectation

In this section, we give a general formula for the expected number of reads one needs to draw to recover the information that has been stored. This formula will then be applied in § 4 to show the optimality of simplex codes.

From now on, let XX be a space such that dim⁡Fq(X)=k\dim_{\mathbb{F}_q}(X)=k, and let pp be a probability distribution defined on XX. For any x∈Xx \in X, let p(x)p(x) denote the probability associated to the element xx, and for any subspace V≤XV \leq X, let

p(V)=∑x∈Vp(x).p(V) = \sum_{x \in V} p(x).

In other words, this is the total probability mass of the subspace VV. Note that, for any pair of subspaces U,V≤XU,V \leq X with V≤UV \leq U, we have 0≤p(V)≤p(U)≤10 \leq p(V) \leq p(U) \leq1. Furthermore, we assume that p(V)<1p(V) < 1 for any V⪇XV \lneq X, while p(X)=1p(X)=1. These conditions are equivalent to requiring that the support of pp spans XX.

The process of drawing columns to recover the standard basis vectors can be visualized as building chains of dimension-increasing subspaces of the form

0=V0<V1<⋯<Vk−1<Vk=X,0 = V_0 < V_1 < \cdots< V_{k-1} < V_k = X,

with dim⁡(Vi)=i\dim(V_i)=i for 0≤i≤k0 \leq i \leq k. In particular, the step corresponding to the transition from the subspace ViV_i to the subspace Vi+1V_{i+1}, for 0≤i≤k−10 \leq i \leq k-1, coincides with drawing the (i+1)(i+1)-th linearly independent column.

Moreover, let

S={(V0,V1,…,Vk):0=V0<V1<⋯<Vk=X,dim⁡(Vi)=i}\mathcal{S} = \{(V_0,V_1,\ldots,V_k): 0=V_0<V_1<\cdots<V_k=X,\dim(V_i)=i\}

be the set of all possible configurations. The following auxiliary lemma focuses on the probability of a single step within the chain.

Lemma III.1. Let V≤XV \leq X be a subspace with dim⁡(V)=i\dim(V)=i, where 0≤i≤k−10 \leq i \leq k-1, and let U≥VU \geq V be a subspace with dim⁡(U)=i+1\dim(U)=i+1. Suppose that the drawn columns first span the subspace VV. The probability that UU is the next span we obtain is

Pr⁡[Vi+1=U∣Vi=V]=p(U)−p(V)1−p(V).\Pr[V_{i+1}=U \mid V_i=V] = \frac{p(U)-p(V)}{1-p(V)}.

Proof. For r≥1r \geq1, suppose that the rr-th draw allows us to get UU. This means that the previous r−1r-1 draws were columns inside VV. This probability is equal to

p(V)r−1(p(U)−p(V)).(1)p(V)^{r-1}(p(U)-p(V)). \tag*{(1)}

To conclude, we sum over all possible values of rr, getting

Pr⁡[Vi+1=U∣Vi=V]=∑r=1∞p(V)r−1(p(U)−p(V))=(p(U)−p(V))∑r=0∞p(V)r=p(U)−p(V)1−p(V).\begin{aligned} \Pr[V_{i+1}=U\mid V_i=V]=\sum_{r=1}^{\infty}p(V)^{r-1}(p(U)-p(V)) \\ &=(p(U)-p(V))\sum_{r=0}^{\infty}p(V)^r=\frac{p(U)-p(V)}{1-p(V)}. \end{aligned}

As a consequence, we can derive the probability of obtaining a specific chain.

Corollary 1. Let S=(V0,V1,…,Vk)∈SS=(V_0,V_1,\ldots,V_k)\in\mathcal{S} be a chain of dimension-increasing subspaces, where Vi≤XV_i\leq X for every 0≤i≤k0\leq i\leq k. We have

Pr⁡[S]=∏i=1kp(Vi)−p(Vi−1)1−p(Vi−1).\Pr[S]=\prod_{i=1}^{k}\frac{p(V_i)-p(V_{i-1})}{1-p(V_{i-1})}.

On the other hand, given a chain S∈SS\in\mathcal{S}, let ni≥1n_i\geq1 be the waiting time, after the selected columns first span the (i−1)(i-1)-dimensional space Vi−1V_{i-1}, until they first span ViV_i, where 1≤i≤k1\leq i\leq k. In other words, nin_i is the number of draws needed for the ii-th step in the chain. The probability of getting the chain SS with waiting times (n1,…,nk)(n_1,\ldots,n_k) is then

Pr⁡[S,(n1,…,nk)]=∏i=1kp(Vi−1)ni−1(p(Vi)−p(Vi−1)).\Pr[S,(n_1,\ldots,n_k)]=\prod_{i=1}^{k}p(V_{i-1})^{n_i-1}(p(V_i)-p(V_{i-1})).

We now have all the ingredients for the main result of this section.

Theorem III.2. Let TT be the random variable that counts the number of draws needed to span XX. We have

E[T]=∑S=(V0,…,Vk)∈SPr⁡[S]∑j=1k11−p(Vj−1).\mathbb{E}[T]=\sum_{S=(V_0,\ldots,V_k)\in\mathcal{S}}\Pr[S]\sum_{j=1}^{k}\frac{1}{1-p(V_{j-1})}.

Proof. The expectation can be expressed by summing over all the possible configurations of SS and all the possible kk-tuples of waiting times as

E[T]=∑S∈S∑n1,…,nk≥1(n1+⋯+nk)Pr⁡[S,(n1,…,nk)]=∑S∈S∑n1,…,nk≥1(n1+⋯+nk)∏i=1kp(Vi−1)ni−1(p(Vi)−p(Vi−1)).\begin{aligned} \mathbb{E}[T]=\sum_{S\in\mathcal{S}}\sum_{n_1,\ldots,n_k\geq1}(n_1+\cdots+n_k)\Pr[S,(n_1,\ldots,n_k)] \\ &=\sum_{S\in\mathcal{S}}\sum_{n_1,\ldots,n_k\geq1}(n_1+\cdots+n_k)\prod_{i=1}^{k}p(V_{i-1})^{n_i-1}(p(V_i)-p(V_{i-1})). \end{aligned}

Note that the sums involving the waiting times are independent. Moreover, the ii-th factor of the product depends only on nin_i and is nonnegative, since 0≤p(Vi−1)≤p(Vi)≤10\leq p(V_{i-1})\leq p(V_i)\leq1 for every 1≤i≤k1\leq i\leq k. We can then exchange the order of sums and products, obtaining

E[T]=∑S∈S∑j=1k∑n1=1∞⋯∑nk=1∞nj∏i=1kp(Vi−1)ni−1(p(Vi)−p(Vi−1))=∑S∈S∑j=1k((p(Vj)−p(Vj−1))∑nj=1∞njp(Vj−1)nj−1)∏i=1i≠jk(p(Vi)−p(Vi−1))∑ni=1∞p(Vi−1)ni−1.\begin{aligned} \mathbb{E}[T]=\sum_{S\in\mathcal{S}}\sum_{j=1}^{k}\sum_{n_1=1}^{\infty}\cdots\sum_{n_k=1}^{\infty}n_j\prod_{i=1}^{k}p(V_{i-1})^{n_i-1}(p(V_i)-p(V_{i-1})) \\ &=\sum_{S\in\mathcal{S}}\sum_{j=1}^{k}\left((p(V_j)-p(V_{j-1}))\sum_{n_j=1}^{\infty}n_jp(V_{j-1})^{n_j-1}\right)\prod_{\substack{i=1\\i\ne j}}^{k}(p(V_i)-p(V_{i-1}))\sum_{n_i=1}^{\infty}p(V_{i-1})^{n_i-1}. \end{aligned}

Since p(Vi)<1p(V_i)<1 for all 0≤i≤k−10\leq i\leq k-1, we can apply the convergence properties of geometric series

∑n=1∞xn−1=11−xand∑n=1∞nxn−1=1(1−x)2.\sum_{n=1}^{\infty}x^{n-1}=\frac{1}{1-x} \quad\text{and}\quad \sum_{n=1}^{\infty}nx^{n-1}=\frac{1}{(1-x)^2}.

Therefore,

E[T]=∑S∈S∑j=1kp(Vj)−p(Vj−1)(1−p(Vj−1))2∏i=1i≠jkp(Vi)−p(Vi−1)1−p(Vi−1)=∑S∈S∑j=1k11−p(Vj−1)∏i=1kp(Vi)−p(Vi−1)1−p(Vi−1)=∑S∈S∑j=1kPr⁡[S]1−p(Vj−1)=∑S∈SPr⁡[S]∑j=1k11−p(Vj−1).\begin{aligned} \mathbb{E}[T] = \sum_{S \in\mathcal{S}}\sum_{j=1}^{k} \frac{p(V_j)-p(V_{j-1})}{(1-p(V_{j-1}))^2}\prod_{\substack{i=1\\i\ne j}}^{k}\frac{p(V_i)-p(V_{i-1})}{1-p(V_{i-1})} \\ &= \sum_{S \in\mathcal{S}}\sum_{j=1}^{k}\frac{1}{1-p(V_{j-1})}\prod_{i=1}^{k}\frac{p(V_i)-p(V_{i-1})}{1-p(V_{i-1})} \\ &= \sum_{S \in\mathcal{S}}\sum_{j=1}^{k}\frac{\Pr[S]}{1-p(V_{j-1})}=\sum_{S \in\mathcal{S}}\Pr[S]\sum_{j=1}^{k}\frac{1}{1-p(V_{j-1})}. \end{aligned}

We now show that applying Theorem III.2 to any first-order qq-ary Reed-Muller code allows us to derive a significantly simpler formula for their expectation than the one presented in [29 Theorem 7.3]. Recall that, for an integer m≥1m \ge1, the first-order qq-ary Reed-Muller code C⊆FqnC \subseteq\mathbb{F}_q^n has length n=qmn=q^m and dimension k=m+1k=m+1; see [31 Definition 15].

It is convenient to introduce some auxiliary quantities that will also be used in the subsequent sections. Given a generator matrix G∈Fqk×nG \in\mathbb{F}_q^{k \times n}, the drawing procedure induces a probability distribution pGp_G on Fqk\mathbb{F}_q^k given by

pG(x)=∣{i∈[n]:gi=x}∣n.p_G(x)=\frac{|\{i\in[n]:g_i=x\}|}{n}.

For a subspace V≤FqkV\leq\mathbb{F}_q^k, let mG(V)=∣{i∈[n]:gi∈V∖{0}}∣m_G(V)=|\{i\in[n]:g_i\in V\setminus\{0\}\}|, and let zG=∣{i∈[n]:gi=0}∣z_G=|\{i\in[n]:g_i=0\}|. Then

pG(0)=zGnandpG(V)=mG(V)+zGn.p_G(0)=\frac{z_G}{n} \qquad\text{and}\qquad p_G(V)=\frac{m_G(V)+z_G}{n}.

Corollary 2. Let C⊆FqnC\subseteq\mathbb{F}_q^n be the first-order qq-ary Reed-Muller code of dimension m+1m+1, where n=qmn=q^m.

E[C]=m+1+∑j=1m1qj−1.\mathbb{E}[C]=m+1+\sum_{j=1}^{m}\frac{1}{q^j-1}.

Proof. A natural generator matrix for CC is

G=(11⋯1v1v2⋯vqm),G=\begin{pmatrix} 1 & 1 & \cdots& 1\\ v_1 & v_2 & \cdots& v_{q^m} \end{pmatrix},

where the vi∈Fqmv_i\in\mathbb{F}_q^m are pairwise distinct. In other words, each vector of Fqm\mathbb{F}_q^m appears exactly once. The columns of GG are all and only the points of the affine chart A={(1,v):v∈Fqm}\mathcal{A}=\{(1,v):v\in\mathbb{F}_q^m\}. Projectively, these are the normalized representative of the points of PG(m,q)∖PG(H)PG(m,q)\setminus PG(H), where H={(0,v):v∈Fqm}H=\{(0,v):v\in\mathbb{F}_q^m\}.

Let V≤Fqm+1V\leq\mathbb{F}_q^{m+1} be a jj-dimensional subspace. We want to count the quantity mG(V)m_G(V), which corresponds to the cardinality of V∩AV\cap\mathcal{A}. We distinguish two cases based on the containment relation with HH. If V⊆HV\subseteq H, then mG(V)=0m_G(V)=0.

On the other hand, if V⊈HV\nsubseteq H, consider the projection map π0:Fqm+1→Fq\pi_0:\mathbb{F}_q^{m+1}\to\mathbb{F}_q onto the first coordinate, namely π0(v)=x0\pi_0(v)=x_0 for every vector v=(x0,…,xm)v=(x_0,\ldots,x_m). We have ker⁡(π0)=H\ker(\pi_0)=H and, since V⊈HV\nsubseteq H, the map restricted to VV is nonzero and, therefore, surjective. The rank-nullity theorem yields

dim⁡(ker⁡(π0∣V))=dim⁡(V)−dim⁡(Im⁡(π0∣V))=j−1,\dim(\ker(\pi_0|_V))=\dim(V)-\dim(\operatorname{Im}(\pi_0|_V))=j-1,

or, equivalently, dim⁡(V∩H)=j−1\dim(V\cap H)=j-1. Let v′∈V∩Av'\in V\cap\mathcal{A} (such a vector exists since the map π0∣V\pi_0|_V is surjective). It is not difficult to see that

V∩A=v′+(V∩H),V\cap\mathcal{A}=v'+(V\cap H),

which means that V∩AV \cap\mathcal{A} is an affine translation of V∩HV \cap H. Since dim⁡(V∩H)=j−1\dim(V \cap H)=j-1, we have that

mG(V)=∣V∩A∣=qj−1.m_G(V)=|V\cap\mathcal{A}|=q^{j-1}.

Therefore,

pG(V)={0if V⊆H,qj−1−motherwise.p_G(V)= \begin{cases} 0 & \text{if } V\subseteq H,\\ q^{j-1-m} & \text{otherwise.} \end{cases}

Moreover, since every drawn column has the first coordinate equal to 1, every possible chain of SS is of the form (0,V1,…,Vm+1)(0,V_1,\ldots,V_{m+1}), with Vj⊈HV_j\nsubseteq H for all j≥1j\ge1. Thus, we have

pG(V0)=0andpG(Vj)=qj−1−mfor 1≤j≤m+1.p_G(V_0)=0 \quad\text{and}\quad p_G(V_j)=q^{j-1-m}\quad\text{for }1\le j\le m+1.

Combining all of the above yields

E[C]=∑S∈SPr⁡[S](1+∑j=1m11−qj−1−m)=1+∑j=1mqm+1−jqm+1−j−1=m+1+∑j=1m1qj−1.\mathbb{E}[C]=\sum_{S\in\mathcal{S}}\Pr[S]\left(1+\sum_{j=1}^{m}\frac{1}{1-q^{j-1-m}}\right) =1+\sum_{j=1}^{m}\frac{q^{m+1-j}}{q^{m+1-j}-1} =m+1+\sum_{j=1}^{m}\frac{1}{q^j-1}.

Optimality of the qq-ary Simplex Code

This section is devoted to the optimality of the qq-ary simplex code, which was conjectured in [28]. Concurrent with the preparation of this manuscript, Kong et al. [30] independently presented a similarity proof of the optimality of the qq-ary simplex code.

We first apply the formula obtained in Theorem III.2 to establish a general lower bound on the expectation; moreover, we provide the cases where equality holds. This result will then be translated into the coding theory language to prove the optimality of the qq-ary simplex code.

First, we introduce an additional notation: For a space XX of dimension kk over Fq\mathbb{F}_q, we denote the projective space obtained from XX by PG(k−1,q)PG(k-1,q). For an integer m≥1m\ge1, let Pm\mathcal{P}_m denote the set of one-dimensional subspaces of Fqm\mathbb{F}_q^m. Every nonzero vector belongs to a unique element of Pm\mathcal{P}_m, and

∣Pm∣=qm−1q−1.|\mathcal{P}_m|=\frac{q^m-1}{q-1}.

Theorem IV.1. Let TT be the random variable that counts the number of draws needed to span XX. We have

E[T]≥∑j=0k−1qk−1qk−qj.(2)\mathbb{E}[T]\ge\sum_{j=0}^{k-1}\frac{q^k-1}{q^k-q^j}. \tag*{(2)}

In particular, the bound is attained with equality if and only if the probability distribution on XX is such that p(0)=0p(0)=0 and the induced distribution on PG(k−1,q)PG(k-1,q) is uniform. Equivalently, p(0)=0p(0)=0 and p(L)=1/[k1]qp(L)=1/\left[\begin{smallmatrix}k\\1\end{smallmatrix}\right]_q for every 1-dimensional subspace L≤XL\le X.

To show this result, we need the following auxiliary lemma.

Lemma IV.2. Let pp be a probability distribution on XX. For every 0≤j≤k−10\le j\le k-1, we have

∑V≤Xdim⁡(V)=j ∑S=(V0,…,Vk)∈SVj=Vp(V)Pr⁡[S]≥(3)\sum_{\substack{V\le X\\ \dim(V)=j}}\ \sum_{\substack{S=(V_0,\ldots,V_k)\in\mathcal{S}\\ V_j=V}}p(V)\Pr[S]\ge \tag*{(3)}

Proof. From now on denote by

Aj=∑V≤Xdim⁡(V)=j∑S=(V0,…,Vk)∈SVj=Vp(V)Pr⁡[S].A_j=\sum_{\substack{V\le X\\ \dim(V)=j}}\sum_{\substack{S=(V_0,\ldots,V_k)\in\mathcal{S}\\ V_j=V}}p(V)\Pr[S].

We proceed by induction on jj. For j=0j=0, the only 0-dimensional space is V=0V=0. Thus,

A0=∑S=(0,V1,…,Vk)∈Sp(0)Pr⁡[S]=p(0)∑S=(0,V1,…,Vk)∈SPr⁡[S]=p(0)≥[01]q[k1]q.A_0=\sum_{\substack{S=(0,V_1,\ldots,V_k)\in\mathcal{S}}}p(0)\Pr[S] =p(0)\sum_{\substack{S=(0,V_1,\ldots,V_k)\in\mathcal{S}}}\Pr[S] =p(0)\ge\frac{\left[\begin{smallmatrix}0\\1\end{smallmatrix}\right]_q}{\left[\begin{smallmatrix}k\\1\end{smallmatrix}\right]_q}.

Assume now that Aj≥[j1]q[k1]qA_j\ge\frac{\left[\begin{smallmatrix}j\\1\end{smallmatrix}\right]_q}{\left[\begin{smallmatrix}k\\1\end{smallmatrix}\right]_q} for some 0≤j≤k−20\le j\le k-2. We fix a jj-dimensional subspace VV as the jj-th subspace of a chain (V0,V1,…,Vk)(V_0,V_1,\ldots,V_k) and compute the expected probability mass of the next subspace in the chain, conditional on Vj=VV_j=V. We have

E[p(Vj+1)∣Vj=V]=∑U⊇Vdim⁡(U)=j+1p(U)Pr⁡[Vj+1=U∣Vj=V]=∑U⊇Vdim⁡(U)=j+1p(U)p(U)−p(V)1−p(V)=11−p(V)∑U⊇Vdim⁡(U)=j+1(p(U)−p(V))2+p(V)1−p(V)∑U⊇Vdim⁡(U)=j+1(p(U)−p(V))=11−p(V)∑U⊇Vdim⁡(U)=j+1(p(U)−p(V))2+p(V)≥1−p(V)[k−j1]q+p(V),\begin{aligned} \mathbb{E}[p(V_{j+1})\mid V_j=V] &=\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}p(U)\Pr[V_{j+1}=U\mid V_j=V]\\ &=\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}p(U)\frac{p(U)-p(V)}{1-p(V)}\\ &=\frac{1}{1-p(V)}\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}(p(U)-p(V))^2 +\frac{p(V)}{1-p(V)}\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}(p(U)-p(V))\\ &=\frac{1}{1-p(V)}\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}(p(U)-p(V))^2+p(V)\\ &\ge\frac{1-p(V)}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}+p(V), \end{aligned}

where we used Lemma III.1 in the second equality, the identity

∑U⊇Vdim⁡(U)=j+1(p(U)−p(V))=1−p(V)\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}(p(U)-p(V))=1-p(V)

in the second-to-last equality, and the Cauchy-Schwarz inequality

(∑U⊇Vdim⁡(U)=j+1(p(U)−p(V))2)(∑U⊇Vdim⁡(U)=j+112)≥(∑U⊇Vdim⁡(U)=j+1(p(U)−p(V)))2\left(\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}(p(U)-p(V))^2\right) \left(\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}1^2\right) \ge\left(\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}(p(U)-p(V))\right)^2

in the last step (recall that there are exactly [k−j1]q\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q subspaces of dimension j+1j+1 containing a given jj-dimensional subspace).

From now on, we focus on the inequality

∑U⊇Vdim⁡(U)=j+1p(U)p(U)−p(V)1−p(V)≥1−p(V)[k−j1]q+p(V).\sum_{\substack{U\supseteq V\\ \dim(U)=j+1}}p(U)\frac{p(U)-p(V)}{1-p(V)} \ge\frac{1-p(V)}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}+p(V).

Multiplying both sides by Pr⁡[Vj=V]\Pr[V_j=V] and then summing over all jj-dimensional spaces yields

∑V≤Xdim⁡(V)=jPr⁡[Vj=V]∑V≤Udim⁡(U)=j+1p(U)−p(V)1−p(V)≥∑V≤Xdim⁡(V)=jPr⁡[Vj=V](1−p(V)[k−j1]q+p(V)).(4)\sum_{\substack{V\leq X\\ \dim(V)=j}} \Pr[V_j=V]\sum_{\substack{V\leq U\\ \dim(U)=j+1}}\frac{p(U)-p(V)}{1-p(V)} \geq\sum_{\substack{V\leq X\\ \dim(V)=j}}\Pr[V_j=V]\left(\frac{1-p(V)}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}+p(V)\right). \tag*{(4)}

Let L(j)L(j) and R(j)R(j) denote the left hand side and the right hand side, respectively, of Equation (4). The law of total probability gives

Pr⁡[Vj+1=U]=∑V≤Udim⁡(V)=jPr⁡[Vj=V]Pr⁡[Vj+1=U∣Vj=V]=∑V≤Udim⁡(V)=jPr⁡[Vj=V]p(U)−p(V)1−p(V),\begin{aligned} \Pr[V_{j+1}=U]=\sum_{\substack{V\leq U\\ \dim(V)=j}}\Pr[V_j=V]\Pr[V_{j+1}=U\mid V_j=V] \\ &=\sum_{\substack{V\leq U\\ \dim(V)=j}}\Pr[V_j=V]\frac{p(U)-p(V)}{1-p(V)}, \end{aligned}

which can be applied to L(j)L(j) as follows:

L(j)=∑U≤Xdim⁡(U)=j+1p(U)∑V≤Udim⁡(V)=jPr⁡[Vj=V]p(U)−p(V)1−p(V)=∑U≤Xdim⁡(U)=j+1p(U)Pr⁡[Vj+1=U]=∑U≤Xdim⁡(U)=j+1∑S=(V0,…,Vk)∈SVj+1=Up(U)Pr⁡[S]=Aj+1.\begin{aligned} L(j)&=\sum_{\substack{U\leq X\\ \dim(U)=j+1}}p(U)\sum_{\substack{V\leq U\\ \dim(V)=j}}\Pr[V_j=V]\frac{p(U)-p(V)}{1-p(V)}\\ &=\sum_{\substack{U\leq X\\ \dim(U)=j+1}}p(U)\Pr[V_{j+1}=U]\\ &=\sum_{\substack{U\leq X\\ \dim(U)=j+1}}\sum_{\substack{S=(V_0,\ldots,V_k)\in\mathcal{S}\\ V_{j+1}=U}}p(U)\Pr[S]=A_{j+1}. \end{aligned}

On the other hand,

R(j)=1−∑V≤Xdim⁡(V)=jp(V)Pr⁡[Vj=V][k−j1]q+∑V≤Xdim⁡(V)=jp(V)Pr⁡[Vj=V]=1[k−j1]q+(1−1[k−j1]q)∑V≤Xdim⁡(V)=jp(V)Pr⁡[Vj=V]=1[k−j1]q+(1−1[k−j1]q)∑V≤Xdim⁡(V)=j∑S=(V0,…,Vk)∈SVj=Vp(V)Pr⁡[S]≥1[k−j1]q+(1−1[k−j1]q)[j1]q[k1]q=1−[j1]q/[k1]q[k−j1]q+[j1]q[k1]q=qj[k1]q+[j1]q[k1]q−[j+11]q[k1]q,\begin{aligned} R(j)=\frac{1-\sum_{\substack{V\leq X\\ \dim(V)=j}}p(V)\Pr[V_j=V]}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}+\sum_{\substack{V\leq X\\ \dim(V)=j}}p(V)\Pr[V_j=V] \\ &=\frac{1}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}+\left(1-\frac{1}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}\right)\sum_{\substack{V\leq X\\ \dim(V)=j}}p(V)\Pr[V_j=V] \\ &=\frac{1}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}+\left(1-\frac{1}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}\right)\sum_{\substack{V\leq X\\ \dim(V)=j}}\sum_{\substack{S=(V_0,\ldots,V_k)\in\mathcal{S}\\ V_j=V}}p(V)\Pr[S] \\ &\geq\frac{1}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}+\left(1-\frac{1}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}\right)\frac{\left[\begin{smallmatrix}j\\1\end{smallmatrix}\right]_q}{\left[\begin{smallmatrix}k\\1\end{smallmatrix}\right]_q} \\ &=\frac{1-\left[\begin{smallmatrix}j\\1\end{smallmatrix}\right]_q/\left[\begin{smallmatrix}k\\1\end{smallmatrix}\right]_q}{\left[\begin{smallmatrix}k-j\\1\end{smallmatrix}\right]_q}+\frac{\left[\begin{smallmatrix}j\\1\end{smallmatrix}\right]_q}{\left[\begin{smallmatrix}k\\1\end{smallmatrix}\right]_q} \\ &=\frac{q^j}{\left[\begin{smallmatrix}k\\1\end{smallmatrix}\right]_q}+\frac{\left[\begin{smallmatrix}j\\1\end{smallmatrix}\right]_q}{\left[\begin{smallmatrix}k\\1\end{smallmatrix}\right]_q}-\frac{\left[\begin{smallmatrix}j+1\\1\end{smallmatrix}\right]_q}{\left[\begin{smallmatrix}k\\1\end{smallmatrix}\right]_q}, \end{aligned}

where we used the induction hypothesis in the third-to-last step and the combinatorial identity

[k1]q−[j1]q=qj[k−j1]q\begin{bmatrix} k \\ 1 \end{bmatrix}_q-\begin{bmatrix} j \\ 1 \end{bmatrix}_q=q^j\begin{bmatrix} k-j \\ 1 \end{bmatrix}_q

in the second-to-last step. Combining all of the above gives

Aj+1≥[j+11]q[k1]q.A_{j+1}\ge\frac{\begin{bmatrix} j+1 \\ 1 \end{bmatrix}_q}{\begin{bmatrix} k \\ 1 \end{bmatrix}_q}.

Proof of Theorem IV.1. We can rewrite the formula from Theorem III.2 conditioning on the jj-th space in the chain S=(V0,…,Vk)S=(V_0,\ldots,V_k), namely

E[T]=∑j=0k−1∑S=(V0,…,Vk)∈SPr⁡[S]1−p(Vj)=∑j=0k−1∑V≤Xdim⁡(V)=j∑S=(V0,…,Vk)∈SVj=VPr⁡[S]1−p(V).(5)\begin{aligned} \mathbb{E}[T]=\sum_{j=0}^{k-1}\sum_{S=(V_0,\ldots,V_k)\in\mathcal{S}}\frac{\Pr[S]}{1-p(V_j)} \\ &=\sum_{j=0}^{k-1}\sum_{\substack{V\leq X\\ \dim(V)=j}}\sum_{\substack{S=(V_0,\ldots,V_k)\in\mathcal{S}\\ V_j=V}}\frac{\Pr[S]}{1-p(V)}. \tag*{(5)} \end{aligned}

Since the function φ(x)=1/(1−x)\varphi(x)=1/(1-x) is convex for 0≤x<10\leq x<1, Jensen’s inequality gives

E[T]≥∑j=0k−111−∑V≤Xdim⁡(V)=j∑S=(V0,…,Vk)∈SVj=Vp(V)Pr⁡[S].(6)\mathbb{E}[T]\geq\sum_{j=0}^{k-1}\frac{1}{1-\sum_{\substack{V\leq X\\ \dim(V)=j}}\sum_{\substack{S=(V_0,\ldots,V_k)\in\mathcal{S}\\ V_j=V}}p(V)\Pr[S]}. \tag*{(6)}

Applying Lemma IV.2 to Equation (6) yields

E[T]≥∑j=0k−111−[j1]q[k1]q=∑j=0k−1qk−1qk−qj.\mathbb{E}[T]\geq\sum_{j=0}^{k-1}\frac{1}{1-\dfrac{\begin{bmatrix} j \\ 1 \end{bmatrix}_q}{\begin{bmatrix} k \\ 1 \end{bmatrix}_q}}=\sum_{j=0}^{k-1}\frac{q^k-1}{q^k-q^j}.

It remains to characterize equality. From now on, for 0≤j≤k−10\leq j\leq k-1, let

Bj=∑V≤Xdim⁡(V)=j∑S∈SVj=VPr⁡[S]1−p(V).B_j=\sum_{\substack{V\leq X\\ \dim(V)=j}}\sum_{\substack{S\in\mathcal{S}\\ V_j=V}}\frac{\Pr[S]}{1-p(V)}.

The preceding argument shows, term by term, that

Bj≥11−Aj≥11−[j1]q[k1]q.(7)B_j\geq\frac{1}{1-A_j}\geq\frac{1}{1-\dfrac{\begin{bmatrix} j \\ 1 \end{bmatrix}_q}{\begin{bmatrix} k \\ 1 \end{bmatrix}_q}}. \tag*{(7)}

Suppose that equality holds in (1). Therefore, the inequalities in (5) must also be equalities. For j=0j=0, we have V0={0}V_0=\{0\} with probability one and hence

B0=11−p(0).B_0=\frac{1}{1-p(0)}.

The corresponding term in the lower bound is 11, which implies p(0)=0p(0)=0. We next consider j=1j=1. Since p(0)=0p(0)=0, the first draw is nonzero with probability one. Thus, for every L∈PkL\in\mathcal{P}_k, we have Pr⁡[V1=L]=p(L)\Pr[V_1=L]=p(L). It follows that

A1=∑L∈Pkp(L)2.A_1=\sum_{L\in\mathcal{P}_k}p(L)^2.

The fact that the equalities must hold in (5) implies that A1=1/(k1)qA_1 = 1/\binom{k}{1}_q. Therefore,

∑L∈Pkp(L)2=1(k1)q.\sum_{L\in\mathcal{P}_k} p(L)^2 = \frac{1}{\binom{k}{1}_q}.

On the other hand, the Cauchy-Schwarz inequality gives

∑L∈Pkp(L)2≥1∣Pk∣(∑L∈Pkp(L))2=1(k1)q,\sum_{L\in\mathcal{P}_k} p(L)^2 \ge\frac{1}{|\mathcal{P}_k|}\left(\sum_{L\in\mathcal{P}_k}p(L)\right)^2 = \frac{1}{\binom{k}{1}_q},

and equality holds if and only if all the values p(L)p(L) are equal. Consequently, p(L)=1/(k1)qp(L)=1/\binom{k}{1}_q for every L∈PkL\in\mathcal{P}_k.

Conversely, suppose that p(0)=0p(0)=0 and that p(L)=1/(k1)qp(L)=1/\binom{k}{1}_q for every one-dimensional subspace L≤XL\le X. If V≤XV\le X has dimension jj, then VV contains exactly (j1)q\binom{j}{1}_q one-dimensional subspaces. Therefore,

p(V)=(j1)q(k1)q.p(V)=\frac{\binom{j}{1}_q}{\binom{k}{1}_q}.

In particular, p(V)p(V) depends only on dim⁡(V)\dim(V). Substituting back into (3), we obtain

E[T]=∑j=0k−111−(j1)q(k1)q∑S∈SPr⁡[S]=∑j=0k−1qk−1qk−qj.\begin{aligned} \mathbb{E}[T]=\sum_{j=0}^{k-1}\frac{1}{1-\dfrac{\binom{j}{1}_q}{\binom{k}{1}_q}}\sum_{S\in\mathcal{S}}\Pr[S] \\ &=\sum_{j=0}^{k-1}\frac{q^k-1}{q^k-q^j}. \end{aligned}

Thus the lower bound is attained, completing the proof. □

Recall that a generator matrix GG of the kk-dimensional qq-ary simplex code is obtained by organizing all nonzero elements of Fqk\mathbb{F}_q^k, up to nonzero scalar multiples, as columns of GG. Equivalently, each projective point of PG(k−1,q)PG(k-1,q) appears exactly once. This fact is crucial to prove their optimality.

Corollary 3. Let n=(qk−1)/(q−1)n=(q^k-1)/(q-1), and let G∈Fqk×nG\in\mathbb{F}_q^{k\times n} have rank kk. Then

E[G]≥∑j=0k−1qk−1qk−qj.\mathbb{E}[G]\ge\sum_{j=0}^{k-1}\frac{q^k-1}{q^k-q^j}.

In particular, equality holds if and only if GG is a generator matrix of the qq-ary simplex code. Equivalently,

Eopt[qk−1q−1,k]q=∑j=0k−1qk−1qk−qj.\mathbb{E}_{\mathrm{opt}}\left[\frac{q^k-1}{q-1},k\right]_q=\sum_{j=0}^{k-1}\frac{q^k-1}{q^k-q^j}.

Consequently, every optimal [qk−1q−1,k]q\left[\frac{q^k-1}{q-1},k\right]_q code is monomially equivalent to the qq-ary simplex code.

Remark 2. A proof showing that the simplex code is optimal in terms of the expectation was independently found by Zhihan Jin and Barnabas Janzer (private communication). In this paper, the optimality of the simplex code is obtained as a corollary of a more general statement (Theorem IV.1).

Proof of Corollary 3. Recall that the probability distribution pGp_G induced by the drawing procedure is given by

pG(x)=∣{i∈[n]:gi=x}∣n.p_G(x)=\frac{|\{i\in[n]:g_i=x\}|}{n}.

By Theorem IV.1, equality holds if and only if pG(0)=0p_G(0)=0 and

pG(L)=1(q1)q=1np_G(L)=\frac{1}{\binom{q}{1}_q}=\frac{1}{n}

for every 1-dimensional subspace LL. The latter conditions imply that zG=0z_G=0 and mG(L)=1m_G(L)=1 for every projective point LL. Therefore, GG contains exactly one nonzero representative of every one-dimensional subspace of Fq\mathbb{F}_q, which is precisely the defining property of a qq-ary simplex matrix.

To conclude, any two simplex matrices differ by a permutation of columns and by multiplication of individual columns by nonzero scalars. However, these operations produce monomially equivalent codes. Therefore, all optimal codes with these parameters are monomially equivalent to the qq-ary simplex code.

Optimality of First-Order qq-ary Reed–Muller Codes

In this section, we prove that the first-order qq-ary Reed–Muller code is optimal with respect to the coverage depth. The proof relies on the optimality of the qq-ary simplex code established in § 4. The main idea is that, after the first nonzero column is sampled, the remaining coverage process can be viewed in a quotient space of dimension one less.

Theorem V.1. Let m≥1m \ge1, let n=qmn=q^m, and let R∈Fq(m+1)×nR \in\mathbb{F}_q^{(m+1)\times n} be a generator matrix of the first-order qq-ary Reed–Muller code. Then, for every matrix A∈Fq(m+1)×nA \in\mathbb{F}_q^{(m+1)\times n} of rank m+1m+1,

E[A]≥E[R].\mathbb{E}[A] \ge\mathbb{E}[R].

In particular,

Eopt[qm,m+1]q=m+1+∑j=1m1qj−1.\mathbb{E}_{\mathrm{opt}}[q^m,m+1]_q=m+1+\sum_{j=1}^{m}\frac{1}{q^j-1}.

Proof. Recall that zA=∣{i∈[n]:ai=0}∣z_A=|\{i\in[n]:a_i=0\}|. Let τ\tau be the first time that a nonzero column is sampled. Since a sampled column is nonzero with probability (n−zA)/n(n-z_A)/n, we have

E[τ]=nn−zA.\mathbb{E}[\tau]=\frac{n}{n-z_A}.

Suppose that the first nonzero column sampled is aja_j. Consider the quotient space

Xj=Fqm+1/⟨aj⟩,X_j=\mathbb{F}_q^{m+1}/\langle a_j\rangle,

which has dimension mm, and let

πj:Fqm+1⟶Xj\pi_j:\mathbb{F}_q^{m+1}\longrightarrow X_j

be the natural projection. Once aja_j has been sampled, spanning Fqm+1\mathbb{F}_q^{m+1} is equivalent to having the projections of the subsequently sampled columns span XjX_j.

Let

dj=∣{i∈[n]:ai∈⟨aj⟩}∣.d_j=\left|\{i\in[n]:a_i\in\langle a_j\rangle\}\right|.

A projected column is zero precisely when the sampled column belongs to ⟨aj⟩\langle a_j\rangle. Hence, a nonzero projected column is obtained with probability

n−djn.\frac{n-d_j}{n}.

Moreover, since all zero columns belong to ⟨aj⟩\langle a_j\rangle and aj≠0a_j\ne0, we have

dj≥zA+1.d_j\ge z_A+1.

Conditioned on obtaining a nonzero projection, the projected columns induce a probability distribution on Xj∖{0}X_j \setminus\{0\}. Since AA has rank m+1m+1, the support of this distribution spans XjX_j. Therefore, by Theorem IV.1, the expected number of nonzero projected columns needed to span XjX_j is at least the coverage depth of the qq-ary simplex code of dimension mm. Denote a generator matrix of this simplex code by SmS_m.

Since a nonzero projected column is obtained with probability (n−dj)/n(n-d_j)/n, it follows that, conditioned on aja_j being the first nonzero sampled column, the expected number of additional draws is at least

nn−djE[Sm].\frac{n}{n-d_j}\mathbb{E}[S_m].

Combining this with dj≥zA+1d_j \ge z_A+1 yields

E[A]≥nn−zA+nn−zA−1E[Sm].\mathbb{E}[A] \ge\frac{n}{n-z_A}+\frac{n}{n-z_A-1}\mathbb{E}[S_m].

Consequently,

E[A]≥1+nn−1E[Sm].\mathbb{E}[A] \ge1+\frac{n}{n-1}\mathbb{E}[S_m].

It remains to show that equality is attained by the first-order Reed–Muller code. A natural generator matrix for this code has columns

rv=(1,v),v∈Fqm.r_v=(1,v), \qquad v\in\mathbb{F}_q^m.

In particular, it has no zero columns. Fix a column rv0=(1,v0)r_{v_0}=(1,v_0). Since all columns have first coordinate equal to 1, no other column lies in ⟨rv0⟩\langle r_{v_0}\rangle, and hence dj=1d_j=1.

Furthermore, modulo ⟨rv0⟩\langle r_{v_0}\rangle, the column rv=(1,v)r_v=(1,v) can be represented by

rv−rv0=(0,v−v0).r_v-r_{v_0}=(0,v-v_0).

As vv ranges over Fqm∖{v0}\mathbb{F}_q^m\setminus\{v_0\}, the vectors v−v0v-v_0 range over all nonzero elements of Fqm\mathbb{F}_q^m exactly once. Thus, conditioned on obtaining a nonzero projection, the induced distribution on the one-dimensional subspaces of XjX_j is uniform. By the equality condition in Theorem IV.1, the corresponding projected coverage process attains E[Sm]\mathbb{E}[S_m].

Therefore,

E[R]=1+nn−1E[Sm].\mathbb{E}[R]=1+\frac{n}{n-1}\mathbb{E}[S_m].

Since n=qmn=q^m and

E[Sm]=∑ℓ=0m−1qm−1qm−qℓ,\mathbb{E}[S_m]=\sum_{\ell=0}^{m-1}\frac{q^m-1}{q^m-q^\ell},

we obtain

E[R]=1+∑ℓ=0m−1qmqm−qℓ=1+∑j=1mqjqj−1=m+1+∑j=1m1qj−1.\begin{aligned} \mathbb{E}[R]=1+\sum_{\ell=0}^{m-1}\frac{q^m}{q^m-q^\ell} \\ &=1+\sum_{j=1}^{m}\frac{q^j}{q^j-1}=m+1+\sum_{j=1}^{m}\frac{1}{q^j-1}. \end{aligned}

Hence E[A]≥E[R]\mathbb{E}[A]\ge\mathbb{E}[R], completing the proof. □

Optimality of the qq-ary Hamming Code

In this section, we prove that the qq-ary Hamming code is optimal, i.e., it minimizes the expected coverage time among all linear codes with the same length and dimension. We begin with a formula that expresses the expected coverage time in terms of spanning subsets of the columns of a generator matrix. By passing to the dual code, these quantities become counts of linearly independent column subsets. We then represent these counts using the basis generating polynomial of a projective-geometry matroid and show, by averaging over the action of GL⁡(r,q)\operatorname{GL}(r,q), that this polynomial is maximized by the simplex matrix.

Theorem VI.1. Let r≥2r \ge2, and let H∈Fqk×nH \in\mathbb{F}_q^{k \times n} be a generator matrix of the qq-ary Hamming code C⊆FqnC \subseteq\mathbb{F}_q^n, where n=(qr−1)/(q−1)n=(q^r-1)/(q-1) and k=n−rk=n-r. For every matrix A∈Fqk×nA \in\mathbb{F}_q^{k \times n} of rank kk, we have E[A]≥E[H]\mathbb{E}[A] \ge\mathbb{E}[H]. In particular,

Eqopt[qr−1q−1,qr−1q−1−r]=E[H].\mathbb{E}_{q}^{\mathrm{opt}}\left[\frac{q^r-1}{q-1},\frac{q^r-1}{q-1}-r\right]=\mathbb{E}[H].

Recall, for k≤s≤nk \le s \le n, the quantities

α(G,s)=∣{S⊆[n]:∣S∣=s, rank⁡(GS)=k}∣,\alpha(G,s)=\left|\left\{S \subseteq[n]: |S|=s,\ \operatorname{rank}(G_S)=k\right\}\right|,

which counts the number of ss-subsets of columns of GG that span the space Fqk\mathbb{F}_q^k. Gruica et al. [16] showed that it is possible to express the expectation in terms of the latter quantities as follows:

E[G]=nHn−∑s=kn−1α(G,s)(n−1s).\mathbb{E}[G]=nH_n-\sum_{s=k}^{n-1}\frac{\alpha(G,s)}{\binom{n-1}{s}}.

Since all coefficients in the sum are positive, minimizing E[G]\mathbb{E}[G] amounts to maximizing the quantities α(G,s)\alpha(G,s). The spanning condition in the definition of α(G,s)\alpha(G,s) has a convenient dual interpretation. To state it, we introduce the following notation.

Definition VI.1. Let G∈Fqk×nG \in\mathbb{F}_q^{k \times n}. For 0≤t≤n0 \le t \le n, define

I(G,t)=∣{T⊆[n]:∣T∣=t, rank⁡(GT)=t}∣.I(G,t)=\left|\left\{T \subseteq[n]: |T|=t,\ \operatorname{rank}(G_T)=t\right\}\right|.

Thus, I(G,t)I(G,t) is the number of linearly independent subsets of tt columns of GG.

We will use the following standard relation between spanning sets of a code and independent sets of its dual. We include the short proof for completeness.

Lemma VI.2. For every k≤s≤nk \le s \le n, α(G,s)=I(G⊥,n−s)\alpha(G,s)=I(G^\perp,n-s).

Proof. Fix S⊆[n]S \subseteq[n], and let T=[n]∖ST=[n]\setminus S. The matrix GSG_S has rank kk if and only if there is no nonzero codeword of CGC_G whose support is contained in TT. On the other hand, the columns of G⊥G^\perp indexed by TT are linearly dependent if and only if there exists a nonzero vector supported on TT that belongs to ker⁡(G⊥)=CG\ker(G^\perp)=C_G.

Therefore, GSG_S has rank kk if and only if the columns of (G⊥)T(G^\perp)_T are linearly independent. The correspondence S↦[n]∖SS \mapsto[n]\setminus S is a bijection between subsets of size ss and subsets of size n−sn-s, which proves the claim. □

:::

Substituting t=n−st=n-s into the formula for the expected coverage time gives

E[G]=nHn−∑t=1n−kI(G⊥,t)(n−1t−1).\mathbb{E}[G]=nH_n-\sum_{t=1}^{n-k}\frac{I(G^\perp,t)}{\binom{n-1}{t-1}}.

Hence, minimizing the expected coverage time reduces to maximizing I(G⊥,t)I(G^\perp,t) for each 1≤t≤r1 \le t \le r. To analyze these quantities, we index the nonzero column directions by the one-dimensional subspaces of Fqr\mathbb{F}_q^r, record their multiplicities in a vector, and describe their linear-dependence structure using a matroid.

The linear-dependence structure of the nonzero column directions is described by a matroid on the projective space Pr\mathcal{P}_r. We recall the matroid terminology needed below.

Definition VI.2. A matroid is a pair M=(E,I)M=(E,\mathcal{I}), where EE is a finite set and I\mathcal{I} is a nonempty collection of subsets of EE satisfying the following properties:

  1. If T∈IT \in\mathcal{I} and S⊆TS \subseteq T, then S∈IS \in\mathcal{I}.

  2. If S,T∈IS,T \in\mathcal{I} and ∣S∣<∣T∣|S|<|T|, then there exists i∈T∖Si \in T\setminus S such that S∪{i}∈IS\cup\{i\}\in\mathcal{I}.

The sets in I\mathcal{I} are called independent sets. A basis is a maximal independent set, and the rank of MM is the cardinality of any basis.

For 1≤t≤r1\leq t\leq r, let Mr,tM_{r,t} be the matroid on Pr\mathcal{P}_r whose independent sets are the linearly independent subsets of size at most tt. Its bases are precisely the linearly independent subsets of Pr\mathcal{P}_r of size tt.

Definition VI.3. Let M=(E,I)M=(E,\mathcal{I}) be a matroid, and let BM\mathcal{B}_M denote its collection of bases. The basis generating polynomial of MM is

gM(z)=∑B∈BM∏e∈Bze.g_M(\mathbf{z})=\sum_{B\in\mathcal{B}_M}\prod_{e\in B}z_e.

For the matroid Mr,tM_{r,t}, we write

gr,t(z)=∑P⊆Pr∣P∣=t,P is linearly independent∏p∈Pzp.g_{r,t}(\mathbf{z})=\sum_{\substack{P\subseteq\mathcal{P}_r\\ |P|=t,\;P\text{ is linearly independent}}}\prod_{p\in P}z_p.

The polynomial gr,tg_{r,t} is homogeneous of degree tt. Moreover, by Theorem 4.2 of Anari et al. [32], the basis generating polynomial of every matroid is completely log-concave over the positive orthant. In particular, log⁡gr,t\log g_{r,t} is concave wherever gr,tg_{r,t} is positive.

We now encode the column multiplicities of a matrix as a vector indexed by Pr\mathcal{P}_r. Recall that, for a matrix G∈Fqr×nG\in\mathbb{F}_q^{r\times n}, and for each p∈Prp\in\mathcal{P}_r, mG(p)m_G(p) is the number of nonzero columns of GG whose span is pp. The basis generating polynomial evaluated at mGm_G counts the independent subsets of columns of GG.

Lemma VI.3. For every 1≤t≤r1\leq t\leq r,

I(G,t)=gr,t(mG).I(G,t)=g_{r,t}(m_G).

Proof. Every linearly independent subset of tt columns of GG consists of nonzero columns with distinct and linearly independent spans. It therefore determines a linearly independent set P⊆PrP\subseteq\mathcal{P}_r of size tt.

Conversely, fix a linearly independent set P⊆PrP\subseteq\mathcal{P}_r of size tt. For each p∈Pp\in P, one may choose any of the mG(p)m_G(p) columns of GG whose span is pp. Hence, the number of independent column subsets associated with PP is ∏p∈PmG(p)\prod_{p\in P}m_G(p). Summing over all linearly independent sets PP of size tt gives

I(G,t)=∑P⊆Pr∣P∣=t,P is linearly independent∏p∈PmG(p)=gr,t(mG).I(G,t)=\sum_{\substack{P\subseteq\mathcal{P}_r\\ |P|=t,\;P\text{ is linearly independent}}}\prod_{p\in P}m_G(p)=g_{r,t}(m_G).

We have now reduced the theorem to an inequality for gr,tg_{r,t}. For a parity-check matrix BB, the value gr,t(mB)g_{r,t}(m_B) counts the independent subsets of tt columns. For a simplex matrix SS, every projective point appears exactly once, so mS=1m_S=1. It remains to show that gr,tg_{r,t} is maximized at this uniform multiplicity vector.

Proof Theorem VI.1. Let A∈Fqk×nA\in\mathbb{F}_q^{k\times n} have rank kk, and let B∈Fqr×nB\in\mathbb{F}_q^{r\times n} be a parity-check matrix of CAC_A. Let SS be a qq-ary simplex matrix of dimension rr. The columns of SS contain exactly one nonzero representative of each element of Pr\mathcal{P}_r. Therefore, mS=1m_S=1, and it is sufficient to prove that

gr,t(mB)≤gr,t(1)g_{r,t}(m_B)\leq g_{r,t}(1)

for every 1≤t≤r1 \le t \le r.

The group GL(r,q)\mathrm{GL}(r,q) acts transitively on Pr\mathcal{P}_r. For σ∈GL(r,q)\sigma\in\mathrm{GL}(r,q) and x∈RPrx \in\mathbb{R}^{\mathcal{P}_r}, define

(σx)(p)=x(σ−1p).(\sigma x)(p)=x(\sigma^{-1}p).

Since every σ∈GL(r,q)\sigma\in\mathrm{GL}(r,q) preserves linear independence, it permutes the bases of Mr,tM_{r,t}. Consequently,

gr,t(σx)=gr,t(x).g_{r,t}(\sigma x)=g_{r,t}(x).

Define the orbit average

m‾B=1∣GL(r,q)∣∑σ∈GL(r,q)σmB.\overline{m}_B=\frac{1}{|\mathrm{GL}(r,q)|}\sum_{\sigma\in\mathrm{GL}(r,q)}\sigma m_B.

If gr,t(mB)=0g_{r,t}(m_B)=0, then the desired inequality is immediate. Assume therefore that gr,t(mB)>0g_{r,t}(m_B)>0.

For every ε>0\varepsilon>0, the vector mB+ε1m_B+\varepsilon\mathbf{1} lies in the positive orthant. Since 1\mathbf{1} is fixed by the action of GL(r,q)\mathrm{GL}(r,q), the invariance of gr,tg_{r,t} and Jensen’s inequality imply

log⁡gr,t(mB+ε1)≤log⁡gr,t(m‾B+ε1).\log g_{r,t}(m_B+\varepsilon\mathbf{1})\leq\log g_{r,t}(\overline{m}_B+\varepsilon\mathbf{1}).

The logarithm is monotonically increasing, and therefore

gr,t(mB+ε1)≤gr,t(m‾B+ε1).g_{r,t}(m_B+\varepsilon\mathbf{1})\leq g_{r,t}(\overline{m}_B+\varepsilon\mathbf{1}).

Letting ε→0\varepsilon\to0 and using the continuity of gr,tg_{r,t}, we obtain

gr,t(mB)≤gr,t(m‾B).g_{r,t}(m_B)\leq g_{r,t}(\overline{m}_B).

The transitivity of the action of GL(r,q)\mathrm{GL}(r,q) on Pr\mathcal{P}_r implies that all coordinates of m‾B\overline{m}_B are equal. Hence,

m‾B=c1\overline{m}_B=c\mathbf{1}

for some c≥0c\geq0.

The action of GL(r,q)\mathrm{GL}(r,q) only permutes the coordinates of mBm_B, so

∑p∈Prm‾B(p)=∑p∈PrmB(p)=∣{i∈[n]:bi≠0}∣.\sum_{p\in\mathcal{P}_r}\overline{m}_B(p)=\sum_{p\in\mathcal{P}_r}m_B(p)=|\{i\in[n]:b_i\ne0\}|.

Since ∣Pr∣=n|\mathcal{P}_r|=n, it follows that

c=∣{i∈[n]:bi≠0}∣n≤1.c=\frac{|\{i\in[n]:b_i\ne0\}|}{n}\leq1.

In particular, c=1c=1 if BB has no zero columns, while c<1c<1 otherwise.

Since gr,tg_{r,t} is homogeneous of degree tt,

gr,t(m‾B)=gr,t(c1)=ctgr,t(1)≤gr,t(1)=gr,t(mS).g_{r,t}(\overline{m}_B)=g_{r,t}(c\mathbf{1})=c^t g_{r,t}(\mathbf{1})\leq g_{r,t}(\mathbf{1})=g_{r,t}(m_S).

Combining the two inequalities gives

I(B,t)=gr,t(mB)≤gr,t(mS)=I(S,t)I(B,t)=g_{r,t}(m_B)\leq g_{r,t}(m_S)=I(S,t)

for every 1≤t≤r1\leq t\leq r.

Finally, the dual expression for the expected coverage time yields

E[A]=nHn−∑t=1rI(B,t)(n−1t−1)≥nHn−∑t=1rI(S,t)(n−1t−1)=E[H],\mathbb{E}[A]=nH_n-\sum_{t=1}^{r}\frac{I(B,t)}{\binom{n-1}{t-1}} \geq nH_n-\sum_{t=1}^{r}\frac{I(S,t)}{\binom{n-1}{t-1}}=\mathbb{E}[H],

which is the desired result. □

Uniformly Random Codes

We now study the expected coverage depth of a random linear code. Random matrices were previously used by Wang and Yaakobi [21] as a probabilistic construction to derive upper bounds on the minimum achievable coverage depth. Here, rather than using randomness only as an existence argument, our objective is to characterize the random-code ensemble itself. We sample uniformly from the set of all full-rank k×nk \times n matrices and determine its average coverage depth exactly.

Let

Mk,n(q)={A∈Fqk×n:rank⁡(A)=k}.\mathcal{M}_{k,n}(q)=\left\{A\in\mathbb{F}_{q}^{k\times n}:\operatorname{rank}(A)=k\right\}.

and let AA be sampled uniformly from Mk,n(q)\mathcal{M}_{k,n}(q). Conditioned on AA, let TAT_A be its coverage time as defined in the preliminaries. Unless stated otherwise, all expectations in this section are taken jointly over the random choice of AA and the column-sampling process. For brevity, we write T=TAT=T_A. We first derive an exact expression for this expectation.

Lemma VII.1. Let AA be sampled uniformly from Mk,n(q)\mathcal{M}_{k,n}(q). Then

E[T]=n(Hn−Hn−k)+n∑t=kn−11n−t(1−qk(n−t)∏i=0k−1qt−qiqn−qi).(8)\mathbb{E}[T]=n(H_n-H_{n-k})+n\sum_{t=k}^{n-1}\frac{1}{n-t}\left(1-q^{k(n-t)}\prod_{i=0}^{k-1}\frac{q^t-q^i}{q^n-q^i}\right). \tag*{(8)}

Equivalently,

E[T]=n(Hn−Hn−k)+n∑t=kn−11n−t(1−∏i=0k−1(1−qi−t−qi−n1−qi−n)).(9)\mathbb{E}[T]=n(H_n-H_{n-k})+n\sum_{t=k}^{n-1}\frac{1}{n-t}\left(1-\prod_{i=0}^{k-1}\left(1-\frac{q^{i-t}-q^{i-n}}{1-q^{i-n}}\right)\right). \tag*{(9)}

Proof. Let DD denote the number of distinct column indices sampled by the time the sampled columns first attain rank kk. Conditioned on D=dD=d, the number of samples required is the waiting time to observe dd distinct elements in the classical coupon-collector process. Hence, by the partial coupon-collector formula [26 p. 216],

E[T∣D=d]=n(Hn−Hn−d).\mathbb{E}[T\mid D=d]=n(H_n-H_{n-d}).

By the law of total expectation,

E[T]=∑d=0nn(Hn−Hn−d)Pr⁡(D=d).\mathbb{E}[T]=\sum_{d=0}^{n}n(H_n-H_{n-d})\Pr(D=d).

Since

Hn−Hn−d=∑j=n−d+1n1j,H_n-H_{n-d}=\sum_{j=n-d+1}^{n}\frac{1}{j},

we obtain

E[T]=∑d=0nn(∑j=n−d+1n1j)Pr⁡(D=d).\mathbb{E}[T]=\sum_{d=0}^{n}n\left(\sum_{j=n-d+1}^{n}\frac{1}{j}\right)\Pr(D=d).

Interchanging the order of summation gives

E[T]=n∑j=1n1jPr⁡(D≥n−j+1).\mathbb{E}[T]=n\sum_{j=1}^{n}\frac{1}{j}\Pr(D\ge n-j+1).

Setting t=n−jt=n-j, we obtain

E[T]=n∑t=0n−11n−tPr⁡(D>t).\mathbb{E}[T]=n\sum_{t=0}^{n-1}\frac{1}{n-t}\Pr(D>t).

Since at least kk distinct columns are required to attain rank kk,

Pr⁡(D>t)=1,0≤t≤k−1.\Pr(D > t) = 1,\qquad0 \le t \le k-1.

Consequently,

E[T]=n(Hn−Hn−k)+n∑t=kn−11n−tPr⁡(D>t).(10)\mathbb{E}[T] = n\left(H_n-H_{n-k}\right)+n\sum_{t=k}^{n-1}\frac{1}{n-t}\Pr(D>t). \tag*{(10)}

It remains to compute Pr⁡(D>t)\Pr(D > t). The first tt distinct sampled indices form a uniformly random ordered tt-tuple of distinct indices. Moreover, the distribution of AA is invariant under column permutations. Therefore, if A[t]A_{[t]} denotes the submatrix formed by the first tt columns of AA, then

Pr⁡(D>t)=Pr⁡(rank⁡(A[t])<k).\Pr(D>t)=\Pr\left(\operatorname{rank}(A_{[t]})<k\right).

Hence,

Pr⁡(D>t)=1−Pr⁡(rank⁡(A[t])=k).\Pr(D>t)=1-\Pr\left(\operatorname{rank}(A_{[t]})=k\right).

The number of full-rank matrices in Fqk×n\mathbb{F}_q^{k\times n} is

∣Mk,n(q)∣=∏i=0k−1(qn−qi).\left|\mathcal{M}_{k,n}(q)\right|=\prod_{i=0}^{k-1}\left(q^n-q^i\right).

Indeed, after choosing ii linearly independent rows, their span has cardinality qiq^i, and the next row can be chosen in qn−qiq^n-q^i ways.

To count the full-rank matrices whose first tt columns already have rank kk, write

A=[B∣C],A=[B\mid C],

where

B∈Fqk×t,C∈Fqk×(n−t).B\in\mathbb{F}_q^{k\times t},\qquad C\in\mathbb{F}_q^{k\times(n-t)}.

The matrix BB must have rank kk, whereas CC may be arbitrary. Hence, the number of such matrices is

qk(n−t)∏i=0k−1(qt−qi).q^{k(n-t)}\prod_{i=0}^{k-1}\left(q^t-q^i\right).

It follows that

Pr⁡(rank⁡(A[t])=k)=qk(n−t)∏i=0k−1qt−qiqn−qi.\Pr\left(\operatorname{rank}(A_{[t]})=k\right)=q^{k(n-t)}\prod_{i=0}^{k-1}\frac{q^t-q^i}{q^n-q^i}.

Substituting this into (8) proves (6).

Finally,

qn−tqt−qiqn−qi=1−qi−t1−qi−n=1−qi−t−qi−n1−qi−n.q^{n-t}\frac{q^t-q^i}{q^n-q^i} =\frac{1-q^{i-t}}{1-q^{i-n}} =1-\frac{q^{i-t}-q^{i-n}}{1-q^{i-n}}.

Distributing qk(n−t)q^{k(n-t)} over the kk factors in the product gives (7). □

The first term in (6) is the coverage depth of an MDS code. Indeed, every kk distinct columns of an MDS generator matrix are linearly independent, and therefore

E[TMDS]=n(Hn−Hn−k).\mathbb{E}[T_{\mathrm{MDS}}]=n\left(H_n-H_{n-k}\right).

We define the additive gap from the MDS benchmark.

Definition VII.1.

Δn,k,q≜E[T]−n(Hn−Hn−k).\Delta_{n,k,q}\triangleq\mathbb{E}[T]-n\left(H_n-H_{n-k}\right).

Next, we derive an upper bound on this gap. The analysis uses the following auxiliary sequence.

Definition VII.2. For m≥1m \ge1, define

Sm(q)=∑j=1mmjqj−m.S_m(q) = \sum_{j=1}^{m} \frac{m}{j}q^{j-m}.

Claim 1.

Sm+1(q)=1+m+1qmSm(q).(11)S_{m+1}(q) = 1 + \frac{m+1}{qm}S_m(q). \tag*{(11)}

Moreover, the sequence {Sm(q)}m≥1\{S_m(q)\}_{m \ge1} is bounded and

lim⁡m→∞Sm(q)=qq−1.\lim_{m \to\infty} S_m(q) = \frac{q}{q-1}.

Proof. We have

Sm+1(q)=∑j=1m+1m+1jqj−m−1=1+∑j=1mm+1jqj−m−1S_{m+1}(q) = \sum_{j=1}^{m+1} \frac{m+1}{j}q^{j-m-1} = 1 + \sum_{j=1}^{m} \frac{m+1}{j}q^{j-m-1}
=1+m+1qm∑j=1mmjqj−m=1+m+1qmSm(q),= 1 + \frac{m+1}{qm}\sum_{j=1}^{m}\frac{m}{j}q^{j-m} = 1 + \frac{m+1}{qm}S_m(q),

which proves (9).

We next show that Sm(q)S_m(q) is bounded. Setting r=m−jr=m-j, we obtain

Sm(q)=∑r=0m−1mm−rq−r.S_m(q) = \sum_{r=0}^{m-1}\frac{m}{m-r}q^{-r}.

Note that, for $0 \le r \le m-1,

mm−r≤1+r.\frac{m}{m-r} \le1+r.

Equivalently,

m≤(1+r)(m−r)=m+r(m−r−1).m \le(1+r)(m-r) = m+r(m-r-1).

It follows that

Sm(q)≤∑r=0m−1(1+r)q−r≤∑r=0∞(1+r)q−r<∞.S_m(q) \le\sum_{r=0}^{m-1}(1+r)q^{-r} \le\sum_{r=0}^{\infty}(1+r)q^{-r} < \infty.

Thus, the sequence is bounded.

Let

S‾=lim sup⁡m→∞Sm(q),S‾=lim inf⁡m→∞Sm(q).\overline{S} = \limsup_{m \to\infty} S_m(q), \qquad\underline{S} = \liminf_{m \to\infty} S_m(q).

Since shifting a sequence does not change its limit superior and m+1qm⟶1q\frac{m+1}{qm} \longrightarrow\frac{1}{q}, (11) gives S‾=1+1qS‾\overline{S} = 1 + \frac{1}{q}\overline{S}. Therefore, S‾=qq−1\overline{S} = \frac{q}{q-1}. Similarly, S‾=1+1qS‾\underline{S} = 1 + \frac{1}{q}\underline{S}, and hence S‾=qq−1\underline{S} = \frac{q}{q-1}. Thus, S‾=S‾=qq−1\underline{S} = \overline{S} = \frac{q}{q-1}, which proves that

Sm(q)⟶qq−1.S_m(q) \longrightarrow\frac{q}{q-1}.

The following lemma relates Sm(q)S_m(q) to the gap from the MDS benchmark.

Lemma VII.2. Let m=n−km=n-k. Then

Δn,k,q≤11−q−m⋅Sm(q)q−1⋅nm.(12)\Delta_{n,k,q} \le\frac{1}{1-q^{-m}} \cdot\frac{S_m(q)}{q-1} \cdot\frac{n}{m}. \tag*{(12)}

Proof. For k≤t≤n−1k \le t \le n-1 and 0≤i<k0 \le i < k, define

ai=qi−t−qi−n1−qi−n.a_i = \frac{q^{i-t}-q^{i-n}}{1-q^{i-n}}.

Since k≤t<nk \le t < n and i<ki < k, we have 0<ai<10 < a_i < 1. Using Weierstrass Product Inequality, equation (9) gives

Δn,k,q≤n∑t=kn−11n−t∑i=0k−1qi−t−qi−n1−qi−n≤n∑t=kn−11n−t∑i=0k−1qi−t1−qi−n.\Delta_{n,k,q} \le n \sum_{t=k}^{n-1} \frac{1}{n-t} \sum_{i=0}^{k-1} \frac{q^{i-t}-q^{i-n}}{1-q^{i-n}} \le n \sum_{t=k}^{n-1} \frac{1}{n-t} \sum_{i=0}^{k-1} \frac{q^{i-t}}{1-q^{i-n}}.

Since i≤k−1i \le k-1,

11−qi−n≤11−qk−n.\frac{1}{1-q^{i-n}} \le\frac{1}{1-q^{k-n}}.

Therefore,

Δn,k,q≤n1−qk−n∑t=kn−11n−t∑i=0k−1qi−t.\Delta_{n,k,q} \le\frac{n}{1-q^{k-n}} \sum_{t=k}^{n-1} \frac{1}{n-t} \sum_{i=0}^{k-1} q^{i-t}.

Furthermore,

∑i=0k−1qi−t=q−tqk−1q−1≤qk−tq−1.\sum_{i=0}^{k-1} q^{i-t}=q^{-t}\frac{q^k-1}{q-1}\le\frac{q^{k-t}}{q-1}.

Thus,

Δn,k,q≤n1−qk−n⋅1q−1∑t=kn−1qk−tn−t.\Delta_{n,k,q} \le\frac{n}{1-q^{k-n}}\cdot\frac{1}{q-1}\sum_{t=k}^{n-1}\frac{q^{k-t}}{n-t}.

Set m=n−km=n-k and change variables according to j=n−tj=n-t. Then

∑t=kn−1qk−tn−t=∑j=1mqj−mj=Sm(q)m.\sum_{t=k}^{n-1}\frac{q^{k-t}}{n-t}=\sum_{j=1}^{m}\frac{q^{j-m}}{j}=\frac{S_m(q)}{m}.

Since qk−n=q−mq^{k-n}=q^{-m}, we obtain

Δn,k,q≤11−q−m⋅Sm(q)q−1⋅nm.\Delta_{n,k,q}\le\frac{1}{1-q^{-m}}\cdot\frac{S_m(q)}{q-1}\cdot\frac{n}{m}.

We can now derive the asymptotic behavior in the two main regimes.

Theorem VII.3 (Constant-rate regime). Let qq and R∈(0,1)R \in(0,1) be fixed, and suppose that

kn=R.\frac{k}{n}=R.

Then, as n→∞n \to\infty,

E[T]≤n(Hn−Hn−k)+q(q−1)2⋅11−R+o(1).\mathbb{E}[T] \le n(H_n-H_{n-k})+\frac{q}{(q-1)^2}\cdot\frac{1}{1-R}+o(1).

Equivalently, using n=k/Rn=k/R and the asymptotic expansion of the harmonic numbers,

E[T]≤nlog⁡(11−R)+11−R(q(q−1)2−R2)+o(1).\mathbb{E}[T]\le n\log\left(\frac{1}{1-R}\right)+\frac{1}{1-R}\left(\frac{q}{(q-1)^2}-\frac{R}{2}\right)+o(1).

In particular, the additive gap between the expected coverage depth of a random code and the MDS benchmark is bounded independently of nn.

For comparison, Wang and Yaakobi [21 Corollary 6] showed that the optimal coverage depth in the same constant-rate regime is within a constant additive gap of the MDS benchmark, with the explicit upper bound

Δn,k,q≤2⋅q(q−1)2⋅11−R+o(1).\Delta_{n,k,q} \le2 \cdot\frac{q}{(q-1)^2} \cdot\frac{1}{1-R} + o(1).

Our result concerns the ensemble-average performance rather than the existence of a favorable code; it shows that the average over all full-rank matrices satisfies

Δn,k,q≤q(q−1)2⋅11−R+o(1).\Delta_{n,k,q} \le\frac{q}{(q-1)^2} \cdot\frac{1}{1-R} + o(1).

Thus, the entire full-rank ensemble achieves a bounded average additive gap, with an explicit constant that is a factor of two smaller than the one stated in [21 Corollary 6].

Proof. Let m=n−km=n-k. Since k/n=Rk/n=R, we have m=n(1−R)m=n(1-R). Hence, m→∞m\to\infty as n→∞n\to\infty, and nm=11−R\frac{n}{m}=\frac{1}{1-R}. Moreover, since m→∞m\to\infty, Lemma 1 gives Sm(q)=qq−1+o(1)S_m(q)=\frac{q}{q-1}+o(1), while 11−q−m=1+o(1)\frac{1}{1-q^{-m}}=1+o(1). Applying Lemma VII.2, we obtain

Δn,k,q≤q(q−1)2⋅11−R+o(1),\Delta_{n,k,q} \le\frac{q}{(q-1)^2} \cdot\frac{1}{1-R} + o(1),

which proves the result. □

Theorem VII.4 (Constant-redundancy regime). Let qq and c≥1c\ge1 be fixed, and suppose that

n−k=c.n-k=c.

Then, as n→∞n\to\infty,

E[T]≤n(Hn−Hc)+11−q−c⋅Sc(q)q−1⋅nc=n(Hn−Hc)+Oq,c(n).\mathbb{E}[T] \le n(H_n-H_c)+\frac{1}{1-q^{-c}}\cdot\frac{S_c(q)}{q-1}\cdot\frac{n}{c}=n(H_n-H_c)+O_{q,c}(n).

Proof. Set m=n−k=cm=n-k=c in Lemma VII.2. We obtain

Δn,k,q≤11−q−c⋅Sc(q)q−1⋅nc,\Delta_{n,k,q}\le\frac{1}{1-q^{-c}}\cdot\frac{S_c(q)}{q-1}\cdot\frac{n}{c},

which is exactly the claimed bound.

Summary and Open Problems

In this work, we studied the coverage depth of several important families of linear codes. While MDS codes are known to be optimal with respect to coverage depth whenever they exist, we showed that the qq-ary Simplex and Hamming codes are also optimal for their respective parameters.

We also analyzed the coverage depth of random linear codes and showed that, in the constant-rate regime, their coverage depth approaches the MDS bound. Nevertheless, determining the coverage depth, and in particular establishing optimality, for many other important families of codes remains open. A natural direction for future work is therefore to characterize the coverage depth of additional structured code families and to identify further parameter regimes in which optimal codes can be determined. More generally, it would be interesting to obtain structural conditions that characterize, or even restrict, the class of codes that are optimal with respect to coverage depth.

Acknowledgment

The authors would like to thank Ronny Roth and Roni Con for helpful discussions related to the analysis of random linear codes.

The research was funded by the European Union (ERC, 101045114 and EIC, DiDAX 101115134). Views and opinions expressed are, however, those of the authors 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.

References

  1. [1]J. Rydning, “Worldwide idc global datasphere forecast, 2022–2026: Enterprise organizations driving most of the data growth,” Technical Report, Tech. Rep., 2022.
  2. [2]DNA Data Storage Alliance, “Preserving our digital legacy: an introduction to DNA data storage,” 2021.
  3. [3]D. Markowitz, “Biology is all you need,” The International Conference for High Performance Computing, Networking, Storage, and Analysis, 2023.
  4. [4]E. M. LeProust, B. J. Peck, K. Spirin, H. B. McCuen, B. Moore, E. Namsaraev, and M. H. Caruthers, “Synthesis of high-quality libraries of long (150mer) oligonucleotides by a novel depurination controlled process,” Nucleic Acids Research, vol. 38, no. 8, pp. 2522–2540, 05 2010. [Online]. Available: https://doi.org/10.1093/nar/gkq163
  5. [5]S. Tabatabaei Yazdi, Y. Yuan, J. Ma, H. Zhao, and O. Milenkovic, “A rewritable, random-access DNA-based storage system,” Scientific reports, vol. 5, no. 1, pp. 1–10, 2015.
  6. [6]M. Blawat, K. Gaedke, I. Huetter, X.-M. Chen, B. Turczyk, S. Inverso, B. W. Pruitt, and G. M. Church, “Forward error correction for DNA data storage,” Procedia Computer Science, vol. 80, pp. 1011–1022, 2016.DOI
  7. [7]J. Bornholt, R. Lopez, D. M. Carmean, L. Ceze, G. Seelig, and K. Strauss, “A DNA-based archival storage system,” in Proceedings of the Twenty-First International Conference on Architectural Support for Programming Languages and Operating Systems, 2016, pp. 637–649.
  8. [8]S. H. T. Yazdi, R. Gabrys, and O. Milenkovic, “Portable and error-free DNA-based data storage,” Scientific reports, vol. 7, no. 1, p. 5011, 2017.DOI
  9. [9]L. Organick, S. D. Ang, Y.-J. Chen, R. Lopez, S. Yekhanin, K. Makarychev, M. Z. Racz, G. Kamath, P. Gopalan, B. Nguyen et al., “Random access in large-scale DNA data storage,” Nature biotechnology, vol. 36, no. 3, pp. 242–248, 2018.DOI
  10. [10]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.DOI
  11. [11]D. Bar-Lev, I. Orr, O. Sabary, T. Etzion, and E. Yaakobi, “Deep DNA storage: Scalable and robust DNA storage via coding theory and deep learning,” arXiv preprint arXiv:2109.00031, 2021.
  12. [12]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, 2015.arxiv.org/abs/1507.01611
  13. [13]I. Shomorony, R. Heckel et al., “Information-theoretic foundations of DNA data storage,” Foundations and Trends® in Communications and Information Theory, vol. 19, no. 1, pp. 1–106, 2022.DOI
  14. [14]R. Heckel, G. Mikitush, and R. N. Grass, “A characterization of the DNA data storage channel,” Scientific reports, vol. 9, no. 1, p. 9663, 2019.DOI
  15. [15]D. Bar-Lev, O. Sabary, R. Gabrys, and E. Yaakobi, “Cover your bases: How to minimize the sequencing coverage in dna storage systems,” IEEE Transactions on Information Theory, vol. 71, no. 1, pp. 192–218, 2025.
  16. [16]A. Gruica, D. Bar-Lev, A. Ravagnani, and E. Yaakobi, “A combinatorial perspective on random access efficiency for dna storage,” IEEE Transactions on Information Theory, 2025.
  17. [17]A. Gruica, M. Montanucci, and F. Zullo, “The geometry of codes for random access in dna storage,” Designs, Codes and Cryptography, vol. 94, no. 5, 2026.arxiv.org/abs/2411.08924
  18. [18]A. Boruchovsky, O. Elishco, R. Gabrys, A. Gruica, I. Tamo, and E. Yaakobi, “Making it to first: The random access problem in dna storage,” 2025. [Online]. Available: https://arxiv.org/abs/2501.12274
  19. [19]H. Abraham, R. Gabrys, and E. Yaakobi, “Covering all bases: The next inning in dna sequencing efficiency,” in 2024 IEEE International Symposium on Information Theory (ISIT). IEEE, 2024, pp. 464–469.arxiv.org/abs/2401.17649
  20. [20]Ş. Bodur, S. Lia, H. H. López, R. Ludhani, A. Ravagnani, and L. Seccia, “The random variables of the dna coverage depth problem,” IEEE Transactions on Information Theory, pp. 1–1, 2026.
  21. [21]C. Wang and E. Yaakobi, “Random access in dna storage: Algorithms, constructions, and bounds,” 2026. [Online]. Available: https://arxiv.org/abs/2601.07053
  22. [22]C. Hofmeister, R. Bitzer, and E. Yaakobi, “Random access expectation in dna storage and fountain codes,” 2026. [Online]. Available: https://arxiv.org/abs/2605.10919
  23. [23]W. Feller, An introduction to probability theory and its applications. Wiley & Sons, 1957.
  24. [24]D. J. Newman, “The double dixie cup problem,” The American Mathematical Monthly, vol. 67, no. 1, pp. 58–61, 1960.DOI
  25. [25]P. Erdős and A. Rényi, “On a classical problem of probability theory,” Magyar Tud. Akad. Mat. Kutató Int. Közl, vol. 6, no. 1, pp. 215–220, 1961.
  26. [26]P. Flajolet, D. Gardy, and L. Thimonier, “Birthday paradox, coupon collectors, caching algorithms and self-organizing search,” Discrete Applied Mathematics, vol. 39, no. 3, pp. 207–229, 1992.
  27. [27]R. Cao and X. Chen, “Optimizing sequencing coverage depth in dna storage: Insights from dna storage data,” in 2025 IEEE International Symposium on Information Theory (ISIT), 2025, pp. 1–6.
  28. [28]M. Bertuzzo, A. Ravagnani, and E. Yaakobi, “The coverage depth problem in dna storage over small alphabets,” in 2025 IEEE International Symposium on Information Theory (ISIT). IEEE, 2025, pp. 1–6.arxiv.org/abs/2507.20639
  29. [29]———, “The dna coverage depth problem: Duality, weight distributions, and applications,” 2026. [Online]. Available: https://arxiv.org/abs/2603.06489
  30. [30]X. Kong, O. Elishco, C. Wang, and T. M. Duman, “The coverage depth problem in distributed dna data storage,” 2026. [Online]. Available: https://arxiv.org/abs/2610.02931
  31. [31]R. P. M. J. Jurrius, “Weight enumeration of codes from finite spaces,” Designs, Codes and Cryptography, vol. 63, no. 3, pp. 321–330, 2012.DOI
  32. [32]N. Anari, S. O. Gharan, and C. Vinzant, “Log-concave polynomials, entropy, and a deterministic approximation algorithm for counting bases of matroids,” in 2018 IEEE 59th Annual Symposium on Foundations of Computer Science (FOCS). IEEE, 2018, pp. 35–46.

Paper details

vlnc:W_n7y7avjr
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 2

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents