Parity checks improve the chance that a cube face contains exactly one mark
Why it matters
Mark corners of a cube and count how many faces have exactly one marked corner. On faces with 32 corners, using even-or-odd rules to pick which corners can receive a mark raises the success rate from 37.4% to 39.3%. On larger faces the advantage shrinks, and we found exactly how fast for this kind of rule.
How should we mark the corners of a cube so that as many faces as possible contain exactly one mark? The faces overlap, so a mark that helps one face can give another an unwanted second mark. Marking corners independently at the best common rate succeeds on a little more than 1/e, or about 37%, of the faces. Label each corner by its coordinates, all zeros and ones. A parity check tests whether a chosen set of coordinates contains an even number of ones. We can restrict marks to corners that pass the check. The question is how much we gain by choosing these restrictions well.
For faces of dimension d, we find that parity checks followed by independent marking raise the best excess above 1/e from order 2^{-d} to order d\,2^{-d}. In other words, the gain still shrinks as faces grow, but parity checks multiply it by a factor proportional to the face dimension. For large d, the multiplier of d\,2^{-d} oscillates between approximately 0.09446 and 0.09947 because each additional check doubles the number of possible outcomes.
The benchmark for independent marks
A corner, or vertex, of an n-dimensional cube is a string of n bits. Fix all but d of the bits. The N=2^d vertices obtained by varying the free bits form a face. We call a face with exactly one mark a singleton. The score of a marking is the fraction of faces of dimension d that are singletons. For random markings we use the expected fraction, equivalently the probability that a uniformly chosen face has exactly one mark. We take the cube dimension n to infinity at each fixed d before asking how the score changes with d.
If all vertices are marked independently at the same rate, the best rate is 1/N. It gives one mark per face on average and exactly one mark with probability b_N=(1-1/N)^{N-1}. Goldwasser and Hansen conjectured that no marking could do better for any d\ge5 [1]. Consider, however, marking only vertices with an even number of ones. Every face has exactly N/2 such vertices. Marking each independently at rate 2/N keeps the same mean but raises the singleton probability to b_{N/2}>b_N: the best singleton probability b_m decreases to 1/e as the number m of independent trials grows. On five-dimensional faces this one check raises the score from 0.37373 to 0.37981.
With several checks we can concentrate the marks on even fewer vertices per face. The cost is that some faces can have no eligible vertices at all. Alon, Axenovich and Goldwasser [2] used parity checks to obtain singleton faces when the free coordinates give independent check outcomes. They asked whether the best score over all markings tends to 1/e as d grows. We optimize the number and choice of parity checks and the probability of marking an eligible vertex.
How checks change the number of eligible vertices
A parity check adds the bits it tests modulo two: the outcome is zero for an even sum and one for an odd sum. Take r independent checks, meaning that none can be obtained by adding others modulo two. Each vertex then has one of q=2^r possible strings of outcomes, called syndromes. A vertex is eligible if its syndrome is zero. These vertices form a binary linear code. Each coordinate carries an r-bit label indicating which checks use it. Flipping that coordinate adds its label to the syndrome, bit by bit modulo two. Written side by side, the labels form the columns of the check matrix. Every binary linear code has this description, including the whole cube when r=0.
For example, take three checks, assign the seven nonzero three-bit labels equally often across the coordinates, and mark each eligible vertex independently with probability 1/4. To visit all 32 vertices of a five-dimensional face from a starting vertex, flip each possible subset of its five free bits. If the sums of the corresponding labels cover all eight syndromes (the labels span them), exactly four vertices are eligible. The singleton probability is then 4(1/4)(3/4)^3=0.421875. If the labels span fewer syndromes, a face can miss the code altogether.
Table 1 counts all 7^5 ordered choices of labels for the free coordinates and all eight starting syndromes. Each combination is equally likely in the limit of a large cube. For each combination we added the labels in each of the 32 subsets to the starting syndrome and counted how often the result was zero.
| Eligible vertices | Cases | Chance of one mark |
|---|---|---|
| 0 | 6,762 | 0.0000 |
| 4 | 120,960 | 0.4219 |
| 8 | 6,720 | 0.2670 |
| 16 | 14 | 0.0535 |
Table 1. Three checks on a five-dimensional face. The average of the last column, weighted by the counts and evaluated without rounding, is 144694303101/368293445632=0.392878\ldots. The four-candidate faces more than offset the losses on faces that miss the code.
How does accepting a single syndrome compare with accepting several? We took tables of Boolean functions (rules that accept or reject bit strings) on two to five bits from the National Institute of Standards and Technology [3]. To each function we added every linear function and constant modulo two, then removed empty acceptance sets and duplicate truth tables. A face visits the span of its free labels shifted by its starting syndrome, a set called a translated subspace. For each of the 3,388 remaining rules we counted how many accepted syndromes belonged to each translated subspace in the space of check outcomes. For d=2,\ldots,32 we weighted these counts by the probabilities of the possible span dimensions, or ranks, for d labels drawn uniformly from the nonzero labels. We set the marking rate to give one expected mark per face, capping the rate at one.
In these 105,028 comparisons no rule beat the best single syndrome tested at the same d. A separate comparison covered 4,586 rank distributions through d=1024, sampling labels both with and without zero among the choices. It suggested a growing advantage from excluding zero and allowing the number of syndromes q to grow with d.
The best score with one eligible syndrome
Let S_d be the limiting best expected score as the cube dimension grows, maximizing over all binary linear codes and all common probabilities p of marking an eligible vertex. Write c=q/d for the ratio of the number of syndromes to the face dimension. The function f(c)=c(1/2-a e^{-1/c}), with a=1-e^{-1}, measures the gain from concentrating marks after accounting for faces whose labels fail to span all syndromes. The best score satisfies
Here o(1) denotes a term tending to zero as d grows. To attain this accuracy, distribute the nonzero labels equally and use p=q/2^d. Choose q to be the power of two in [sd,2sd], where s=0.818366\ldots is derived below. Thus about \log_2 d checks suffice. By comparison, the independent-mark excess is b_N-e^{-1}\sim 1/(2eN).

