Manuscript Offprint
arXiv:2611.08230The probabilistic bound for perfect hashing is sharp only for binary alphabets
Abstract
We investigate the optimal asymptotic rate of perfect -hash codes, a fundamental extremal problem in combinatorics, information theory, and computer science. Let denote the classical probabilistic lower bound. We prove that if and only if , establishing an explicit strict improvement for every and settling the first assertion of a conjecture of Xing and Yuan (Combinatorica 43 (2023), 347–366). More significantly, we show that, for every , for all sufficiently large integers . This improves the previously known increments of scale by an exponential factor. We also establish a structural limitation of the concatenation method. For pairwise uniform inner codes of subexponential length, the resulting rate bound exceeds by at most . Thus, exponentially long inner codes are necessary to achieve the new improvement scale within this framework. Our proofs combine Fourier analysis, high-dimensional simplex codes, additive permutation counts, and entropy bounds for hypergraph matchings. We further strengthen lower bounds from short inner codes and improve several known numerical estimates.
Keywords: Perfect hashing, probabilistic method, additive triples of bijections, Latin square transversals, hypergraph matchings, simplex codes.
2020 MSC: Primary 05D40, 05D05; Secondary 94B65, 05B15, 05C70, 11B30, 51E20.
1 Introduction
Let be an integer and write . A code is a perfect -hash code if every distinct codewords have a coordinate such that . Such a coordinate separates the codewords. Perfect 3-hash codes are also called trifferent codes. Equivalently, the coordinate projections of a perfect -hash code form a family of functions from to such that every -element subset of is mapped injectively by at least one of them. This formulation as a perfect hash family underlies applications in combinatorics and computer science [14]. For example, such families are used to derandomize the color-coding method of Alon,
*School of Internet, Anhui University, Hefei, Anhui 230039, China. E-mail: lishitao0216@163.com.
†Key Laboratory of Intelligent Computing and Signal Processing, Ministry of Education, School of Mathematical Sciences, Anhui University, Hefei, Anhui 230601, China. E-mail: smjwcl.good@163.com
‡Corresponding author: Minjia Shi.
Yuster and Zwick [2]. Explicit perfect hash families with more general alphabet and separation parameters can be constructed from algebraic curves [31]. Perfect -hash codes also describe zero-error list decoding with list size at most on the channel [32, Section 1]. In this channel, each input symbol can be received as any of the other symbols, and the separation condition guarantees that no received word is compatible with distinct codewords.
The basic extremal problem is to determine the largest size of a perfect -hash code of length . For fixed , we study the asymptotic rate
which measures the exponential growth of . The study of goes back to the 1980s, but its exact value is not known for any .
Progress on lower bounds has been much more limited. Let be the probability that independent uniform symbols are all distinct, and let . By choosing codewords independently and deleting one codeword from each nonseparated -subset, Fredman and Komlós [14] and Körner [19] obtained the classical probabilistic lower bound
Before the present work, this bound had been improved only for finitely many small alphabet sizes and for all sufficiently large . Körner and Marton [20] obtained the first strict improvement in 1988. For , they proved
by concatenating a short ternary inner code with a randomly chosen outer code.
Later work on trifferent codes includes linear and explicit constructions. Bishnoi, D'haeseleer, Gijswijt and Potukuchi [5] proved that ternary linear trifferent codes are equivalent to minimal codes, and hence to strong blocking sets. They also constructed linear trifferent codes of size at least for all sufficiently large [5, Theorem 1.5], which matches the exponential lower bound in (2) within the class of linear codes. Explicit constructions were developed further by Alon, Bishnoi, Das and Neri [1], using expander graphs, and by Bishnoi and Tomon [6], using blocking sets of higher codimension. These results concern linearity and explicitness, rather than a strict improvement on (1) for every . Recently, Han, Sun and Ge [18, Theorem 1.1] proved that for some absolute constant and all sufficiently large . This improves the lower bound on by an unbounded factor, but leaves the lower bound on unchanged. Thus, (2) is still the best known lower bound on .
For more than three decades, remained the only alphabet size for which a strict improvement on (1) was known [32]. The next advance is due to Xing and Yuan, who removed the requirement that the inner code itself be a perfect hash code. Instead, they count the separated -element subsets of the inner code and choose an outer code adapted to this family. This additional freedom permits maximum distance separable (MDS) inner codes over finite abelian groups and relates the rate problem to the enumeration of simultaneous permutations. Using the asymptotic counts of additive triples of bijections due to Eberhard, Manners and Mrazović [12] and Eberhard [11], Xing and Yuan proved
These bounds exceed for all sufficiently large [32, Theorem 1.1]. Xing and Yuan [32] also obtained strict improvements for and for every odd with , and reported numerical evidence for several further odd values of . To the best of our knowledge, (3) and (4) remain the best known general asymptotic lower bounds on as .
These results left open whether the probabilistic bound can be improved for every alphabet size, and not only for the small values verified in [32] and for all sufficiently large values. Xing and Yuan formulated a conjecture consisting of two assertions.
Conjecture 1 (Xing–Yuan [32, Conjecture 1.2]). For every integer , there exist families of perfect -hash codes whose asymptotic rate is strictly larger than . Moreover, this strict improvement can be obtained from the concatenation constructions specified in Theorems 4.7, 4.8 and 5.2 of [32], in their respective ranges of alphabet sizes.
In this paper, we prove the first assertion of the Xing–Yuan conjecture with an explicit lower bound for every . Once an improvement is known to exist for every alphabet size, the next question is how large it can be. We improve (3) and (4) on a different exponential scale, uniformly over all sufficiently large integers , and we show that inner codes of the type used by Xing and Yuan cannot reach this scale unless their length grows exponentially with .
1.2 Main results
Our first theorem answers the qualitative question. It characterizes the alphabet sizes for which the probabilistic lower bound (1) can be improved.
Theorem 1.1. One has . For every integer ,
In particular,
Theorem 1.1 proves the first assertion of the Xing-Yuan conjecture for every , with no unspecified threshold and no finite range of left to verification. The lower bound in (5) is obtained by concatenating an explicit inner code of length with a randomly chosen outer code. Theorem 3.7 replaces this length by a computable odd integer . The equivalence (6) characterizes equality in the probabilistic lower bound and does not determine .
We next ask how large the improvement can be. By Stirling's formula, we have
Expanding the logarithms in (3) and (4) as in Section 2.1, we see that these bounds exceed by and , respectively. Both increments have the exponential scale . Our main asymptotic result provides a much larger increment over the probabilistic lower bound, uniformly over all sufficiently large alphabet sizes.
Theorem 1.2. For every real , there exists an integer such that
Consequently, we have
In contrast with the increments of Xing and Yuan, Theorem 1.2 implies
where ranges over all integers. These improvements concern only the excess over , and the leading order of the lower bound is still . Theorem 1.2 does not determine the exponential order of , and unlike Theorem 1.1, it does not specify the threshold .
We prove Theorem 1.2 by establishing a more general quantitative bound for a family of high-dimensional simplex inner codes. This bound allows the inner length to grow exponentially with the alphabet size and also yields polynomial improvements when the dimension is fixed. Let be a prime-power divisor of , let , and let contain one nonzero vector from each one-dimensional subspace of . With , we use the alphabet of size and define
The first components form the s-ary simplex code of dimension , and the second components are unrestricted, so that . If , then is trivial.
Theorem 1.3. Fix . Let be a prime-power divisor of , let , and let satisfy
Set . Then, as , concatenation with the inner code (11) yields
where the term depends only on and . In particular, it is uniform over all such and .
Since the increment in (13) grows linearly with , Theorem 1.2 follows by taking as large as (12) permits. For each fixed , all parameters of the inner code are fixed before the outer length tends to infinity, so allowing to grow with in Theorem 1.3 does not interchange these two limits. For fixed dimensions, we obtain the following polynomial improvements over the increments of Xing and Yuan.
Corollary 1.4. The following asymptotic bounds hold.
(1) For each fixed integer , as through prime powers,
(2) For each fixed positive integer , as through prime powers and ,
For and , the code (11) is equivalent to the extended Reed–Solomon code of dimension two and length (Remark 4.7). For this inner code, the case of Corollary 1.4(1) provides the increment .
We now turn to inner codes of length at most , which include the inner codes of lengths four and three behind (3) and (4), respectively. For such lengths, a second construction, based on MacNeish's product construction [23], is sometimes better than the case of Theorem 1.3. Its length is governed by the following arithmetic function. For an integer , let be the smallest prime power such that and . For , let
We have for every , since, if , every prime power exactly dividing is odd or divisible by 4, and if , then is odd and at least 3.
Theorem 1.5. As ,
The inner code behind Theorem 1.5 has length . If (mod 4), it is a two-dimensional linear code over the ring , where is the factorization of into prime powers, and any two of its coordinates determine a codeword. If (mod 4), the inner code is obtained from such a code over a ring of order by adjoining free binary components.
Remark. Let be a commutative ring of order , and let be a matrix over with two rows such that any two coordinates of determine . If , then the code has length at most by Remark 5.3, so no such code is longer than the inner code behind Theorem 1.5. For every , the constant comes from the projections of the inner code behind Theorem 1.5 onto three coordinates. By Remark 5.4, is asymptotically the largest constant obtainable from Lemma 2.5 for three-coordinate projections of the form with a subgroup.
Since , Theorem 1.5 contains the following bounds.
Corollary 1.6. The following lower bounds hold as through the indicated sets of integers.
(1) If , then
(2) If , then
Remark. Corollary 1.6 increases the leading coefficients of the increments in (3) and (4) by the factors 4/3 and , respectively. If , which holds unless 3 exactly divides q, then , and these factors at least double. If q is a prime power, then Theorem 1.5 and Corollary 1.4(1) with d = 2 have the same leading term . Similarly, if and q/2 is a prime power, then Theorem 1.5 and Corollary 1.4(2) with r = 2 have the same leading term . In general, neither of the two constructions of length at most dominates the other. If for primes , then the increments in Theorem 1.5 and in Theorem 1.3 with d = 2 are of orders and , respectively. If with , these orders are and , respectively.
Table 1 summarizes the increments over as , where denotes the inner length. The first five rows list the leading terms of these increments, up to a factor , whereas the last row contains an explicit lower bound valid for all sufficiently large . In Corollary 1.4(1), is fixed, and in Corollary 1.4(2), is a fixed positive integer and ranges over prime powers. In the last row, is fixed.
The increments in Table 1 grow with the inner length. The next theorem shows that this growth is necessary for a large class of inner codes. We call a code over an alphabet of size pairwise uniform if, for any two distinct coordinates, all pairs of symbols have the same number of preimages under the corresponding projection. All inner codes in this paper are pairwise uniform, and so are the inner codes behind (3) and (4). Let be the probability that codewords chosen independently and uniformly from are not separated by any coordinate. By the concatenation inequality of Xing and Yuan (Lemma 2.2), we have whenever .
Table 1: Comparison of asymptotic rate improvements.
| Result | Increment | ||
|---|---|---|---|
| [32], (3) | 4 | ||
| [32], (4) | 3 | ||
| Theorem 1.5 | all | ||
| Corollary 1.4(1) | prime powers | ||
| Corollary 1.4(2) | |||
| Theorem 1.2 | all |
Theorem 1.7. Let , and let be a pairwise uniform code of length over an alphabet of size . Let . If and , then
By (7), . Hence, uniformly over pairwise uniform inner codes of length , the lower bound from Lemma 2.2 is at most as . Specifically, by Remark 6.1, if and a pairwise uniform inner code yields an increment of at least over , then its length is at least . Thus, inner codes of exponential length, as in the proof of Theorem 1.2, are necessary for increments on this scale.
Remark. An MDS code of dimension two is a code with in which any two coordinates determine a codeword. It is pairwise uniform and has length at most (Remark 6.2), so the bound applies to it. If , the inner code behind Theorem 1.5 is such a code. Theorems 1.5 and 1.7 show that, for , the best lower bound on obtainable from Lemma 2.2 with MDS inner codes of dimension two is .
Finally, for some fixed values of , the extended Reed–Solomon inner code also leads to improved bounds. We derive two exact identities for the number of its separated subsets, one in terms of functions and one in terms of permutations of (Lemma 7.1). The resulting counts recover the examples for in [32, Remark 4 and Corollary 3.6] and improve the numerical lower bounds reported in [32, Table 3] for .
The paper is organized as follows. Section 2 collects the concatenation inequality, the Bonferroni inequalities and two counting tools for intersections of separation events. We prove Theorem 1.1 and its refinement Theorem 3.7 in Section 3, Theorems 1.2 and 1.3 together with Corollary 1.4 in Section 4, Theorem 1.5 and Corollary 1.6 in Section 5, and Theorem 1.7 in Section 6. Section 7 contains exact counts for extended Reed–Solomon inner codes, and Section 8 discusses the remaining assertion of the conjecture and further questions.
2 Preliminaries
This section collects the tools used in the later proofs. Section 2.1 recalls the concatenation inequality of Xing and Yuan, converts an upper bound for the failure probability of an inner code into a lower bound for the rate, and states the Bonferroni inequalities. All inner codes in this paper are compared with the independent model, in which the coordinates of the sampled words are independent and uniform. For a pairwise uniform code, intersections of one or two separation events have the same probabilities as in this model, by (18) below, so the comparison is decided by intersections of three or more events. Section 2.2 computes the probability of an intersection of three events asymptotically by averaging Eberhard's count of additive triples of bijections, uniformly over all abelian groups of order and all subgroups . Section 2.3 bounds intersections of three or more events from above by Luria's entropy method, uniformly over all pairwise uniform codes and all sets of coordinates. This uniformity is essential, since the number of sets of coordinates grows with in our applications.
Throughout, denotes the length of a perfect hash code and the length of an inner code. For a prime power , denotes the field of order , and denotes the ring of integers modulo . Logarithms in rate expressions have base two, and denotes the natural logarithm. Entropies are also taken with natural logarithms. Samples from an inner code are always independent and uniform, with replacement. We use Stirling's formula in the form [26]
In particular, , and hence .
2.1 The concatenation inequality
Definition 2.1. Let be an alphabet of size , and let . A coordinate separates words if . Let be the family of -element subsets of that are separated by at least one coordinate. Let be the probability that no coordinate separates words sampled from independently and uniformly, with replacement.
A separated -tuple contains no repeated word. Hence, the ordered -tuples of words separated by some coordinate are exactly the orderings of the sets in , and there are of them. Dividing by the number of all -tuples, we obtain
The following concatenation lemma is due to Xing and Yuan. By (15), it is a restatement of [32, Lemma 2.3], whose proof concatenates with a randomly chosen outer code.
Lemma 2.2 (Xing-Yuan). If and , then
Lemma 2.2 reduces the construction of good perfect hash codes to the construction of a single inner code. By (15), the lower bound in Lemma 2.2 equals
which increases with the ratio . Thus, for given and , we only need to find inner codes for which is as large as possible compared with . The whole space serves as the benchmark. Its coordinates are independent, and each of them separates independent uniform words with probability . Hence, , and for the lower bound in Lemma 2.2 is exactly the probabilistic bound . Consequently, the lower bound obtained from an inner code exceeds if and only if , that is, if and only if . All constructions in this paper are designed to make the difference positive and as large as possible.
For a code , let
We have for every nonempty code , since two of the sampled words coincide with positive probability, and repeated words are not separated. The next lemma converts bounds for into bounds for .
Lemma 2.3. Let be a nonempty code over an alphabet of size .
(i) If for some , then and
(ii) If for some , then
Proof. By the definition of , we have . Let in part (i) and in part (ii), so that and . In part (i), we have , so by Lemma 2.2. Using the inequality , we obtain
Dividing by , we obtain the second inequality in (i). The third follows from .
In part (ii), we have . Since , we have
Dividing by proves part (ii).
Suppose that with , where runs through a sequence of codes with . Applying both parts of Lemma 2.3 with , we obtain
The same computation applies to the right-hand sides of (3) and (4), with , and with , , respectively. Since for fixed , these right-hand sides exceed by and , as stated after (7).
We also use the Bonferroni inequalities [15]. Let be events in a probability space. For , let be the sum of over all -element subsets , and let . Then, for every integer ,
In other words, the partial sum is an upper bound for the probability that none of the events occurs when is even, and a lower bound when is odd. For , the partial sum is the inclusion-exclusion formula and equals this probability.
For independent events of probability , we have . Hence, (16) shows that the truncated binomial sums
satisfy for every . Since the difference equals , applying this inequality to K and to , we obtain
Let , with , be a pairwise uniform code, as defined before Theorem 1.7. For two distinct coordinates and , each pair of symbols has exactly preimages under the projection onto these two coordinates, and hence each symbol has exactly preimages under the projection onto either of them. Now sample words of independently and uniformly, and let be the event that the th coordinate separates them. The pairs , , are independent and uniform on . Hence, the columns and are independent, and each of them consists of independent uniform symbols. Since depends only on the th column, and independent uniform symbols are all distinct with probability , we obtain
2.2 Additive triples of bijections
In this subsection, is a finite abelian group of order , and is the set of bijections . For , define
The main input for intersections of three separation events is the following theorem of Eberhard.
Theorem 2.4 ([11, Theorem 1.3]). Let be a finite abelian group of order , and let satisfy . Then, as ,
We call the functions in Theorem 2.4 admissible. Since the group and the admissible function in Theorem 2.4 may depend on arbitrarily, the error term in (19) is uniform over all abelian groups of order and all admissible . To see this, let , and let be the maximum of over all pairs , where runs through representatives of the finitely many isomorphism classes of abelian groups of order and is admissible. Both quantities are invariant under isomorphisms of . Choosing for each a pair at which the maximum is attained, we obtain a sequence to which Theorem 2.4 applies. Hence, , and
for every abelian group of order and every admissible . This uniformity is essential below, since we average over exponentially many admissible functions.
In particular, if , then is admissible and , so that
The case f = 0 for odd cyclic groups is due to Eberhard, Manners and Mrazović [12].
The counts are closely related to complete mappings and transversals in group tables. After fixing and relabelling its domain by , a solution of is equivalent to a bijection for which is also bijective. Thus, is the number of complete mappings of . Eberhard, Manners and Mrazović [13] obtained an asymptotic count in the broader setting of finite groups satisfying the Hall–Paige condition. For an abelian group , this condition means , and their count recovers (21). Müyesser and Pokrovskiy [24] proved a random-set extension of the Hall–Paige theorem. The nonconstant right-hand sides needed below, however, require the more specific formula (19).
Let . Since permutes , we have , that is, . For a subgroup , let , and let be the probability that the three coordinates of separate independent uniform words of . The following lemma averages the singular series in (19) over all admissible right-hand sides with values in .
Lemma 2.5. Let be an abelian group of order , and let be a subgroup of order . If , then . If , then
In particular, as , uniformly over all such and .
Proof. We first express through the numbers . The code has words, since and are arbitrary and lies in the coset . Let be words of , and let be the th column, given by . The -tuple is separated by all three coordinates exactly when are bijections. The condition that every lies in states that takes values in . Hence, the number of ordered -tuples of words of separated by all three coordinates is the sum of over all , and
If , then for bijections , and summing over , we obtain . If , no function has this property, since . Hence, in this case.
Assume now that , and let be the set of functions with . Only the functions in contribute to the sum above, and every is admissible. Since is determined by , we have . Let be the average of over , and let be the average over of . By (20), we have . Since and , we obtain
Since is an average and not a sum, the number of terms does not enter its bound.
It remains to estimate . Let be uniformly distributed on , and let be distinct. Since , there is a further position whose value absorbs the sum condition, and hence every choice of and has exactly extensions to a function in . Thus, and are independent and uniform on . Let , so that . Since , we have by the Cauchy–Schwarz inequality. Moreover, for each ,
and summing over the elements of , we obtain
Since , we have for every , and hence . For the lower bound, we apply the inequality for with , and obtain . Averaging over and using the formula for , we obtain
Combining this with and the expression for , we obtain the asserted inequality.
For , the code is the MDS code , and Lemma 2.5 reduces to (21). Larger subgroups occur in Sections 4 and 5, and in Section 4 the order of may grow with .
2.3 An entropy bound for separation intersections
For intersections of four or more separation events, and for upper bounds on intersections of three, we use Luria's entropy method. Luria [22, Theorem 3.1] proved the following. Let be fixed, and let be an -uniform, -regular hypergraph on vertices in which every pair of vertices lies in common edges. Then, as , the number of perfect matchings of satisfies
We need a version with an explicit error term that applies to all pairwise uniform codes simultaneously. Such a version is not stated in [22], and we derive it from Luria's argument, retaining the error terms. The size of the code is not assumed to be a fixed multiple of .
Lemma 2.6. Let be a pairwise uniform code over an alphabet of size , let be a set of coordinates, and let be the probability that every coordinate in separates independent uniform words of . Let
Then we have
and
In particular, for each fixed , we have uniformly over all such codes and sets .
Proof. The proof has three steps. We first express through the number of perfect matchings of a hypergraph. Then we bound this number by Luria's entropy argument, and finally we estimate the integral .
Let . Since is pairwise uniform, every pair of symbols in two given coordinates has the same number of preimages, and these numbers sum to . Hence, is a positive integer, and . Let be the -uniform hypergraph on the vertex set with one edge for each , where distinct codewords correspond to distinct edges even if their vertex sets coincide. It has vertices, and every vertex lies in exactly edges. Two vertices and with lie in exactly common edges, and two distinct vertices with the same first component lie in no common edge. A perfect matching of is a set of edges covering every vertex exactly once, that is, a -element subset of separated by every coordinate in . An ordered -tuple of codewords is separated by all coordinates in exactly when its entries are distinct and form such a subset. Therefore,
If , there is nothing to prove, so we assume that .
Let be a uniformly chosen perfect matching of , and for a vertex , let be the edge of containing . The entropy of is . Assign independent priorities to the vertices, uniform in and independent of . Almost surely, the priorities are distinct, and we list the vertices as in decreasing order of priority. Since determines the family and is determined by it, it follows from the chain rule for entropy that
where denotes conditional entropy. Call first in if has the largest priority among the vertices of . If is not first in , then for some , and the th term vanishes. If is first in , then is one of the edges through that are disjoint from . We denote the number of these edges by . Whether is first in , and the number , are determined by the conditioning variables. Since the entropy of a random variable is at most the logarithm of the size of its support, we obtain
where the expectation is taken over X and the priorities.
Fix . Call an edge bad if it contains two vertices of some edge of , and let be the number of bad edges containing . Each of the edges of contains pairs of vertices, and each such pair lies in at most edges. Hence, there are at most bad edges. Since every bad edge contains vertices,
Now fix also a vertex , and condition on the event that the priority of equals and that is first in . Given that the priority of equals , this event requires the other vertices of to have priority less than , and therefore has probability . The edges counted by are itself, some of the bad edges through , and some of the edges through that are not bad. Let be an edge through that is not bad. Then no two vertices of lie in a common edge of . In particular, the other vertices of lie in distinct edges of , all different from . The edge is disjoint from the previously exposed edges only if none of these edges of has been exposed before , that is, only if all their vertices have priority less than . These vertices lie outside , so their priorities are independent of the conditioning event, and this happens with probability . Since at most edges contain , we obtain
The term 1 accounts for , which is also bad. This double count only weakens the bound. By Jensen's inequality for the concave function , the conditional expectation of is at most . Integrating over the priority of and averaging over , we obtain
For each , the function is concave and increasing. Applying Jensen's inequality to the average over the vertices and then (25), we may replace each by . Hence,
Since and , we have . We substitute , so that and . Using and , we obtain
Thus, . Since , this bound together with (24) implies (22).
To bound , let , so that , and extend the integration interval to , which can only increase the integral. For , we have , and hence , whose integral over equals . For , the logarithm is at most , whose integral over equals since . Adding these two integrals proves (23). Finally, for fixed , it follows from (23) that , and by (14). Together with (22), this proves the last assertion.
The error in Lemma 2.6 depends only on and . Thus, the estimate holds simultaneously for every pairwise uniform code and every set of coordinates, however many such sets occur, and no union bound over coordinate sets is needed. In Section 4, we use it only for finitely many fixed values of , after choosing a Bonferroni order. For , we have , and hence, by (23),
3 Proof of Theorem 1.1
In this section, we prove Theorem 1.1 and its refinement Theorem 3.7. Both follow from Theorem 3.1, a non-asymptotic upper bound for the failure probability of a single-parity-check code over a finite-field component of the alphabet. Since Theorem 3.1 holds for every and every admissible choice of its parameters, Theorem 1.1 and the bound (32) hold for every , without an unspecified threshold.
The parity condition leaves every proper coordinate projection uniform, so only the intersection of all separation events differs from the independent model. This intersection has probability , where is a normalized return probability of a random walk on . For odd , we bound from below by Fourier analysis, keeping the contribution of the constant vectors and controlling the negative Fourier coefficients by Parseval's identity. Theorem 1.1 corresponds to the choice , and Theorem 3.7 to the shortest length allowed by the resulting certificate.
3.1 A non-asymptotic spectral estimate
Let be a prime power dividing , let , and identify the alphabet with
Let be the projection onto the first component. For an odd integer , define
Then . If , then is a single-parity-check code. For general , the parity condition involves only the -components, and the components in are unrestricted.
Theorem 3.1. Let , and be as above, and let
For every odd integer , we have
If , then the right-hand side of (27) is positive and
Proof. Sample words of independently and uniformly, with replacement, and for , let be the event that the th coordinate separates these words. Let
A vector in is determined by the positions at which each element of occurs, and hence . Let be independent and uniform on , and let . We first show that only the intersection of all events differs from the independent model, and we express this intersection through .
Claim 3.2. For every proper subset , we have
Moreover, we have
Proof of Claim 3.2. Let , and fix a coordinate . Given a word in , the letters in the coordinates outside can be chosen freely. The parity condition then determines the -component of the letter in the coordinate , and its -component is arbitrary. Hence, every word in has exactly extensions to a word of . Since this number does not depend on the word, the projection of a uniform word of onto the coordinates in is uniform on . Thus, the entries of the sampled words in these coordinates are independent and uniform on , and the first assertion of the claim follows as in the derivation of (18).
To compute the intersection of all events, let be a matrix with independent uniform entries in . Let be the event that every row of lies in , and let be the event that every column of is a bijection . For each row, the elements are independent and uniform on , so their sum is uniform on . Thus, each row lies in with probability , and since the rows are independent, . The columns are also independent, and each of them is a bijection with probability , so that . Conditionally on , the rows of are independent uniform words of , since is the intersection of independent events, one for each row. Therefore,
A bijection with maps, for each , the positions with bijectively onto . Hence, each vector is the -image of exactly bijections . Conditionally on , the columns of are independent uniform bijections, and therefore their -images are independent and uniform on . The event holds exactly when these vectors sum to . Thus, , and by Bayes' formula,
By inclusion-exclusion, we have
where the empty intersection has probability one. By the first assertion and the formula for above, this sum differs from the binomial expansion only in the term indexed by , which is instead of . Since is odd, the difference is , which proves (28).
It remains to bound the normalized return probability from below.
Claim 3.3. Let be a nontrivial additive character of , and let for . Then every is real and satisfies
In particular, for every . Moreover, we have
Proof of Claim 3.3. Let . If , then , since the positions at which equals are the positions at which equals . Thus, multiplication by permutes , and is uniform on whenever is. Hence, . For , applying the orthogonality relations for characters [27, Section 4.1] to the character of the additive group of , which is trivial exactly when , we see that equals if and 0 otherwise. Consequently, equals if and otherwise. Averaging the identity over , we find
Since , the number is real and satisfies (29). Since , the elements of sum to zero. Every contains each element of exactly times, and hence . Consequently, we have for every , and for every .
For , the map is a character of , and it is trivial exactly when . Therefore, it follows from the orthogonality relations for characters [27, Section 4.1] that
Applying this identity with , taking expectations, and using the independence of , we obtain
For the second identity, let be an independent copy of . Since is real and , we have . Applying the same identity with , we obtain
We now bound the negative terms in the odd moment . Since is odd, a term in the first identity of (30) is negative exactly when , and then it equals . Keeping the terms and omitting the other nonnegative terms, we obtain
The second inequality holds because by (29), and hence , whenever . The third holds because the vectors with are nonconstant, and by (30) the sum of over all nonconstant vectors equals . Combining (31) with (28) proves (27). The right-hand side of (27) is at least , which is positive because two sampled words coincide with positive probability. If , then this right-hand side is also strictly smaller than . Hence, it follows from Lemma 2.2 and the monotonicity of that
which is the asserted lower bound for .
Proof of Theorem 1.1. If , then any two distinct binary words differ in some coordinate, and this coordinate separates them. Thus, is a perfect 2-hash code, and hence and . Since , we also have .
Now let , and choose a prime-power divisor of as follows. If has an odd prime divisor, let be such a divisor. Otherwise, is a power of two with , and we take . Let and , which is odd. Since , we have , and therefore
The equality in the third line follows from , and the last inequality uses , and for . In particular, , and it follows from (27) that . As in the proof of Theorem 3.1, applying Lemma 2.2 and the monotonicity of then yields
This proves (5). Together with the case q = 2, it proves (6).
Remark 3.4. Single-parity-check inner codes of arbitrary length already appear in [32, Corollaries 3.2 and 3.3]. Let be a prime power and . Then , and negating the last coordinate maps onto the -MDS code of [32, Corollary 3.2] over the additive group of . Since this map relabels the symbols in one coordinate, the two codes have the same separation counts. For odd , comparing (28) with [32, Corollaries 3.2 and 3.3] shows that the criterion of [32, Corollary 3.3] for this code is equivalent to . Hence, Theorem 3.1 verifies this criterion whenever . By the computation in the proof of Theorem 1.1, which applies to every prime power dividing , this holds in particular for .
Remark 3.5. For particular parameters, Theorem 3.1 can be substantially better than the uniform choice . For instance, the exact values
show that the inner lengths 5 and 7 already lead to strict improvements for and , respectively. More generally, fix a prime power and let through multiples of . By Stirling's formula, and . Since , it follows that
Since if and only if , a strict improvement is certified by some odd length . The choice in the proof of Theorem 1.1 has the advantage that it requires no optimization and no exceptional cases.
Remark 3.6 (Relation to iterated quasigroups). The random walk on balanced columns in [29, Section 4], which is also related to Taranenko's work on iterated groups [30, Theorem 6], leads to a qualitative counterpart of the preceding proof. We describe its specialization to the present setting, together with the additional observation needed for perfect hashing. Let be the additive subgroup of generated by . The random walk on with independent increments uniform on is irreducible, and its stationary distribution is uniform on . It is also aperiodic. If , then , so the walk can return to in two steps. If satisfy , then and , so the walk can also return in three steps. Such exist because . Since every vector in has coordinate sum zero, we have and . By the convergence theorem for finite Markov chains [21], we obtain as . Together with (28) and Lemma 2.2, this already implies for every , but without an explicit inner length. In contrast, the inequality (31) and the resulting length bounds do not depend on an unspecified mixing threshold.
3.2 Shorter effective inner lengths
From the spectral certificate, we also obtain a shorter computable inner length. Here and are as in Theorem 3.1. The proof bounds from above in two ways, by and by a power of , and then determines an odd length for which the negative part of (31) is smaller than .
Theorem 3.7. For every integer , let be the smallest odd integer for which for at least one prime-power divisor of . This length is finite, can be computed by exact integer arithmetic, and satisfies
Moreover, as through all integers. For every prime-power divisor of , an explicit upper bound is
Proof. We first bound . By the multinomial theorem, is the sum of the multinomial coefficients over the at most compositions , and the balanced coefficient is the largest of them, since moving one unit from a part to a part multiplies the coefficient by , and repeated moves of this kind lead to because divides . Hence, , that is, . Moreover, , and by (14), so that . Thus, , where .
Let be the odd integer on the right of (33). Since , we have , and hence . Thus,
where the last step uses . This proves that is finite and satisfies (33). Multiplying by , we see that the condition is equivalent to , so it can be tested in exact integer arithmetic. For and a divisor with , we have by (27). As in the proof of Theorem 3.1, we obtain (32) from Lemma 2.2 and the monotonicity of .
For the asymptotic bound on , fix any prime-power divisor of . Such a divisor exists by the proof of Theorem 1.1. The right-hand side of (33) is at most .
Table 2: Certified inner lengths.
| 16 | 4 | 7 | 33 |
| 18 | 3 | 7 | 37 |
| 100 | 4 | 9 | 201 |
| 101 | 101 | 23 | 203 |
| 210 | 5 | 9 | 421 |
| 499 | 499 | 81 | 999 |
| 500 | 4 | 11 | 1001 |
We consider two cases. If , then and , so the right-hand side of (33) is at most
If , then and , so the right-hand side of (33) is at most
In both cases, , and the estimates are uniform in the choice of .
Remark 3.8. Along primes , the only admissible divisor is , and . Taking logarithms in and using Stirling's formula, we see that along primes. This identifies the worst-case order of this particular sufficient spectral certificate, but not a lower bound on the length of the shortest improving inner code, since inner codes of length three or four already lead to strict improvements for all sufficiently large , by (3) and (4).
Table 2 compares with the length in Theorem 1.1. For each , all prime-power divisors are considered, and the displayed is the smallest one satisfying .
4 Proofs of Theorems 1.2 and 1.3
In this section, we prove Theorem 1.3 and deduce Theorem 1.2 and Corollary 1.4 from it. The inner code is , whose coordinates are indexed by the projective points in . We show that is smaller than by at least , where is the number of collinear triples of points, and then apply Lemma 2.3.
In Section 4.1, we show that linearly independent sets of coordinates behave exactly as in the independent model, and that every collinear triple has the same separation probability, which we evaluate by Lemma 2.5. In Section 4.2, we truncate inclusion-exclusion at a fixed even order with . The remaining terms of orders four to come from linearly dependent sets of coordinates. We count these sets projectively and bound their contributions with the help of Lemma 2.6. Under (12), these terms and the truncation error are negligible compared with . Section 4.3 contains the deduction of Theorem 1.2 and Corollary 1.4, and Remark 4.7 identifies the extended Reed–Solomon code as a special case.
We use the following terminology. A projective point is a one-dimensional subspace of , and we identify it with its representative in . The rank of a set of projective points is the dimension of the span of their representatives. A set of points is independent if its rank is and dependent otherwise. Three distinct points are collinear exactly when their rank is two.
4.1 Coordinate projections and triple intersections
Let be the event that the coordinate separates independent uniform words of . Let have cardinality and rank . The projection of onto the coordinates in maps the word with parameters and to . Its image is
The linear map , , has rank , since its rank equals the dimension of the span of the vectors . Hence, its image has elements, and each of them has preimages. The components with are arbitrary, and the components with do not affect the projection. Therefore, , and every word of has exactly preimages. In particular, the projection of a uniform word of onto is uniform on . If , then , so the entries of the sampled words in the coordinates of are independent and uniform. Since each depends only on the th column, it follows that
Any two distinct projective points are linearly independent. Taking above, we see that is pairwise uniform.
For three distinct points, the rank is either two or three, and rank two means that the points are collinear. Let be collinear. Then there exist (not all zero) such that . All three coefficients are nonzero, since any two distinct projective points are linearly independent. In the th of these three coordinates, the map is a bijection of , so this coordinatewise relabelling preserves separation. After relabelling, the projected image consists of the triples . Their -components sum to , and by the preceding paragraph the image has elements. The set of all triples in whose -components sum to zero also has elements. Hence, the relabelled image is this set, which is the code of Lemma 2.5 with
Since the projected distribution is uniform, the probability that the three coordinates separate q independent uniform words of equals . In particular, it does not depend on the collinear triple, and we denote it by .
Lemma 4.1. Let be a prime-power divisor of , let , and write . Then and
More precisely, let , where is as in (20). Then the terms and above are bounded in absolute value by and , respectively. Since depends only on and tends to zero, both estimates are uniform over all prime-power divisors of .
Proof. Since , the elements of sum to zero. Hence, we have
Thus, Lemma 2.5 applies with and , and we obtain
Multiplying by , we see that the term is bounded in absolute value by , uniformly in and . Furthermore, since and , we have . Thus, , and subtracting from proves (35) with the stated bound on the error term.
Every pair of distinct points of spans a two-dimensional subspace, and hence lies on a unique projective line, which has exactly points. Choosing two points and then a third point on their line counts each collinear triple three times, once for each of its pairs. Therefore, the number of collinear triples is
For , let denote the sum of the probabilities over all -subsets of , and let . Then for . Every set of one or two points is independent, and a set of three points is either independent or collinear. By (34) and the definition of ,
4.2 Dependent sets and the Bonferroni remainder
Throughout this subsection, fix , let , and be as in Theorem 1.3, and write , and . All asymptotic statements refer to , and they are uniform over all prime-power divisors of and all satisfying (12). Let
We first determine the size of . Since and , we have and , and hence by (36). By Lemma 4.1, we have and . Since the factor lies between and 6 for all sufficiently large , it follows that, for all such ,
where . In particular, . Since and by (14), we also obtain .
Claim 4.2. For , let be the number of dependent -subsets of , and let . Then
and
In particular, and .
Proof of Claim 4.2. Let be a dependent -subset of . Since is dependent, some has a nonzero coefficient in a nontrivial linear relation among the points of , and hence lies in the span of . This span has dimension at most , so it contains at most projective points. Hence, every dependent -subset arises by choosing points of and then one further point in their span, and the first inequality in (38) follows. Some dependent sets may be counted more than once, which only weakens the bound. The second inequality follows from and . Both inequalities also hold when or .
The number of -subsets of is , and by (34) every independent -subset contributes exactly to . Subtracting from therefore leaves only the dependent -subsets, which proves (39). Every set of one or two points is independent, so . The dependent triples are the collinear triples, each of which contributes , so .
From now on, let be an even integer such that , and keep fixed as . For , let
Claim 4.3. For every with , we have and
In particular, .
Proof of Claim 4.3. For even , we drop the nonpositive terms in (39). Applying Lemma 2.6 to the pairwise uniform code and each dependent -subset , we obtain
For odd , since the intersection probabilities are nonnegative, it follows from (39) that . If , then , and the asserted bound for holds trivially. Let . By (38), and , we have for even , and the same bound without the term for odd . By (23),
Subtracting and using , we obtain
which is the asserted bound for . Since and is fixed, the sum of the finitely many terms is , uniformly in and .
Claim 4.4. Let and . Then
and .
Proof of Claim 4.4. Since is even, the two inequalities for follow from (17). If , then . Otherwise, using the upper bound for , the inequality and (37), we obtain
By (12) and , the logarithm of the right-hand side is at most
Since , the coefficient of q is negative, and hence .
Proof of Theorem 1.3. Since is even, it follows from the Bonferroni inequality (16) that . Writing for and using and from Claim 4.2, we obtain the exact identity
By Claim 4.3, each term with on the right-hand side is at most . Hence, , where . By Claims 4.3 and 4.4, we have , and hence by (37). In particular, for all sufficiently large . To compare with , note that, by (12) and (37),
Since by Bernoulli's inequality, we obtain for all sufficiently large . Thus, part (i) of Lemma 2.3 applies to the bound . Combining it with the asymptotic formula for , we obtain
Substituting from (36) proves (13). All error estimates depend only on and on , through the fixed integer . This establishes the stated uniformity.
Remark 4.5. The Bonferroni order suffices when for a fixed . Its remainder in the independent model is at most , and not , because the independent four-coordinate intersections cancel exactly. Larger fixed even orders allow every fixed exponent in (12). No estimate in this proof is asserted to be uniform when grows with .
4.3 Proof of Theorem 1.2 and Corollary 1.4
Theorem 1.3 applies to every dimension with , and the increment in (13) grows linearly in . For Theorem 1.2, we therefore take as large as this condition allows. Then is close to , and the increment is of order , which is up to a power of . For Corollary 1.4, we keep fixed and evaluate the coefficient in (13) asymptotically.
Proof of Theorem 1.2. If , then , so it suffices to prove (8) for . Fix such an , let , and choose a prime-power divisor of as in the proof of Theorem 1.1. For , let . Since for all sufficiently large , there is a largest integer with . We use this , so that (12) holds with , and by the maximality of .
Since , and by (35), the coefficient in (13) is at least . Since and , this coefficient is at least . By Theorem 1.3, applied with this value of , the factor in (13) depends only on and , so it is at least for all sufficiently large , whatever and are. Since also by (14), we obtain for all sufficiently large . Since , the right-hand side exceeds for all sufficiently large . This proves (8).
By (8), the lower limit in (9) is at least for every , and letting decrease to zero proves (9). Finally, by (14). Hence, by (8) with , we have , which tends to infinity for every fixed . This is (10).
Remark 4.6. The proof fixes , and hence the Bonferroni order , before letting . It does not substitute a function into Theorem 1.3, and it does not use an intersection estimate that is uniform in an unbounded order. The formulation for each fixed is what permits the exponent two in (9).
Proof of Corollary 1.4. For part (1), let be a prime power, and take , and a fixed . Then , so (12) holds with for all sufficiently large . Moreover, , and . Hence,
and part (1) follows from Theorem 1.3.
For part (2), fix , let through prime powers, let , and take . Then , so (12) holds with for all sufficiently large . Moreover, , and . Hence,
since . Part (2) now follows from Theorem 1.3.
Remark 4.7 (The extended Reed–Solomon code). Let be a prime power and . The one-dimensional subspaces of are spanned by and by the vectors with . With these representatives and , the coordinate forms are and for . Since , the group is trivial. Hence, the code (11) is
the extended Reed–Solomon code of dimension two. Since , all its triples of coordinates are collinear, and by Corollary 1.4(1) with , this inner code yields the increment . The same code is the case of a prime power in Section 5, and Lemma 5.1 recovers this increment directly from the Bonferroni inequality of order four. Section 7 evaluates this inner code exactly for small .
5 Proof of Theorem 1.5 and Corollary 1.6
In this section, we prove Theorem 1.5 and Corollary 1.6. The inner code has length , which is short compared with the high-dimensional codes of Section 4. For such lengths, every triple of coordinates may be dependent, but the Bonferroni inequality of order four suffices. First, we prove a general bound for pairwise uniform codes of length at most in which all triples of coordinates have the same separation probability. Then we construct the product-ring codes and show that, after relabelling the symbols, every projection onto three coordinates becomes a code with . Finally, we evaluate these projections by Lemma 2.5 and complete the proof.
Lemma 5.1. Let be an infinite set of integers, and let be fixed. For each , let be a pairwise uniform code, where and the length may depend on and satisfies . Suppose that any three distinct coordinates separate independent uniform words of with the same probability , and that as through . Then, as through ,
Proof. Sample words of independently and uniformly, and let be the event that the th coordinate separates them. Write , and let be as in (16). By (18), we have and . By hypothesis, . Let be the largest probability of an intersection of four of these events, with if . Then .
We first compare with . By Lemma 2.6 with , every intersection of four of these events has probability at most , and hence so does . Moreover, by (23). For all sufficiently large , we have , and by (14). Hence,
By the Bonferroni inequality (16) with K = 4,
By (17) with , the truncated sum is at most . Writing , we obtain , where .
We now show that . Since , it follows from the above bound for that
Moreover, . Hence, . In particular, for all sufficiently large . Since , we also have , which tends to zero because , whereas . Thus, for all sufficiently large . Applying Lemma 2.3(i) to the bound , we obtain
Since
this proves the lemma.
We now construct the product-ring inner codes behind Theorem 1.5. Let . If (mod 4), let and . If (mod 4), let and . In both cases, . Write , where are powers of distinct primes. Then , by the definition of . Moreover, every is odd or divisible by 4, as noted before Theorem 1.5. Let be the commutative ring of order . An element of is a unit exactly when all its components are nonzero. For each , fix an injection , which exists since , and let for . If , then every component of is nonzero, and hence is a unit of .
On , define the linear forms and for . Let , and use the alphabet , which has elements. Define
If , we identify with , and is the -linear code whose coordinates are given by the forms . In particular, if is a prime power, then , the map is a bijection, and . In this case, is, up to the order of the coordinates, the extended Reed–Solomon code (40).
Lemma 5.2. Let be the additive group of , and let .
(i) For any two distinct coordinates, every pair of symbols has exactly preimages under the corresponding projection of . In particular, is pairwise uniform.
(ii) For any three distinct coordinates, every word in the image of the corresponding projection has exactly preimages. After the symbols in each of the three coordinates are relabelled by a bijection of , this image becomes .
Proof. We first show that the values of any two of the forms determine . For and , we have and . For and with , we have , and since is a unit, we obtain and then . Conversely, all values occur. Hence, the symbols in two coordinates of a word of determine and the two corresponding components in , while the remaining components in are free. This proves (i).
Any three of the forms satisfy a linear relation whose coefficients are units of , namely
for distinct . The first relation follows from . In the second relation, the coefficients sum to zero, so the terms involving cancel, and the coefficient of is . In each of the three coordinates, multiply the -component of every symbol by the corresponding coefficient and keep the -component. This relabels the symbols by bijections of , and the relabelled image consists of triples with . Since any two of the three forms determine , the image has elements, and so does the set of all such triples. Thus, the relabelled image is the set of all such triples, which is . The remaining components in are free, and this proves (ii).
For , the length is the largest possible for linear codes of this type.
Remark 5.3. Let be a finite commutative ring of order , and let be a matrix over such that any two coordinates of determine . Equivalently, all minors of are units, since a square matrix over is invertible exactly when its determinant is a unit. By [3, Theorem 8.7], is a direct product of finite local rings, and the order of each factor is a power of the characteristic of its residue field, because the maximal ideal of a finite local ring is nilpotent and the successive quotients of its powers are vector spaces over the residue field. If , then the factors with residue characteristic have total order , since is the exact power of dividing , so one of them has a residue field of order at most . Reducing modulo the corresponding maximal ideal of , we obtain a matrix over the field whose minors are nonzero. Hence, its columns span pairwise distinct one-dimensional subspaces of , and . For , the codes thus have the largest length among such linear codes. For , we have , so such codes have length at most 3. This is why the components in are needed in that case.
By Lemma 5.2(ii), the three-coordinate intersections of are described by Lemma 2.5 with and . Two other cases of Lemma 2.5 concern the inner codes of Xing and Yuan. For and , it is (21). For with odd, and , we have , so , and is the inner code
of [32, Section 5]. Thus, by Lemma 2.5 with h = 2,
In this case, a function taking the value exactly times has , so it is admissible exactly when is odd, and then . The dependence of on is essential here. In [32, Proposition 4.3], the count is recorded with the constant for every admissible . Since , Theorem 2.4 shows that is a lower bound for , with equality only for constant . Together with the uniformity in (20), this lower bound suffices for [32, Theorem 5.2], but it loses the factor in (43). The code (42) is pairwise uniform, since any two of are arbitrary and the third lies in a coset of . Already for this code, applying Lemma 5.1 with and (43), we obtain
which improves (4) by the factor .
Remark 5.4. Let be an abelian group of order . Every subgroup with contains the subgroup , which is if and otherwise. If , then , and hence
Since the error in Lemma 2.5 is uniform over all and , it follows that, for all sufficiently large , the largest value of over subgroups is attained at . Moreover, is the sum of the elements of order at most two in , since the other elements cancel in pairs . These elements form an elementary abelian 2-group of some rank , whose elements sum to zero unless . Since exactly when the Sylow 2-subgroup of is cyclic and nontrivial, we have exactly in this case. This is always the case if , while for the group of Lemma 5.2 has . Thus, the constants in Theorem 1.5 are the largest asymptotic values of obtainable from Lemma 2.5 over all abelian groups of order and all subgroups .
Proof of Theorem 1.5. Let be the code (41), of length . Since , we have . By Lemma 5.2(i), the code is pairwise uniform. By Lemma 5.2(ii), for any three coordinates the projection of a uniform word of is uniform on the image, and after relabelling the symbols, this image is with and . Relabelling the symbols in each coordinate does not change the probability of separation. Hence, any three coordinates of separate independent uniform words of with probability .
We now compute . If , then and . Each is odd or divisible by 4, so the elements of each sum to zero, and hence . If , then and is odd. Each element of occurs times as a first component, and each element of occurs twice as a second component. Hence, , and . In both cases, it follows from Lemma 2.5 that . Applying Lemma 5.1 separately to the sets of integers and , with and , we obtain the bound in Theorem 1.5.
Proof of Corollary 1.6. Since , we have , and both parts follow from Theorem 1.5.
Remark 5.5. The improvement over (3) is already visible for the length-four inner codes of [32, Theorems 4.7 and 4.8]. These are the codes , where and if is odd, while and with if with and odd, the second factor being omitted if . Write , , and . The four triples of these forms satisfy , , , , and all coefficients are units because and are units. As in the proof of Lemma 5.2, each triple projection of is therefore equivalent to , and the elements of sum to zero. Let be the number of -element subsets of separated by each of three given coordinates, and let be the number separated by all four coordinates. A -element subset separated by one given coordinate is obtained by choosing, for each of the symbols, one of the words with this symbol, so there are of them. A subset separated by two given coordinates is the inverse image of the graph of a permutation of , so there are of them. By inclusion-exclusion over the four coordinates, we have . The estimate in [32, Lemma 4.6] uses , and hence . By Lemmas 2.5 and 2.6, we have , and hence . Thus, applying Lemma 5.1 with , we obtain the constant of Corollary 1.6(1) already for these codes. For odd , the number counts the configurations of nonattacking queens on the toroidal board, and in this case the required upper bound already follows from [22, Corollary 3.2(1)].
6 Proof of Theorem 1.7
In this section, we prove Theorem 1.7 and deduce its consequences for the length of inner codes with large increments and for MDS codes of dimension two. Since Theorem 1.7 bounds from above, we need a lower bound for , and we obtain it from the Bonferroni inequality of order three. By pairwise uniformity, the only terms of this inequality that differ from the independent model are the intersections of three separation events, and by Lemma 2.6 with h = 3, each of them has probability at most , independently of the pairwise uniform code and of the three coordinates.
Proof of Theorem 1.7. Let be the event that the th coordinate separates independent uniform words of , write , and let be as in (16). By (18), we have and . By Lemma 2.6 with and by (26), every intersection of three of these events has probability at most . Hence, . By the Bonferroni inequality (16) with ,
By (17) with , the truncated sum is at least . Therefore, , where . By the hypotheses, , and by Bernoulli's inequality, . Hence, , and by Lemma 2.3(ii),
Since , this proves the theorem.
Remark 6.1. Let , and suppose that a pairwise uniform inner code of length yields an increment of at least over . Then , since for by inclusion-exclusion and (18), and for . By (14), we have . If the hypotheses of Theorem 1.7 fail, then or , and hence . Otherwise, it follows from Theorem 1.7 that , and hence . Thus, the last bound holds in both cases.
Remark 6.2. Let be an MDS code of dimension two with . Since the first two coordinates determine a codeword, each of the other coordinates is a function of the first two, and these functions form mutually orthogonal Latin squares of order . There are at most such squares [7], and hence . Moreover, the projection of onto any two coordinates is a bijection onto , so is pairwise uniform.
The hypotheses of Theorem 1.7 become weaker as decreases, so it suffices to check them for and . Since by Bernoulli's inequality, the ratio of consecutive values of is at most . Together with , this gives for all . By (14), we have , where
Since for , the function is decreasing for , and a direct computation gives . Hence, for all . Moreover, by (14), so that . Since and , it follows from Theorem 1.7 that
for every MDS code of dimension two and every .
The projection of such a code onto three coordinates consists of the triples for a Latin square of order , and a -element subset is separated by all three coordinates exactly when it is a transversal of . In this case, Lemma 2.6 with is a quantitative form of the upper bound for the number of transversals of a Latin square of order , due to Taranenko [28]. A simpler proof of this bound is due to Glebov and Luria [16]. The factor above comes only from this bound. For the codes of Theorem 1.5 with (mod 4), every triple projection has , which corresponds to transversals. An upper bound of the form for the number of transversals of every Latin square of order would replace by for MDS codes of dimension two.
7 Exact counts for extended Reed–Solomon inner codes
In this section, we compute exactly for small prime powers , where is the code (40). By Lemma 2.2 and (15), these counts lead to explicit lower bounds for , which the asymptotic arguments in Sections 4 and 5 do not provide for a particular small alphabet size. Since a direct enumeration of all subsets of size is infeasible except for very small , we count incidences between separated subsets and their separating coordinates in two ways, using the transitive action of on coordinates and on pairs of coordinates. This reduces the count to histograms over functions or permutations of (Lemma 7.1), and a further reduction by affine symmetries makes the enumeration feasible for .
For a function , set
The summand 1 accounts for the coordinate . Let be the number of functions with , and let be the number of permutations with . Thus, and . Moreover, , since for every permutation , the coordinate corresponding to .
Lemma 7.1. For the code in (40), we have
Moreover, the numbers can be computed from normalized functions, and the numbers from normalized permutations.
Proof. The map is a bijection from onto , since the coordinates and of a codeword determine it. We identify -element subsets of with -element subsets of in this way. The coordinates of correspond to the linear forms and with , which represent the one-dimensional subspaces of the dual space of . A coordinate separates a subset exactly when the corresponding form is injective on .
If the coordinate separates , then contains exactly one point with each first coordinate, and hence is the graph of a unique function . The coordinate separates this graph exactly when is a permutation. Hence, the number of coordinates separating the graph of is . Let be the number of -element subsets of separated by exactly coordinates. Let . For a nonzero linear form , the form is nonzero, and hence equals for a unique coordinate form and a unique . Since multiplication by is injective, separates exactly when separates , that is, exactly when separates . Thus, induces a permutation of the coordinates, and and are separated by the same number of coordinates. Since acts transitively on ordered bases of the dual space, and hence on ordered pairs of distinct one-dimensional subspaces, the induced action is transitive on coordinates and on pairs of distinct coordinates.
We count the pairs such that is separated by exactly coordinates and is one of them. Each such contributes pairs, so there are pairs. On the other hand, for each coordinate , the number of subsets separated by and by exactly coordinates in total is the same as for the coordinate , by the transitivity on coordinates. For , this number is , by the second paragraph. Hence,
Dividing by k and summing over proves (44).
A subset is separated by both coordinates and if and only if it is the graph of a permutation , and then it is separated by exactly coordinates. Counting the pairs such that is separated by exactly coordinates, including the two distinct coordinates and , and using the transitivity on pairs, we obtain
Summing (46) over , we obtain . By (47), for . Hence,
For the normalization, let . Replacing by replaces each map by . Since adding a constant does not affect bijectivity, this shifts the set of good directions by and preserves . The resulting action of the affine functions is free, so every orbit has elements. Every orbit contains a unique function with , obtained with and . Thus, can be computed by enumerating these functions and multiplying the resulting histogram by . For permutations, the transformations with and preserve the
Table 3: Exact counts and rate bounds.
| Xing-Yuan [32] | ||||
|---|---|---|---|---|
| 3 | 84 | 0.1812850396923541 | 0.2119992266387375 | 0.2119992266387375 |
| 4 | 1100 | 0.0473396682908092 | 0.0495860874315075 | 0.0495860874315075 |
| 5 | 17130 | 0.0141227997095659 | 0.0145266449305914 | 0.0142073683923850 |
| 7 | 6453552 | 0.0014760459085397 | 0.0014833905220379 | 0.0014771283199558 |
| 8 | 149566104 | 0.0004959061690047 | 0.000495909 | 0.0004959550085065 |
| 9 | 3858113790 | 0.0001689929050610 | 0.0001689931 | 0.0001690016093551 |
| 11 | 3421113322836 | 0.0000201855739361 | 0.0000201855746 | 0.0000201856126515 |
| 13 | 4239685205859376 | 0.0000024718066359 | — | 0.0000024718068259 |
Values with sixteen decimal places are rounded down. Obtained from the same count of separated subsets. Computed from the counts in [32, Lemma 6.1] for the nonlinear construction of [32, Section 6] and Lemma 2.2. The values stated in [32, Corollary 6.2] are 0.01452 and 0.001483. As reported in [32, Table 3].
permutation property. They also preserve , since shows that is a good direction for exactly when is one for . This action is free, so each orbit has elements, and each orbit contains a unique permutation with and . Enumerating these permutations and multiplying the histogram by , we obtain .
For a given function or permutation, testing all directions takes field operations. Thus, the two enumeration procedures use and field operations, respectively, and working storage. The bit cost of the integer arithmetic and of the arbitrary-precision accumulation is not included in these counts. For example, for the nonzero values of are , , , and . For , they are , , , , , and . For the numerical evaluation, we compute the numbers from the normalized permutations of Lemma 7.1 and substitute them into (45). By (15) and Lemma 2.2, we obtain , where
In Table 3, we list the exact numbers of separated subsets of the code (40) and the corresponding lower bounds on . For comparison, it also lists the probabilistic bound and the lower bounds of Xing and Yuan [32].
For , our counts agree with those of [32], and for , the resulting bound is exactly the bound (2) of Körner and Marton. For , the nonlinear construction in [32, Section 6] is better than the extended Reed–Solomon inner code. Thus, increasing the length of the MDS inner code does not improve the best available construction for every small alphabet size. For , the bounds improve those reported in [32, Table 3]. The values are lower bounds obtained from one particular inner code, and they do not determine .
8 Concluding remarks
In Theorem 1.1, we proved that the classical probabilistic lower bound for perfect -hash codes is sharp if and only if , which settles the first assertion of the Xing–Yuan conjecture with an explicit bound for every . In Theorem 1.2, using high-dimensional simplex inner codes, we showed that for each fixed and all sufficiently large , whereas the previously known increments are of order . In Theorem 1.5, we used MacNeish's product construction to strengthen the bounds obtained from inner codes of length at most . In Theorem 1.7, we bounded the increments obtainable from pairwise uniform inner codes and deduced that such codes need exponential length to reach the scale of Theorem 1.2. For polynomial lengths, these increments are at most , so the constructions of Theorem 1.5 are optimal for such lengths up to this factor.
The second assertion of the Xing–Yuan conjecture, which concerns the short inner codes specified in [32, Theorems 4.7, 4.8 and 5.2], remains open. For the length-four MDS code, with and as in Remark 5.5, it amounts to the inequality , which Lemmas 2.5 and 2.6 establish only for all sufficiently large . For the two-coset inner code (42), the corresponding condition is likewise known only asymptotically, by (43).
It is natural to ask how large the increment can be. Since by the Fredman–Komlós bound [14], we have by (14). Together with (9), this shows that all limit points of lie in the interval .
Problem 8.1. Determine the limit points of as . In particular, is
Within the concatenation method, Remark 6.1 shows that, for , a pairwise uniform inner code with an increment of at least has length at least , whereas our simplex codes have length close to . Inner lengths beyond would require control of intersections of unbounded order, which our fixed-order Bonferroni argument does not provide.
For MDS codes of dimension two, the factor in Remark 6.2 comes only from the upper bound for the number of transversals of Latin squares. By the results of Taranenko [28] and of Glebov and Luria [16], the maximum number of transversals of a Latin square of order is . For comparison, if is an abelian group of order with , then the Cayley table of has transversals, which is by (21).
Problem 8.2. Is it true that every Latin square of order has at most transversals?
An affirmative answer would replace the factor in Remark 6.2 by .
Finally, two questions concern effectivity and explicitness. Theorems 3.1 and 3.7 are explicit, but the thresholds in Theorems 1.2, 1.3 and 1.5 depend on the asymptotic count of additive triples of bijections in Theorem 2.4, and effective versions would require a quantitative form of that theorem. Moreover, our outer codes are chosen at random, and constructing explicit outer codes that achieve the same rates with these inner codes remains open.
Acknowledgments. The work of Shitao Li was supported by the National Natural Science Foundation of China under Grants 12526612 and 126011020. The work of Minjia Shi was supported by the National Natural Science Foundation of China under Grants 12471490 and W2611002. During the preparation and revision of this manuscript, Claude (Anthropic) suggested the directions that led to Theorems 1.5 and 1.7, namely to extend the short inner codes of Xing and Yuan by MacNeish's product construction, and to bound the increments obtainable from short inner codes such as MDS codes of dimension two. It also assisted in developing the corresponding proofs. The authors take full responsibility for all content of the manuscript, including the mathematical statements, proofs, originality claims, and references.
References
[1] N. Alon, A. Bishnoi, S. Das and A. Neri, Strong blocking sets and minimal codes from expander graphs, Trans. Amer. Math. Soc. 377 (2024), no. 8, 5389–5410.
[2] N. Alon, R. Yuster and U. Zwick, Color-coding, J. ACM 42 (1995), no. 4, 844–856.
[3] M. F. Atiyah and I. G. Macdonald, Introduction to Commutative Algebra, Addison-Wesley, Reading, MA, 1969.
[4] S. Bhandari and A. Khetan, Improved upper bound for the size of a trifferent code, Combinatorica 45 (2025), Paper No. 2.
[5] A. Bishnoi, J. D'haeseleer, D. Gijswijt and A. Potukuchi, Blocking sets, minimal codes and trifferent codes, J. Lond. Math. Soc. 109 (2024), no. 6, e12938.
[6] A. Bishnoi and I. Tomon, Explicit constructions of optimal blocking sets and minimal codes, Combinatorica 46 (2026), Paper No. 13.
[7] C. J. Colbourn and J. H. Dinitz (eds.), Handbook of Combinatorial Designs, 2nd ed., Chapman & Hall/CRC, Boca Raton, FL, 2007.
[8] S. Costa and M. Dalai, New bounds for perfect k-hashing, Discrete Appl. Math. 289 (2021), 374–382.
[9] M. Dalai, V. Guruswami and J. Radhakrishnan, An improved bound on the zero-error list-decoding capacity of the 4/3 channel, IEEE Trans. Inform. Theory 66 (2020), no. 2, 749–756.
[10] S. Della Fiore, S. Costa and M. Dalai, Improved bounds for -hashing, IEEE Trans. Inform. Theory 68 (2022), no. 8, 4983–4997.
[11] S. Eberhard, More on additive triples of bijections, arXiv:1704.02407 (2017).
[12] S. Eberhard, F. Manners and R. Mrazović, Additive triples of bijections, or the toroidal semiqueens problem, J. Eur. Math. Soc. 21 (2019), no. 2, 441–463.
[13] S. Eberhard, F. Manners and R. Mrazović, An asymptotic for the Hall–Paige conjecture, Adv. Math. 404 (2022), 108423.
[14] M. L. Fredman and J. Komlós, On the size of separating systems and families of perfect hash functions, SIAM J. Algebraic Discrete Methods 5 (1984), no. 1, 61–68.
[15] J. Galambos and I. Simonelli, Bonferroni-type Inequalities with Applications, Springer-Verlag, New York, 1996.
[16] R. Glebov and Z. Luria, On the maximum number of Latin transversals, J. Combin. Theory Ser. A 141 (2016), 136–146.
[17] V. Guruswami and A. Riazanov, Beating Fredman–Komlós for perfect k-hashing, J. Combin. Theory Ser. A 188 (2022), 105580.
[18] X. Han, Y. Sun and G. Ge, Polynomially improved lower bounds for trifferent codes via locally sparse 3-uniform hypergraphs, arXiv:2607.26376v2 (2026).
[19] J. Körner, Fredman–Komlós bounds and information theory, SIAM J. Algebraic Discrete Methods 7 (1986), no. 4, 560–570.
[20] J. Körner and K. Marton, New bounds for perfect hashing via information theory, European J. Combin. 9 (1988), no. 6, 523–530.
[21] D. A. Levin, Y. Peres and E. L. Wilmer, Markov Chains and Mixing Times, American Mathematical Society, Providence, RI, 2009.
[22] Z. Luria, New bounds on the number of n-queens configurations, arXiv:1705.05225 (2017).
[23] H. F. MacNeish, Euler squares, Ann. of Math. (2) 23 (1922), no. 3, 221–227.
[24] A. Müyesser and A. Pokrovskiy, A random Hall–Paige conjecture, Invent. Math. 240 (2025), 779–867.
[25] A. Nilli, Perfect hashing and probability, Combin. Probab. Comput. 3 (1994), no. 3, 407–409.
[26] H. Robbins, A remark on Stirling's formula, Amer. Math. Monthly 62 (1955), no. 1, 26–29.
[27] T. Tao and V. H. Vu, Additive Combinatorics, Cambridge Stud. Adv. Math., vol. 105, Cambridge University Press, Cambridge, 2006.
[28] A. A. Taranenko, Multidimensional permanents and an upper bound on the number of transversals in Latin squares, J. Combin. Des. 23 (2015), no. 7, 305–320.
[29] A. A. Taranenko, Transversals, plexes, and multiplexes in iterated quasigroups, Electron. J. Combin. 25 (2018), no. 4, Paper No. 4.30, 17 pp.
[30] A. A. Taranenko, Transversals, near transversals, and diagonals in iterated groups and quasigroups, Electron. J. Combin. 28 (2021), no. 3, Paper No. 3.48, 22 pp.
[31] H. Wang and C. Xing, Explicit constructions of perfect hash families from algebraic curves over finite fields, J. Combin. Theory Ser. A 93 (2001), no. 1, 112–124.
[32] C. Xing and C. Yuan, Beating the probabilistic lower bound on q-perfect hashing, Combinatorica 43 (2023), 347–366.