Manuscript Offprint
arXiv:2610.28820A Matroidal Framework for Random Access in Linear Codes
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Daniella Bar-Lev*†, Hiram H. López‡, Gretchen L. Matthews‡, and Flavio Salizzoni*
*Department of Mathematics, Universität Zürich, Zürich, Switzerland
†Department of Computer Science, Technion—Israel Institute of Technology, Haifa 3200003, Israel
‡Department of Mathematics, Virginia Tech, Blacksburg, VA, USA
daniellalev@technion.ac.il, {hhlopez,gmatthews}@vt.edu, flavio.salizzoni@math.uzh.ch
Abstract—We study random access in linear codes when codeword symbols are sampled independently and uniformly with replacement. A code is recovery balanced if the expected number of samples required to recover a codeword coordinate is the same for every coordinate. We express the recovery expectations in terms of the associated matroid and derive a coordinatewise identity relating these values for a code and its dual. This proves that a linear code is recovery balanced if and only if its dual is recovery balanced, establishing a conjecture of Gruica et al. We further define the recovery balance for arbitrary matroids and show that asymptotically almost every sparse paving matroid is not recovery balanced.
Index Terms—DNA-based data storage, coded information retrieval, coupon collector problem, linear codes, random sampling, matroid, sparse paving.
I. INTRODUCTION
The coded coupon collector problem studies the recovery of information from randomly sampled encoded symbols. An information vector is encoded into a codeword, whose symbols are sampled independently and uniformly with replacement until the collected symbols suffice to recover the requested information. The objective is to minimize the expected number of samples required for recovery. Introduced in [1] with motivation from DNA-based data storage systems [2]–[7], this problem has since been studied under several recovery objectives.
In the full-recovery setting, the entire information vector must be reconstructed. Work in this direction includes exact recovery-time formulas, optimality results for specific code families, and the analysis of random linear codes [1], [8], [9]. Other formulations require recovering a requested collection of files [10] or information symbols [11], and study the worst-case or average expected recovery time over requests of a given size. A complementary direction fixes a partition into files and investigates the tradeoff between their individual expected retrieval times [12], [13]. Partial reconstruction, where only a fraction of the information needs to be recovered, has also been studied using Luby Transform (LT) codes [14].
Alongside these different recovery objectives, several works extend the sampling and storage models. These include recovery under noisy or nonuniform sampling [15]–[17], reconstruction of a failed storage container from surviving containers [18], and full recovery through parallel sampling from multiple containers [19]. Related generalizations of the classical coupon collector problem allow each draw to reveal a subset of items, including contiguous windows [20], as well as the reconstruction of composite symbols and combinations of motifs from repeated observations [21]–[23].
In this work, we consider the uniform noiseless model and focus on random access, where only a single information symbol is requested [24]–[28]. For linear codes, recovery is possible once the requested symbol can be expressed as a linear combination of the sampled symbols. The expected recovery time therefore depends on the linear dependencies among the columns of the generator matrix.
To study this dependence, Gruica et al. [24] considered the expected recovery times of all codeword coordinates and introduced recovery balanced codes, for which these expectations are equal. They proved that the average expectation over the coordinates of an code is , and hence every coordinate of a recovery balanced code has expected recovery time . Under a systematic encoding, this also holds for every information symbol and equals the uncoded recovery time. Thus, improving on this baseline requires a code that is not recovery balanced. The same work conjectured that recovery balance is preserved under code duality.
In this paper, we observe that being recovery balanced is a matroidal property in the sense that, to determine whether a code is recovery balanced, it suffices to examine the associated matroid. We therefore introduce the notion of a recovery-balanced matroid and show that this property is preserved under duality if the matroid has neither loops nor coloops. In particular, it follows that a linear code is recovery balanced if and only if its dual is recovery balanced, establishing the conjecture over every finite field.
We then determine how common the recovery balanced property was among matroids. Using the correspondence with independent sets of Johnson graphs, we prove that, for every rank , the proportion of recovery balanced sparse paving matroids on n elements is at most 4/n for all
The work of D. Bar-Lev was supported in part by the Swiss National Science Foundation under Grant 212865 and by Schmidt Sciences. H. H. López was partially supported by the NSF grants DMS-2401558 and DMS-2502705. G. L. Matthews is supported in part by NSF DMS-2502705 and the Commonwealth Cyber Initiative. F. Salizzoni is supported by the Swiss National Science Foundation under the grant P5R5-2_239500 sufficiently large n. Consequently, asymptotically almost every sparse paving matroid is not recovery balanced.
The rest of the paper is organized as follows. Section II introduces the notation and basic definitions. Section III expresses coordinate recovery expectations as matroid invariants. Section IV derives the duality identity and proves that recovery balance is preserved under duality. Finally, Section V characterizes recovery balance for sparse paving matroids and shows that asymptotically almost every sparse paving matroid is not recovery balanced.
A. Linear Codes and Recovery Balance
A linear code is a k-dimensional subspace . A generator matrix of is a rank-k matrix whose rows span . We denote its columns by . The dual code is the code
A generator matrix of is a parity-check matrix of C. For background on linear codes and duality, see e.g. [29], [30].
We consider the random-access model of [24], in which column indices of are drawn independently and uniformly from , with replacement. For , let be the number of draws required until belongs to the span of the drawn columns. In particular, if . This random variable was introduced in [24], where it was shown that its expectation depends only on , so we write .
Definition 1 ([24, Definition 2]). A code C is recovery balanced if .
For every code C, [24, Theorem 1] gives
Consequently, if is recovery balanced, then for every . It was conjectured in [24] that recovery balance is preserved under duality.
Conjecture 1 ([24, Conjecture 1]). A code C is recovery balanced if and only if its dual is recovery balanced.
Conjecture 1 was proved for codes with a transitive permutation automorphism group. In Section IV we prove the conjecture for every linear code. As in [24], for and an integer , let
The argument of [24, Lemma 1], applied to recovery of , gives
provided , or equivalently . Thus, and the recovery expectations are determined by the linear dependencies among the columns of . We express these dependencies using matroids, which are defined in the next section.
B. Matroids and Duality
A matroid is a combinatorial object that captures the notion of independence. Here, we recall the rank-based definition of a matroid and express independent sets, closure, and circuits in terms of the rank function. See [31] for further background.
Definition 2. A matroid is a pair , where is a finite ground set and the rank function satisfies, for all ,
(R1) ;
(R2) if ;
(R3)
Let C be an code with a generator matrix G. The matroid associated with C is , where
If generates , we write and call it the matroid of the code. This is independent of the choice of , since invertible row operations preserve dependencies among columns. A matroid isomorphic to such an is said to be -representable.
Definition 3. For a matroid , a set is independent if and dependent otherwise. A minimal dependent set is called a circuit. Moreover, the closure of A is
For a representable matroid, adjoining an index to A leaves its rank unchanged precisely when the corresponding column lies in the span of the columns indexed by A. Hence
This allows us to express in terms of matroid closure.
Definition 4. An element is a loop of if , and a coloop if . Equivalently, a coloop belongs to every maximal independent set.
In , an index is a loop if and only if , and a coloop if and only if . Since , the closure definition gives
• if and only if is a loop of .
• if and only if is not a coloop of .
Definition 5. The dual of is the matroid , where
The function satisfies (R1)–(R3), and .
We will use the following standard consequences of duality, which follow directly from the definitions.
Proposition 1 ([31]). (a) An element is a loop of if and only if it is a coloop of M, and a coloop of if and only if it is a loop of M [31, §2.1].
(b) If and are generator and parity-check matrices of , respectively, then , or equivalently [31, §2.2, Thm. 2.2.8].
The next lemma relates closure in M to closure in and will be used to prove the main duality identity. We give its proof for completeness.
Lemma 1 ([31]). Let be a matroid on , let , and let . Set . Then
Proof: Since and , (4) gives
Subtracting yields
By (R1)–(R3), the rank increment belongs to . It is zero exactly when , in which case the dual increment is one and ; otherwise, the dual increment is zero and .
III. THE EXPECTATION AS A MATROID INVARIANT
Throughout this section C is an code with generator matrix G and matroid . By (3), the counting function of (2) is purely matroidal:
In particular , and therefore (by (2)) , depends only on the matroid ; this recovers and refines [24, Claim 2].
It is convenient to separate, in (5), the subsets that contain i from those that do not.
Definition 6. For and , set
and
Lemma 2. Let be such that (i.e. is not a loop of ). Then
and .
Proof: If then, it holds that , and there are such subsets of size . Otherwise, and the subsets not containing are counted by . This proves the first identity. Substituting it into (2) gives
Since , the middle sum equals
where the first equality follows from substituting . Therefore .
Lemma 2 already explains the two extreme cases. If is a coloop, then no subset has , so for all , whence and . At the other extreme, for an MDS code one recovers (cf. [24, Proposition 1]) since for and for .
As we already observed, the property of being recovery balanced is determined by the associated matroid, and actually at the matroidal level, there is no need of representability. Indeed, the notion of recovery balance can be naturally extended to arbitrary matroids as follows.
Definition 7. A matroid is said to be recovery balanced if for every .
It is clear from Lemma 2 that a code is recovery balanced if and only if the associated matroid is recovery balanced. We conclude the section with the following identity, which is the main tool for our duality result.
Lemma 3. Let be a matroid on and . For all ,
Proof: The map is a bijection from the -subsets of onto its -subsets. By Lemma 1, if and only if . Hence,
since the number of -subsets with equals the number of -subsets with .
IV. THE DUALITY IDENTITY AND PROOF OF CONJECTURE 1
Recall that a code is non-degenerate if no coordinate is identically zero on , i.e. if has no zero column. Note that if both and are non-degenerate, then has neither loops nor coloops. All codes considered in [24] (MDS, Hamming, simplex, Reed–Muller, Golay codes) are of this type.
Theorem 1. Let be a matroid. Then for every ,
where if is a loop and if is a coloop of .
Proof: Using Lemma 3,
where we re-indexed . By isolating the terms and , we get
By Definition 6, we have
and
Substituting,
that is , as required.
We can now settle the conjecture. We first exclude the degenerate case in the following lemma. The proof is immediate from the definitions of loops, coloops and the fact that for a recovery balanced code, for all .
Lemma 4. Let C be a recovery balanced code with . Then has neither loops nor coloops.
We are now in position to prove Conjecture 1.
Theorem 2. A code C is recovery balanced if and only if its dual is recovery balanced .
An AI-generated proof for the case of linear codes, prepared with OpenAI Codex (GPT-6 Astra), was posted pseudonymously online in October 2026. Its accompanying disclosure states that no independent human audit has been conducted on the formal Lean statement. The proof presented here was obtained independently.
Proof: Since , it suffices to show that if is recovery balanced then so is . Let be a recovery balanced code. If , then and , while if , then and . It can be verified that in either case both codes are recovery balanced.
Now assume . By Lemma 4, has neither loops nor coloops, so Theorem 1 applies and yields, for every ,
where we used that the common balanced value equals k. As this value is independent of i, the dual is recovery balanced (with common value , consistently with (1) for ).
Remark 1. Theorem 1 is strictly stronger than what Conjecture 1 requires. Indeed, it holds coordinatewise, with no assumption of balance. The entire “profile” of the dual is the reflection of that of when both and are non-degenerate.
V. SPARSE PAVING MATROIDS
Over a sufficiently large finite field, a random code is MDS [32] and, therefore, recovery balanced. However, notice that every MDS code is associated with the same matroid, known as the uniform matroid. So, a natural question to ask is whether a random matroid is recovery balanced. To this end, we study the proportion of sparse paving matroids that are not recovery balanced as approaches infinity. We begin by reviewing the necessary definitions.
Definition 8. A matroid M of rank k on [n] is paving if and only if every circuit has cardinality at least k. A matroid M of rank k on [n] is sparse paving if and only if it is paving and its dual is paving.
For a sparse paving matroid it is known that
(a) every subset of of cardinality at most is independent;
(b) any two distinct dependent sets of cardinality k intersect in at most k - 2 elements.
We will use the fact that sparse paving matroids are in bijection with the set of independent sets of the Johnson graph.
Definition 9. The Johnson graph is the graph whose vertex set is , the set of subsets of with cardinality , and two vertices are adjacent if and only if their intersection has cardinality . A family is an independent set of if no two of its elements are adjacent. We denote by the collection of independent sets of and we set .
We write for the family of dependent k-sets of M and let .
Lemma 5 ([33, Lemma 6]). Let . The map is a bijection between the sparse paving matroids of rank k on [n] and the independent sets of . In particular, the number of sparse paving matroids of rank k on equals .
For all , consider
Let us now express the of a sparse paving matroid in terms of the .
Lemma 6. Let be a sparse paving matroid of rank on with . Then, for every ,
From Lemma 6, it is immediately clear that the condition for a matroid to be recovery balanced can be expressed in terms of the 's.
Corollary 1. Let be a sparse paving matroid of rank on with . Then is recovery balanced if and only if . In that case and for all .
We say that an independent set is regular if . In view of Corollary 1, counting recovery balanced sparse paving matroids of rank amounts to counting regular independent sets of the Johnson graph . Our goal now is to determine the proportion of regular independent sets in a Johnson graph. We do this by estimating separately the cardinality of the families of regular independent sets with small and large cardinalities; proofs are deferred to the long version in the interest of space.
Lemma 7. Let and . Then
Lemma 8. Let . Then
Lemma 9. Let and , and suppose . Then
Proof: Clearly the number of regular independent sets of size at most t is bounded by the number of independent sets of size at most t. Moreover,
where .
To determine a lower bound on the number of sparse paving matroids, inspired by [34, Equation 2], we use [35, Theorem 1] from Graham and Sloane.
Theorem 3. Let denote the maximum number of codewords in any binary code of length n, minimum distance 4, and constant weight w. Then,
Lemma 10. Let . Then .
Proof: By Theorem 3, there exists a code C of minimum distance 4 and constant weight k of cardinality at least . Any subset of C corresponds to an independent set of . We conclude that has cardinality at least . We can now prove the main theorem of this section.
Theorem 4. There exists such that for every and every we have
Proof: If or , the result follows directly from Lemma 8. So, assume that . In particular, when is large enough we get . We set . By Lemmas 7 and 9,
We divide both sides by and by Lemma 10 for n large enough we get
The previous theorem can also be restated as follows.
Corollary 2. Asymptotically almost every sparse paving matroid is not recovery balanced, that is
We believe that the assumption regarding sparse paving in the previous theorem can be eliminated. That is, we believe that asymptotically almost every matroid is not recovery balanced.
Remark 2. We point out that in [36, Conjecture 1.6] Mayhew, Newman, Welsh, and Whittle conjectured that almost every matroid is sparse paving. This is strongly supported by the counting results of Bansal, Pendavingh and van der Pol [33]. A positive answer to their conjecture, together with Theorem 4, would imply that indeed almost every matroid is not recovery balanced when .
Remark 3. Note that Corollary 2 concerns the uniform measure of all sparse paving matroids and implies nothing about representable ones. Recall that a linear code is near-MDS when and ; since and are the minimum cocircuit and circuit sizes of the matroid , the matroids of near-MDS codes are exactly the non-uniform representable sparse paving matroids. However, the set of representable matroids asymptotically has measure zero in the set of matroids, and so our approach gives zero information on the size of representable sparse paving matroids.
ACKNOWLEDGMENT
This work was initiated during the “Coding Theory and Cryptography Summer School and Collaboration Workshop”, held at the Stager Center for International Scholarship – Virginia Tech, Switzerland, in July 2026. The authors thank the organizers for facilitating this collaboration.
AI DISCLOSURE
Claude Fable suggested proving Theorem 4 by distinguishing between small and large cardinalities, and suggested a connection of our proof of Theorem 2 to matroid theory, which was further developed by the authors. ChatGPT-6 Astra was used for grammar and wording.
REFERENCES
[1] 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.
[2] G. M. Church, Y. Gao, and S. Kosuri, “Next-generation digital information storage in DNA,” Science, vol. 337, no. 6102, pp. 1628–1628, 2012.
[3] 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.
[4] R. N. Grass, R. Heckel, M. Puddu, D. Paunescu, and W. J. Stark, “Robust chemical preservation of digital information on DNA in silica with error-correcting codes,” Angewandte Chemie International Edition, vol. 54, no. 8, pp. 2552–2555, 2015.
[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] 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.
[7] D. Bar-Lev, I. Orr, O. Sabary, T. Etzion, and E. Yaakobi, “Scalable and robust DNA-based storage via coding theory and deep learning,” Nature Machine Intelligence, vol. 7, no. 4, pp. 639–649, 2025.
[8] M. Bertuzzo, A. Ravagnani, and E. Yaakobi, “The DNA coverage depth problem: Duality, weight distributions, and applications,” arXiv preprint arXiv:2603.06489, 2026.
[9] R. Gross, Y. Grunbaum, M. Bertuzzo, E. Yaakobi, and A. Ravagnani, "Optimal codes for the coverage depth problem and the performance of random codes," arXiv preprint arXiv:2610.07370, 2026.
[10] 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), pp. 464–469, IEEE, 2024.
[11] A. Gruica, A. Petrillo, and F. Zullo, “The generalized random access problem for linear codes,” arXiv preprint arXiv:2608.20152, 2026.
[12] D. Bar-Lev, “Coded information retrieval for block-structured DNA-based data storage,” arXiv preprint arXiv:2603.17154, 2026.
[13] C. V. A. Vlachos and D. Bar-Lev, “A hyperbolic bound for file retrieval in DNA-based data storage,” arXiv preprint arXiv:2609.36067, 2026.
[14] N. Akkaya and E. Haytaoglu, “Dupleth: DNA depolama sistemlerinde lt kodları kullanıldığında kısımi kapsama derinliği problemi,” Osmaniya Korkut Ata Üniversitesi Fen Bilimleri Enstitüsü Dergisi, vol. 9, no. 4, pp. 2301–2321, 2026.
[15] S. K. Hanna, “On the reliability of information retrieval from MDS coded data in DNA storage,” IEEE Transactions on Molecular, Biological, and Multi-Scale Communications, 2026.
[16] R. Cao, P. Zhou, and X. Chen, “Modeling dna storage retrieval reliability via sequencing coverage depth,” Briefings in Bioinformatics, vol. 27, no. 3, p. bbag303, 2026.
[17] H. Abraham, I. Feldman, and E. Yaakobi, “Coverage depth analysis: Random access for dna storage over noisy channels,” in 2026 IEEE International Symposium on Information Theory (ISIT), pp. 1–6, IEEE, 2026.
[18] A. Levy, R. Con, E. Yaakobi, and H. M. Kiah, “Expected recovery time in DNA-based distributed storage systems,” arXiv preprint arXiv:2602.07601, 2026.
[19] X. Kong, O. Elishco, C. Wang, and T. M. Duman, “The coverage depth problem in distributed DNA data storage,” arXiv preprint arXiv:2610.02931, 2026.
[20] Y. Grunbaum and E. Yaakobi, “General coverage models-structure, monotonicity and shotgun sequencing,” in 2026 IEEE International Symposium on Information Theory (ISIT), pp. 1–6, IEEE, 2026.
[21] I. Preuss, B. Galili, Z. Yakhini, and L. Anavy, “Sequencing coverage analysis for combinatorial DNA-based storage systems,” IEEE Transactions on Molecular, Biological, and Multi-Scale Communications, vol. 10, no. 2, pp. 297–316, 2024.
[22] T. Cohen and E. Yaakobi, “Optimizing the decoding probability and coverage ratio of composite DNA,” IEEE Journal on Selected Areas in Information Theory, 2025.
[23] R. Sokolovskii, P. Agarwal, L. A. Croquevielle, Z. Zhou, and T. Heinis, "Coding over coupon collector channels for combinatorial motif-based DNA storage," IEEE Transactions on Communications, vol. 73, no. 6, pp. 3750–3760, 2024.
[24] 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.
[25] 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, p. 114, 2026.
[26] A. Boruchovsky, O. Elishco, R. Gabrys, A. Gruica, I. Tamo, and E. Yaakobi, “Making it to first: The random access problem in DNA storage,” IEEE Transactions on Information Theory, 2026.
[27] S. 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, 2026.
[28] C. Wang and E. Yaakobi, “Random access in DNA storage: Algorithms, constructions, and bounds,” arXiv preprint arXiv:2601.07053, 2026.
[29] F. J. MacWilliams and N. J. A. Sloane, The theory of error-correcting codes, vol. 16. Elsevier, 1977.
[30] R. M. Roth, Introduction to coding theory, vol. 1. Cambridge University Press Cambridge, 2006.
[31] J. G. Oxley, Matroid theory, vol. 3. Oxford university press, 2006.
[32] S. R. Ghorpade and G. Lachaud, “Hyperplane sections of grassmannians and the number of MDS linear codes,” Finite Fields and Their Applications, vol. 7, no. 4, pp. 468–506, 2001.
[33] N. Bansal, R. A. Pendavingh, and J. G. Van der Pol, “On the number of matroids,” Combinatorica, vol. 35, no. 3, pp. 253–277, 2015.
[34] D. Mayhew and D. Welsh, “On the number of sparse paving matroids,” Advances in Applied Mathematics, vol. 50, no. 1, pp. 125–131, 2013.
[35] R. Graham and N. Sloane, “Lower bounds for constant weight codes,” IEEE Transactions on Information Theory, vol. 26, no. 1, pp. 37–43, 1980.
[36] D. Mayhew, M. Newman, D. Welsh, and G. Whittle, “On the asymptotic proportion of connected matroids,” European Journal of Combinatorics, vol. 32, no. 6, pp. 882–890, 2011.