Figure 1. Gain above the independent-mark limit for face dimensions 512 to 2048. The line is the leading coefficient in the excess, \max_r f(2^r/d)/e; the points give the achieved excess multiplied by 2^d/d, at intervals of 32 dimensions. The dotted lines mark switches to the next check count. For the points we used the prescribed number of checks and marking rate and computed the score by counting label sequences. Working from smaller spans to larger ones, we started with all sequences in each span and subtracted those that generate a smaller subspace. The minima occur where two check counts give the same leading gain. The gap between the computed gain and the curve narrows over successive doublings of dimension.
Why equal nonzero labels suffice
For a given code and marking rate, the expected score conditional on the free labels depends only on their rank J, the dimension of their span. Generate a uniform face by choosing its free coordinates and a uniformly random host vertex as starting point. The starting syndrome is uniform over all q outcomes because the checks are independent. The syndromes on the face form a translate of the span. This translate contains zero precisely when the starting syndrome belongs to the span. Thus the face hits the code with probability 2^J/q. When it hits, each syndrome in that translate occurs exactly N/2^J times. Multiplying the hit probability by the chance of one mark among those eligible vertices gives the score
For fixed q,p, increasing J cannot lower the score in (2): the exponent decreases, so a marked vertex has fewer eligible companions that must remain unmarked. In a large cube we can treat the d labels as independent draws from the host's label frequencies: drawing coordinates with replacement instead of without changes the expected payoff by at most \binom d2/n, since the score lies between zero and one and the two sampling rules agree unless a coordinate repeats. When r>0, replacing every zero draw with a random nonzero label can only enlarge the span.
Kovačević's rank comparison [4, Theorem 5.1] explains how to draw the nonzero labels. It applies to a matroid, a system that records which sets of elements are independent. If a symmetry of the system can send any element to any other, uniform independent draws maximize the probability of rank at least j for each j. Here the elements are the nonzero binary vectors. A change of basis can send any one of them to any other while preserving linear independence. Since larger ranks are always at least as good, maximizing the chance of reaching each rank threshold maximizes (2).
Conversely, assigning the nonzero labels as equally often as possible realizes their uniform law as n\to\infty. With q\ge4N, (2) gives a score of at most 1/4, below the independent-mark benchmark. This leaves finitely many ranks at fixed d, each with a continuous score on 0\le p\le1. Together the comparison and the construction prove that the limit defining S_d exists.
The cost of a rank defect
Adding checks improves the full-rank score until rank losses cost more than the checks buy. Take uniform nonzero labels and suppose q\le N. A face whose labels have full rank (J=r) always hits the code and has M=N/q eligible vertices. Write z=Mp for the mean number of marks per face and D=r-J for the rank deficit, the number of missing span dimensions. At full rank the score in (2) is B_M(z)=z(1-z/M)^{M-1}. A deficit of one multiplies this by t=(1-p)^M; a deficit of D multiplies it by t^{2^D-1}. Full rank thus sets the ceiling b_M=B_M(1). For M\to\infty,
The leading gain at full rank therefore comes from having only M independent marking trials per face. Any sequence scoring at least 1/e with M\to\infty has z\to1: B_M(z)\le z\exp[-z(1-1/M)] and z e^{-z} has its unique maximum there.
A nonzero linear functional is a parity test on the bits of a label. Its zero set, called a hyperplane, contains half the labels. A rank defect occurs when all free labels lie in such a hyperplane. Let H=2^D-1 count the nonzero linear functionals that give zero on every free label. One such test allows q/2-1 nonzero labels. Two distinct tests are linearly independent, so only q/4-1 nonzero labels pass both. Thus for q\ge4
For 0\le t\le1, 0\le H(1-t)-(1-t^H)\le\binom H2(1-t)^2 by the union bound and the two-term inclusion–exclusion bound for H independent events. Here the score multiplier is t^H. The bound shows that its mean loss is (1-t)h to first order: adding the losses for individual tests introduces an error of order M^{-2}. Thus the score is
At a mean of one mark per face, a rank loss of one halves the probability of hitting the code but doubles the number of candidates on a hit. Those two factors cancel in the expected number of marks. The chance of avoiding a second mark, however, falls by a factor tending to 1/e as M\to\infty. This is why the relative loss from a single rank defect tends to 1-1/e.
When the ratio q/d stays bounded above and bounded away from zero, h=(q/N)(e^{-d/q}+o(1)) uniformly. At z=1, 1-t=a+o(1). This gives eS-1=(d/N)[f(q/d)+o(1)] for this construction's score S. For an upper bound on any competitor scoring at least 1/e, z\to1 still gives 1-t=a+o(1); replacing B_M(z) by b_M gives the same expression as an upper bound. Adjusting the rate can therefore change only smaller terms in the optimum.
Much smaller or larger numbers of syndromes cannot improve this gain. If q=o(d), even b_M has excess o(d/N). If q/d\to\infty but M\to\infty, then h=(1+o(1))/M. A score at least 1/e would by (3) satisfy eS\le1+(1/2-a+o(1))/M<1, a contradiction. It remains to consider a number of checks close to the number of free coordinates, where M can stay fixed.
When the number of checks is close to the face dimension
When the difference between the number of checks and the face dimension stays fixed, even a generous estimate for deficient faces leaves the score below 1/e. Suppose M=N/q is fixed and a power of two as d\to\infty. The chance that any of d independent uniform columns, now including zero, equals zero is at most d/q=o(1). Conditioning them all to be nonzero thus changes the expected score by o(1), uniformly in p. Allowing zero makes each entry of the matrix of free labels an independent fair bit. For M\ge1, full rank means its rows are linearly independent. This has probability \prod_{i=1}^{r}(1-2^{-i}/M), by revealing one row at a time and requiring it to lie outside the span of the preceding rows. Write A_M for the infinite product, the limit of this full-rank probability. Even if every deficient matrix had deficiency only one, the limiting score would be at most the maximum over p of
For M\ge64, 1-A_M\ge1-e^{-1/M}\ge (1-1/(2M))/M. If z\le3/4, the full-rank ceiling at that rate is at most (3/4)\exp[-(3/4)(1-1/64)]<1/e, because the full-rank score increases up to z=1. For higher marking rates, deficient faces incur a larger loss, and (4) is at most
Indeed \log(e b_M)\le1/[2(M-1)] by expanding \log(1-1/M), and (1-e^{-3/4})(1-1/128)>64/126.
For M=1,2,4,8,16,32 we bounded (4) using exact fractions. The product A of the first twelve factors bounds A_M from above. On an interval [l,u] of marking rates we used u to bound p and 1-l to bound 1-p. This bounds (4) by
Starting from [0,1], we bisected each interval until its bound fell below 367/1000<1/e. For the six values of M in order, the numbers of final intervals were 17, 22, 35, 54, 86 and 162.
For q=2N, reveal the columns one at a time instead of the rows. The chance of full column rank is at most (1-1/4)(1-1/8)=21/32 for d\ge2 in the fair-bit model. At full column rank the payoff is p/2; otherwise it is at most p(1-p)/2. The combined upper bound p[1-(11/32)p]/2 increases up to p=1 and stays below 1/e. Larger q were already excluded by (2).
To finish, a power of two q between d/2 and d yields f(q/d) bounded away from zero. This positive gain rules out both extremes: an optimizing q/d cannot tend to zero or infinity, since along a further subsequence M either diverges or is fixed (discard q\ge4N). The expansion for bounded ratios therefore gives (1): the maximizers of f among the allowed ratios also stay bounded above and away from zero (f(0+)=0,\ f(+\infty)=-\infty).
Why the coefficient oscillates
The best continuous ratio q/d is generally unavailable: the choices jump by factors of two. The difference f(2c)-f(c) has the sign of 1/2-a(2x-x^2), where x=e^{-1/(2c)}. This sign changes only at
Thus choose a power of two q in [sd,2sd]; at the endpoints the two choices tie to leading order. As integer d varies, the selected ratios q/d approach every value in [s,2s] along subsequences (round 2^r/c to the nearest integer for each interior c). The minimum of f on this interval is the common endpoint value. Its maximum occurs at c=1.177503\ldots, the unique root of a(1+1/c)e^{-1/c}=1/2, by differentiation. Consequently the lower and upper limits of (S_d-1/e)2^d/d are f(s)/e\approx0.09446 and f(1.177503\ldots)/e\approx0.09947, respectively. Between successive check counts the coefficient runs through this range again.
The sharp coefficient applies to independent marking of vertices with one eligible syndrome. For unrestricted markings the score gives a lower bound: at least one realization scores at least its expectation. Because the gain tends to zero, this bound is consistent with the proposed unrestricted limit of 1/e.
References
- J. Goldwasser and R. Hansen. Inducibility in the hypercube, §9.3, Conjecture 9.5 in the preprint.
- N. Alon, M. Axenovich and J. Goldwasser. On hypercube statistics, Theorem 2 and §5.
- National Institute of Standards and Technology. Boolean function class representatives.
- M. Kovačević. Maximum Probability of Independence in Transitive Matroids, version 2, Theorem 5.1.