Non-Monotonicity of Optimal Identifying Code Size in Hypercubes (with Rigorous Certificates for r=2 and Explicit Counterexamples for r > n/2)
Non-Monotonicity of Optimal Identifying Code Size in Hypercubes
(with Rigorous Certificates for and Explicit Counterexamples for )
Draft — February 22, 2026
Abstract
Identifying codes, introduced by Karpovsky–Chakrabarty–Levitin, are useful for fault localization in networks. In the binary Hamming space (hypercube) , let denote the minimum size of an -identifying code. A natural open question asks: for fixed radius , is monotonically non-decreasing in the dimension ? While monotonicity is known to hold for (Moncel), the case remained open. We provide two fully explicit counterexamples: (1) The classical counterexample: , where we construct a 6-element code and prove no 5-element code exists, forming a rigorous certificate; (2) A stronger result showing that even under the constraint , monotonicity can fail: while , hence . These phenomena demonstrate that optimal identifying code sizes can exhibit sudden drops at boundary regimes (e.g., ).
1. Introduction and Background
Let denote the -dimensional hypercube, with vertex set , where two vertices are adjacent if and only if they differ in exactly one coordinate. The hypercube is a classical model in parallel computing and network topology, making the structure and parameters of identifying codes on this graph a subject of sustained interest.
For any integer and vertex , define where denotes the Hamming distance. Given a code , define the -identifying set of vertex as
Definition 1 (-identifying code). A set is called an -identifying code of if:
- (Covering) For all , ;
- (Separation) For all distinct , .
Let denote the minimum size of an -identifying code of .
The optimization of identifying codes is generally NP-hard (e.g., Charon–Hudry–Lobstein established NP-hardness for general graphs). On hypercubes, a natural question is monotonicity: for fixed , is monotonically non-decreasing in ? Moncel proved monotonicity for , but for the conclusion does not hold. Below we provide two fully explicit, directly verifiable counterexamples with rigorous proofs.
2. Preliminary Lemmas
2.1 Complementary Ball Identity
For , let denote the bitwise complement. Since for any we have , we obtain the following identity.
Lemma 2 (Complementary Ball Identity). For any and any , 2^n \setminus B_r(x) = B{n-r-1}(\bar{x}).
In particular, when : ; when : .
Proof. .
2.2 Exact Value for Radius
Lemma 3. For any ,
Proof. For any , we have . If the identifying code has complement 2^n \setminus C containing at least two distinct points , let , then {n-1}(u) = (\mathbb{F}2^n \setminus {a}) \cap C = C, {n-1}(v) = (\mathbb{F}_2^n \setminus {b}) \cap C = C, so and cannot be separated—a contradiction. Hence , i.e., . On the other hand, taking easily satisfies both covering and separation.
3. The Computer-Assisted Counterexample:
This section presents the well-known non-monotonicity phenomenon. Such counterexamples are often first discovered via computer search; here we provide a hand-verifiable rigorous certificate: we construct a 2-identifying code of size 6 on and prove that no 2-identifying code of size 5 exists.
3.1 Dimension :
Corollary 4. .
Proof. In , , so by Lemma 3, .
3.2 Dimension : Constructing a 6-Element 2-Identifying Code
Let
Proposition 5. The set above is a 2-identifying code of ; hence .
Proof. Direct computation of shows that all 16 identifying vectors are non-empty and pairwise distinct. For ease of verification, Table 1 provides the identifying matrix (rows correspond to vertices , columns to codewords ). Since every row is non-zero and all rows are distinct, covering and separation hold.
Table 1: 2-identifying matrix for in .
| 0000 | 0001 | 0010 | 0101 | 1010 | 1100 | |
|---|---|---|---|---|---|---|
| 0000 | 1 | 1 | 1 | 1 | 1 | 1 |
| 0001 | 1 | 1 | 1 | 1 | 0 | 0 |
| 0010 | 1 | 1 | 1 | 0 | 1 | 0 |
| 0011 | 1 | 1 | 1 | 1 | 1 | 0 |
| 0100 | 1 | 1 | 1 | 1 | 0 | 1 |
| 0101 | 1 | 1 | 0 | 1 | 0 | 1 |
| 0110 | 1 | 0 | 1 | 1 | 1 | 1 |
| 0111 | 0 | 1 | 1 | 1 | 0 | 0 |
| 1000 | 1 | 1 | 1 | 0 | 1 | 1 |
| 1001 | 1 | 1 | 0 | 1 | 1 | 1 |
| 1010 | 1 | 0 | 1 | 0 | 1 | 1 |
| 1011 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1100 | 1 | 0 | 0 | 1 | 1 | 1 |
| 1101 | 0 | 1 | 0 | 1 | 0 | 1 |
| 1110 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1111 | 0 | 0 | 0 | 1 | 1 | 1 |
3.3 Optimality: No 5-Element 2-Identifying Code Exists
Proposition 6. No 2-identifying code of size 5 exists in ; hence .
Proof. Suppose for contradiction that a 2-identifying code with exists. By Lemma 2 (with ),
Define
Then the injectivity of is equivalent to the injectivity of (since complementation and bitwise negation are both bijections). Therefore must consist of 16 pairwise distinct subsets of .
Note that and . If some satisfies , then , violating covering. Hence for all , i.e.,
On the other hand, the number of subsets of with size is
so to obtain 16 pairwise distinct values of , we must have exactly all subsets of size 0, 1, and 2, with no of size .
In particular, for any two distinct codewords , there must exist a unique vertex such that
This means that for each pair of distinct codewords , the radius-1 ball intersection must contain exactly one vertex .
However, in , for any two distinct vertices :
- If , then (namely and themselves);
- If , then (their two "midpoints");
- If , then .
In every case, —it can never equal 1. Contradiction.
Therefore no 2-identifying code exists, and .
Combining Propositions 5 and 6 immediately gives . Together with Corollary 4, we obtain the main result of this section.
Corollary 7. hence monotonicity of in fails when .
4. Non-Monotonicity Persists for : and
This section addresses the stronger (seemingly more "reasonable") conjecture:
If , then is monotonically non-decreasing (or increasing) in .
We prove this conjecture also fails, providing a fully explicit counterexample.
Theorem 8 (Explicit counterexample: even can decrease). Let . Then hence . Note that and , so the counterexample occurs in the regime .
Proof.
Part 1: In , , so by Lemma 3, .
Part 2: We construct a 3-identifying code of size 10 on . Let denote the unit vector with a 1 in position and 0 elsewhere, and let . Define
That is, consists of all vertices of weight 1 and all vertices of weight 4, giving .
By Lemma 2 (with ),
Again define . Since , we must have , so and covering holds.
To prove separation, it suffices to show is injective. For any , we classify by weight:
- If ():
- If ():
- If with :
- If with :
- If with 1-positions :
- If with 0-positions :
The size and element structure of these sets uniquely determine , hence is injective, and therefore is injective. Thus is a 3-identifying code and . Combined with Part 1, we obtain .
5. Discussion: Why Does the "Sudden Drop" Occur?
Theorem 8 shows that even when , the optimal identifying code size can decrease as increases. The mechanism can be explained by a boundary phenomenon: when , the radius equals , and the ball almost covers the entire space. By Lemma 3, the optimal identifying code is then forced to be close to the full vertex set (size ). However, once the dimension increases to , the same radius becomes , causing a significant change in local structure. This allows constructions of much smaller size, producing sudden drops like "."
References
[1] J. Moncel, "Monotonicity of the minimum cardinality of an identifying code in the hypercube," Discrete Applied Mathematics 154 (2006), 898–899.
[2] I. Charon, O. Hudry, A. Lobstein, "Minimizing the size of an identifying or locating-dominating code in a graph is NP-hard," Theoretical Computer Science 290 (2003), 2109–2120.
[3] S. Janson, T. Laihonen, "On the size of identifying codes in binary hypercubes," Journal of Combinatorial Theory, Series A 116 (2009), 1087–1096.
[4] O. Hudry, V. Junnila, A. Lobstein, "Iiro Honkala's contributions to identifying codes," arXiv:2402.08264.
Discussion (0)
to join the discussion.
No comments yet. Be the first to discuss this paper.


