In this paper, we present improved decoding algorithms for expander-based Tanner codes.
We begin by developing a randomized linear-time decoding algorithm that, under the condition that \(\delta d_0 > 2\), corrects up to \(\alpha n\) errors for a Tanner code \(T(G, C_0)\), where \(G\) is a \((c, d, \alpha, \delta)\)-bipartite expander with \(n\) left vertices, and \(C_0 \subseteq \mathbb{F}_2^d\) is a linear inner code with minimum distance \(d_0\). This result improves upon the previous work of Shen, Shangguan, Ouyang and Cheng (IEEE TIT 2025), which required \(\delta d_0 > 3\).
We further derandomize the algorithm to obtain a deterministic linear-time decoding algorithm with the same decoding radius. Our algorithm improves upon the previous deterministic algorithm of Cheng et al.by achieving a decoding radius of \(\alpha n\), compared with the previous radius of \(\frac{2\alpha}{d_0(1 + 0.5c\delta) }n\).
Additionally, we investigate the size-expansion trade-off introduced by the recent work of Chen, Cheng, Li, and Ouyang (IEEE TIT 2023), and use it to provide new bounds on the minimum distance of Tanner codes. Specifically, we prove that the minimum distance of a Tanner code \(T(G,C_0)\) is approximately \(f_\delta^{-1} \left( \frac{1}{d_0} \right) \alpha n\), where \(f_\delta(\cdot)\) is the Size-Expansion Function. As another application, we improve the decoding radius of our decoding algorithms from \(\alpha n\) to approximately \(f_\delta^{-1}\left(\frac{2}{d_0}\right)\alpha n\).
Finally, we extend Viderman’s find-erasures-and-decode framework (ACM TOCT 2013) to general linear inner codes, obtaining a deterministic linear-time decoder for \(\delta d_{0}>1.8\) when \(d_0=3\), thus pushing below the \(\delta d_0 > 2\) threshold of our general result.
Low-density parity-check (LDPC) codes are an important class of error-correcting codes known for their near-optimal error-correction performance and low decoding complexity. They are characterized by sparse parity-check matrices, where most entries are zero, which makes them efficient in both encoding and decoding. LDPC codes were first introduced by Gallager [2] in the 1960s but gained renewed attention due to their suitability for modern communication systems, including wireless and satellite communications, as well as for storage applications.
A key feature of LDPC codes is their representation as a bipartite graph, with bits on the left side and parity checks on the right. This leads to a parity-check graph with a constant degree, where the sparsity of the graph enables the development of efficient decoding algorithms. In particular, the belief-propagation algorithm, introduced by Gallager [2], was later proven by Zyablov and Pinsker [3] to correct a constant fraction of errors on random LDPC codes.
Later, Tanner [4] extended LDPC codes by developing a recursive approach to construct long error-correcting codes from shorter inner codes. Tanner codes are constructed by assigning a linear inner code \(C_0\) of length \(d\) and minimum distance \(d_0\) to the vertices of a sparse bipartite graph. Specifically, bits are placed on the left side of the bipartite graph, and each vertex on the right side is assigned an inner code that imposes constraints on the connected bits. Note that when the inner code is a parity-check code, the Tanner code simplifies to an LDPC code. This construction offers greater flexibility in code design, enabling codes with both large minimum distances and efficient decoding properties.
To analyze the decoding algorithms of LDPC and Tanner codes, Sipser and Spielman [5] introduced the concept of vertex expansion. Expander codes are a special class of Tanner codes constructed from \((c,d,\alpha,\delta)\)-bipartite expanders, where \(c\), \(d\), \(\alpha\), and \(\delta\) are constants. Specifically, the graph \(G = (L \cup R, E)\) is left-regular of degree \(c\) and right-regular of degree \(d\), and for any set \(S \subseteq L\) with \(|S| \leq \alpha n\), the size of the neighborhood of \(S\) is at least \(\delta c |S|\). Expander codes are known for their efficient decoding algorithms, which can correct \(\Omega(n)\) errors in linear time. Research on expander codes in coding theory and theoretical computer science [5]–[12] has focused on optimizing the decoding radius and other parameters while keeping the decoding algorithm linear-time.
Consider the special case where the inner code is a parity-check code. In this case, the flip algorithm introduced by Sipser and Spielman [5] can decode up to \((2\delta-1)\alpha n\) errors in linear time for any expander code with \(\delta > \frac{3}{4}\). Later, Viderman [10] proposed a new decoding method, which corrects up to \(\frac{3\delta - 2}{2\delta - 1}\alpha n\) errors in linear time when \(\delta \geq \frac{2}{3}\).
More recently, Chen, Cheng, Li, and Ouyang [12] presented an improved decoding algorithm by combining previous approaches and introducing a method they term “expansion guessing.” They also discovered a size-expansion trade-off, which enables expansion of larger sets to be inferred from smaller sets. Their work showed that expander codes achieve a minimum distance of \(\frac{1}{2(1-\delta)} \alpha n\), and their decoding algorithm achieves a decoding radius of \(\frac{3}{16(1-\delta)} \alpha n\), which is nearly half of the code’s distance. However, their algorithm still requires \(\delta > \frac{3}{4}\) to use the flip algorithm. This raises an open question: What is the minimum \(\delta\) required to decode a linear number of errors in linear time? It was shown in [10] that \(\delta > \frac{1}{2}\) is necessary.
The above studies focus on the special case of expander codes where the inner code \(C_0\) is a parity-check code with minimum distance \(d_0 = 2\). Progress has also been made on the general case [13]–[15]. Notably, Dowling and Gao [14] proved that the condition \(d_0 \delta^2=\Omega(c)\) is sufficient for error correction using a flip-based decoding algorithm. More recently, Shen, Shangguan, Ouyang and Cheng [15] improved this result by showing that \(\delta d_0 > 3\) is sufficient for error correction. They also proved that \(\delta d_0 > 1\) is necessary, thereby generalizing an earlier result of Viderman [10] for expander codes with parity-check inner codes.
However, many questions remain open about the optimal parameters. In particular, there is still a gap between the sufficient and necessary conditions for \(\delta d_0\) to enable a linear-time decoding. In this paper, we narrow this gap by proving that \(\delta d_0 > 2\) is sufficient for expander-based Tanner codes.
Let \(T(G, C_0)\) be a Tanner code based on a bipartite expander \(G\) and an inner code \(C_0\) (see 2). Our first main result is a deterministic linear-time decoding algorithm for \(T(G, C_0)\).
Theorem 1 (Informal version of 8). Suppose \(\delta d_0 > 2\). There exists a deterministic \(O(n)\)-time algorithm that corrects up to \(\alpha n\) errors for any Tanner code \(T(G, C_0)\subseteq\mathbb{F}_2^n\), where \(G\) is a \((c, d, \alpha, \delta)\)-bipartite expander and \(C_0\) is an inner code with minimum distance \(d_0\).
Previously, under the condition \(\delta d_0 > 3\), Shen, Shangguan, Ouyang and Cheng [15] gave a randomized linear-time decoding algorithm for \(T(G,C_0)\) that corrects up to \(\alpha n\) errors, as well as a deterministic linear-time decoding algorithm with a slightly smaller decoding radius \(\frac{2\alpha}{d_0(1 + 0.5c\delta) }n\). 1 improves on their results by (1) relaxing the condition to \(\delta d_0 > 2\), and (2) derandomizing the randomized decoding algorithm without reducing the decoding radius \(\alpha n\).
To prove 1, we first establish a weaker result: Assuming \(\delta d_0 > 2\), there exists a randomized linear-time algorithm correcting \(\alpha n\) errors. This result is stated as 6, and its proof closely follows the approach in [15]. Then, in 4, we derandomize the algorithm while preserving the decoding radius.
We also investigate the size-expansion trade-off introduced by [12]. Specifically, we define the Size-Expansion Function \(f_\delta(k)\) (see 5), which satisfies the following property: For any \((c, d, \alpha, \delta)\)-bipartite expander, the graph remains an expander with parameters \((c, d, k\alpha, f_\delta(k))\), where \(k>1\) is a constant. Consequently, our decoding algorithm achieves a decoding radius of approximately \(f^{-1}_{\delta}\left(\frac{2}{d_0}\right) \alpha n\), which is strictly larger than \(\alpha n\).
Theorem 2 (Informal version of 10). 1 still holds with the decoding radius increased to approximately \(f^{-1}_{\delta}\left(\frac{2}{d_0}\right) \alpha n\).
Additionally, we establish the following tight bound on the minimum distance of \(T(G,C_0)\):
Theorem 3 (Informal version of 9 11). Suppose \(\delta d_0>1\). The minimum distance of the Tanner code \(T(G, C_0)\) is at least approximately \(f_\delta^{-1}\left(\frac{1}{d_0}\right) \alpha n\). Furthermore, this lower bound is tight in the sense that it is achieved by infinitely many examples.
The proof of 3 has two parts. First, we show that the minimum distance is bounded from below by \(f_\delta^{-1}\left(\frac{1}{d_0}\right) \alpha n\). Second, we present a construction showing that this bound is achievable when \(\alpha\) is sufficiently small but still constant. This construction builds on the approach in [12]. For details, see 5.
Recall that Viderman [10] gave a linear-time decoding algorithm for expander codes that corrects up to \(\frac{3\delta-2}{2\delta-1}\alpha n\) errors when \(\delta \ge \frac{2}{3}\). Our final result generalizes Viderman’s framework from expander codes to Tanner codes with arbitrary linear inner codes, yielding the following theorem.
Theorem 4 (Informal version of 13). Assume \(d_0\ge 2\) and \(\delta > \frac{d_0}{2d_0-1}\). Then there exists a deterministic \(O(n)\)-time decoding algorithm for \(T(G,C_0)\) that corrects up to \(\gamma\alpha n-O(1)\) errors, where \(\gamma = \frac{\delta(2d_0-1)-d_0}{\delta d_0-1} > 0\).
In particular, for \(d_0=3\), we obtain a decoder with \(\delta > 3/5\), equivalently \(\delta d_0 > 1.8\), improving upon the \(\delta d_0 > 2\) requirement of 1. The proof is presented in 8.
Let \(\mathbb{N}=\{0,1,2,\dots\}\) and \(\mathbb{N}^+=\{1,2,\dots\}\). For \(n\in\mathbb{N}\), denote by \([n]\) the set \(\{1,2,\dots,n\}\). The functions \(\log(\cdot)\) and \(\exp(\cdot)\) use base \(e\). The time complexity of algorithms is analyzed using the RAM model, in which random access of memory and arithmetic operations are assumed to take constant time. Graphs are represented using adjacency lists within the algorithms.
In this paper, all codes are assumed to be Boolean linear codes. That is, a code is defined as a subspace \(C \subseteq \mathbb{F}_2^n\) over the finite field \(\mathbb{F}_2\). The parameter \(n\) is called the length of \(C\).
The Hamming weight of a vector \(x \in \mathbb{F}_2^n\), denoted \(\mathrm{wt}(x)\), is defined as the number of nonzero coordinates in \(x\). The Hamming distance between two vectors \(x, y \in \mathbb{F}_2^n\) is defined as \(d_H(x, y) \coloneq \mathrm{wt}(x - y)\). The minimum distance of a code \(C\) is \(d_H(C)\coloneq\min\{d_H(x,y):x,y\in C, x\neq y\}\).
A bipartite graph \(G = (L \cup R, E)\) is called \((c,d)\)-regular if \(\deg(u) = c\) for all \(u \in L\) and \(\deg(v) = d\) for all \(v \in R\).
For any subset of vertices \(S \subseteq L \cup R\), let \(N(S)\) denote the set of all neighbors of \(S\). Define \(N_i(S)\) as the set of vertices adjacent to exactly \(i\) vertices in \(S\). Additionally, we use the following shorthand notations for convenience: \[N_{\geq i}(S) \mathrel{\vcenter{:}}= \bigcup_{j \geq i} N_j(S), \quad N_{\leq i}(S) \mathrel{\vcenter{:}}= \bigcup_{j \leq i} N_j(S).\]
We define \(E(S, T)\) as the set of edges connecting the two vertex sets \(S\) and \(T\).
Definition 1 (Bipartite expander). A \((c, d, \alpha, \delta)\)-bipartite expander is a \((c, d)\)-regular bipartite graph \(G = (L \cup R, E)\) such that for any subset of vertices \(S \subseteq L\) with \(|S| \leq \alpha |L|\), it holds that \(|N(S)| \geq \delta c |S|\).
For non-empty \(S\subseteq L\), we call \(\frac{N(S)}{c|S|}\) the expansion factor of \(S\). The above expansion property is equivalent to that the expansion factor of every non-empty \(S\subseteq L\) of size at most \(\alpha |L|\) is at least \(\delta\).
We now proceed to define Tanner codes, the central object studied in this paper.
Definition 2 (Tanner code). Let \(C_0\) be a code of length \(d\). Let \(G = (L \cup R, E)\) be a \((c, d, \alpha, \delta)\)-bipartite expander, where \(L = [n]\) for some positive integer \(n\). For each \(v \in R\), fix a total ordering on \(N(v)\), and let \(N(v, i)\) denote its \(i\)-th element for \(i \in [d]\). For \(x \in \mathbb{F}_2^n\) and \(v \in R\), define \[x_{N(v)} \mathrel{\vcenter{:}}= (x_{N(v, 1)}, \dots, x_{N(v, d)}) \in \mathbb{F}_2^d.\] In other words, if \(x\) is viewed as an assignment \(L \to \mathbb{F}_2\), then \(x_{N(v)}\) is its restriction to \(N(v)\).
The Tanner code \(T(G, C_0)\) is a code of length \(n\), defined as \[T(G, C_0) \mathrel{\vcenter{:}}= \{x \in \mathbb{F}_2^n : x_{N(v)} \in C_0 \text{ for all } v \in R\} \subseteq \mathbb{F}_2^n.\] In other words, a vector \(x\in\mathbb{F}_2^n\) is a codeword of \(T(G, C_0)\) if for every \(v \in R\), the “local view” \(x_{N(v)}\) is a codeword of \(C_0\).
Throughout this paper, we fix positive integers \(c,d\) and real numbers \(\alpha, \delta\in (0,1]\). The parameters \(c,d,\alpha,\delta\) are viewed as constants independent of the growing parameter \(n\). Also, let \(G = (L \cup R, E)\) be a \((c, d, \alpha, \delta)\)-bipartite expander with \(L = [n]\), and let \(C_0\) be a code of length \(d\) with minimum distance \(d_0\). All lemmas and theorems are stated under the assumption that \(G\) and \(C_0\) are given, without explicitly mentioning this.
For convenience, we introduce the following definition.
Definition 3 (Corrupt bits and unsatisfied checks). For \(x,y \in \mathbb{F}_2^n\), define \(F(x,y)=\{i\in [n]: x_i\neq y_i\}\). Define \(F(x)=F(x,y)\), where \(y\) is the closest codeword to \(x\) in \(T(G, C_0)\) with respect to the Hamming distance. (If there are multiple closest codewords, \(y\) is chosen to be the lexicographically smallest one.) Let \(U(x) \subseteq R\) denote the set of unsatisfied checks, defined as \(U(x) = \{v \in R : x_{N(v)} \not\in C_{0}\}\).
We use standard tools from probability theory, such as Hoeffding’s inequality and Azuma’s inequality, which are detailed in textbooks like [16].
Lemma 1 (Hoeffding’s inequality [16]). Let \(X_1, X_2, \dots, X_n\) be independent random variables. Let \(X = \sum_{i=1}^n X_i\). If \(X_i \in [\ell, r]\) for all \(i\), then for any \(a > 0\), \[\Pr[X \geq \mathop{\mathrm{\mathbb{E}}}[X] + a] \leq \exp{\left(-\frac{2a^2}{n(r-\ell)^2}\right)} \quad \text{and} \quad \Pr[X \leq \mathop{\mathrm{\mathbb{E}}}[X] - a] \leq \exp{\left(-\frac{2a^2}{n(r-\ell)^2}\right)}.\]
Recall that a sequence of random variables \(X_0,X_1,\dots,X_n\) is called a martingale if for \(i=0,1,\dots,n-1\), \[\mathop{\mathrm{\mathbb{E}}}[X_{i+1}|X_0,X_1,\dots,X_{i}]=X_i.\] Azuma’s inequality provides a concentration bound for martingales.
Lemma 2 (Azuma’s inequality [16]). Let \(X_0, X_1, \dots, X_n\) be a martingale such that \(|X_k - X_{k-1}| \leq c_k\) for all \(k\). Then, for any \(t \geq 1\) and \(\lambda > 0\), \[\Pr(|X_t - X_0| \geq \lambda) \leq 2\exp{\left(-\frac{\lambda^2}{2\sum_{k=1}^t c_k^2}\right)}.\]
We present some useful auxiliary lemmas.
Lemma 3. For any \(S\subseteq L\) with \(|S|\le \alpha n\) and integer \(t\geq 0\), it holds that \[|N_{\le t}(S)|\ge \frac{\delta(t+1)-1}{t}\cdot c|S|.\]
Proof. The claim follows from a double-counting argument. Since \(G\) is left-regular of degree \(c\), we have \(c|S| =|E(S,N(S))|\). On the other hand, \[\begin{align} |E(S,N(S))| & =\sum_{i=1}^{d} i|N_i(S)| \\ & \ge |N_{\le t}(S)|+(t+1) (|N(S)|-|N_{\le t}(S)|) \\ & =(t+1)|N(S)|-t|N_{\le t}(S)| \\ & \geq (t+1)\delta c|S|-t|N_{\le t}(S)|, \end{align}\] where the last inequality follows from the expansion property of \(G\).
Therefore, we have \(c|S|\geq (t+1)\delta c|S|-t|N_{\le t}(S)|\). Rearranging this establishes the lemma. ◻
Lemma 4. Let \(x\in \mathbb{F}_2^n\) and \(y\in T(G,C_0)\) such that \(d_H(x,y)\leq \alpha n\). Let \(F=F(x,y)\). Then \[c|F|\ge |U(x)|\ge |N_{\leq d_0-1}(F)|\ge \frac{\delta d_0 -1}{d_0-1}\cdot c|F|.\]
Proof. Since \(G\) is left-regular of degree \(c\), the number of edges incident to \(F \subseteq L\) is \(c|F|\). Each vertex in \(U(x) \subseteq R\) is incident to at least one of these edges. Therefore, \(|U(x)| \leq c|F|\).
Since the minimum distance of \(C_{0}\) is \(d_{0}\), every \(v \in R\) that is a common neighbor of no more than \(d_0 - 1\) vertices in \(F\) must be an unsatisfied check, i.e., \(N_{\leq d_0-1}(F) \subseteq U(x)\). It follows that \(|N_{\leq d_0-1}(F)| \leq |U(x)|\).
Finally, applying 3 with \(t = d_0 - 1\) and \(S = F\) gives the inequality \[|N_{\leq d_0-1}(F)| \geq \frac{\delta d_0 - 1}{d_0 - 1} \cdot c|F|.\qedhere\] ◻
Lemma 5. For any \(S\subseteq L\), \[|N_{\ge t}(S)|\leq \frac{c}{t}|S|.\]
Proof. Since \(G\) is left-regular of degree \(c\), we have \(|E(S,N(S))|=c|S|\). Moreover, by the definition of \(N_{\geq t}(\cdot)\), we have \(|E(S,N(S))|\geq t |N_{\geq t}(S)|\). The lemma follows. ◻
Lemma 6. Let \(T(G, C_0)\) be a Tanner code where \(G\) is a \((c, d, \alpha, \delta)\)-bipartite expander and the inner code \(C_0\) has distance \(d_0\). If \(\delta d_0 >1\), then the distance of \(T(G, C_0)\) is greater than \(\alpha n\).
Proof. For any linear code, its distance is equal to the minimum Hamming weight among all of its codewords.
Assume, to the contrary, that \(T(G, C_0)\) has a nonzero codeword \(x\) such that \(\mathrm{wt}(x) \leq \alpha n\). Let \(F = \{i \in [n] : x_i \neq 0\}\), whose size is \(\mathrm{wt}(x)\). By 3, we have \[N_{\leq d_0 - 1}(F) \geq \frac{\delta d_0 - 1}{d_0 - 1} \cdot c |F| > 0.\] This implies that there exists \(u \in R\) that has fewer than \(d_0\) neighbors in \(F\). Consequently, \(\mathrm{wt}(x_{N(u)}) < d_0\).
As the minimum distance of \(C_0\) is \(d_0\), we have \(x_{N(u)} \notin C_0\), which contradicts the assumption that \(x \in T(G, C_0)\). Thus, the lemma is proven. ◻
In this section, we present an improved randomized flipping algorithm for the decoding regime \(\delta d_0 > 2\), and then extend it to a full randomized decoding algorithm.
Our flipping algorithm follows the approach of [15], which is based on the following idea: For each unsatisfied check \(v \in U(x)\), if \(x_{N(v)}\) is sufficiently close to a codeword \(c \in C_{0}\) of the inner code, it is likely that \(x_{N(v)}\) should be corrected to \(c\). We let each such check \(v\) cast a “vote” on which bits to flip. Then, each bit is flipped with a probability determined by the votes it receives. This process corrects a constant fraction of errors. By repeating it logarithmically many times, the received word can be corrected with high probability.
Our improvement is achieved by allowing each \(v\) to send a weighted vote based on \(d_H(x_{N(v)}, y)\), where \(y\in C_0\) is the closest codeword to \(x_{N(v)}\), rather than using an unweighted vote when \(d_H(x_{N(v)}, y) < d_0/3\), as was done in [15].4 This modification enables a tighter analysis.
In the following, let \(\mathsf{InnerDecode}(x)\) denote the function that, given \(x \in \mathbb{F}_2^d\), returns the codeword \(y \in C_0\) closest to \(x\) in Hamming distance, with ties broken by selecting the lexicographically smallest \(y\).
We now present the pseudocode of the randomized flipping algorithm.
We first check that the values \(p_i\) are within \([0,1]\), ensuring the validity of Line 11.
Lemma 7. For \(i \in [n]\), we have \(p_i \in [0, 1]\) at Line 11.
Proof. Each \(p_i\) is the sum of at most \(\deg(i)=c\) terms of the form \(\frac{t - d_H(w_v, x_{N(v)})}{ct}\), where each term lies between \(0\) and \(\frac{1}{c}\). The lemma follows. ◻
The following theorem states that the algorithm \(\mathsf{RandFlip}(x)\) is expected to correct at least a constant fraction of errors of \(x\) under certain conditions.
Theorem 5. Assume \(d_0 \delta>2\). Let \(\varepsilon_0=\frac{d_0}{2}-\frac{1}{\delta}>0\). Let \(x\in\mathbb{F}_2^n\) and \(y\in T(G,C_0)\) such that \(d_H(x,y)\le \alpha n\). Let \(x'\) be the output of 1 with \(x\) as input. Then \(\mathop{\mathrm{\mathbb{E}}}[d_H(x',y)|]\leq (1-\frac{\varepsilon_0\delta}{t}) d_H(x,y)\).
To prove 5, we need the following lemma. Recall that \(F(x,y)=\{i\in [n]: x_i\neq y_i\}\).
Lemma 8. Let \(x\in\mathbb{F}_2^n\), \(y\in T(G,C_0)\), and \(F=F(x,y)\). Let \(v\in N_k(F)\) for some integer \(k\). Let \(w_v\) be as in 1, i.e., \(w_v=\mathsf{InnerDecode}(x_{N(v)})\). If \(w_v= y_{N(v)}\), then \(d_H(w_v, x_{N(v)})=k\). On the other hand, if \(w_v\neq y_{N(v)}\), then \(d_0-k\leq d_H(w_v, x_{N(v)})\leq k\). The latter case occurs only if \(k\geq \frac{d_0}{2}=t\), i.e., \(v\in N_{\geq t}(F)\).
Proof. By the definition of \(F\) and the choice of \(v\), we have \(d_H(y_{N(v)}, x_{N(v)})=k\). As \(y\in T(G, C_0)\), we have \(y_{N(v)}\in C_0\). As \(w_v\) is a vector in \(C_0\) closest to \(x_{N(v)}\), we have \[d_H(w_v, x_{N(v)})\leq d_H(y_{N(v)}, x_{N(v)})=k.\] If \(w_v=y_{N(v)}\), we have \(d_H(w_v, x_{N(v)})=d_H(x_{N(v)}, y_{N(v)})=k\). On the other hand, if \(w_v\neq y_{N(v)}\), then the distance between these two codewords of \(C_0\) is at least \(d_0\), which implies \(d_H(w_v, x_{N(v)})\geq d_H(w_v, y_{N(v)})-d_H(x_{N(v)}, y_{N(v)})\geq d_0-k\). This proves the lemma. ◻
Now we are ready to prove 5.
Proof of 5. Let \(F=\{i\in [n]:x_i\neq y_i\}\), whose size is \(d_H(x,y)\leq \alpha n\). By definition, we have \[\label{eq:dh} d_H(x',y) =|F|-|\{i\in F: x_i\text{ is flipped}\}|+|\{i\in [n]\setminus F: x_i \text{ is flipped}\}|.\tag{1}\]
By 1 and linearity of expectation, we have \[\label{eq:dh2} \mathop{\mathrm{\mathbb{E}}}[d_H(x',y)]=|F|-\left(\sum_{i\in F} p_i-\sum_{i\in [n]\setminus F} p_i\right).\tag{2}\]
Consider arbitrary \(v\in R\). In the iteration of the first for loop (Lines 3–9) corresponding to \(v\), some \(p_i\) may increase by \(\frac{t-d_H (w_v,x_{N(v)})}{ct}\). We analyze how this affects the quantity \(\sum_{i\in F} p_i-\sum_{i\in [n]\setminus F} p_i\). Suppose \(v\) has \(k\) neighbors in \(F\), i.e., \(v\in N_k(F)\).
\(k = 0\). In this case, \(d_H(w_v, x_{N(v)}) = 0\). Due to the condition \(1 \leq d_H(w_v, x_{N(v)}) < t\) at Line 5, the iteration corresponding to \(v\) does not affect \(\sum_{i \in F} p_i - \sum_{i \in [n] \setminus F} p_i\).
\(1 \leq k < t\). In this case, we have \(d_H(w_v, x_{N(v)}) = k \in [1, t)\) and \(w_v = y_{N(v)}\) by 8. In the iteration corresponding to \(v\), the index \(i\) chosen at Line 6 is in \(F\) since \(w_v = y_{N(v)}\). Thus, this iteration contributes exactly \[\frac{t - d_H(w_v, x_{N(v)})}{ct} = \frac{t - k}{ct}\] to \(\sum_{i \in F} p_i - \sum_{i \in [n] \setminus F} p_i\).
\(t \leq k< d_0\). In this case, we have \(d_H(w_v, x_{N(v)}) \geq d_0 - k = 2t - k\) by 8. Thus, the iteration corresponding to \(v\) contributes at least \[-\frac{t - d_H(w_v, x_{N(v)})}{ct} \geq -\frac{t - (2t - k)}{ct} = \frac{t - k}{ct}\] to \(\sum_{i \in F} p_i - \sum_{i \in [n] \setminus F} p_i\).
\(k \geq d_0\). In this case, we have \(d_H(w_v, x_{N(v)}) \geq 0\). Thus, the iteration corresponding to \(v\) contributes at least \[-\frac{t - d_H(w_v, x_{N(v)})}{ct} \geq -\frac{t}{ct} \geq \frac{t - k}{ct},\] to \(\sum_{i \in F} p_i - \sum_{i \in [n] \setminus F} p_i\), where the last inequality uses the fact that \(k \geq d_0 = 2t\).
By the above discussion, We have \[\label{eq:sumofpi} \sum_{i\in F} p_i-\sum_{i\in [n]\setminus F} p_i\geq \sum_{k=1}^{d}\frac{t-k}{ct}|N_k(F)|.\tag{3}\]
Next, we establish a lower bound on the RHS of 3 . By the definition of \(N_k(\cdot)\) and the fact that \(G\) is left-regular of degree \(c\), we have \[\label{eq:eq1} \sum_{k=1}^{d} k|N_k(F)|=|E(F,N(F))|=c|F|.\tag{4}\]
As \(|F|\leq \alpha n\) and \(G\) is a \((c,d,\alpha,\delta)\)-bipartite expander, we have \[\label{eq:eq2} \sum_{k=1}^{d} |N_k(F)|=|N(F)|\ge \delta c|F|.\tag{5}\]
Multiplying both sides of 5 by \(t = \frac{1}{\delta} + \varepsilon_0\) and subtracting both sides of 4 , we obtain \[\sum_{k=1}^{d}(t-k)|N_k(F)|\ge \varepsilon_0 \delta c |F|,\] or equivalently, \[\label{eq:eq3} \sum_{k=1}^{d}\frac{t-k}{ct}|N_k(F)|\ge \frac{\varepsilon_0 \delta}{t} |F|.\tag{6}\]
Combining 3 and 6 shows \[\label{eq:eq4} \sum_{i\in F} p_i-\sum_{i\in [n]\setminus F} p_i\geq \frac{\varepsilon_0 \delta}{t} |F|.\tag{7}\] And 2 and 7 together yield \(\mathop{\mathrm{\mathbb{E}}}[d_H(x',y)]\leq (1-\frac{\varepsilon_0\delta}{t})|F|=(1-\frac{\varepsilon_0\delta}{t}) d_H(x,y)\), as desired. ◻
While 1 is expected to reduce the number of corrupt bits by a constant factor, the number may increase depending on the chosen randomness. Nevertheless, the following lemma shows that any such increase will not be too large. This result will be used later.
Lemma 9. Let \(x\in\mathbb{F}_2^n\), \(y\in T(G,C_0)\), and \(F=\{i\in [n]: x_i\neq y_i\}\). The number of \(i\in [n]\setminus F\) such that \(p_i>0\) at the end of \(\mathsf{RandFlip}(x)\) is at most \(\frac{c}{t}|F|\). In particular, for \(x'=\mathsf{RandFlip}(x)\), we always have \(d_H(x',y)\leq (1+\frac{c}{t})d_H(x,y)\).
Proof. Consider \(v \in U(x)\) such that the corresponding iteration increases \(p_i\) from zero to nonzero for some \(i \in [n] \setminus F\). By the way \(i\) is chosen at Line 6, we know \(w_v\) and \(x_{N(v)}\) differ at this bit. As \(i \in [n] \setminus F\), we know \(x_{N(v)}\) and \(y_{N(v)}\) agree at this bit. So \(w_v \neq y_{N(v)}\). By 8, this occurs only if \(v \in N_{\geq t}(F)\). Finally, by 5, the number of \(v \in N_{\geq t}(F)\) is at most \(\frac{c}{t}|F|\). ◻
It is straightforward to implement 1 in \(O(n)\) time. However, since the main algorithm runs it \(O(\log n)\) times, this is not sufficient to achieve overall linear time. Instead, we adapt 1 to run in time proportional to the number of corrupt bits, following analyses similar to those in [5], [14], [15]. This adjustment ensures that the total runtime across all executions of 1 forms a geometric series that sums to \(O(n)\). The details are provided below for completeness.
In the following, let \(x\in \mathbb{F}_2^n\) and \(y\) be a code of \(T(G, C_0)\).
First, we design a data structure to store the set \(U(x)\) of unsatisfied checks, ensuring the following properties:
The elements in \(U(x)\) can be enumerated in \(O(|U(x)|)\) time.
Given \(v\in R\), we can determine whether \(v\in U(x)\) in constant time.
Each time a bit of \(x\) is flipped, \(U(x)\) is updated in constant time.
Specifically, we store the elements of \(U(x)\) via a linked list. Additionally, we maintain an array that records for each \(v\in R\):
Whether \(v\in U(x)\).
The pointer to \(v\) in the linked list.
The above information can be accessed in constant time for any given \(v\in R\). When flipping a bit \(i\in [n]\), we update \(U(x)\) in constant time by iterating over each \(v\in N(i)\), updating its status in the array, and adding or removing \(v\) from the linked list as needed.
Define \[P:=\{i \in [n]: p_i\neq 0\}.\] By similarly using an array and a linked list, we maintain the set \(P\) together with the flipping probabilities \(p_i\) such that:
The elements in \(P\) can be enumerated in \(O(|P|)\) time.
Given \(i\in [n]\), we can find \(p_i\) in constant time.
Each time some \(p_i\) changes, the set \(P\) is updated in constant time.
The array and the linked list used to maintain \(U(x)\) are treated as global variables. They are initialized in \(O(n)\) time at the start of the main algorithm, described in 3.3, and are maintained throughout the algorithm.
At the start of 1, we require \(p_i=0\) for all \(i\in [n]\) and \(P=\emptyset\). However, manually assigning these variables as in Line 3 of 1 would take \(\Theta(n)\) time. Instead, we treat the array and the linked list used to maintain \(p_i\) and \(P\) as global variables, which are initialized in \(O(n)\) time at the start of the main algorithm. Then, at the end of each execution of 1, we reset the array and the linked list to their initial states so that they can be reused in the next execution of 1. The resetting takes time linear in \(|P|\).
Beyond the previously described measures, we further modify 1 to enumerate only the unsatisfied checks and the bits with nonzero flipping probabilities.
Specifically, we replace \(v\in R\) at Line 3 of 1 with \(v\in U(x)\). To see that this change does not affect the flipping probabilities \(p_i\), observe that for \(v \in R \setminus U(x)\), \(x_{N(v)}\) is a codeword of \(C_0\). Consequently, \(w_v=\mathsf{Decode}(x_{N(v)})\) is simply \(x_{N(v)}\) itself, implying that \(d_H(w_v, (x_{N(v)})=0\). So \(p_i\) is unchanged in the iteration corresponding to \(v\).
Moreover, we modify \(i\in [n]\) at Line 11 of 1 to \(i\in P\), where \(P=\{i\in [n]: p_i\neq 0\}\).
With these adjustments, the first loop executes at most \(|U(x)|\leq c |F(x,y)|\) times, and the second loop at most \(|P|\leq |U(x)|\leq c|F(x,y)|\) times. The function \(\mathsf{Decode}(x_{N(v)})\) can be computed in constant time, e.g., by brute-force search. Thus, we have:
Lemma 10. 1 can be implemented to run in \(O(|F(x,y)|)\) time, where \(x\in\mathbb{F}_2^n\) is the input and \(y\) is any codeword of \(T(G,C_0)\).
We present the pseudocode of our randomized decoding algorithm:
Theorem 6. Assume \(d_0 \delta>2\) and let \(\varepsilon_0=\frac{d_0}{2}-\frac{1}{\delta}>0\). Let \(x\in\mathbb{F}_2^n\) and \(y\in T(G, C_0)\) such that \(d_H(x,y)\leq \alpha n\). Then given the input \(x\), 2 outputs \(y\) in \(O(n)\) time with probability \(1-o(1)\).
The \(o(1)\) term is with respect to the growing parameter \(n\). We also assume \(n\geq n_0\) for some large enough constant \(n_0\); otherwise, the unique decoding of \(T(G, C_0)\) can be solved in constant time, e.g., via brute-force search.
Proof of 6. Let \(t=\frac{d_0}{2}\), \(\varepsilon_1=\frac{\varepsilon_0 \delta}{t}\), and \(\varepsilon_2=\frac{c}{t}\). Let \(\beta\in (0,1)\) be a small enough constant depending only on \(\varepsilon_1\) and \(\varepsilon_2\). We consider two phases of the algorithm:
Suppose at some point during the algorithm, calling \(\mathsf{RandFlip}(x)\) changes \(F(x,y)\) from a set \(F\) to another set \(F'\), and \(|F|\geq n^\beta\).Then \[|F'|=|F|-\left(\sum_{i\in F} X_i-\sum_{i\in [n]\setminus F}X_i\right),\] where each \(X_i\) is the indicator random variable associated with the event that \(x_i\) is flipped in \(\mathsf{RandFlip}(x)\). Each \(X_i\) takes the value one with probability \(p_i\) (see 1) and zero with probability \(1-p_i\), and these random variables \(X_i\) are independent. Also note that by 9, the number of \(i\in [n]\) such that \(p_i\neq 0\) is at most \((1+\varepsilon_2) |F|\). Let \(\mu=\mathop{\mathrm{\mathbb{E}}}[\sum_{i\in F} X_i-\sum_{i\in [n]\setminus F}X_i]\). By 5, we have \(\mu\geq \varepsilon_1 |F|\). Choose \(k\coloneq\lceil\frac{\log(n^{1-\beta})}{-\log\left(1-\frac{\varepsilon_1}{2}\right)}\rceil\) so that \(n\cdot \left(1-\frac{\varepsilon_1}{2}\right)^k\leq n^\beta\). We have \[\begin{align} \Pr\left[|F'|\geq (1-\frac{\varepsilon_1}{2}) |F|\right]&\leq \Pr\left[\sum_{i\in F} X_i-\sum_{i\in [n]\setminus F}X_i\leq \mu-\frac{\varepsilon_1|F|}{2}\right]\\ &\leq \exp\left(-\frac{2\left(\frac{\varepsilon_1}{2}|F|\right)^2}{(1+\varepsilon_2) |F|}\right) &{(\text{Hoeffding's inequality})}\\ &\leq \exp\left(-\frac{\varepsilon_1^2}{2(1+\varepsilon_2)}n^\beta\right) &{(\text{since }|F|\geq n^\beta)}\\ &=o(1/k). \end{align}\]
Thus, with probability at least \(1-o(1/k)\), the size of \(F(x,y)\) decreases by at least a factor of \(1-\frac{\varepsilon_1}{2}\). By the union bound, with probability \(1-o(1)\), \(|F(x,y)|\) decreases by at least a factor of \(1-\frac{\varepsilon_1}{2}\) in each run of \(\mathsf{RandFlip}(x)\) until \(|F(x,y)|\leq n \cdot \left(1-\frac{\varepsilon_1}{2}\right)^k\leq n^\beta\). When this happens, the total time it takes is \(O\left(\sum_{i=0}^{k-1}\left(n\cdot \left(1-\frac{\varepsilon_1}{2}\right)^i\right)\right)=O(n)\) by 10.
Now assume \(|F(x,y)|\leq n^\beta\). Consider running \(\mathsf{RandFlip}(x)\) another \(\ell:=\lceil\frac{2\beta \log n}{-\log(1-\varepsilon_1)}\rceil\) times. By 9, the size of \(F(x,y)\) may increase by at most a factor of \(1+\varepsilon_2\) each time. Therefore, \(|F(x,y)|\) would not exceed \[\begin{align} n^\beta \cdot (1+\varepsilon_2)^\ell\le n^{0.5} <\alpha n, \end{align}\] where we use the fact that \(\beta\) is a small enough constant depending on \(\varepsilon_1\) and \(\varepsilon_2\). In particular, as \(|F(x,y)|\leq \alpha n\), 5 applies to each run of \(\mathsf{RandFlip}(x)\), which shows that the expectation of \(|F(x,y)|\) after running \(\mathsf{RandFlip}(x)\) \(\ell\) times is at most \[p\coloneq n^{\beta}\cdot (1-\varepsilon_1)^\ell\leq n^{-\beta}=o(1).\] As the algorithm outputs \(y\) whenever \(|F(x,y)|=0\), by Markov’s inequality, the probability that the algorithm does not output \(y\) after running \(\mathsf{RandFlip}(x)\) \(\ell\) times is \(o(1)\). And the running time of this phase is \(O(\ell n^{0.5})=o(n)\) by 10.
Combining the two phases shows that with probability \(1-o(1)\), 2 correctly outputs \(y\) in \(O(n)\) time. ◻
In this section, we begin by applying the same derandomization technique as in [15] to develop a deterministic algorithm that corrects \(\gamma n\) errors when \(\delta d_0 > 2\), where \(\gamma = \left(1+\frac{c}{t}\right)^{-1} \frac{\delta d_0 - 1}{d_0 - 1} \alpha\). Subsequently, we introduce an additional deterministic step before this algorithm, extending the decoding radius to \(\alpha n\).
The main idea in [15] is as follows: The vertices in \(L = [n]\) are divided into a constant number of buckets based on their flipping probability \(p_i\). It can be shown that at least one of these buckets contains a significantly higher proportion of corrupt bits than uncorrupt bits. By flipping the bits in this bucket, a small but constant fraction of the errors can be corrected.
However, the specific bucket containing the majority of corrupt bits is not known in advance. Therefore, we must recursively search through all possible choices until the number of errors is significantly reduced, as indicated by a substantial decrease in the size of \(U(x)\). We prune branches where \(|U(x)|\) does not decrease significantly. While this approach may appear to rely on brute force, careful analysis shows that the algorithm still runs in linear time.
The previous process requires the number of corrupt bits to be bounded by \(\gamma n\) initially to guarantee that this number remains below \(\alpha n\) during the search, allowing the expansion property to apply. Our key new idea is that, even if the initial number of corrupt bits exceeds \(\gamma n\) (but remains bounded by \(\alpha n\)), we can search through the first few steps to find a branch where the number of corrupt bits drops below \(\gamma n\). Although we cannot immediately verify which branch works, there is only a constant number of branches. So we can run the aforementioned decoding process on all these branches and check whether any of them produces a valid codeword.
We begin by modifying 1 to obtain the following deterministic flipping algorithm.
3 is derived from 1 with the following modifications: First, it takes an additional input \(q\in \mathbb{R}\) as a guess of the flipping probability. Second, instead of flipping each \(x_i\) with probability \(p_i\), it flips \(x_i\) when \(p_i\) equals \(q\). In particular, 3 is deterministic.
Define the finite set \[W \coloneq \left\{\frac{i}{cd_0}: i\in\mathbb{Z}, 0\leq i\leq cd_0\right\}.\] Note that each \(p_i\in [0,1]\) is an integral multiple of \(\frac{1}{2ct}=\frac{1}{cd_0}\) and, therefore, lies within \(W\).
The following lemma shows that there exists \(q\in W\) such that flipping all \(x_i\) with \(p_i=q\) corrects a constant fraction of errors.
Lemma 11. Assume \(d_0 \delta>2\) and let \(\varepsilon_0=\frac{d_0}{2}-\frac{1}{\delta}>0\). Let \(x\in\mathbb{F}_2^n\) and \(y\in T(G,C_0)\) such that \(d_H(x,y)\le \alpha n\). Let \(F=F(x,y)\). For \(q\in W\), let \(P_q\) be the set of \(i\in [n]\) such that \(p_i=q\) at the end of \(\mathsf{DeterFlip}(x,q)\). Then there exists \(q\in W\setminus\{0\}\) such that \(|P_q\cap F|-|P_q\setminus F|\ge \frac{\varepsilon_0 \delta }{2c t^2}|F|\).
Proof. Assume to the contrary that \(W\) does not contain any \(q\) satisfying the lemma. In other words, for every \(q\in W\setminus\{0\}\), it holds that \[\label{eq:lessthan} |P_q\cap F|-|P_q\setminus F|< \frac{\varepsilon_0 \delta }{2c t^2}|F|\tag{8}\] Then we have \[\begin{align} \sum_{i\in F} p_i - \sum_{i\in [n]\setminus F} p_i&=\sum_{q\in W}q\left(|P_q\cap F|-|P_q\setminus F|\right)\\ &\leq \sum_{q\in W\setminus\{0\}} \left(|P_q\cap F|-|P_q\setminus F|\right)\\ &< (|W|-1) \frac{\varepsilon_0 \delta }{2c t^2}|F|\\ &\leq \frac{\varepsilon_0 \delta }{t}|F| \end{align}\] where the last two inequalities hold by 8 and the fact that \(|W|-1=cd_0=2ct>0\). On the other hand, we know \(\sum_{i\in F} p_i-\sum_{i\in [n]\setminus F} p_i\geq \frac{\varepsilon_0 \delta}{t} |F|\) (see 7 in the proof of 5). This is a contradiction. ◻
As \(\mathsf{DeterFlip}(x,q)\) only flips the bits \(x_i\) with \(i\in P_q\), we immediately derive the following corollary:
Corollary 1. Under the notation and conditions in 11, there exists \(q\in W\setminus\{0\}\) such that \(\mathsf{DeterFlip}(x,q)\) corrects at least a \(\frac{\varepsilon_0 \delta}{2ct^2}\)-fraction of corrupt bits, i.e., \(|F(x',y)|\leq \left(1-\frac{\varepsilon_0 \delta}{2ct^2}\right) |F(x,y)|\), where \(x'\) is the output of \(\mathsf{DeterFlip}(x,q)\).
The proofs of 9 and 10 still hold and yield the following counterparts.
Lemma 12. Let \(x\in\mathbb{F}_2^n\) and \(y\in T(G,C_0)\). For all \(q\in W\setminus\{0\}\) and \(x'=\mathsf{DeterFlip}(x, q)\), it holds that \(d_H(x',y)\leq (1+\frac{c}{t})d_H(x,y)\), or equivalently, \(|F(x',y)|\leq (1+\frac{c}{t})|F(x,y)|\).
Lemma 13. For all \(q\in W\setminus\{0\}\), 3 can be implemented to run in \(O(|F(x,y)|)\) time, where \((x,q)\) is the input and \(y\) is any codeword of \(T(G,C_0)\).
In the following, we assume \(\delta d_0>2\) and let \(\varepsilon_0=\frac{d_0}{2}-\frac{1}{\delta}>0\).
The deterministic algorithm below is based on 3. 7 will show that it corrects a constant fraction of corrupt bits, though it is only guaranteed to work within a decoding radius somewhat smaller than \(\alpha n\).
Lemma 14. Let \(x\in\mathbb{F}_2^n\) and \(y\in T(G,C_0)\) such that \(d_H(x,y)\le \gamma n\), where \(\gamma= \left(1+\frac{c}{t}\right)^{-1} \frac{\delta d_0 - 1}{d_0 - 1} \alpha\). Suppose \(\mathsf{DeepFlip}(x)\) outputs some \(x'\in\mathbb{F}_2^n\). Then \(|F(x',y)|\leq \frac{d_0-1}{\delta d_0 -1} \gamma n\).
Proof. Suppose the output value \(x_{\min}\) is assigned \(x^{(s)}\) at Line 12 in the iteration corresponding to \((q_1,\dots,q_s)\in (W\setminus\{0\})^s\). We have \(x^{(0)}=x\), \(x^{(i)}=\mathsf{DeterFlip}(x^{(i-1)}, q_i)\) for \(i\in [s]\), and \(x_{\min}=x^{(s)}\).
As \(x^{(0)}=x\), we have \(|F(x^{(0)},y)|=|F(x,y)|\leq \gamma n\leq \frac{d_0-1}{\delta d_0 -1} \gamma n\). Now, consider \(i\in [s]\) and assume \(|F(x^{(i-1)},y)|\leq \frac{d_0-1}{\delta d_0 -1} \gamma n\). By 12, \[|F(x^{(i)},y)|\leq \left(1+\frac{c}{t}\right)|F(x^{(i-1)},y)|\leq \left(1+\frac{c}{t}\right)\frac{d_0-1}{\delta d_0 -1} \gamma n=\alpha n.\] By 4, we have \[\label{eq:u-and-f} |U(x^{(i)})|\ge \frac{\delta d_0 -1}{d_0 - 1} \cdot c |F(x^{(i)},y)|.\tag{9}\] If \(|F(x^{(i)},y)|>\frac{d_0-1}{\delta d_0 -1} \gamma n\), then by 9 , we would have \(|U(x^{(i)})|>c\gamma n\). In this case, the algorithm would exit the inner loop at Line 9 and modify \((q_1,\dots,q_s)\) to a different sequence, contradicting the choice of \((q_1,\dots,q_s)\). Therefore, \(|F(x^{(i)},y)|\leq \frac{d_0-1}{\delta d_0 -1} \gamma n\).
By induction, it follows that \(|F(x^{(i)},y)|\leq \frac{d_0-1}{\delta d_0 -1} \gamma n\) for \(i=0,1,\dots,s\). Choosing \(i=s\) proves the lemma. ◻
Theorem 7. Let \(x\in\mathbb{F}_2^n\) and \(y\in T(G,C_0)\) such that \(d_H(x,y)\le \gamma n\), where \(\gamma= \left(1+\frac{c}{t}\right)^{-1} \frac{\delta d_0 - 1}{d_0 - 1} \alpha\). Then \(\mathsf{DeepFlip}(x)\) outputs an element \(x'\in\mathbb{F}_2^n\) in \(O(|F(x,y)|)\) time such that \(|F(x',y)|\leq \frac{1}{2}|F(x,y)|\).
Proof. By 1, there exists \((q_1,\dots,q_s)\in (W\setminus\{0\})^{s}\) such that for \((x^{(0)},\dots,x^{(s)})\) defined by \(x^{(0)}=x\) and \(x^{(i)}=\mathsf{DeterFlip}(x^{(i-1)}, q_i)\), we have \(|F(x^{(i)},y)|\leq \left(1-\frac{\varepsilon_0 \delta}{2ct^2}\right)^i|F(x,y)|\) for \(i\in [s]\). By 4, we have \(|U(x^{(i)})|\leq c|F(x^{(i)},y)|\leq c|F(x,y)| \leq c\gamma n\) for \(i\in [s]\). Therefore, the iteration of the outer loop corresponding to \((q_1,\dots,q_s)\) passes the test at Line 8 for \(i\in [s]\) and reaches Line 12.
The element \(x'=x_{\min}\) is chosen to minimize the number of unsatisfied checks among all branches that reach Line 12. So we have \[\label{eq:boundU} |U(x')|\leq |U(x^{(s)})|\leq c|F(x^{(s)},y)|\leq c\left(1-\frac{\varepsilon_0 \delta}{2ct^2}\right)^s|F(x,y)|.\tag{10}\] By 14, we have \(|F(x',y)|\leq \frac{d_0-1}{\delta d_0 -1} \gamma n\leq \alpha n\). So 4 applies to \(x'\) and \(y\). Finally, \[|F(x',y)|\leq \frac{d_0-1}{\delta d_0-1} \cdot \frac{1}{c}\cdot |U(x')|\leq \frac{d_0-1}{\delta d_0-1} \left(1-\frac{\varepsilon_0 \delta}{2ct^2}\right)^s |F(x,y)|\leq \frac{1}{2}|F(x,y)|\] where the first inequality holds by 4, the second one holds by 10 , and the last one holds by the choices of \(s\).
Next, we bound the time complexity. Since \(|W\setminus\{0\}|=c d_0=O(1)\) and \(s=O(1)\), by 12 and 13, the running time is bounded by: \[O\left((cd_0)^s\cdot s\left(1+\frac{c}{d_0/2}\right)^s|F(x,y)|\right)=O(|F(x,y)|).\qedhere\] ◻
We now present the deterministic decoding algorithm. The idea is to enumerate all sequences \((q_1,\dots, q_r)\in(W\setminus\{0\})^r\) of length \(r=O(1)\). For each sequence, we iteratively apply \(x\gets \mathsf{DeterFlip}(x, q_i)\), \(i=1,\dots,r\), aiming to reduce the number of corrupt bits.
There is guaranteed to be at least one sequence \((q_1,\dots,q_r)\) that reduces the number of corrupt bits to below \(\gamma n\). While we do not know which sequence achieves this, we can enumerate all possible sequences, run \(\mathsf{DeepFlip}\) repeatedly for each, and verify the final result.
In the following, let \(t=d_0/2\), \(\gamma= \left(1+\frac{c}{t}\right)^{-1} \frac{\delta d_0 - 1}{d_0 - 1} \alpha\), \(\varepsilon_0=\frac{d_0}{2}-\frac{1}{\delta}\), and \(\varepsilon=\frac{\varepsilon_0 \delta}{2ct^2}\).
Theorem 8. Assume \(\delta d_0>2\). Then 5 can be implemented to correct up to \(\alpha n\) errors in \(O(n)\) time for the code \(T(G, C_0)\).
Proof. We first prove the correctness of 5. Let \(x\in\mathbb{F}_2^n\) and \(y\in T(G, C_0)\) such that \(d_H(x,y)\leq \alpha n\).
By 1, there exists a sequence \((q_1,\dots q_r) \in (W\setminus\{0\})^r\) such that after completing the first inner loop (Lines 5–7) with respect to this sequence, we have \(|F(\hat{x}, y)|\leq \gamma n\). Fix this sequence \((q_1,\dots q_r)\) and consider the corresponding iteration of the outer loop (assuming it is executed). By 7, \(|F(\hat{x},y)|\) is reduced by at least half each time we apply \(\hat{x}\gets \mathsf{DeepFlip}(\hat{x})\) (Line 9). By 4, for \(i\in [r']\), we have \(|U(\hat{x})|\leq c|F(\hat{x},y)|\leq c 2^{-i} \gamma n\) at Line 10 in the \(i\)-th iteration of the second inner loop (Lines 8–13), which guarantees that the algorithm does not exit this inner loop at line 12. Finally, after completing the second inner loop, \(|F(\hat{x}, y)|\) will be reduced to at most \(2^{-r'} \gamma n<1\), which implies that \(F(\hat{x}, y)=0\) and hence \(\hat{x}=y\). So \(y\) is output at Line 15.
This is assuming that the iteration corresponding to \((q_1,\dots q_r)\) is executed. However, the algorithm may terminate at Line 15 earlier and output some \(\hat{x}\in \mathbb{F}_2^n\) satisfying \(|U(\hat{x})|=0\) and \(d_H(x, \hat{x}) \leq \alpha n\). The former condition means \(\hat{x}\in T(G, C_0)\). In this case, the output is still \(\hat{x}=y\) since \(\alpha n\) is less than half of the minimum distance of \(T(G,C_0)\) [14]. This proves the correctness of 5.
Next, we bound the time complexity. Note that \(r,r',|W\setminus\{0\}|=O(1)\). By 13, the first inner loop runs in \(O(n)\) time. The condition on \(|U(\hat{x})|\) at Line 10 ensures that at the end of the \(i\)-th iteration of the second inner loop, we have \(|U(\hat{x})|\leq c 2^{-i} \gamma n\) and, consequently, \(|F(\hat{x},y)|\leq d|U(\hat{x})|\leq dc 2^{-i} \gamma n\). By 7, the second inner loop also runs in \(O(n+\sum_{i=1}^{r'} dc 2^{-i} \gamma n)=O(n)\) time. It follows that 5 runs in \(O(n)\) time. ◻
In this subsection, we briefly review the size-expansion trade-off introduced in [12], which will be used later in this section. We also compare these results with related work and establish relevant notation.
Recall that a \((c,d,\alpha,\delta)\)-bipartite expander \(G=(L\cup R, E)\) satisfies the condition that for any \(S \subseteq L\) with \(|S| \leq \alpha n\), we have \(|N(S)| \geq \delta c |S|\). This raises a natural question: Given this condition, can we infer a positive expansion factor \(\delta'\) for a larger set \(S \subseteq L\) of size \(k\alpha n\) with \(k>1\)?
To begin, we establish a trivial lower bound, \(\delta' \geq \frac{\delta}{k}\), which was also used in the proof of [14]. Consider \(S\subseteq L\) of size \(k \alpha n\), and let \(S' \subseteq S\) be an arbitrary subset of size \(\alpha n\). Since every neighbor of \(S'\) is also a neighbor of \(S\), it follows that \(|N(S)| \geq |N(S')| \geq \delta c |S'| = \delta c \alpha n = \frac{\delta}{k} c |S|\). Thus, choosing \(\delta' = \frac{\delta}{k}\) provides a valid lower bound on the expansion factor of \(S\). A tighter bound was established in [12] using an expectation argument. The main idea is to choose \(S'\) uniformly at random among all subsets of \(S\) of size \(\alpha n\). Suppose, for the sake of contradiction, that \(|N(S)|\) is too small. This would result in an upper bound on \(\mathbb{E}[|N(S')|]\) that is too strong, contradicting the fact that every subset \(S'\) of size \(\alpha n\) must have an expansion factor of at least \(\delta\).
We now formalize this argument. Assume \(n\) is large enough such that \(d\leq k\alpha n-\alpha n\). Consider \(i\in \{0,1\dots,d\}\) and let \(\beta_i \mathrel{\vcenter{:}}= \frac{|N_i(S)|}{c\alpha n }\) (i.e., \(|N_i(S)| = \beta_i c\alpha n\)). For each \(v \in N_i(S)\), we calculate the probability of \(v\) being a neighbor of \(S'\): \[\Pr[v \in N(S')] = 1 - \Pr[S' \cap N(v) = \emptyset]=1-\frac{\binom{k\alpha n -i}{\alpha n}}{\binom{k\alpha n}{\alpha n}} = 1 - \left(1 - \frac{1}{k}\right)^i + O\left(\frac{1}{n}\right),\] where the last equality holds by 18.
Therefore, the expected number of neighbors of \(S'\) satisfies: \[\mathop{\mathrm{\mathbb{E}}}[|N(S')|] =\sum_{i=1}^d \sum_{v \in N_i(S)}\Pr[v \in N(S')] =O\left(\frac{1}{n}\right)+\sum_{i=1}^{d} \left(1 - \left(1 - \frac{1}{k}\right)^i\right) \cdot \beta_i c\alpha n.\] On the other hand, we have \(\mathop{\mathrm{\mathbb{E}}}[|N(S')|] \geq \delta\alpha n\) by the expansion property. So the parameters \(\beta_i\) must satisfy the following constraint: \[\label{eq:LP95constr1} O\left(\frac{1}{n}\right)+\sum_{i=1}^{d} \left(1 - \left(1 - \frac{1}{k}\right)^i\right) \cdot \beta_i c\alpha n\ge \delta\alpha n.\tag{11}\]
Another constraint can be derived by double counting the number of edges in \(E(S,N(S))\): \[\begin{align} c\cdot k\alpha n=|E(S,N(S))|=\sum_{i=1}^d \beta_i c\alpha n\cdot i \label{eq:LP95constr2} \end{align}\tag{12}\]
Also, by definition, the number of neighbors of \(S\) is: \[|N(S)|=\sum_{i=1}^d |N_i(S)|=c\alpha n \cdot \sum_{i=1}^d\beta_i \label{eq:LP95targ}\tag{13}\]
Thus, subject to the constraints 11 and 12 in the variables \(\beta_i\), the minimum of \(c\alpha n \cdot \sum_{i=1}^d\beta_i\) is a lower bound on \(|N(S)|\). Consequently, subject to the constraints 11 and 12 , the minimum of \(\frac{1}{k} \sum_{i=1}^d\beta_i\) is a lower bound on the expansion factor \(\frac{|N(S)|}{c|S|}=\frac{|N(S)|}{ck\alpha n}\) of \(S\).
This can be formalized as a linear program (LP), as shown in [12].
Definition 4 (Degree-Dependent Size-Expansion Function [12]). For \(k>1\), define \(f_{d,\delta}(k)\) as the optimal value of the following LP: \[\begin{align} \text{minimize} \quad & \frac{1}{k} \sum_{i=1}^{d} \beta_i \\ \text{subject to} \quad & \sum_{i=1}^{d} i \cdot \beta_i = k, \\ & \sum_{i=1}^{d} \left(1 - \left(1 - \frac{1}{k}\right)^i\right) \cdot \beta_i \ge \delta, \\ & \beta_i \ge 0, \quad \forall i\in [d]. \end{align}\] We call \(f_{d,\delta}\) the Degree-Dependent Size-Expansion Function.
Note that the \(O\left( \frac{1}{n} \right)\) term in the constraint 11 is omitted in this definition. However, we will see in [lem:size95expansion95prop] below that this omission has a negligible effect on the LP value.
To simplify our discussion, we focus on the following LP, where the summation range is extended from \([1, d]\) to \([1, +\infty)\).
Definition 5 (Size-Expansion Function). For \(k>1\), define \(f_{\delta}(k)\) as the optimal value of the following LP. \[\begin{align} \text{minimize} \quad & \frac{1}{k} \sum_{i=1}^{\infty} \beta_i \\ \text{subject to} \quad & \sum_{i=1}^{\infty} i \cdot \beta_i = k, \\ & \sum_{i=1}^{\infty} \left(1 - \left(1 - \frac{1}{k}\right)^i\right) \cdot \beta_i \ge \delta, \\ & \beta_i \ge 0, \quad \forall i\in \mathbb{N}^+. \end{align}\] We call \(f_\delta\) the Size-Expansion Function.
This modification represents a slight relaxation: The value of the new LP is less than or equal to the original, i.e., \(f_{\delta}(k)\leq f_{d, \delta}(k)\), resulting in a formally weaker bound on the expansion factor. This is because any feasible solution to the original LP (with \(\beta_i = 0\) for all \(i > d\)) remains feasible for the new LP, preserving the same objective function value.
Nevertheless, [lem:size95expansion95prop] below states that \(f_{d,\delta}(k) = \max \left\{ f_{\delta}(k), \frac{1}{d} \right\}\). In particular, the two are equal when \(f_{\delta}(k)\geq 1/d\). For this reason, we focus on the simpler function \(f_{\delta}\), which does not depend on the parameter \(d\).
lemmaLPprops The functions \(f_\delta\) and \(f_{d,\delta}\) satisfy the following properties:
\(f_{\delta}\) and \(f_{d,\delta}\) are non-increasing.
\(f_{d,\delta}(k) = \max \left\{ f_{\delta}(k), \frac{1}{d} \right\}\).
\(f_{\delta}(k)\ge\frac{\delta}{k}\).
Omitting the \(O\left(\frac{1}{n}\right)\) term in the constraint 11 increases the value of \(f_{d,\delta}(k)\) by at most \(O\left(\frac{1}{n}\right)\).
\(f_\delta(k)\) is continuous with \(\lim_{k\to1}f_{\delta}(k)=\delta\) and \(\lim_{k\to\infty}f_{\delta}(k)=0\).
[lem:size95expansion95prop] is proved in 7.3. The proof also provides explicit descriptions of the functions \(f_\delta(k)\) and \(f_{d,\delta}(k)\) as piecewise rational functions; see 23 and 24 .
Note that \(f_\delta\) and \(f_{d,\delta}\) are non-increasing by [lem:size95expansion95prop]. In particular, \(f_{\delta}(k)\) is not only a lower bound for the expansion factor of sets of size \(k\alpha n\), but also for smaller sets. By definition, this implies the following result.
Lemma 15 (Size-Expansion Trade-off [12]). For \(k>1\), a \((c, d, \alpha, \delta)\)-bipartite expander with \(n\) left vertices is also a \((c, d, k\alpha, f_\delta(k)-O(\frac{1}{n}))\)-bipartite expander.
The following result was also proved in [12].
Lemma 16 ([12]). \(f_{\delta }(k)\) can be efficiently computed as a piecewise rational function. Specifically, \(f_\delta(k) = 1 - (1 - \delta)k\) when \(k \leq \frac{1}{2(1 - \delta)}\) (or equivalently, when \(f_\delta(k) \geq \frac{1}{2}\)).
6 shows the Size-Expansion Function \(f_\delta\) for various values of \(\delta\), along with the trivial lower bound \(\frac{\delta}{k}\) when \(\delta=0.8\). As the figure illustrates, the bound \(f_\delta(k)\) is always tighter than \(\frac{\delta}{k}\) for \(k>1\).
The following theorem gives a lower bound on the minimum distance of a Tanner code \(T(G, C_0)\).
Theorem 9. Suppose \(\delta d_0>1\). The minimum distance of the Tanner code \(T(G,C_0)\) is greater than \(f_\delta^{-1}\left( \frac{1}{d_0} + \varepsilon\right) \alpha n\) for any constant5 \(\varepsilon\in(0,\delta-\frac{1}{d_0})\) and all sufficiently large \(n\).
Proof. Let \(\delta' =\frac{1}{d_0} + \varepsilon\), \(k= f_\delta^{-1}\left(\delta'\right)\), and \(\alpha' =k \alpha\). By [lem:size95expansion95prop], \(f_{\delta}^{-1}(\delta')\) is well-defined.
Since \(G\) is a \((c,d,\alpha,\delta)\)-bipartite expander and \(k\alpha =\alpha', f_\delta(k)=\delta'\), applying 15 implies that \(G\) is also a \((c,d,\alpha', \delta')\)-bipartite expander. By 6 and the fact that \(\delta' d_0=1+d_0\varepsilon>1\), we have that the distance of \(T(G, C_0)\) is greater than \(\alpha'\), thus proving this theorem. ◻
Remark 1. 9 generalizes [12], which establishes a lower bound of \(\frac{\alpha}{2(1-\delta)} n\) on the minimum distance of expander codes, where \(d_0=2\). To see that 9 recovers the this result, note that when \(d_0=2\), we have \(f_\delta(k) = 1 - (1 - \delta)k\) when \(f_\delta(k) \geq \frac{1}{2}=\frac{1}{d_0}\) by 15. Therefore, \(f_{\delta}^{-1}\left(\frac{1}{d_0}\right)=f_{\delta}^{-1}\left(\frac{1}{2}\right)=\frac{1}{2(1-\delta)}\). Substituting this into the bound gives \(f_{\delta}^{-1}\left(\frac{1}{d_0}\right)\alpha n = \frac{\alpha}{2(1-\delta)} n\).
Remark 2. If the Size-Expansion Function in 9 is replaced with the trivial bound \(\frac{\delta}{k}\), the resulting distance bound is \(\delta d_0 \alpha n\), as proved in [14]. However, this trivial bound is strictly weaker than the bound provided by 9.
The relationship between the distance bound and the parameters \(\delta\) and \(d_0\) is illustrated in the following figure:
We have the following theorem on the decoding radius of our previous algorithm.
Theorem 10. Suppose \(\delta d_0>2\). 2 and 5 can decode up to \(f_\delta^{-1}\left(\frac{2}{d_0}+\varepsilon\right)\alpha n\) errors in \(O(n)\) time for any constant \(\varepsilon\in(0,\delta-\frac{2}{d_0})\) and all sufficiently large \(n\).
Proof. Let \(\delta' = \frac{2}{d_0} + \varepsilon\), \(k= f_\delta^{-1}\left(\delta'\right)\), and \(\alpha'= k \alpha\). By [lem:size95expansion95prop], \(f_{\delta}^{-1}(\delta')\) is well-defined.
Since \(G\) is a \((c,d,\alpha,\delta)\)-bipartite expander and \(k\alpha =\alpha', f_\delta(k)=\delta'\), applying 15 implies that the graph \(G\) is also a \((c, d, \alpha', \delta')\)-bipartite expander. Since \(\delta' d_0 = 2 + d_0 \varepsilon> 2\), it follows from 6 and 8 that 2 and 5 can both decode up to \(\alpha' n\) errors in linear time. ◻
Remark 3. If the Size-Expansion Function in 10 is replaced with the trivial bound \(\frac{\delta}{k}\), the resulting decoding radius becomes \(\frac{\delta d_0}{2} \alpha n\). This bound is strictly weaker than the one derived in 10.
The relationship between the decoding radius and the parameters \(\delta\) and \(d_0\) is illustrated in the following figure:
The following theorem, 11, demonstrates that the distance bound in 3 is essentially tight. This theorem follows [12] but extends it in two significant ways. First, while [12] establishes the existence of infinitely many expander codes (\(d_0 = 2\)) with a minimum distance of \(\frac{\alpha}{2(1-\delta)} n\), the underlying graphs are only “almost regular” bipartite expanders. 11 extends the result to strictly regular bipartite expanders. It also applies to Tanner codes \(T(G, C_0)\) with \(d_0 > 2\).
Theorem 11. Given any constants \(\delta, d_0, \varepsilon> 0\) with \(\delta d_0 > 1\), there exist constants \(c\), \(d\), and \(\alpha\) such that for infinitely many values of \(n\), a \((c,d,\alpha,\delta-\varepsilon)\)-bipartite expander \(G\) with \(n\) left vertices exists. Moreover, for any linear code \(C_0\subseteq\mathbb{F}_2^d\) of minimum distance \(d_0\), there exists such a graph \(G\) such that, by fixing an appropriate total ordering on \(N(v)\) for each \(v\in R(G)\), the minimum distance of the resulting Tanner code \(T(G,C_0)\) is at most \(f_\delta^{-1}\left(\frac{1}{d_0}\right) \alpha n\).
Proof. We denote the left and right parts of a bipartite graph \(G\) by \(L(G)\) and \(R(G)\), respectively. Let \(k= f_\delta^{-1}\left(\frac{1}{d_0}\right)\).
We construct two bipartite graphs:
\(G_0\) is a uniformly chosen random \((c,d_0)\)-regular graph with \(|L(G_0)| = k \alpha n\) and \(|R(G_0)| = c n \frac{k\alpha}{d_0}\).
\(G_1\) is a uniformly chosen random graph subject to the constraints that (1) \(G_1\) is left-regular of degree \(c\) with \(|L(G_1)| = (1 - k\alpha)n\) and \(|R(G_1)| = c n\frac{1}{d}\), and (2) \(c n \frac{k\alpha}{d_0}\) right vertices of \(G_1\) have degree \(d - d_0\), while the remaining ones have degree \(d\). The parameter \(\alpha\) is chosen to satisfy \(\alpha\leq \frac{d_0}{dk}\) so that this is possible.
We formalize the algorithm used to generate the regular graphs \(G_0\) and \(G_1\) as 10 in 7.1.
Next, we merge \(G_0\) and \(G_1\) into a single bipartite graph \(G\). Specifically, for each vertex \(u \in R(G_0)\), we pair it with a vertex \(v\in R(G_1)\) of degree \(d - d_0\), merging \(u\) and \(v\) into a single vertex. All other vertices in \(G_0\) and \(G_1\) remain unchanged. This process results in the final graph \(G\).
Assume without loss of generality that \(1^{d_0}0^{d-d_0}\in C_0\). Then, for each merged vertex \(v\in R(G)\), we may order its \(d\) neighbors such that the first \(d_0\) neighbors are in \(L(G_0)\). Then the unique vector in \(\mathbb{F}_2^{L(G)}\) with support \(L(G_0)\) is a codeword of \(T(G,C_0)\), implying that the minimum distance of \(T(G, C_0)\) is at most \(|L_0(G)|=k\alpha n\).
It remains to prove that \(G\) is a \((c,d,\alpha,\delta - \varepsilon)\)-bipartite expander with high probability. Fix a set \(S \subseteq L(G)\) with \(|S| \leq \alpha n\). Let \(S_0 \mathrel{\vcenter{:}}= S \cap L(G_0)\) and \(S_1 \mathrel{\vcenter{:}}= S \cap L(G_1)\). Suppose \(|S_0| = \alpha_0 n\) and \(|S_1| = \alpha_1 n\), where \(\alpha_0 + \alpha_1 \eqcolon\alpha'\leq \alpha\). Next, we bound the probability that \(N(S)\) is small.
Assume \(\gamma n\le |S|\le \alpha n\), where \(\gamma=O_{\delta,\alpha,d_{0},d}(1)\) is a small constant to be determined later. Denote the set of merged vertices in \(R(G)\) as \(M\). We calculate the expected size of \(N(S)\) using Azuma’s inequality. \[\begin{align} \mathop{\mathrm{\mathbb{E}}}[|N(S)|] & =\notag \sum_{u \in R(G)} \Pr[u \in N(S)] \\ & =\notag |R(G)|-\sum_{u \in R(G), u \in M} \Pr[u \not\in N(S)] -\sum_{u \in R(G), u\not \in M} \Pr[u \not\in N(S)] \\ & \geq c n \left(\frac{1}{d} - \frac{k\alpha}{d_0} \left(1 - \frac{\alpha_0}{k\alpha}\right)^{d_0} \left(1 - \frac{\alpha_1}{1 - k\alpha}\right)^{d-d_0} - \left(\frac{1}{d} - \frac{k\alpha}{d_0}\right)\left(1 - \frac{\alpha_1}{1 - k\alpha}\right)^{d}\right),\label{ineq:expected95neibors1} \end{align}\tag{14}\] where the last step holds since for \(u\in R(G)\), \[\Pr[u \not\in N(S)]\leq\begin{cases} \left(1 - \frac{\alpha_0}{k\alpha}\right)^{d_0} \left(1 - \frac{\alpha_1}{1 - k\alpha}\right)^{d-d_0} & u\in M, \\ \left(1 - \frac{\alpha_1}{1 - k\alpha}\right)^{d} & u\not\in M. \end{cases}\]
We claim 14 is bounded from below by \[\begin{align} & c n\left(\frac{1}{d} - \frac{k\alpha}{d_0} \left(1 - \delta d_0 \frac{\alpha_0}{k\alpha}\right) - \left(\frac{1}{d} - \frac{k\alpha}{d_0}\right)(1 - \alpha_1 d+O_{k,d,d_0}(\alpha'^2))\right) \tag{15} \\ & = c n \left(\delta \alpha_0 + \alpha_1 - O_{k,d,d_0}( \alpha'^2)\right).\tag{16} \end{align}\] To see this, we first prove the following claim.
Claim 12. \(\left( 1-\frac{1}{k} \right) ^{d_{0}}\le 1-\delta d_{0}\frac{1}{k}\).
Proof. Assume to the contrary that the claim is not true. Then \(\left( 1 - \frac{1}{k} \right)^{d_0} = 1 - (1 - \eta) \delta d_0 \cdot \frac{1}{k}\) for some constant \(\eta > 0\).
Define the function \(h(x)\coloneq \left( 1 - \frac{1}{k} \right)^{x}+ (1 - \eta) \delta \frac{x}{k}-1\). Then \(h(0)=0\) and \(h(d_0)=0\). Note that \(h(x)\) is a convex function. So if \(h(t)<0\) for some \(t\geq d_0\), then we would have \(h(d_0)<0\), yielding a contradiction. Therefore, \(h(t)\geq 0\) for all \(t\geq d_0\), or equivalently, \[1 - \left( 1 - \frac{1}{k} \right)^{t} \le (1-\eta)\delta \frac{t}{k}, \quad \forall t\ge d_0. \label{eq:LP95coeff95lower95bound}\tag{17}\]
By the proof of [lem:size95expansion95prop], the optimal solution \((\hat{\beta}_i)_{i\in\mathbb{N}^+}\) of \(f_{\delta}(k)\) is supported on at most two adjacent indices. That is, the support is either \(\{j, j+1\}\) or a singleton \(\{j\}\) for some integer \(j\in\mathbb{N}^+\).
\(j\geq d_0\). By the constraints from 5 and inequality 17 , we have \[\begin{align} \delta &\le \sum_{i=1}^{\infty} \left(1 - \left(1 - \frac{1}{k}\right)^i\right) \cdot \hat{\beta}_i \\ &= \sum_{i=d_0}^{\infty} \left(1 - \left(1 - \frac{1}{k}\right)^i\right) \cdot \hat{\beta}_i \\ &\le (1-\eta)\frac{\delta}{k} \sum_{i=d_0}^{\infty} i \cdot \hat{\beta}_i \\ &= (1-\eta)\frac{\delta}{k} \sum_{i=1}^{\infty} i \cdot \hat{\beta}_i \\ &= (1-\eta)\delta, \end{align}\] which yields a contradiction since \((1-\eta)\delta < \delta\).
\(j<d_0\). By the constraints from 5, either \(k=j\hat{\beta}_j + (j+1)\hat{\beta}_{j+1}\) or \(k=j\hat{\beta}_j\), depending or whether the support of the optimal solution is \(\{j, j+1\}\) or \(\{j\}\).
In the former case, we have \(k<d_0 (\hat{\beta}_j+\hat{\beta}_{j+1})=k d_0 f_\delta(k)\). Equivalently, \(f_\delta(k)>\frac{1}{d_0}\). However, this contradicts the definition \(k= f^{-1}_{\delta}(\frac{1}{d_0})\).
In the latter case, we have \(k<d_0 \hat{\beta}_j=k d_0 f_\delta(k)\). This similarly leads to a contradiction.
Since both cases lead to a contradiction, the claim is proved. ◻
By the convexity of the function \(g(x)\mathrel{\vcenter{:}}= (1-x)^{d_{0}}\) for \(x\in [0,1]\), we know that \[\left( 1 - \frac{\alpha_0}{k \alpha} \right)^{d_0} =g\left(\frac{\alpha_{0}}{k \alpha }\right)\le \left(1-\frac{\alpha_{0}}{\alpha } \right) g(0)+\frac{\alpha_{0}}{\alpha }g\left(\frac{1}{k}\right)=1-\frac{\alpha_0}{\alpha}+\frac{\alpha_0}{\alpha}(1-\frac{1}{k})^{d_0}\le 1 - \delta d_0 \frac{\alpha_0}{k \alpha}, \label{ineq:expected95neibors3}\tag{18}\] where the last inequality holds by 12. By 18 , we see that 14 , and consequently \(\mathop{\mathrm{\mathbb{E}}}[|N(S)|]\), is bounded from below by 15 .
By choosing \(\alpha\geq \alpha'\) to be sufficiently small (but still a constant depending on \(k,d,d_0,\varepsilon\)), we can ensure that the term \(O_{k,d,d_0}(\alpha'^2)\) in 16 is at most \(\alpha' \frac{\varepsilon}{2}\). Thus, as \(|S|=\alpha_0 n+\alpha_1 n=\alpha' n\), we have
\[\mathop{\mathrm{\mathbb{E}}}[|N(S)|] \geq c n \left(\delta \alpha_0 + \alpha_1 - \alpha' \frac{\varepsilon}{2}\right)\geq \left(\delta - \frac{\varepsilon}{2}\right)c|S|.\]
Now, consider the process of revealing the edges going out of \(S\) one by one, in an arbitrary order. For \(i=0,1,\dots, c|S|\), let \[X_i=\mathop{\mathrm{\mathbb{E}}}[|N(S)| \mid \text{The first }i\text{ edges going out of }S\text{ are revealed}].\] Clearly, the random variables \(X_i\) form a martingale, and \(|X_{i+1} - X_i| \leq 1\). By Azuma’s inequality (2), for any \(\lambda>0\), \[\begin{align} \Pr[|X_{c|S|} - X_0| \geq \lambda] \leq 2\exp\left(-\frac{\lambda^2}{2 c|S|}\right). \end{align}\]
Choose \(\lambda = \sqrt{\log \left(2n^2\binom{n}{|S|}\right)\cdot2c|S|} =O\left(\sqrt{c|S|\log n+ c|S|^2\log \frac{1}{\gamma } } \right)= O_{\gamma }(\sqrt{c}|S|)\). Also choose sufficiently large \(c=\Omega_{\gamma }(\frac{1}{\varepsilon^2})\) such that \(\lambda\leq \frac{\varepsilon}{2} c|S|\). Then we have \[\begin{align} \Pr[|N(S)| \leq (\delta - \varepsilon)c |S|] \leq \Pr\left[||N(S)|-\mathop{\mathrm{\mathbb{E}}}[|N(S)|]|\geq \lambda\right] \leq \left(n^2 \binom{n}{|S|}\right)^{-1}.\label{ineq:prob95large95s} \end{align}\tag{19}\]
Assume \(1\le |S|< \gamma n\). We claim that with high probability, \(|N(S)|\ge\delta c|S|\). By the union bound, \[\begin{align} \Pr[|N(S)|\le \delta c|S|] & \le \sum_{\substack{T\subseteq R(G),\\|T|=\delta c|S|}}\Pr[N(S)\subseteq T]\\ & \le \binom{\frac{c}{d}n}{\delta c|S|} \cdot \max\left\{\frac{d\cdot \delta c|S|}{cn k\alpha}, \frac{d\cdot \delta c|S|}{(1-k \alpha )n c}\right\}^{c|S|}\\ &=\binom{\frac{c}{d}n}{\delta c|S|} \cdot \max\left\{\frac{d\cdot \delta |S|}{n k\alpha}, \frac{d\cdot \delta |S|}{(1-k \alpha )n }\right\}^{c|S|}, \end{align}\] where \(\max\left\{\frac{d\cdot \delta c|S|}{cn k\alpha}, \frac{d\cdot \delta c|S|}{(1-k \alpha )n c}\right\}^{c|S|}\) is an upper bound on \(\Pr[N(S) \subseteq T]\).
Using the standard estimate \(\binom{n}{m}\leq \left(\frac{ne}{m}\right)^m\), we obtain \[\begin{align} \Pr[|N(S)|\le \delta c|S|] & \le \left(\frac{ne}{d\delta |S|}\right)^{\delta c|S|}\cdot \max\left\{\frac{d\cdot \delta |S|}{n k\alpha}, \frac{d\cdot \delta |S|}{(1-k \alpha )n }\right\}^{c|S|}\\ & = \left(O_{\delta,\alpha,d_{0},d}(1)\cdot \left(\frac{|S|}{n}\right)^{1-\delta }\right)^{c|S|} \end{align}\] Choose \(\gamma\) to be a sufficiently small constant depending on \(\delta\), \(\alpha\), \(d_{0}\), and \(d\). And choose \(c\) to be a sufficiently large constant depending on \(\delta\).6 We have \[\begin{align} \Pr[|N(S)|\le \delta c|S|] \le \left(O_{\delta,\alpha,d_{0},d}(1)\cdot \gamma^\frac{1-\delta}{2}\left(\frac{|S|}{n}\right)^\frac{1-\delta}{2} \right)^{c|S|} \leq \left(\frac{|S|}{en}\right)^{\frac{1-\delta}{2}c|S|} \leq \left(\frac{|S|}{en}\right)^{2|S|}. \label{ineq:prob95small95s} \end{align}\tag{20}\]
Combining the bounds 19 and 20 and taking the union bound over all \(S\), we see that the probability that \(|N(S)|\geq (\delta-\varepsilon) c|S|\) for all \(S\subseteq L(G)\) of size at most \(\alpha n\) is at least \[\begin{align} 1 & -\Pr[\exists\,S \subseteq L(G) \text{ such that } |S|\in [\gamma n, \alpha n] \text{ and } |N(S)|\le (\delta-\varepsilon)c|S|] \\ & -\Pr[\exists\,S\subseteq L(G)\text{ such that } |S|\in [1,\gamma n) \text{ and } |N(S)|\le (\delta-\varepsilon)c|S|]\cr & \ge 1- \sum_{i=\gamma n}^n\binom{n}{i}\left(n^2\binom{n}{i}\right)^{-1}-\sum_{i=1}^{\gamma n-1}\binom{n}{i}\left(\frac{i}{en}\right)^{2i}\cr &\ge 1- \sum_{i=\gamma n}^n\binom{n}{i}\left(n^2\binom{n}{i}\right)^{-1}-\sum_{i=1}^{\gamma n-1}\left(\frac{ne}{i}\right)^i\left(\frac{i}{en}\right)^{2i}\cr & \ge 1-o(1). \end{align}\] Therefore, \(G\) is a \((c,d,\alpha,\delta-\varepsilon)\)-bipartite expander with high probability. ◻
There remains a gap between the sufficient condition \(\delta d_0 > 2\) required by our algorithms and the necessary condition \(\delta d_0 > 1\) established in [15]. We note that if \(\delta d_0\) is not greater than \(2\), then there exists a set \(S \subseteq [n]\) such that \(|N(S)| \leq \frac{2c}{d_0} |S|\). When \(S\) is the set of corrupt bits, a random vertex \(v\in N(S)\) is expected to have \(\frac{c|S|}{|N(S)|}\geq \frac{d_0}{2}\) neighbors that are corrupt. So we cannot expect the local word \(x|_{N(v)}\) to be uniquely decodable. This suggests that \(\delta d_0 > 2\) might be the best achievable condition using the approach of [14], [15], where algorithms depend solely on the unique decoding of the inner code.
However, local words might still provide useful information even when unique decoding of the inner code is not feasible. For instance, the flip algorithm of Sipser and Spielman [5] works in a setting where the inner code is a parity-check code. In this case, \(d_0=2\), making unique decoding of the inner code impossible. Nevertheless, the flip algorithm proves to be effective, requiring only that \(\delta \geq \frac{3}{4}\). This observation raises the question of whether insights from this special case can be generalized to achieve improved results for \(d_0>2\).
As a complementary result, in 8 we generalize Viderman’s find‑erasures‑and‑decode framework to arbitrary linear inner codes, yielding a deterministic linear‑time decoder that succeeds whenever \(\delta > \frac{d_0}{2d_0-1}\). For \(d_0=3\), this requires only \(\delta > 0.6\), equivalently \(\delta d_0 > 1.8\), thereby improving upon the \(\delta d_0>2\) threshold. Unlike the approaches of [14], [15], this framework avoids unique decoding of the inner code and instead relies on erasure decoding, which can tolerate a larger number of corrupted neighbors. It remains open whether this approach can be further developed to break the \(\delta d_0>2\) barrier for \(d_0>3\).
The first author thanks Xue Chen for explaining their results [12]. The second author thanks Chong Shangguan and Yuanting Shen for helpful discussions and for explaining their results [15], and Zihan Zhang for additional discussions.
The following algorithm generates a random graph given the degrees of the right vertices, while all left vertices have degree \(c\).
We claim the following property of this process and omit its proof.
Lemma 17. The probability distribution of the graph generated by 10 is independent of the order in which the pairs \((u, i) \in L \times [c]\) are enumerated.
Lemma 18. Let \(m > 0\) and \(i\geq 0\) be integers. Let \(k > 1\) be a real number such that \(i\leq km-m\). Then, \[\left(1 - \frac{1}{k}\right)^i \geq \frac{\binom{km-i}{m}}{\binom{km}{m}} = \left(1 - \frac{1}{k}\right)^i - O_{i,k}\left(\frac{1}{m}\right) ,\] where the \(O(\cdot)\) term is with respect to the growing parameter \(m\).
Proof. The ratio can be expressed as: \[\frac{\binom{km-i}{m}}{\binom{km}{m}} = \frac{(km-i)(km-i-1) \ldots((k-1)m-i+1)}{km(km-1) \ldots((k-1)m+1)}.\] Since the product \((km-i)\cdots((k-1)m+1)\) appears in both the numerator and denominator, by factoring out the \(\left(1 - \frac{1}{k}\right)\) terms, we can simplify the ratio as follows: \[\frac{\binom{km-i}{m}}{\binom{km}{m}} =\prod_{j=0}^{i-1}\frac{(k-1)m-j}{km-j} =\left( 1-\frac{1}{k} \right)^i\cdot \prod_{j=0}^{i-1}\left(1-\frac{j}{(k-1)(km-j)}\right)\leq \left(1 - \frac{1}{k}\right)^i.\] Further, we bound the additional factor: \[\begin{align} \prod_{j=0}^{i-1}\left(1-\frac{j}{(k-1)(km-j)}\right) & \ge 1-\sum_{j=0}^{i-1}\frac{j}{(k-1)(km-j)} \\ & \ge 1-\frac{i(i-1)}{2(k-1)(km-i)} . \end{align}\] Therefore, we have \[\begin{align} \frac{\binom{km-i}{m}}{\binom{km}{m}} & \ge \left(1 - \frac{1}{k}\right)^i \left( 1-\frac{i(i-1)}{2(k-1)(km-i)} \right) \\ & \ge \left(1 - \frac{1}{k}\right)^i- \frac{i(i-1)}{2(k-1)(km-i)} \\ & = \left(1 - \frac{1}{k}\right)^i - O_{k,i}\left(\frac{1}{m}\right). \end{align}\] This completes the proof. ◻
Next, we restate and prove [lem:size95expansion95prop].
Proof. We prove these properties separately.
Let \(k' > k\), and let \((\hat{\beta_i})_{i\in\mathbb{N}^+}\) denote the optimal solution to the LP defining \(f_{\delta}(k)\). Then, \((\frac{k'}{k} \hat{\beta_i})_{i\in\mathbb{N}^+}\) is a feasible solution to the LP defining \(f_{\delta}(k')\), and the corresponding value of the objective function is \[\frac{1}{k'}\sum_{i=1}^\infty \frac{k'}{k} \hat{\beta_i}=\frac{1}{k}\sum_{i=1}^\infty\hat{\beta_i}=f_{\delta}(k).\] Therefore, \(f_{\delta}(k')\leq f_{\delta}(k)\). The same argument applies to \(f_{d,\delta}\). This proves [p1].
Recall the definition of \(f_{\delta}(k)\) from 5, which is the minimum of the following LP: \[\begin{align} \text{minimize} \quad & \frac{1}{k} \sum_{i=1}^{\infty} \beta_i \\ \text{subject to} \quad & \sum_{i=1}^{\infty} i \cdot \beta_i = k, \\ & \sum_{i=1}^{\infty} \left(1 - \left(1 - \frac{1}{k}\right)^i\right) \cdot \beta_i \ge \delta, \\ & \beta_i \ge 0, \quad \forall i. \end{align} \label{eq:LP}\tag{21}\]
We now show that the optimal solution is achieved by \(\hat{\beta}=(\hat{\beta}_i)_{i\in\mathbb{N}^+}\) that is supported on at most two adjacent indices. The proof follows [12].
The dual of this LP is: \[\begin{align} \text{maximize} \quad & kx + \delta y \\ \text{subject to} \quad & x \cdot i + y \left(1 - \left(1 - \frac{1}{k}\right)^i\right) \le \frac{1}{k}, \quad \forall i \in \mathbb{N}^+ \\ & y \ge 0. \end{align} \label{eq:DP}\tag{22}\]
Assume, for contradiction, that \(\hat{\beta}_i, \hat{\beta}_j \neq 0\) with \(j > i + 1\). By the complementary slackness conditions, the corresponding constraints in Equation 22 must be satisfied as equalities: \[x \cdot i + y \left(1 - \left(1 - \frac{1}{k}\right)^i\right) = \frac{1}{k}\] and \[x \cdot j + y \left(1 - \left(1 - \frac{1}{k}\right)^j\right) = \frac{1}{k}.\] These two equalities imply that \(y \neq 0\).
The function \(1 - \left(1 - \frac{1}{k}\right)^i\) is convex with respect to \(i\). In particular: \[\left(1 - \left(1 - \frac{1}{k}\right)^i\right) - \left(1 - \left(1 - \frac{1}{k}\right)^{i-1}\right) > \left(1 - \left(1 - \frac{1}{k}\right)^{i+1}\right) - \left(1 - \left(1 - \frac{1}{k}\right)^i\right).\] From the two equalities derived from the slackness conditions, \(y > 0\), and the convexity of the function, we obtain: \[x \cdot (i + 1) + y \left(1 - \left(1 - \frac{1}{k}\right)^{i+1}\right) > \frac{1}{k}.\] This contradicts the constraints of the dual program. Thus, we have shown that \(\hat{\beta}\) must be supported on at most two adjacent indices.
Now, assume that the support of \(\hat{\beta}\) is contained in \(\{i,i+1\}\) for some \(i\in\mathbb{N}^+\). Then, the LP 21 simplifies to: \[\begin{align} \text{minimize} \quad & \frac{1}{k}(\beta_i + \beta_{i+1}) \\ \text{subject to} \quad & \beta_i \cdot i + \beta_{i+1} \cdot (i+1) = k, \\ & \beta_i \cdot \left(1 - \left(1 - \frac{1}{k}\right)^i\right) + \beta_{i+1} \cdot \left(1 - \left(1 - \frac{1}{k}\right)^{i+1}\right) \ge \delta, \\ & \beta_i, \beta_{i+1} \ge 0. \end{align}\]
The optimal value of this problem is given by: \[\begin{align} \begin{cases} \frac{\delta - (1 - \frac{1}{k})^i}{k - (k + i)(1 - \frac{1}{k})^i}, \quad & \text{for } \frac{k \left(1 - \left(1 - \frac{1}{k}\right)^{i+1}\right)}{i+1} \le \delta \le \frac{k \left(1 - \left(1 - \frac{1}{k}\right)^i\right)}{i}, \\ \frac{1}{i+1}, \quad & \text{for } \delta < \frac{k \left(1 - \left(1 - \frac{1}{k}\right)^{i+1}\right)}{i+1}, \\ \text{infeasible}, \quad & \text{otherwise}. \end{cases} \end{align}\]
By comparing the values above for different choices of \(i\), we find the value of \(f_{\delta}(k)\) is given by: \[\label{eq:f95delta95expr} f_\delta(k) = \frac{\delta - (1 - \frac{1}{k})^i}{k - (k + i)(1 - \frac{1}{k})^i} \quad\text{for } i\in\mathbb{N}^+ \text{ such that } \frac{k \left(1 - \left(1 - \frac{1}{k}\right)^{i+1}\right)}{i+1} \le \delta \le \frac{k \left(1 - \left(1 - \frac{1}{k}\right)^i\right)}{i}.\tag{23}\]
The same analysis applies to the LP defining \(f_{d,\delta}\), with the only difference being that the choice of \(i\) is restricted to the range \([d-1]\). Therefore, we have the expression for \(f_{d,\delta}(k)\) as follows: \[\label{eq:f95d95delta95expr} f_{d,\delta}(k) = \begin{cases} \frac{1}{d}, \quad & \text{for } \delta < \frac{k \left(1 - \left(1 - \frac{1}{k}\right)^d\right)}{d}, \\ \frac{\delta - (1 - \frac{1}{k})^i}{k - (k + i)(1 - \frac{1}{k})^i}, \quad & \text{for } i\in [d-1] \text{ such that } \frac{k \left(1 - \left(1 - \frac{1}{k}\right)^{i+1}\right)}{i+1} \le \delta \le \frac{k \left(1 - \left(1 - \frac{1}{k}\right)^i\right)}{i}. \end{cases}\tag{24}\]
Next, we consider the condition \(f_\delta(k) \neq f_{d,\delta}(k)\), which implies that the support of the optimal solution \(\hat{\beta}\) of the LP 21 has the form \(\{i+1\}\) or \(\{i,i+1\}\) with \(i\geq d\). Therefore, comparing 24 with 23 proves [p2].
By substituting \(x = 0\) and \(y = \frac{1}{k}\) into the dual program 22 , we see that \(f_{\delta}(k)\geq \frac{\delta}{k}\), which establishes [p3].
Let \(f^*_{d,\delta}(k)\) be the size-expansion trade-off defined by the LP without omitting the error term. The only difference from the LP defining \(f_{d,\delta}(k)\) is that the constraint becomes \(\sum_{i=1}^{d} \left(1 - \left(1 - \frac{1}{k}\right)^i\right) \beta_i \ge \delta - O\left(\frac{1}{n}\right)\), and the dual objective function changes to \(kx + \left(\delta - O\left(\frac{1}{n}\right)\right)y\).
Let \((\hat{x}, \hat{y})\) be the optimal solution for the dual program for \(f_{d,\delta}(k)\), so \(f_{d,\delta}(k) = k\hat{x} + \delta \hat{y}\). Since \(\hat{x}, \hat{y}\) also satisfy the dual program for \(f^*_{d,\delta}(k)\), we obtain the bound: \[f^*_{d,\delta}(k) \ge f_{d,\delta}(k) - \hat{y}\cdot O\left( \frac{1}{n} \right).\]
Next, we bound \(\hat{y}\). The constraint in 22 with \(i = 1\) states that \(\hat{x} + \frac{\hat{y}}{k} \le \frac{1}{k}\), i.e., \(\hat{x} \le \frac{1 - \hat{y}}{k}\). Therefore, \[f_{d,\delta}(k) = k \hat{x} + \delta \hat{y} \le 1 - \hat{y} + \delta \hat{y}.\] By [p3], \(f_{d,\delta}(k)\geq \frac{\delta}{k}\geq 0\). So \(y\leq \frac{1}{1-\delta}=O(1)\). Thus, \(f^*_{d,\delta}(k) \ge f_{d,\delta}(k) - O\left( \frac{1}{n} \right)\), which proves [p4].
The continuity of \(f_\delta\) can be established via the explicit description of \(f_\delta\) given in 23 . When \(k\) is located at the endpoint of two pieces, namely, when \[\frac{k \left(1 - \left(1 - \frac{1}{k}\right)^{i+1}\right)}{i+1} = \delta\] for some positive integer \(i\), we have \[\lim_{x \to k^-} f_{\delta}(x) = \frac{\delta - \left(1 - \frac{1}{k}\right)^i}{k - (k + i)\left(1 - \frac{1}{k}\right)^i} = \frac{1}{i+1} = \frac{\delta - \left(1 - \frac{1}{k}\right)^{i+1}}{k - (k + i+1)\left(1 - \frac{1}{k}\right)^{i+1}} = \lim_{x \to k^+} f_{\delta}(x).\] Thus, \(f_\delta\) is continuous.
To prove that \(\lim_{k \to 1} f_{\delta}(k) = \delta\), note that for bounded \(k\), the value of \(i\) chosen in 23 satisfies \(i=O(1/\delta)\). Thus, \[\lim_{k \to 1} f_{\delta}(k)=\lim_{k\to 1} \frac{\delta - (1 - \frac{1}{k})^i}{k - (k + i)(1 - \frac{1}{k})^i} =\lim_{k\to 1}\frac{\delta}{k}=\delta.\]
Next, we prove that \(\lim_{k \to \infty} f_{\delta}(k) = 0\). For any fixed \(i\), we have \[\lim_{k \to \infty} \frac{k \left(1 - \left(1 - \frac{1}{k}\right)^{i+1}\right)}{i+1} = 1.\] Thus, as \(k \to \infty\), the value of \(i\) chosen in 23 also tends to infinity. Therefore, the value of the function satisfies \[\lim_{k \to \infty} f_\delta(k) = \lim_{k \to \infty} \frac{\delta - \left(1 - \frac{1}{k}\right)^i}{k - (k + i)\left(1 - \frac{1}{k}\right)^i} \le \lim_{k \to \infty} \frac{1}{i} = 0,\] which completes the proof of [p5]. ◻
In this section, we generalize Viderman’s find-erasures-and-decode algorithm [10]. Viderman’s algorithm first identifies a small superset of the corrupt bits and then decodes this set as erasures. We show that this approach extends to arbitrary linear inner codes, yielding a deterministic linear-time decoder in the regime \(\delta>\frac{d_0}{2d_0-1}\). In particular, when \(d_0=3\), this yields the below-two regime \(\delta d_0>1.8\).
Throughout this section, we set the threshold parameter: \[\label{eq:viderman-h} h\coloneq \frac{c(\delta d_0-1)}{d_0-1}.\tag{25}\] Note that \(h\le c\), and under the condition \(\delta>\frac{d_0}{2d_0-1}\) we have \(h>c(1-\delta)\). The latter inequality ensures that the find-erasure step identifies a superset of the corrupt set \(F\) that is sufficiently close to \(F\).
We first present the algorithm for finding erasures.
Next, we describe the erasure decoding algorithm \(\mathsf{ErasureDecode}(x,L')\), which takes as input the received word \(x\) and a set \(L'\subseteq L\) that is intended to be a superset of \(F\).
This algorithm invokes a subroutine \(\mathsf{InnerErasureDecode}\), the erasure decoder for the inner code \(C_0\). Formally, given a local word \(z\in\mathbb{F}_2^d\) and a set of erased coordinates \(E\subseteq[d]\) with \(|E|<d_0\), \(\mathsf{InnerErasureDecode}(z,E)\) returns the unique codeword \(\omega\in C_0\), if it exists, such that \(\omega_i=z_i\) for all \(i\notin E\).
In the algorithm below, the set \(N(v)\cap L'\) is identified with the corresponding local coordinate positions of \(C_0\) when evaluating \(\mathsf{InnerErasureDecode}(\hat{x}_{N(v)},N(v)\cap L')\).
The main algorithm first applies 11 to identify a superset of \(F\), and then applies 12 to decode the erasures.
The main result of this section is the following theorem:
Theorem 13. Assume \(d_0\ge 2\) and \(\delta>\frac{d_0}{2d_0-1}\). Then 13 can be implemented in \(O(n)\) time to correct up to \(\gamma(\alpha n-1)\) errors, where \[\gamma \coloneq 1-\frac{c(1-\delta)}{h} =\frac{\delta(2d_0-1)-d_0}{\delta d_0-1}>0.\]
Before proving 13, we present two lemmas analyzing the properties of the set \(L'\) output by 11.
Lemma 19. Let \(y\in T(G,C_0)\), let \(F=F(x,y)\), and let \(L'\) be the output of 11. Assume \(|F|\le \gamma(\alpha n-1)\), where \(\gamma\) is as in 13. Then \(|L'|\le \alpha n\).
Proof. In the proof, we use \(L'\) and \(R'\) to denote the intermediate sets at any point of executing the algorithm. We prove that the invariant \(|L'|\le \alpha n -1\) is maintained throughout the whole procedure.
If, during the execution of \(\mathsf{FindErasure}(x)\), there are multiple valid choices for the next vertex to be added to \(L'\), the order in which they are added does not affect the final set \(L'\). Indeed, since \(R'\) only grows throughout the algorithm, any vertex \(i\) satisfying \(|N(i)\cap R'|\ge h\) at some point will continue to satisfy this condition until it is added to \(L'\).
Let \[F_0\coloneq \{i\in F: |N(i)\cap U(x)|\ge h\}.\] We choose an order in which all vertices in \(F_0\) are added before any other vertices. This is valid since every vertex in \(F_0\) satisfies the threshold condition at the beginning of the algorithm.
Since \(|F|\le \gamma(\alpha n-1)\) and \(\gamma\le 1\), we have \[|F_0|\le |F|\le \alpha n-1.\] So the invariant holds for \(L'=F_0\).
Every check node in \(U(x)\) has at least one neighbor in \(F\). Therefore, \(|E(F,U(x))|\ge |U(x)|\). On the other hand, every vertex in \(F\setminus F_0\) contributes fewer than \(h\) edges to \(E(F, U(x))\). Hence \[|E(F_0,U(x))|\geq |E(F,U(x))|-h(|F|-|F_0|) \geq|U(x)|-h(|F|-|F_0|).\]
Therefore, the size of \(R'\) after adding all vertices in \(F_0\), denoted by \(R_0\), is bounded by \[\begin{align} |R_0| & = |U(x)\cup N(F_0)| \\ & \le |U(x)|+|N(F_0)\setminus U(x)| \\ & \le |U(x)|+|E(F_0,N(F_0)\setminus U(x))| \\ & \le |U(x)|+c|F_0|-|E(F_0,U(x))| \\ & \le (c-h)|F_0|+h|F|. \label{eq:R0-upper} \end{align}\tag{26}\]
After all the vertices of \(F_0\) have been added, we consider the remaining vertices added to \(L'\) one by one. Whenever a vertex \(i\) is added to \(L'\), it already has at least \(h\) neighbors in \(R'\), and hence at most \(c-h\) new right vertices are added to \(R'\). So we always have \[\label{eq:viderman-R-upper} |R'|\leq |R_0|+(c-h)(|L'|-|F_0|)\leq(c-h)|L'|+h|F|,\tag{27}\] where the second inequality follows from 26 . By the invariant, \(|L'|\le \alpha n-1\) before adding a single vertex. So after that, we still have \(|L'|\leq \alpha n\), and the expansion property gives \[\delta c|L'|\leq |N(L')|\leq |R'|\le(c-h)|L'|+h|F|,\] where the last inequality holds by 27 . Therefore, \[\left(h-c(1-\delta)\right)|L'|\le h|F|.\] As \(|F|\le \gamma(\alpha n-1)\) and \(\gamma=1-\frac{c(1-\delta)}{h}\), we have \[|L'|\le \frac{h|F|}{h-c(1-\delta)} \leq \frac{h\gamma(\alpha n-1)}{h-c(1-\delta)} =\alpha n -1.\] Repeating this argument for each vertex added to \(L'\) shows that the invariant \(|L'|\leq \alpha n-1\) holds throughout the algorithm, and in particular for the final output. ◻
Lemma 20. Let \(y\in T(G,C_0)\), let \(F=F(x,y)\), and let \(L'\) be the output of 11. If \(|F|\leq \alpha n\), then \(F\subseteq L'\).
Proof. Let \(R'\) be the final set of right vertices maintained by 11. Suppose for contradiction that \[S\coloneq F\setminus L'\neq \emptyset.\] Since the algorithm has stopped, every \(i\in S\) satisfies \(|N(i)\cap R'|<h\). Thus \[\label{eq:viderman-edge-S-R} |E(S,R')|<h|S|.\tag{28}\] We now upper bound \(|N(S)|\). Consider \(v\in N(S)\setminus R'\). As \(N(L')\subseteq R'\), the check \(v\) has no neighbor in \(L'\). As \(v\in N(S)\subseteq N(F)\) and \(F=F(x,y)\), we have \(x_{N(v)}\neq y_{N(v)}\). On the other hand, as \(U(x)\subseteq R'\), the check \(v\) is satisfied by \(x\), implying that \(x_{N(v)}\) is a codeword of \(C_0\). So \(x_{N(v)}\) and \(y_{N(v)}\) are distinct codewords of \(C_0\). It follows that \[|N(v)\cap F|=|N(v)\cap S|\geq d_0.\] As this holds for all \(v\in N(S)\setminus R'\), we have \[|N(S)\setminus R'|\leq \frac{|E(S,N(S)\setminus R')|}{d_0}=\frac{c|S|-|E(S,R')|}{d_0}.\] It follows that \[\begin{align} |N(S)| & =|N(S)\cap R'|+|N(S)\setminus R'| \\ & \leq |E(S,R')|+\frac{c|S|-|E(S,R')|}{d_0} \\ & =\left(1-\frac{1}{d_0}\right)|E(S,R')| +\frac{c}{d_0}|S| \\ & <\left(\left(1-\frac{1}{d_0}\right)h+\frac{c}{d_0}\right)|S| \\ & =\delta c|S|, \end{align}\] where the strict inequality follows from 28 , and the last equality follows from the definition of \(h\) 25 . On the other hand, since \(S\subseteq F\) and \(|F|\leq \alpha n\), the expansion property gives \(|N(S)|\geq \delta c|S|\), a contradiction. Hence \(F\subseteq L'\). ◻
We then prove the correctness of the erasure decoding algorithm.
Lemma 21. Assume \(\delta d_0>1\). Let \(y\in T(G,C_0)\), and suppose \(L'\subseteq L\) satisfies \(F(x,y)\subseteq L'\) and \(|L'|\leq \alpha n\). Then 12, with input \((x,L')\), outputs \(y\) in \(O(n)\) time.
Proof. We maintain the invariant that \(\hat{x}_i=y_i\) for every \(i\in L\setminus L'\). This invariant holds initially because \(F(x,y)\subseteq L'\).
Suppose \(L'\neq \emptyset\). Since \(|L'|\leq \alpha n\), applying 3 with \(S=L'\) and \(t=d_0-1\) gives \[|N_{\leq d_0-1}(L')|\geq \frac{\delta d_0-1}{d_0-1}\cdot c|L'|>0.\] Thus there exists \(v\in R\) such that \(1\leq |N(v)\cap L'|\leq d_0-1\). In particular, Line 3 of 12 can always be executed whenever \(L'\neq\emptyset\), which is guaranteed by the condition in Line 2.
By the invariant, we have \(\hat{x}_{N(v)\setminus L'}=y_{N(v)\setminus L'}\). Since \(y_{N(v)}\in C_0\), there exists a codeword of \(C_0\) that agrees with \(\hat{x}\) on the unerased coordinates \(N(v)\setminus L'\). This codeword is unique. Indeed, if two distinct codewords of \(C_0\) agreed with \(\hat{x}_{N(v)\setminus L'}\) on the unerased coordinates, then their difference would be a nonzero codeword supported on at most \(|N(v)\cap L'|\le d_0-1\) coordinates, contradicting the minimum distance of \(C_0\). Therefore, \(\mathsf{InnerErasureDecode}(\hat{x}_{N(v)},N(v)\cap L')\) returns \(y_{N(v)}\) and the invariant is preserved after removing \(N(v)\) from \(L'\).
The loop terminates after at most \(|L'|\) iterations, since \(|N(v)\cap L'|\ge 1\) in every iteration and all elements of \(N(v)\cap L'\) are removed from \(L'\). At termination, \(L'=\emptyset\), and the invariant implies that \(\hat{x}=y\).
To achieve the desired running time, maintain the values \(|N(v)\cap L'|\) for all \(v\in R\), together with a queue of checks \(v\) satisfying \(1\leq |N(v)\cap L'|\leq d_0-1\). Whenever erased coordinates are recovered, update only the counts of their neighboring checks. Since \(c\), \(d\), and the local erasure-decoding time of \(C_0\) are constants, each edge of the graph \(G\) is processed only \(O(1)\) times. Therefore, the total running time is \(O(n)\). ◻
We are now ready to prove 13 by combining the preceding lemmas.
Proof of 13. Let \(y\in T(G,C_0)\) be the transmitted codeword, and let \(F=F(x,y)\). Assume \(|F|\leq \gamma(\alpha n-1)\).
By 19, the output \(L'\) of 11 satisfies \(|L'|\leq \alpha n\). Since \(|F|\leq \gamma(\alpha n-1)\) and \(\gamma\leq 1\), we also have \(|F|\leq \alpha n\), and therefore 20 gives \(F\subseteq L'\). Finally, the condition \(\delta>\frac{d_0}{2d_0-1}\) implies \(\delta d_0>1\), so 21 shows that 12 outputs \(y\).
It remains to verify that 11 runs in \(O(n)\) time. We first compute \(U(x)\) by checking every right vertex, which takes \(O(n)\) time. We then maintain the values \(|N(i)\cap R'|\) for all \(i\in L\), together with a queue of vertices in \(L\setminus L'\) satisfying the threshold condition. Whenever a new right vertex is added to \(R'\), we update the counters of its \(d\) left neighbors, adding them to the queue when necessary. When a vertex from the queue is added to \(L'\), it is removed from the queue.
Every left vertex is added to the queue at most once and removed to the queue at most once. Moreover, since each right vertex is added to \(R'\) at most once and \(c,d\) are constants, every edge is processed only \(O(1)\) times. Therefore, 11 runs in \(O(n)\) time. Combined with 21, this implies that the entire decoder runs in \(O(n)\) time. ◻
zhaienhezhou@gmail.com, School of the Gifted Young & College of Computer Science, University of Science and Technology of China, Hefei 230026, China.↩︎
zguotcs@gmail.com, Department of Computer Science and Engineering, The Ohio State University↩︎
This is an extended version of the conference paper [1], presented at IEEE ISIT 2025, which includes detailed proofs and an additional result, [thm:viderman_intro].↩︎
At a high level, this bears some similarity with the GMD decoding algorithm for concatenated codes [17], where a large \(d_H(x_{N(v)},y)\) suggests that \(y\) is likely incorrect.↩︎
It is likely that the statement holds for sub-constant \(\varepsilon\) as well. For simplicity, we do not discuss it further.↩︎
Due to the proof for large sets \(S\), the parameter \(c\) also needs to depend on \(\gamma\) and \(\varepsilon\).↩︎