This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Improved Construction of Robust Gray Codes

Dorsa Fathollahi Department of Electrical Engineering
Stanford University
Stanford, CA, USA
Email: [email protected]
   Mary Wootters Departments of Computer Science and Electrical Engineering
Stanford University
Stanford, CA, USA
Email: [email protected]
Abstract

A robust Gray code, formally introduced by (Lolck and Pagh, SODA 2024), is a Gray code that additionally has the property that, given a noisy version of the encoding of an integer jj, it is possible to reconstruct j^\hat{j} so that |jj^||j-\hat{j}| is small with high probability. That work presented a transformation that transforms a binary code 𝒞\mathcal{C} of rate RR to a robust Gray code with rate Ω(R)\Omega(R), where the constant in the Ω()\Omega(\cdot) can be at most 1/41/4. We improve upon their construction by presenting a transformation from a (linear) binary code 𝒞\mathcal{C} to a robust Gray code with similar robustness guarantees, but with rate that can approach R/2R/2.

I Introduction

In [1], Lolck and Pagh introduce the notion of a robust Gray code. Informally, a robust Gray code 𝒢{0,1}d\mathcal{G}\subseteq\{0,1\}^{d} has an encoding map Enc𝒢:{0,,N1}{0,1}d\mathrm{Enc}_{\mathcal{G}}:\{0,\ldots,N-1\}\to\{0,1\}^{d} that maps integers to bitstrings, with the following desiderata.

  • 𝒢\mathcal{G} should be a Gray code.111The paper [1] also gives a more general definition, where the code should have low sensitivity, meaning that |Enc𝒢(j)Enc𝒢(j+1)||\mathrm{Enc}_{\mathcal{G}}(j)-\mathrm{Enc}_{\mathcal{G}}(j+1)| is small; however, both their code and our code is a Gray code, so we specialize to that case (in which the sensitivity is 11). That is, for any j{0,,N2}j\in\{0,\ldots,N-2\}, |Enc𝒢(j)Enc𝒢(j+1)|=1|\mathrm{Enc}_{\mathcal{G}}(j)-\mathrm{Enc}_{\mathcal{G}}(j+1)|=1.

  • 𝒢\mathcal{G} should be “noise robust.” Informally, this means that we should be able to approximately recover an integer j{0,,N1}j\in\{0,\ldots,N-1\} given a noisy version of Enc𝒢(j)\mathrm{Enc}_{\mathcal{G}}(j). Slightly more formally, 𝒢\mathcal{G} should have a decoding map Dec𝒢:{0,1}d{0,,N1}\mathrm{Dec}_{\mathcal{G}}:\{0,1\}^{d}\to\{0,\ldots,N-1\}, so that when ηBer(p)n\eta\sim\mathrm{Ber}(p)^{n}, the estimate j^=Dec𝒢(Enc𝒢(j)η)\hat{j}=\mathrm{Dec}_{\mathcal{G}}(\mathrm{Enc}_{\mathcal{G}}(j)\oplus\eta) should be close to jj with high probability.

  • 𝒢\mathcal{G} should have high rate. The rate dlogN\frac{d}{\log N} of 𝒢\mathcal{G} should be as close to 11 as possible.

  • 𝒢\mathcal{G} should have efficient algorithms. Both Enc𝒢\mathrm{Enc}_{\mathcal{G}} and Dec𝒢\mathrm{Dec}_{\mathcal{G}} should have running time polynomial (ideally, near-linear) in dd.

Robust Gray codes have applications in differential privacy; see [1, 2, 3, 4] for more details on the connection. It is worth mentioning that there exist non-binary codes based on the Chinese Remainder Theorem [5, 6] that have nontrivial sensitivity, but in our work, we focus on binary codes.

Our Contributions. In this paper, we improve upon the construction of [1] by giving a construction of a robust Gray code with the same robustness guarantees, but better rate.

More precisely, for p(0,1/2)p\in(0,1/2), [1] give a general recipe for turning a binary error-correcting code 𝒞\mathcal{C} with rate RR into a robust Gray code 𝒢\mathcal{G} with rate Ω(R)\Omega(R), and with the following robustness guarantee:

Pr[|jDec𝒢(Enc𝒢(j)+η)|texp(Ω(t))+exp(Ω(d))+O(Pfail(𝒞)),\Pr[|j-\mathrm{Dec}_{\mathcal{G}}(\mathrm{Enc}_{\mathcal{G}}(j)+\eta)|\geq t\leq\exp(-\Omega(t))+\exp(-\Omega(d))+O(P_{\text{fail}}(\mathcal{C})), (1)

where the probability is over the noise vector ηBer(p)d\eta\sim\mathrm{Ber}(p)^{d}, and Pfail(𝒞)P_{\text{fail}}(\mathcal{C}) is the failure probability of the code 𝒞\mathcal{C} on the binary symmetric channel with parameter pp.

Our main result is a similar transformation that turns a (linear) binary code 𝒞\mathcal{C} with good performance on the binary symmetric channel into a robust Gray code 𝒢\mathcal{G}. We obtain a similar robustness guarantee as (1) (see Theorem 1 for the precise statement), but with better rate. Concretely, if the original code 𝒞\mathcal{C} has rate R(0,1)R\in(0,1), the rate of the robust Gray code from [1] is proven to be Ω(R)\Omega(R), where the constant inside the Ω\Omega approaches 1/41/4 when 𝒞\mathcal{C} has sublinear distance; this comes from the fact that the a codeword in their final construction involves four codewords from 𝒞\mathcal{C}. In contrast, under the same conditions, our robust Gray code 𝒢\mathcal{G} has rate approaching R/2R/2; this is because our construction involves only two codewords from 𝒞\mathcal{C}. (See Observation 2 for the formal statement). Moreover, if the encoding and decoding algorithms for 𝒞\mathcal{C} are efficient, then so are the encoding and decoding algorithms for our construction 𝒢\mathcal{G}; concretely, the overhead on top of the encoding and decoding algorithms for 𝒞\mathcal{C} is O(d)O(d) (see Lemma 7 for the formal statement).

As a result, when instantiated with, say, a constant-rate Reed-Muller code or a polar code (both of which have sublinear distance and good performance on the BSC(pp) (see, e.g., [7, 8, 9, 10, 11])), our construction gives efficient robust Gray codes with a rate about two times larger than than previous work, approaching 1/21/2.

Main Idea. The idea of our transformation is quite simple, and follows the same high-level structure as [1]. We begin with our base code 𝒞\mathcal{C}, and use it to construct an intermediate code 𝒲\mathcal{W} (with an appropriate ordering). Then we add new codewords to 𝒲\mathcal{W} to complete it to a Gray code. For example, if wi,wi+1w_{i},w_{i+1} are two consecutive codewords in 𝒲\mathcal{W}, then we will insert Δ(wi,wi+1)1\Delta(w_{i},w_{i+1})-1 codewords in between them, iteratively flipping bits to move from wiw_{i} to wi+1w_{i+1}.

The main difference between our construction and that of previous work is how we build and order 𝒲\mathcal{W}. First, we use a standard Gray code to construct an ordering of the codewords in 𝒞\mathcal{C}. Then, we build 𝒲\mathcal{W} as follows. Let cic_{i} be the ii’th codeword in 𝒞\mathcal{C}. Then the ii’th codeword in 𝒲\mathcal{W} is given by

wi=sicisicisi,w_{i}=s_{i}\circ c_{i}\circ s_{i}\circ c_{i}\circ s_{i},

where sis_{i} is a short string that is all zeros if ii is even and all ones otherwise, and \circ denotes concatenation. Then we form 𝒢\mathcal{G} by interpolating as described above.

Our decoding algorithm ends up being rather complicated, but the idea is simple. Suppose that for a codeword g𝒢g\in\mathcal{G}, we see a corrupted version g+η𝔽2dg+\eta\in\mathbb{F}_{2}^{d}, where η\eta is a noise vector. As described above, gg is made up of a prefix from wi+1w_{i+1} and a suffix from wiw_{i}, for some ii. Let h[d]h\in[d] be the index where gg “crosses over” from wi+1w_{i+1} to wiw_{i}. Notice that, as this crossover point can only be in one place, at least one of the two codewords of 𝒞\mathcal{C} appearing in gg will be complete, and equal to either cic_{i} or ci+1c_{i+1}. Thus, if we could identify where the crossover point hh was, then we could use 𝒞\mathcal{C}’s decoder to decode whichever the complete 𝒞\mathcal{C}-codeword was to identify ii; and then use our knowledge of where hh is to complete the decoding. The simple observation behind our construction is that, because the strings sis_{i} (which are either all zeros or all ones) flip with the parity of ii, we can tell (approximately) where hh was! Indeed, these strings will be all zeros before hh and all ones after hh, or vice versa. Of course, some noise will be added, but provided that the length of the strings sis_{i} are long enough, we will still be able to approximately locate hh with high probability.

However, there are several challenges to implementing this simple idea. For example, given ii and hh, how do we efficiently compute jj? (Here is where the fact that we ordered 𝒞\mathcal{C} carefully comes in; it’s not trivial because the number of codewords of 𝒢\mathcal{G} inserted between wiw_{i} and wi+1w_{i+1} depends on ii, so naively adding up the number of codewords of 𝒢\mathcal{G} that come before wiw_{i} and then adding hh would take exponential time.) Or, what happens when the crossover point hh is very close to the end of gj+ηg_{j}+\eta? (Here, it might be the case that we mis-identify ii; but we show that this does not matter, with high probability, because our final estimate will still be close to jj with high probability). In the rest of the paper, we show how to deal with these and other challenges.

II Preliminaries

We begin by setting notation. Throughout, we work with linear codes over 𝔽2\mathbb{F}_{2}, so all arithmetic between codewords is modulo 2. For x,y𝔽2x,y\in\mathbb{F}_{2}^{\ell}, let Δ(x,y)\Delta(x,y) denote the Hamming distance between xx and yy. We use x\|x\| to denote the Hamming weight of a vector x𝔽2x\in\mathbb{F}_{2}^{\ell}. For a code 𝒞𝔽2n\mathcal{C}\subseteq\mathbb{F}_{2}^{n}, the minimum distance of the code is given by D(𝒞):=maxccCΔ(c,c)D(\mathcal{C}):=\max_{c\neq c^{\prime}\in C}\Delta(c,c^{\prime}).

For two strings s1s_{1} and s2s_{2}, we use s1s2s_{1}\circ s_{2} to denote the concatenation of s1s_{1} and s2s_{2}. For a string s𝔽2s\in\mathbb{F}_{2}^{\ell} and for ii\leq\ell, we use prefi(s)𝔽2i\text{pref}_{i}(s)\in\mathbb{F}_{2}^{i} to denote the prefix of the string ss ending at (and including) index ii. Analogously, we use suffi(s)𝔽2i\text{suff}_{i}(s)\in\mathbb{F}_{2}^{\ell-i} be defined as the suffix of ss starting at (and including) index ii. For an integer \ell, we use [][\ell] to denote the set {1,,}\{1,\ldots,\ell\}.

For \ell\in\mathbb{Z}, let Maj:𝔽2𝔽2\mathrm{Maj}_{\ell}:\mathbb{F}_{2}^{\ell}\rightarrow\mathbb{F}_{2} be majority function on \ell bits. (In the case that \ell is even and a string y𝔽2y\in\mathbb{F}_{2}^{\ell} has an equal number of zeros and ones, Maj(y)\mathrm{Maj}_{\ell}(y) is defined to be a randomized function that outputs 0 or 11 each with probability 1/21/2.) We use Ber(p)\mathrm{Ber}(p) to denote the Bernoulli-pp distribution on 𝔽2\mathbb{F}_{2}, so if XBer(p)X\sim\mathrm{Ber}(p), then XX is 11 with probability pp and 0 with probability 1p1-p.

Next we define Binary Reflected Codes, a classical Gray code ([12]; see also, e.g., [13]); we will use these to define our ordering on 𝒞\mathcal{C}.

Definition 1 (Binary Reflected Code, [12]).

Let kk be a positive integer. The Binary Reflected Code (BRC) is a map k:{0,,2k1}𝔽2k\mathcal{R}_{k}:\{0,\ldots,2^{k}-1\}\rightarrow\mathbb{F}_{2}^{k} defined recursively as follows.

  1. 1.

    For k=1k=1, 1(0)=0\mathcal{R}_{1}(0)=0 and 1(1)=1\mathcal{R}_{1}(1)=1.

  2. 2.

    For k>1k>1, for any i{0,,2k1}i\in\{0,\ldots,2^{k}-1\},

    • If i<2k1i<2^{k-1}, then k(i)=0Rk1(i)\mathcal{R}_{k}(i)=0\circ R_{k-1}(i)

    • If i2k1i\geq 2^{k-1}, then k(i)=1R¯k1(2k1(i2k1))=1R¯k1(2ki).\mathcal{R}_{k}(i)=1\circ\overline{R}_{k-1}(2^{k-1}-(i-2^{k-1}))=1\circ\overline{R}_{k-1}(2^{k}-i).

It is not hard to see that for any two successive integers ii and i+1i+1, the encoded values k(i)\mathcal{R}_{k}(i) and k(i+1)\mathcal{R}_{k}(i+1) differ in exactly one bit. We will need one more building-block, the Unary code.

Definition 2 (Unary code).

The Unary code 𝒰𝔽2\mathcal{U}\subseteq\mathbb{F}_{2}^{\ell} is defined as the image of the encoding map Enc𝒰:{0,,}𝔽2\mathrm{Enc}_{\mathcal{U}}:\{0,\ldots,\ell\}\to\mathbb{F}_{2}^{\ell} given by Enc𝒰(v):=1v0v.\mathrm{Enc}_{\mathcal{U}}(v):=1^{v}\circ 0^{\ell-v}. The decoding map Dec𝒰:𝔽2{0,,}\mathrm{Dec}_{\mathcal{U}}:\mathbb{F}_{2}^{\ell}\to\{0,\ldots,\ell\} is given by

Dec𝒰(x)=argminv{0,,}Δ(x,Enc𝒰(v)).\mathrm{Dec}_{\mathcal{U}}(x)=\mathrm{argmin}_{v\in{\{0,\ldots,\ell\}}}\Delta(x,\mathrm{Enc}_{\mathcal{U}}(v)).

Next, we define the failure probability of a code 𝒞\mathcal{C}.

Definition 3.

Let 𝒞𝔽2n\mathcal{C}\subseteq\mathbb{F}_{2}^{n} be a code with message length kk and encoding and decoding maps Dec𝒞\mathrm{Dec}_{\mathcal{C}} and Enc𝒞\mathrm{Enc}_{\mathcal{C}} respectively. The probability of failure of 𝒞\mathcal{C} is

Pfail(𝒞)=maxv𝔽2kP[Dec𝒞(Enc𝒞(v)+ηp)v],P_{\text{fail}}(\mathcal{C})=\max_{v\in\mathbb{F}_{2}^{k}}P[\mathrm{Dec}_{\mathcal{C}}(\mathrm{Enc}_{\mathcal{C}}(v)+\eta_{p})\neq v],

where the probability is over a noise vector ηp𝔽2n\eta_{p}\in\mathbb{F}_{2}^{n} with ηpBer(p)n\eta_{p}\sim\mathrm{Ber}(p)^{n}.

III Construction

We recall the high-level overview of our construction from the introduction: To construct 𝒢\mathcal{G} we will start with a base code 𝒞\mathcal{C} where 𝒞𝔽2n\mathcal{C}\subseteq\mathbb{F}_{2}^{n}, which we will order in a particular way (Definition 4). Then we construct an intermediate code 𝒲={w0,,w2k1}𝔽2d\mathcal{W}=\{w_{0},\ldots,w_{2^{k}-1}\}\subseteq\mathbb{F}_{2}^{d}  by transforming the codewords of 𝒞\mathcal{C} (Definition 5); the codewords of 𝒲\mathcal{W} inherit an order of 𝒞\mathcal{C}. Finally, we create final code 𝒢𝔽2d\mathcal{G}\subseteq\mathbb{F}_{2}^{d} by adding new codewords that “interpolate” between the codewords of 𝒲\mathcal{W} so that it satisfies the Gray code condition (Definition 6). We discuss each of these steps in the subsequent subsections.

III-A Base Code 𝒞\mathcal{C}

Given a base code 𝒞𝔽2n\mathcal{C}\subset\mathbb{F}_{2}^{n}, we define an ordering on the elements of 𝒞\mathcal{C} as follows.

Definition 4.

[Ordering on 𝒞\mathcal{C}] Let 𝒞𝔽2n\mathcal{C}\subseteq\mathbb{F}_{2}^{n} be a linear code with block length nn and dimension kk. Let A𝒞𝔽2k×nA_{\mathcal{C}}\in\mathbb{F}_{2}^{k\times n} be a generator matrix for 𝒞\mathcal{C}, and let aia_{i} denote the ii-th row of A𝒞A_{\mathcal{C}}. Given i{0,,2k1}i\in\{0,\ldots,2^{k}-1\}, define ziz_{i} to be the unique integer so that k(i)[zi]k(i+1)[zi]\mathcal{R}_{k}(i)[z_{i}]\neq\mathcal{R}_{k}(i+1)[z_{i}].222As noted after Definition 1, k(i)\mathcal{R}_{k}(i) and k(i+1)\mathcal{R}_{k}(i+1) differ in only one bit, so ziz_{i} is well-defined. Let c0=0nc_{0}=0^{n}. Then, for all i{1,,2k1}i\in\{1,\ldots,2^{k}-1\}, the ii-th codeword of 𝒞\mathcal{C} is defined by

ci=ci1+azi.c_{i}=c_{i-1}+a_{z_{i}}.

Our next lemma establishes that indeed this ordering hits all of the codewords.

Lemma 1.

Let 𝒞\mathcal{C} be a linear code, and consider the ordering defined in Definition 4. For every c𝒞c\in\mathcal{C}, there is a unique index i{0,,2k1}i\in\{0,\ldots,2^{k}-1\} such that ci=cc_{i}=c.

Proof.

Observe that, by construction, we have

ci=k(i)TA𝒞.c_{i}=\mathcal{R}_{k}(i)^{T}A_{\mathcal{C}}.

Since k:{0,,2k1}𝔽2k\mathcal{R}_{k}:\{0,\ldots,2^{k}-1\}\to\mathbb{F}_{2}^{k} is a bijection and A𝒞A_{\mathcal{C}} is full rank, this implies that each codeword in 𝒞\mathcal{C} is uniquely represented as some cic_{i} for i{0,,2k1}.i\in\{0,\ldots,2^{k}-1\}.

III-B Intermediate Code 𝒲\mathcal{W}

Next, we describe how to generate our intermediate code 𝒲\mathcal{W}.

Definition 5.

Let 𝒞𝔽2n\mathcal{C}\subseteq\mathbb{F}_{2}^{n} be a linear code of dimension kk. Let (c0,,c2k1)(c_{0},\ldots,c_{2^{k}-1}) denote the ordering of codewords in 𝒞\mathcal{C} as per Definition 4. Let d=2n+3D(𝒞)d=2n+3D(\mathcal{C}). The intermediate code 𝒲\mathcal{W}, along with its ordering, is defined as follows. For each i{0,,2k1}i\in\{0,\ldots,2^{k}-1\}, define wi𝔽2dw_{i}\in\mathbb{F}_{2}^{d} by the equation

wi={0D(𝒞)ci0D(𝒞)ci0D(𝒞)if i is even1D(𝒞)ci1D(𝒞)ci1D(𝒞)if i is oddw_{i}=\begin{cases}0^{D(\mathcal{C})}\circ c_{i}\circ 0^{D(\mathcal{C})}\circ c_{i}\circ 0^{D(\mathcal{C})}&\text{if }i\text{ is even}\\ 1^{D(\mathcal{C})}\circ c_{i}\circ 1^{D(\mathcal{C})}\circ c_{i}\circ 1^{D(\mathcal{C})}&\text{if }i\text{ is odd}\end{cases} (2)

Then, 𝒲\mathcal{W} is the subset of 𝔽2d\mathbb{F}_{2}^{d} defined by 𝒲={wi:i{1,,2k1}}\mathcal{W}=\{w_{i}\,:\,i\in\{1,\ldots,2^{k}-1\}\}, where the code 𝒲\mathcal{W} is ordered as (w0,,w2k1)(w_{0},\ldots,w_{2^{k}-1}).

III-C Final Code 𝒢\mathcal{G}

To create our robust Gray code 𝒢\mathcal{G}, given any two consecutive codewords in 𝒲\mathcal{W}, we inject extra codewords between them to create 𝒢\mathcal{G}, as follows.

Definition 6 (Definition of our robust Gray code 𝒢\mathcal{G}; and the parameters ri,hi,jr_{i},h_{i,j}).

Let 𝒲𝔽2d\mathcal{W}\subseteq\mathbb{F}_{2}^{d} be a code defined as in Definition 5. For each i[2k]i\in[2^{k}], define ri==1iΔ(w1,w)r_{i}=\sum_{\ell=1}^{i}\Delta(w_{\ell-1},w_{\ell}), and let N=r2kN=r_{2^{k}}. For i[2k]i\in[2^{k}] and 1j<Δ(wi,wi+1)1\leq j<\Delta(w_{i},w_{i+1}), let hi,j{0,,d1}h_{i,j}\in\{0,\ldots,d-1\} be the jj-th index where codewords wiw_{i} and wi+1w_{i+1} differ.

Define the zero’th codeword of 𝒢\mathcal{G} as g0=w0g_{0}=w_{0}. Fix j{1,,N1}j\in\{1,\ldots,N-1\}. If j=rij=r_{i} for some ii, we define gj𝔽2dg_{j}\in\mathbb{F}_{2}^{d} by gj=wig_{j}=w_{i}. On the other hand, if j(ri,ri+1)j\in(r_{i},r_{i+1}) for some ii, then we define gj𝔽2dg_{j}\in\mathbb{F}_{2}^{d} as

gj=prefhi,jri(wi+1)suffhi,jri+1(wi).g_{j}=\text{pref}_{h_{i,j-r_{i}}}(w_{i+1})\circ\text{suff}_{h_{i,j-r_{i}}+1}(w_{i}). (3)

Finally, define 𝒢𝔽2d\mathcal{G}\subseteq\mathbb{F}_{2}^{d} by 𝒢={gi:i{0,,N1}},\mathcal{G}=\{g_{i}\,:\,i\in\{0,\ldots,N-1\}\}, along with the encoding map Enc𝒢:{0,,N1}𝔽2d\mathrm{Enc}_{\mathcal{G}}:\{0,\ldots,N-1\}\to\mathbb{F}_{2}^{d} given by Enc𝒢(i)=gi\mathrm{Enc}_{\mathcal{G}}(i)=g_{i}.

We will also define hi=(hi,1,hi,2,,hi,Δ(wi,wi+1)1){0,,d1}Δ(wi,wi+1)1h_{i}=(h_{i,1},h_{i,2},\ldots,h_{i,\Delta(w_{i},w_{i+1})-1})\in\{0,\ldots,d-1\}^{\Delta(w_{i},w_{i+1})-1} to be the vector of all indices in which wiw_{i} and wi+1w_{i+1} differ, in order, except for the last one.333The reason we don’t include the last one is because once the last differing bit has been flipped, gjg_{j} will lie in [wi+1,wi+2)[w_{i+1},w_{i+2}), not [wi,wi+1)[w_{i},w_{i+1}).

It will frequently be useful to be able to locate j[N]j\in[N] within a block [ri,ri+1)[r_{i},r_{i+1}). To that end, we introduce the following notation.

Definition 7.

Let j{0,,N1}j\in\{0,\ldots,N-1\}. Let i{0,,2k1}i\in\{0,\ldots,2^{k}-1\} be such that j[ri,ri+1)j\in[r_{i},r_{i+1}). Then we will use the notation j¯\bar{j} to denote jrij-r_{i}. That is, j¯\bar{j} is the index of jj in the block [ri,ri+1)[r_{i},r_{i+1}).

Note that, in this notation, when j[ri,ri+1)j\in[r_{i},r_{i+1}), the last bit that has been flipped to arrive at gjg_{j} in the ordering of 𝒢\mathcal{G} (that is, the “crossover point” alluded to in the introduction) is hi,j¯.h_{i,\bar{j}}. We make a few useful observations about Definition 6. The first two follow immediately from the definition.

Observation 1.

𝒢\mathcal{G} is a Gray code. That is, For any j{0,,N1}j\in\{0,\ldots,N-1\}, we have that Δ(gj,gj+1)=1\Delta(g_{j},g_{j+1})=1.

Observation 2.

Suppose that 𝒞𝔽2n\mathcal{C}\subseteq\mathbb{F}_{2}^{n} has rate R=log2|𝒞|/nR=\log_{2}|\mathcal{C}|/n and distance o(n)o(n). Then the code 𝒢\mathcal{G} constructed as in Definition 6 has rate that approaches R/2R/2 as NN\to\infty.

Observation 3.

Let gj𝒢g_{j}\in\mathcal{G}, and suppose that j(ri,ri+1)j\in(r_{i},r_{i+1}) for some i{0,,2k1}i\in\{0,\ldots,2^{k}-1\}. Then

(gj+wi)[hi]=Enc𝒰(j¯),(g_{j}+w_{i})[h_{i}]=\mathrm{Enc}_{\mathcal{U}}(\bar{j}),

where 𝒰𝔽2Δ(wi,wi+1)\mathcal{U}\subset\mathbb{F}_{2}^{\Delta(w_{i},w_{i+1})} is the unary code of length Δ(wi,wi+1)\Delta(w_{i},w_{i+1}). Above, (gj+wi)[hi](g_{j}+w_{i})[h_{i}] denotes the restriction of the vector gi+wi𝔽2dg_{i}+w_{i}\in\mathbb{F}_{2}^{d} to the indices that appear in the vector hih_{i}.

Proof.

By definition, hih_{i} contains the indices on which wiw_{i} and wi+1w_{i+1} differ, and also by definition, by the time we have reached gjg_{j}, the first jri=j¯j-r_{i}=\bar{j} of these indices have been flipped from agreeing with wiw_{i} to agreeing with wi+1w_{i+1}. Thus, if we add gjg_{j} and wiw_{i} (mod 2), we will get 11 on the first jrij-r_{i} indices and 0 on the on the rest. ∎

Before we move on, we show Definition 6 actually defines an injective map.

Lemma 2.

Let 𝒢\mathcal{G} be a code with encoding map Enc𝒢\mathrm{Enc}_{\mathcal{G}} be as defined in Definition 6. Then Enc𝒢\mathrm{Enc}_{\mathcal{G}} is injective.

Proof.

Assume, for the sake of contradiction, that there are two distinct j,j{0,,N1}j,j^{\prime}\in\{0,\ldots,N-1\} such that gj=gjg_{j}=g_{j^{\prime}}. Without loss of generality assume that j>jj^{\prime}>j. There are three scenarios possible.

  1. 1.

    Case 1: Both jj and jj^{\prime} are in the interval [ri,ri+1)[r_{i},r_{i+1}). Then we claim that gj[hi,j¯]gj[hi,j¯]g_{j}[h_{i,\bar{j^{\prime}}}]\neq g_{j^{\prime}}[h_{i,\bar{j^{\prime}}}]. The reason is that gj[hi,j¯]=wi[hi,j¯]g_{j}[h_{i,\bar{j^{\prime}}}]=w_{i}[h_{i,\bar{j^{\prime}}}] and gj[hi,j¯]=wi+1[hi,j¯]g_{j^{\prime}}[h_{i,\bar{j^{\prime}}}]=w_{i+1}[h_{i,\bar{j^{\prime}}}]; but by definition of hi,j¯h_{i,\bar{j^{\prime}}}, wi[hi,j¯]wi+1[hi,j¯]w_{i}[h_{i,\bar{j^{\prime}}}]\neq w_{i+1}[h_{i,\bar{j^{\prime}}}]. Thus, gjgjg_{j}\neq g_{j^{\prime}}.

  2. 2.

    Case 2: j[ri1,ri)j\in[r_{i-1},r_{i}) and j[ri,ri+1)j^{\prime}\in[r_{i},r_{i+1}). Then gjg_{j} is an interpolation of wi1w_{i-1} and wiw_{i}, and gjg_{j^{\prime}} is an interpolation of wiw_{i} and wi+1w_{i+1}. Notice that gj[d1]=wi1[d1]g_{j}[d-1]=w_{i-1}[d-1] and gj[d1]=wi[d1]g_{j^{\prime}}[d-1]=w_{i}[d-1], as the last index of the codewords gjg_{j} and gjg_{j^{\prime}} has not been flipped yet. However, as ii and i1i-1 have different parity, wi[d1]wi1[d1]w_{i}[d-1]\neq w_{i-1}[d-1], which implies gjgjg_{j}\neq g_{j^{\prime}}.

  3. 3.

    Case 3: j[ri,ri+1)j\in[r_{i},r_{i+1}) and j[ri,ri+1)j^{\prime}\in[r_{i^{\prime}},r_{i^{\prime}+1}) where |ii|>1|i-i^{\prime}|>1. In this scenario, {ci,ci+1}{ci,ci+1}=\{c_{i},c_{i+1}\}\cap\{c_{i^{\prime}},c_{i^{\prime}+1}\}=\emptyset. Suppose that neither hi,j¯h_{i,\bar{j}} nor hi,j¯h_{i^{\prime},\bar{j^{\prime}}} are in [D(𝒞),D(𝒞)+n)[D(\mathcal{C}),D(\mathcal{C})+n). Then c~1(gj){ci,ci+1}\tilde{c}_{1}(g_{j})\in\{c_{i},c_{i+1}\} and c1~(gj){ci,ci+1}\tilde{c_{1}}(g_{j^{\prime}})\in\{c_{i^{\prime}},c_{i^{\prime}+1}\} leading to c~1(gj)c1~(gj)\tilde{c}_{1}(g_{j})\neq\tilde{c_{1}}(g_{j^{\prime}}) hence gjgjg_{j}\neq g_{j^{\prime}}. The same holds if neither are in [2D(𝒞)+n,2D(𝒞)+2n)[2D(\mathcal{C})+n,2D(\mathcal{C})+2n), repeating the argument with c~2\tilde{c}_{2}. The final sub-case is that hi,j¯[D(𝒞),D(𝒞)+n)h_{i,\bar{j}}\in[D(\mathcal{C}),D(\mathcal{C})+n) and hi,j¯[2D(𝒞)+n,2D(𝒞)+2n)h_{i^{\prime},\bar{j^{\prime}}}\in[2D(\mathcal{C})+n,2D(\mathcal{C})+2n) or vice versa. If this occurs (suppose without loss of generality, it is the first one, not the “vice versa” case), then according to Lemma 4, s1(gj)s2(gj)s_{1}(g_{j})\neq s_{2}(g_{j}), however for gjg_{j^{\prime}}, s1(gj)=s1(wi+1)=s2(wi+1)=s2(gj)s_{1}(g_{j^{\prime}})=s_{1}(w_{i^{\prime}+1})=s_{2}(w_{i^{\prime}+1})=s_{2}(g_{j^{\prime}}). This implies that either s1(gj)s1(gj)s_{1}(g_{j})\neq s_{1}(g_{j^{\prime}}) or s2(gj)s2(gj)s_{2}(g_{j})\neq s_{2}(g_{j^{\prime}}), which implies that gjgjg_{j}\neq g_{j^{\prime}}, as desired.

IV Decoding Algorithm and Analysis

In this section, we define our decoding algorithm and analyze it. We begin with some notation for the different parts of the codewords gj𝒢g_{j}\in\mathcal{G}. For a string xx, we use x[i:i]x[i:i^{\prime}] to denote the substring (xi,xi+1,,xi1)(x_{i},x_{i+1},\ldots,x_{i^{\prime}-1}). With this notation, for any x𝔽2dx\in\mathbb{F}_{2}^{d}, define the following substrings:

  • s1(x)=x[0:D(𝒞)]s_{1}(x)=x[0:D(\mathcal{C})]

  • c~1(x)=x[D(𝒞):D(𝒞)+n]\tilde{c}_{1}(x)=x[D(\mathcal{C}):D(\mathcal{C})+n]

  • s2(x)=x[D(𝒞)+n:2D(𝒞)+n]s_{2}(x)=x[D(\mathcal{C})+n:2D(\mathcal{C})+n]

  • c~2(x)=x[2D(𝒞)+n,2D(𝒞)+2n]\tilde{c}_{2}(x)=x[2D(\mathcal{C})+n,2D(\mathcal{C})+2n]

  • s3(x)=x[2D(𝒞)+2n:3D(𝒞)+2n]s_{3}(x)=x[2D(\mathcal{C})+2n:3D(\mathcal{C})+2n].

Notice that if x𝒢x\in\mathcal{G}, then c~1\tilde{c}_{1} and c~2\tilde{c}_{2} are in locations corresponding to the codewords of 𝒞\mathcal{C} that appear in codewords of 𝒲\mathcal{W}, while s1,s2s_{1},s_{2}, and s3s_{3} are in locations corresponding to the 0D(𝒞)0^{D(\mathcal{C})} and 1D(𝒞)1^{D(\mathcal{C})} strings.

Before we formally state the algorithm (Algorithm 2 below), we prove a few lemmas to motivate its structure.

Our first lemma formalizes the intuition in the introduction that at most one of the “chunks” in each codeword gjg_{j} is broken up by the crossover point hi,j¯h_{i,\bar{j}}.

Lemma 3.

Fix j{0,,N1}j\in\{0,\ldots,N-1\}. Suppose that i{0,,2k1}i\in\{0,\ldots,2^{k}-1\} is such that j[ri,ri+1)j\in[r_{i},r_{i+1}), so gj𝒢g_{j}\in\mathcal{G} can be written as gj=s1c~1s2c~2s3g_{j}=s_{1}\circ\tilde{c}_{1}\circ s_{2}\circ\tilde{c}_{2}\circ s_{3} as above. Then at most one of the substrings in 𝒮={s1,s2,s3,c~1,c~2}\mathcal{S}=\{s_{1},s_{2},s_{3},\tilde{c}_{1},\tilde{c}_{2}\} that is not equal to the corresponding substring in wiw_{i} or wi+1w_{i+1}.

Proof.

First, suppose that j=rij=r_{i}. Then in that case gj=wig_{j}=w_{i} and all of the substrings in 𝒮\mathcal{S} are equal to their corresponding substring. Otherwise, j(ri,ri+1)j\in(r_{i},r_{i+1}). In that case, j¯(0,ri+1ri)=(0,Δ(wi,wi+1))\bar{j}\in(0,r_{i+1}-r_{i})=(0,\Delta(w_{i},w_{i+1})). This means that hi,j¯h_{i,\bar{j}} (the “crossover point” for gjg_{j}) is defined, and indexes a position in gjg_{j}, and in particular in one of the sub-strings in 𝒮\mathcal{S}. Then other substrings strictly to the left of hi,j¯h_{i,\bar{j}} are equal to their corresponding substring in wi+1w_{i+1}; and the ones strictly to the right are equal to the corresponding substring in wiw_{i}. ∎

Using the language of Lemma 3, we say that a substring in 𝒮\mathcal{S} that is equal to its corresponding substring in wiw_{i} is a full chunk. Thus, Lemma 3 implies that there are at least four full chunks in any gj𝒢g_{j}\in\mathcal{G}. Notice that it is possible that a substring c~\tilde{c}_{\ell} is in 𝒞\mathcal{C} but is not a full chunk. We say that all full chunks are decoded correctly if, for full chunk of xx, when we run the corresponding decoder, we get the right answer. That is, if c~1(x)\tilde{c}_{1}(x) is a full chunk, then if we were to run Dec𝒞\mathrm{Dec}_{\mathcal{C}} on c~1(x)\tilde{c}_{1}(x) we would obtain c~1(gj)\tilde{c}_{1}(g_{j}), and similarly for c~2\tilde{c}_{2}; and if s1(x)s_{1}(x) is a full chunk, and we were to run MajD(𝒞)\mathrm{Maj}_{D(\mathcal{C})} on s1(x)s_{1}(x), we would obtain s1(gj)s_{1}(g_{j}), and similarly for s2s_{2} and s3s_{3}.

Next, we show that if the “crossover point” hi,j¯h_{i,\bar{j}} does not point to one of chunks s1,s2s_{1},s_{2}, or s3s_{3}, then there are at least two of them that differ.

Lemma 4.

Let 𝒢\mathcal{G} be a code defined as in Definition 6. Fix any gj𝒢g_{j}\in\mathcal{G} and let rir_{i} be such that j[ri,ri+1)j\in[r_{i},r_{i+1}). Suppose that hi,j¯[D(𝒞),D(𝒞)+n)[2D(𝒞)+n,2D(𝒞)+2n)h_{i,{\bar{j}}}\in[D(\mathcal{C}),D(\mathcal{C})+n)\cup[2D(\mathcal{C})+n,2D(\mathcal{C})+2n); that is, hi,j¯h_{i,\bar{j}} indexes a position in c~i(gj)\tilde{c}_{i^{\prime}}(g_{j}) for some i{1,2}i^{\prime}\in\{1,2\}. Then si(gj)si+1(gj)s_{i^{\prime}}(g_{j})\neq s_{i^{\prime}+1}(g_{j}).

Proof.

Without loss of generality, suppose that i=1i^{\prime}=1. By definition, we have

gj=prefhi,j¯(wi+1)suffhi,j¯+1(wi).g_{j}=\mathrm{pref}_{h_{i,\bar{j}}}(w_{i+1})\circ\mathrm{suff}_{h_{i,\bar{j}}+1}(w_{i}).

In particular, since the “cut-off” hi,j¯h_{i,\bar{j}} points to a position within c~1(gj)\tilde{c}_{1}(g_{j}), we have that both s1(gj)s_{1}(g_{j}) and s2(gj)s_{2}(g_{j}) are full chunks, and further s1(gj)s_{1}(g_{j}) agrees with wi+1w_{i+1}, while s2(gj)s_{2}(g_{j}) agrees with wiw_{i}. Since ii and i+1i+1 have different parities, either s1(gj)=0D(𝒞)s_{1}(g_{j})=0^{D(\mathcal{C})} and s2(gj)=1D(𝒞)s_{2}(g_{j})=1^{D(\mathcal{C})}, or the other way around; in either case, they are different. The same argument holds when i=2i^{\prime}=2.

Finally, we break things up into three cases, which will be reflected in our algorithm. In each case, we can use the pattern of the chunks s1(x),s2(x),s3(x)s_{1}(x),s_{2}(x),s_{3}(x) to get an estimate for cic_{i} or ci+1c_{i+1}, and bound where the crossover point hi,j¯h_{i,\bar{j}} will be.

Lemma 5.

Let gj𝒢g_{j}\in\mathcal{G} and let ii be such that j[ri,ri+1)j\in[r_{i},r_{i+1}). Let ηBer(p)d\eta\sim\mathrm{Ber}(p)^{d} where p(0,1/2)p\in(0,1/2). Let x=gj+ηx=g_{j}+\eta be a received input. Then define v^i=Dec𝒞(c~i(x))\hat{v}_{i^{\prime}}=\mathrm{Dec}_{\mathcal{C}}(\tilde{c}_{i^{\prime}}(x)) for i{1,2}i^{\prime}\in\{1,2\} and bi=MajD(𝒞)(si(x))b_{i^{\prime}}=\mathrm{Maj}_{D(\mathcal{C})}(s_{i^{\prime}}(x)) for i{1,2,3}i^{\prime}\in\{1,2,3\}. Assume that all full chunks are decoded correctly by their corresponding decoder. Then the following hold.

  1. 1.

    If (b1,b2,b3){(1,1,0),(0,0,1)}(b_{1},b_{2},b_{3})\in\{(1,1,0),(0,0,1)\}, then Enc𝒞(v^1)=ci+1\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1})=c_{i+1} and hi,j¯n+D(𝒞)h_{i,\bar{j}}\geq n+D(\mathcal{C}).

  2. 2.

    If (b1,b2,b3){(0,1,1),(1,0,0)}(b_{1},b_{2},b_{3})\in\{(0,1,1),(1,0,0)\}, then Enc𝒞(v^2)=ci\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{2})=c_{i} and hi,j¯n+2D(𝒞)h_{i,\bar{j}}\leq n+2D(\mathcal{C}).

  3. 3.

    If (b1,b2,b3){(0,0,0),(1,1,1)}(b_{1},b_{2},b_{3})\in\{(0,0,0),(1,1,1)\}, then Enc𝒞(v^1)=Enc𝒞(v^2){ci,ci+1}\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1})=\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{2})\in\{c_{i},c_{i+1}\} and hi,j¯[0,D(𝒞))[dD(𝒞),d)h_{i,\bar{j}}\in[0,D(\mathcal{C}))\cup[d-D(\mathcal{C}),d). Moreover, if hi,j¯[0,D(𝒞))h_{i,\bar{j}}\in[0,D(\mathcal{C})), then c~1(gj)=c~2(gj)=ci\tilde{c}_{1}(g_{j})=\tilde{c}_{2}(g_{j})=c_{i}; and otherwise they are equal to ci+1c_{i+1}.

Proof.

We address each case individually.

  1. 1.

    If (b1,b2,b3){(1,1,0),(0,0,1)}(b_{1},b_{2},b_{3})\in\{(1,1,0),(0,0,1)\} then we claim that hi,j¯n+D(𝒞)h_{i,\bar{j}}\geq n+D(\mathcal{C}). Assume otherwise. If hi,j¯[0,D(𝒞))h_{i,\bar{j}}\in[0,D(\mathcal{C})), then gj[D(𝒞):]=wi[D(𝒞):]g_{j}[D(\mathcal{C}):]=w_{i}[D(\mathcal{C}):]. This means that s2(gj)=s3(gj)s_{2}(g_{j})=s_{3}(g_{j}), and are full chunks. Given the assumption that all the full chunks are decoded correctly, b2=Maj(s2(x))=Maj(s3(x))=b3b_{2}=\mathrm{Maj}(s_{2}(x))=\mathrm{Maj}(s_{3}(x))=b_{3} but that contradicts our assumption for this case; so we conclude that hi,j¯[0,D(𝒞))h_{i,\bar{j}}\not\in[0,D(\mathcal{C})). Thus, hi,j¯[D(𝒞),n+D(𝒞))h_{i,\bar{j}}\in[D(\mathcal{C}),n+D(\mathcal{C})). But then then s1(gj)s_{1}(g_{j}) and s2(gj)s_{2}(g_{j}) are full chunks, and according to Lemma 4, s1(gj)s2(gj)s_{1}(g_{j})\neq s_{2}(g_{j}). Again using the assumption of correct decoding of all full chunks, this implies that b1b2b_{1}\neq b_{2}, which again contradicts our assumption for this case. This establishes the claim that hi,j¯n+D(𝒞)h_{i,\bar{j}}\geq n+D(\mathcal{C}).

    Finally, the fact that hi,j¯n+D(𝒞)h_{i,\bar{j}}\geq n+D(\mathcal{C}) implies that c~1(gj)=c~1(wi+1)=ci+1\tilde{c}_{1}(g_{j})=\tilde{c}_{1}(w_{i+1})=c_{i+1}, and c~1(gj)\tilde{c}_{1}(g_{j}) is a full chunk. Using the assumption of correct decoding of all full chunks, we get that Enc𝒞(v^1)=ci+1\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1})=c_{i+1}

  2. 2.

    If (b1,b2,b3){(0,1,1),(1,0,0)}(b_{1},b_{2},b_{3})\in\{(0,1,1),(1,0,0)\}, then the conclusion follows by an argument nearly identical to case 1.

  3. 3.

    If (b1,b2,b3){(0,0,0),(1,1,1)}(b_{1},b_{2},b_{3})\in\{(0,0,0),(1,1,1)\}, then we claim that hi,j¯[0,D(𝒞))[dD(𝒞),d)h_{i,\bar{j}}\in[0,D(\mathcal{C}))\cup[d-D(\mathcal{C}),d). Assume otherwise, then s1(gj)=s1(wi+1)s_{1}(g_{j})=s_{1}(w_{i+1}) and s3(gj)=s3(wi)s_{3}(g_{j})=s_{3}(w_{i}) and they are full chunks. Now as ii and i+1i+1 do not have the same parity, s1(gj)s3(gj)s_{1}(g_{j})\neq s_{3}(g_{j}). As a result, if all full chunks are decoded correctly, we have that b1b3b_{1}\neq b_{3}, which contradicts our assumption in this case. This proves our claim that hi,j¯[0,D(𝒞))[dD(𝒞),d)h_{i,\bar{j}}\in[0,D(\mathcal{C}))\cup[d-D(\mathcal{C}),d).

    If hi,j¯[0,D(𝒞))h_{i,\bar{j}}\in[0,D(\mathcal{C})) then c~1(gj)=c~2(gj)=ci\tilde{c}_{1}(g_{j})=\tilde{c}_{2}(g_{j})=c_{i}; if hi,j¯[dD(𝒞),d)h_{i,\bar{j}}\in[d-D(\mathcal{C}),d) then c~1(gj)=c~2(gj)=ci+1\tilde{c}_{1}(g_{j})=\tilde{c}_{2}(g_{j})=c_{i+1}; and in either case both are full chunks. Using the assumption that all full chunks are decoded correctly, we see that Enc𝒞(v^1)=Enc𝒞(v^2){ci,ci+1}\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1})=\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{2})\in\{c_{i},c_{i+1}\}, as desired.

IV-A Decoding Algorithm

Before we state our main algorithm (Algorithm 2 below), we include a helper algorithm, compute-r (Algorithm 1). This algorithm takes an index i{0,,2k1}i\in\{0,\ldots,2^{k}-1\} and returns rir_{i}. Note that this is not trivial to do efficiently: If we wanted to compute rir_{i} directly from the definition, that would require computing or storing Δ(w,w+1)\Delta(w_{\ell},w_{\ell+1}) for all i\ell\leq i and adding them up, which may take time Ω(2k)\Omega(2^{k}). Instead, we do something much faster.

Algorithm 1 compute-r
Input: i{0,,2k1}i\in\{0,...,2^{k}-1\}
r^i=0\hat{r}_{i}=0
for z{0,,k1}z\in\{0,\ldots,k-1\} do
     r^i=r^i+2max(i2z,0)2z+1az+3D(𝒞)\hat{r}_{i}=\hat{r}_{i}+2\lfloor\frac{\max(i-2^{z},0)}{2^{z+1}}\rfloor\cdot\|a_{z}\|+3D(\mathcal{C}) \triangleright aza_{z} is the zz’th row of the generator matrix of 𝒞\mathcal{C}.
end for
Return: r^i\hat{r}_{i}
Lemma 6.

The Algorithm compute-r  (Algorithm 1) correctly computes rir_{i}.

Proof.

Recall that ri==0i1Δ(w,w+1)r_{i}=\sum_{\ell=0}^{i-1}\Delta(w_{\ell},w_{\ell+1}). Consider a fixed difference Δ(w,w+1)\Delta(w_{\ell},w_{\ell+1}). This is precisely

Δ(w,w+1)=2az+3D(𝒞),\Delta(w_{\ell},w_{\ell+1})=2\|a_{z_{\ell}}\|+3D(\mathcal{C}), (4)

where zz_{\ell} is the unique index so that k()[z]k(+1)[z]\mathcal{R}_{k}(\ell)[z_{\ell}]\neq\mathcal{R}_{k}(\ell+1)[z_{\ell}]: indeed, by Definition 4, Δ(c,c+1)=az\Delta(c_{\ell},c_{\ell+1})=\|a_{z_{\ell}}\|, and from that (4) follows from the definition of 𝒲\mathcal{W} (Definition 5). Thus, in order to compute

ri==0i1(2az+3D(𝒞)),r_{i}=\sum_{\ell=0}^{i-1}(2\|a_{z_{\ell}}\|+3D(\mathcal{C})),

it suffices to count how often each index z{0,,k1}z\in\{0,\ldots,k-1\} shows up as some zz_{\ell} in that sum. This is precisely max(i2z,0)2z+1,\left\lfloor\frac{\max(i-2^{z},0)}{2^{z+1}}\right\rfloor, by the definition of k\mathcal{R}_{k}. ∎

Our final algorithm is given in Algorithm 2. It is organized into the three cases of Lemma 5. To help the reader, we have included comments saying what each estimate “should” be. Here, “should” is under the assumption that each full chunk is decoded correctly.

Algorithm 2 Dec𝒢\mathrm{Dec}_{\mathcal{G}}: Decoding algorithm for 𝒢\mathcal{G}
1:Input: x=gj+η𝔽2dx=g_{j}+\eta\in\mathbb{F}_{2}^{d}
2:Output: j^[N]\hat{j}\in[N]
3:for  {1,2}\ell\in\{1,2\} do
4:     v^=Dec𝒞(c~(x))\hat{v}_{\ell}=\mathrm{Dec}_{\mathcal{C}}(\tilde{c}_{\ell}(x)) \triangleright Decode c~1(x)\tilde{c}_{1}(x) and c~2(x)\tilde{c}_{2}(x) individually to obtain v^1,v^2{0,,2k1}\hat{v}_{1},\hat{v}_{2}\in\{0,\ldots,2^{k}-1\}.
5:end for
6:for  {1,2,3}\ell\in\{1,2,3\}  do
7:     b=MajD(𝒞)(s(x))b_{\ell}=\mathrm{Maj}_{D(\mathcal{C})}(s_{\ell}(x)) \triangleright Decode each s(x)s_{\ell}(x) to obtain b{0,1}b_{\ell}\in\{0,1\}.
8:end for
9:\triangleright Below, in the comments we note what each value “should” be. This is what these values will be under the assumption that each full chunk is decoded correctly.
10:if (b1,b2,b3){(1,1,0),(0,0,1)}(b_{1},b_{2},b_{3})\in\{(1,1,0),(0,0,1)\} then \triangleright Case 1: Enc𝒞(v^1)\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1}) should be ci+1c_{i+1}
11:     ι^=k1(v^1)\hat{\iota}=\mathcal{R}_{k}^{-1}(\hat{v}_{1}) \triangleright ι^\hat{\iota} should be i+1i+1
12:     v^=k(ι^1)\hat{v}=\mathcal{R}_{k}(\hat{\iota}-1) \triangleright v^\hat{v} should be the BRC corresponding to ii
13:     c^1=Enc𝒞(v^)\hat{c}_{1}=\mathrm{Enc}_{\mathcal{C}}(\hat{v}) \triangleright c^1\hat{c}_{1} should be cic_{i}
14:     c^2=Enc𝒞(v^1)\hat{c}_{2}=\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1}) \triangleright c^2\hat{c}_{2} should be ci+1c_{i+1}
15:     w^1=Enc𝒲(c^1)\hat{w}_{1}=\mathrm{Enc}_{\mathcal{W}}(\hat{c}_{1}) \triangleright w^1\hat{w}_{1} should be wiw_{i}
16:     w^2=Enc𝒲(c^2)\hat{w}_{2}=\mathrm{Enc}_{\mathcal{W}}(\hat{c}_{2}) \triangleright w^2\hat{w}_{2} should be wi+1w_{i+1}
17:     H={hι^1:n+D(𝒞)}H^{\prime}=\{\ell\in h_{\hat{\iota}-1}\,:\,\ell\geq n+D(\mathcal{C})\} \triangleright Should be the set of indices that appear in hih_{i} that are at least n+D(𝒞)n+D(\mathcal{C}).
18:     u=Dec𝒰(x[H]+w^1[H])u=\mathrm{Dec}_{\mathcal{U}}(x[H^{\prime}]+\hat{w}_{1}[H^{\prime}]) \triangleright uu is an estimate of hi,j¯Δ(ci,ci+1)D(𝒞)h_{i,\bar{j}}-\Delta(c_{i},c_{i+1})-D(\mathcal{C})
19:     j^=u+D(𝒞)+Δ(c^1,c^2)+compute-r(ι^1)\hat{j}=u+D(\mathcal{C})+\Delta(\hat{c}_{1},\hat{c}_{2})+\texttt{compute-r}(\hat{\iota}-1)
20:else if  (b1,b2,b3){(0,1,1),(1,0,0)}(b_{1},b_{2},b_{3})\in\{(0,1,1),(1,0,0)\} then \triangleright Case 2: Enc𝒞(v^2)\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{2}) should be cic_{i}
21:     ι^=k1(v^2)\hat{\iota}=\mathcal{R}_{k}^{-1}(\hat{v}_{2}) \triangleright ι^\hat{\iota} should be ii
22:     v^=k(ι^+1)\hat{v}=\mathcal{R}_{k}(\hat{\iota}+1) \triangleright v^\hat{v} should be the BRC corresponding to i+1i+1
23:     c^1=Enc𝒞(v^2)\hat{c}_{1}=\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{2}) \triangleright c^1\hat{c}_{1} should be cic_{i}
24:     c^2=Enc𝒞(v^)\hat{c}_{2}=\mathrm{Enc}_{\mathcal{C}}(\hat{v}) \triangleright c^2\hat{c}_{2} should be ci+1c_{i+1}
25:     w^1=Enc𝒲(c^1)\hat{w}_{1}=\mathrm{Enc}_{\mathcal{W}}(\hat{c}_{1}) \triangleright w^1\hat{w}_{1} should be wiw_{i}
26:     w^2=Enc𝒲(c^2)\hat{w}_{2}=\mathrm{Enc}_{\mathcal{W}}(\hat{c}_{2}) \triangleright w^2\hat{w}_{2} should be wi+1w_{i+1}
27:     H={hι^1:<n+2D(𝒞)}H^{\prime}=\{\ell\in h_{\hat{\iota}-1}\,:\,\ell<n+2D(\mathcal{C})\}
28:     \triangleright HH^{\prime} should be the set of indices that appear in hih_{i} that are less than n+2D(𝒞)n+2D(\mathcal{C}).
29:     u=Dec𝒰(x[H]+w^1[H])u=\mathrm{Dec}_{\mathcal{U}}(x[H^{\prime}]+\hat{w}_{1}[H^{\prime}]) \triangleright uu is an estimate of hi,j¯2D(𝒞)+nh_{i,\bar{j}}\leq 2D(\mathcal{C})+n
30:     j^=u+compute-r(ι^)\hat{j}=u+\texttt{compute-r}(\hat{\iota})
31:else if  (b1,b2,b3){(0,0,0),(1,1,1)}(b_{1},b_{2},b_{3})\in\{(0,0,0),(1,1,1)\} then
32:     \triangleright Case 3: Enc𝒞(v^1)\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1}) and Enc𝒞(v^2)\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{2}) should be equal to each other, and to either cic_{i} or ci+1c_{i+1}, but we need to figure out which one.
33:     ι^=k1(v^1)\hat{\iota}=\mathcal{R}_{k}^{-1}(\hat{v}_{1}) \triangleright ι^\hat{\iota} should be either ii or i+1i+1
34:     v^=k(ι^1)\hat{v}=\mathcal{R}_{k}(\hat{\iota}-1) \triangleright v^\hat{v} should be BRC encoding of ii or i1i-1 depending on ι^\hat{\iota}
35:     c^1=Enc𝒞(v^)\hat{c}_{1}=\mathrm{Enc}_{\mathcal{C}}(\hat{v}) \triangleright c^1=ci\hat{c}_{1}=c_{i} if ι^=i+1\hat{\iota}=i+1 and c^1=ci1\hat{c}_{1}=c_{i-1} if ι^=i\hat{\iota}=i
36:     c^2=Enc𝒞(v^1)\hat{c}_{2}=\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1}) \triangleright c^2=ci+1\hat{c}_{2}=c_{i+1} if ι^=i+1\hat{\iota}=i+1 and c^1=ci\hat{c}_{1}=c_{i} if ι^=i\hat{\iota}=i
37:     w^=EncW(c^2)\hat{w}=\mathrm{Enc}_{W}(\hat{c}_{2}) \triangleright w^=wi+1\hat{w}=w_{i+1} if ι^=i+1\hat{\iota}=i+1 and w^=wi\hat{w}=w_{i} if ι^=i\hat{\iota}=i
38:     u1=Dec𝒰(x[<D(𝒞)]+b1D(𝒞))u_{1}=\mathrm{Dec}_{\mathcal{U}}(x[<D(\mathcal{C})]+b_{1}^{D(\mathcal{C})}) \triangleright u1u_{1} is an estimate of hi,j¯<D(C)h_{i,\bar{j}}<D(C) assuming w^=wi\hat{w}=w_{i}
39:     u2=Dec𝒰(x[>2D(𝒞)+2n]+b¯1D(𝒞))u_{2}=\mathrm{Dec}_{\mathcal{U}}(x[>2D(\mathcal{C})+2n]+\bar{b}_{1}^{D(\mathcal{C})})
40:     \triangleright u2u_{2} is an estimate of hi,j¯2D(𝒞)2Δ(ci,ci+1)h_{i,\bar{j}}-2D(\mathcal{C})-2\Delta(c_{i},c_{i+1}) assuming w^=wi+1\hat{w}=w_{i+1}
41:     j^1=u1+compute-r(ι^)\hat{j}_{1}=u_{1}+\texttt{compute-r}(\hat{\iota}) \triangleright Estimate for jj assuming w^=wi\hat{w}=w_{i}
42:     j^2=u2+2D(𝒞)+2Δ(c^1,c^2)+compute-r(ι^1))\hat{j}_{2}=u_{2}+2D(\mathcal{C})+2\Delta(\hat{c}_{1},\hat{c}_{2})+\texttt{compute-r}(\hat{\iota}-1)) \triangleright Estimate for jj assuming w^=wi+1\hat{w}=w_{i+1}
43:     g^1=Enc𝒢(j^1)\hat{g}_{1}=\mathrm{Enc}_{\mathcal{G}}(\hat{j}_{1})
44:     g^2=Enc𝒢(j^2)\hat{g}_{2}=\mathrm{Enc}_{\mathcal{G}}(\hat{j}_{2})
45:     j^=minj{j^1,j^2}Δ(x,g^j)\hat{j}=\min_{j^{\prime}\in\{\hat{j}_{1},\hat{j}_{2}\}}\Delta(x,\hat{g}_{j^{\prime}})
46:end if

IV-B Analysis

Next, we analyze the correctness and running time of Algorithm 2. We begin with the running time.

Lemma 7.

Let 𝒞𝔽2n\mathcal{C}\subseteq\mathbb{F}_{2}^{n} be a constant rate code. Suppose that Dec𝒞\mathrm{Dec}_{\mathcal{C}} runs in time TDec𝒞(n)T_{\mathrm{Dec}_{\mathcal{C}}}(n), and Enc𝒞\mathrm{Enc}_{\mathcal{C}} runs in time TEnc𝒞(n)T_{\mathrm{Enc}_{\mathcal{C}}}(n), and that D(𝒞)=o(n)D(\mathcal{C})=o(n). Let A𝒞A_{\mathcal{C}} be the generator matrix of 𝒞\mathcal{C}, with rows aza_{z} for z{0,,2k1}z\in\{0,\ldots,2^{k}-1\}. Suppose that az\|a_{z}\| can be computed in time O(1)O(1). Then the running time is of Dec𝒢\mathrm{Dec}_{\mathcal{G}} is

O(TDec𝒞(d)+TEnc𝒞(d)+d),O(T_{\mathrm{Dec}_{\mathcal{C}}}(d)+T_{\mathrm{Enc}_{\mathcal{C}}}(d)+d),

and the running time of Enc𝒢\mathrm{Enc}_{\mathcal{G}} is O(TEnc𝒞(d)).O(T_{\mathrm{Enc}_{\mathcal{C}}}(d)).

Remark 1 (Time to compute az\|a_{z}\|).

We note that if 𝒞\mathcal{C} is, say, a Reed-Muller code (r,m)\mathcal{R}\mathcal{M}(r,m), then indeed, given zz, az\|a_{z}\| can be computed in time O(1)O(1): if the binary expansion of zz has weight trt\leq r, then the corresponding row has weight 2mt2^{m-t}. For codes that may not have closed-form expressions for their generator matrices, we can pre-compute each az\|a_{z}\| (in total time O(d2)O(d^{2})) and store them to allow for O(1)O(1) lookup time.444 If a lookup table is not desirable and the az\|a_{z}\| cannot otherwise be computed on the fly, then our algorithm still works, and Dec𝒢\mathrm{Dec}_{\mathcal{G}} runs in time at most O(TDec𝒞(d)+TEnc𝒞(d)+d2),O(T_{\mathrm{Dec}_{\mathcal{C}}}(d)+T_{\mathrm{Enc}_{\mathcal{C}}}(d)+d^{2}), where we recall that d=Θ(n)d=\Theta(n) and O(logN)O(\log N).

Proof of Lemma 7.

As we are assuming that D(𝒞)=o(n)D(\mathcal{C})=o(n), finding the bb_{\ell} also takes time o(n)o(n) and is negligible. Among the other steps, the only non-tivial ones are running the encoding and decoding maps for 𝒞\mathcal{C} (each of which happens O(1)O(1) times); running compute-r  (which takes time O(k)=O(d)O(k)=O(d) if az\|a_{z}\| can be computed in time O(1)O(1)); and running k\mathcal{R}_{k} and k1\mathcal{R}_{k}^{-1}, which can be done in time O(k)=O(d)O(k)=O(d). ∎

Next, we move on to the analysis of the correctness and failure probability of Algorithm 2. The final statement is Theorem 1 below, but we will need several lemmas first. We begin by showing that, if all full chunks are decoded correctly, then gj^g_{\hat{j}} is equal to gjg_{j} on the portion of indices where the crossover point hi,j¯h_{i,\bar{j}} is guaranteed not to be.

Lemma 8.

Let x=gj+ηx=g_{j}+\eta be the noisy input to Dec𝒢\mathrm{Dec}_{\mathcal{G}}, where gj𝒢g_{j}\in\mathcal{G} and ηBer(p)n\eta\sim\mathrm{Ber}(p)^{n} and let j^=Dec𝒢(x).\hat{j}=\mathrm{Dec}_{\mathcal{G}}(x). Assume that all full chunks are decoded correctly in Lines 3 to 8. Define {0,,d1}\mathcal{I}\subset\{0,\ldots,d-1\} as the set of indices that hi,j¯h_{i,\bar{j}} can be equal to depending on the pattern of (b1,b2,b3)(b_{1},b_{2},b_{3}) according to Lemma 5.555That is, if (b1,b2,b3)=(0,0,1)(b_{1},b_{2},b_{3})=(0,0,1) or (1,1,0)(1,1,0), then =[n+D(𝒞),2n+3D(𝒞))\mathcal{I}=[n+D(\mathcal{C}),2n+3D(\mathcal{C})), and so on. Then gj^[¯]=gj[¯]g_{\hat{j}}[\bar{\mathcal{I}}]=g_{j}[\bar{\mathcal{I}}].

Proof.

First notice that the indices in ¯\bar{\mathcal{I}} are indices corresponding to a subset S{s1,s2,s3,c~1,c~2}S\subseteq\{s_{1},s_{2},s_{3},\tilde{c}_{1},\tilde{c}_{2}\}. As hi,j¯h_{i,j}\neq\bar{\mathcal{I}} then all chunks in SS are full chunks. Given that full chunks are decoded correctly, then we know that for c~iS\tilde{c}_{i}\in S, Enc𝒞(v^i)=c~i(gj)\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{i})=\tilde{c}_{i}(g_{j}) and for siSs_{i}\in S we have that biD(𝒞)=si(gj)b_{i}^{D(\mathcal{C})}=s_{i}(g_{j}). As a result the decoder fixes the values of these indices and only estimates the values of the rest of the bits in lines 18, 29, 38, and 39. Thus, gj[¯]=gj^[¯]g_{j}[\bar{\mathcal{I}}]=g_{\hat{j}}[\bar{\mathcal{I}}]. ∎

Lemma 9.

For a i{0,,2k2}i\in\{0,\ldots,2^{k}-2\} let jj be such that j[ri,ri+1)j\in[r_{i},r_{i+1}) and hi,j¯[D(𝒞),dD(C))h_{i,\bar{j}}\in[D(\mathcal{C}),d-D(C)). Let x=gj+ηx=g_{j}+\eta be the noisy input for Dec𝒢\mathrm{Dec}_{\mathcal{G}} and j^\hat{j} be the estimate given by Dec𝒢\mathrm{Dec}_{\mathcal{G}}. Assuming that all full chunks are decoded correctly, then j^[ri,ri+1)\hat{j}\in[r_{i},r_{i+1}), Moreover, |jj^|=Δ(gj,gj^)|j-\hat{j}|=\Delta(g_{j},g_{\hat{j}}).

Proof.

We first claim that either Case 1 or Case 2 of Lemma 5 has occurred. Indeed, the fact that hi,j¯[D(𝒞),dD(𝒞))h_{i,\bar{j}}\in[D(\mathcal{C}),d-D(\mathcal{C})) implies that s1(gj)s_{1}(g_{j}) and s3(gj)s_{3}(g_{j}) are both full chunks, and our assumption that each full chunk is correctly decoded implies that s1(gj)=s1(wi+1)s_{1}(g_{j})=s_{1}(w_{i+1}) while s3(gj)=s3(wi)s_{3}(g_{j})=s_{3}(w_{i}). As ii and i+1i+1 have different parities, s1(gj)s3(gj)s_{1}(g_{j})\neq s_{3}(g_{j}), which implies that we are in Case 1 or Case 2 of Lemma 5.

Next, we establish that the estimate j^\hat{j} returned by the algorithm in Cases 1 or 2 satisfies j^[ri,ri+1)\hat{j}\in[r_{i},r_{i+1}). Suppose without loss of generality that we are in Case 1, so (b1,b2,b3)=(0,0,1)(b_{1},b_{2},b_{3})=(0,0,1) or (1,1,0)(1,1,0) (Case 2 is symmetric). We first go through Case 1 of Algorithm 2, which starts at Line 10. Since we are in Case 1 of Lemma 5, that lemma implies that Enc𝒞(v^1)=ci+1\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1})=c_{i+1} and that hi,j¯n+D(𝒞)h_{i,\bar{j}}\geq n+D(\mathcal{C}). Thus, in the first case in Algorithm 2, under the assumption that all full chunks are correctly decoded, we have ι^1=i\hat{\iota}-1=i, c^1=ci\hat{c}_{1}=c_{i}, c^2=ci+1\hat{c}_{2}=c_{i+1}, w^1=wi\hat{w}_{1}=w_{i}, and w^2=wi+1\hat{w}_{2}=w_{i+1}. At the end of this case, the final estimate j^\hat{j} is set to be

j^=u+D(𝒞)+Δ(c^1,c^2)+compute-r(ι^1).\hat{j}=u+D(\mathcal{C})+\Delta(\hat{c}_{1},\hat{c}_{2})+\texttt{compute-r}(\hat{\iota}-1).

By the above, we have ι^1=i\hat{\iota}-1=i, so by Lemma 6, compute-r(ι^1)=ri\texttt{compute-r}(\hat{\iota}-1)=r_{i}. Note also that Δ(𝒞)=Δ(s1(wi),s1(wi+1))\Delta(\mathcal{C})=\Delta(s_{1}(w_{i}),s_{1}(w_{i+1})). Plugging in to our expression for j^\hat{j} and subtracting rir_{i} from both sides, we have

j^ri=u+Δ(s1(wi),s1(wi+1))+Δ(c~1(wi),c~1(wi+1)).\hat{j}-r_{i}=u+\Delta(s_{1}(w_{i}),s_{1}(w_{i+1}))+\Delta(\tilde{c}_{1}(w_{i}),\tilde{c}_{1}(w_{i+1})). (5)

Now, recall that in Algorithm 2, we have u=Dec𝒰(x[H]+w^1[H])u=\mathrm{Dec}_{\mathcal{U}}(x[H^{\prime}]+\hat{w}_{1}[H^{\prime}]), where HH^{\prime} is the set of \ell appearing in hih_{i} so that n+D(𝒞)\ell\geq n+D(\mathcal{C}). It thus follows from the definition that

u|H|<Δ(wi[n+D(𝒞):],wi+1[n+D(𝒞):]),u\leq|H^{\prime}|<\Delta(w_{i}[n+D(\mathcal{C}):],w_{i+1}[n+D(\mathcal{C}):]),

from the definition of HH^{\prime}. Plugging this into (5), we see that j^ri<Δ(wi,wi+1)\hat{j}-r_{i}<\Delta(w_{i},w_{i+1}), which implies that j^[ri,ri+1)\hat{j}\in[r_{i},r_{i+1}), as desired.

Finally, we argue that |j^j|=Δ(gj,gj^)|\hat{j}-j|=\Delta(g_{j},g_{\hat{j}}). Indeed, we may write

gj+gj^=(gj+wi)+(gj^+wi)=(gj+wi)[hi]+(gj^+wi)[hi].g_{j}+g_{\hat{j}}=(g_{j}+w_{i})+(g_{\hat{j}}+w_{i})=(g_{j}+w_{i})[h_{i}]+(g_{\hat{j}}+w_{i})[h_{i}].

By Observation 3, (gj+wi)[hi]=Enc𝒰(j)(g_{j}+w_{i})[h_{i}]=\mathrm{Enc}_{\mathcal{U}}(j); and by that observation along with the fact that j^[ri,ri+1)\hat{j}\in[r_{i},r_{i+1}), we also have (gj^+wi)[hi]=Enc𝒰(j^).(g_{\hat{j}}+w_{i})[h_{i}]=\mathrm{Enc}_{\mathcal{U}}(\hat{j}). Thus,

gj+gj^=(gj+wi)[hi]+(gj^+wi)[hi]=Enc𝒰j+Enc𝒰j^=|jj^|,\|g_{j}+g_{\hat{j}}\|=\|(g_{j}+w_{i})[h_{i}]+(g_{\hat{j}}+w_{i})[h_{i}]\|=\|\mathrm{Enc}_{\mathcal{U}}{j}+\mathrm{Enc}_{\mathcal{U}}{\hat{j}}\|=|j-\hat{j}|,

which finishes the proof of the lemma.

Lemma 10.

For i{0,,2k2}i\in\{0,\ldots,2^{k}-2\}, let jj be such that j[ri,ri+D(𝒞))[ri+1D(𝒞),ri+1)j\in[r_{i},r_{i}+D(\mathcal{C}))\cup[r_{i+1}-D(\mathcal{C}),r_{i+1}). Further let x=gj+ηx=g_{j}+\eta be the noisy input and j^\hat{j} be the estimate obtained from Dec𝒢\mathrm{Dec}_{\mathcal{G}}. Assuming that all full chunks are decoded correctly, then either

  1. 1.

    j^[ri,ri+1)\hat{j}\in[r_{i},r_{i+1}) and Δ(gj,gj^)=|jj^|\Delta(g_{j},g_{\hat{j}})=|j-\hat{j}|; or

  2. 2.

    j^[ri+1,ri+2)[ri1,ri)\hat{j}\in[r_{i+1},r_{i+2})\cup[r_{i-1},r_{i}) and |jj^|2D(𝒞)|j-\hat{j}|\leq 2D(\mathcal{C}) and Δ(gj,gj^)=|jj^|\Delta(g_{j},g_{\hat{j}})=|j-\hat{j}|.

Proof.

Unlike in Lemma 9, it is now the case that any of the three cases in Lemma 5 could occur. We first consider Cases 1 and 2, so (b1,b2,b3){(0,0,0),(1,1,1)}(b_{1},b_{2},b_{3})\notin\{(0,0,0),(1,1,1)\} in line 7. The proof is quite similar to that of Lemma 9, so we just sketch it here. Suppose that we are in Case 1 of Lemma 5 (Case 2 is symmetric). In Case 1, we claim that j^[ri,ri+1)\hat{j}\in[r_{i},r_{i+1}). Indeed, since all full chunks are decoded correctly, as we argued in the proof of Lemma 9, the values ι^,v^,c^,w^\hat{\iota},\hat{v},\hat{c}_{\ell},\hat{w}_{\ell} are computed correctly, meaning that they match the values that the comments in Algorithm 2 say they should be. In particular, as before we have

j^\displaystyle\hat{j} =u+D(𝒞)+Δ(c~1,c~2)+compute-r(ι^1)\displaystyle=u+D(\mathcal{C})+\Delta(\tilde{c}_{1},\tilde{c}_{2})+\texttt{compute-r}(\hat{\iota}-1)
=u+D(𝒞)+Δ(ci,ci+1)+ri\displaystyle=u+D(\mathcal{C})+\Delta(c_{i},c_{i+1})+r_{i}
<Δ(wi,wi+1)+ri\displaystyle<\Delta(w_{i},w_{i+1})+r_{i}
<ri+1.\displaystyle<r_{i+1}.

This establishes that j^[ri,ri+1)\hat{j}\in[r_{i},r_{i+1}), which proves the claim; the rest of this case follows identically to the proof of Lemma 9.

Next we consider Case 3, so (b1,b2,b3){(0,0,0),(1,1,1)}(b_{1},b_{2},b_{3})\in\{(0,0,0),(1,1,1)\}. In this case, Lemma 5 (and the assumption that all full chunks are correctly decoded) says that Enc𝒞(v^1)=Enc𝒞(v^2){ci,ci+1}\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{1})=\mathrm{Enc}_{\mathcal{C}}(\hat{v}_{2})\in\{c_{i},c_{i+1}\}, which implies that the value of w^\hat{w} computed in line 37 is either wiw_{i} or wi+1w_{i+1}. Algorithm 2 then computes two estimates j^1\hat{j}_{1} and j^2\hat{j}_{2}, which are meant to be an estimate of jj in the two cases the w^=wi\hat{w}=w_{i} and w^=wi+1\hat{w}=w_{i+1}; eventually it picks whichever j^\hat{j}_{\ell} produces a codeword closer to the received word xx.

There are two main sub-cases. In the first, the algorithm guesses correctly, meaning that either j^=j^1\hat{j}=\hat{j}_{1} and w^=wi\hat{w}=w_{i}; or that j^=j^2\hat{j}=\hat{j}_{2} and w^=wi+1\hat{w}=w_{i+1}. In the other case, the algorithm guesses incorrectly, meaning that j^=j^1\hat{j}=\hat{j}_{1} and w^=wi+1\hat{w}=w_{i+1}, or j^=j^2\hat{j}=\hat{j}_{2} and w^=wi\hat{w}=w_{i}. We consider each of these in turn.

First suppose that the algorithm guesses correctly. This case is again quite similar to that of Lemma 9, and we sketch the proof. Suppose that j^=j^1\hat{j}=\hat{j}_{1} and w^=wi\hat{w}=w_{i}; the other way of “guessing correctly” leads to a similar argument. Now, we claim that j^[ri,ri+1)\hat{j}\in[r_{i},r_{i+1}). To see this, notice that in this case, we have

j^=j^1=u1+compute-r(ι^)\hat{j}=\hat{j}_{1}=u_{1}+\texttt{compute-r}(\hat{\iota})

in Line 41. Since w^=wi\hat{w}=w_{i}, given our assumption that all full chunks are correctly decoded, it is not hard to see that ι^=i\hat{\iota}=i. Lemma 6 then implies that compute-r(ι^)=ri\texttt{compute-r}(\hat{\iota})=r_{i}, so

j^=u1+riD(𝒞)+ri<Δ(wi,wi+1)+ri=wi+1.\hat{j}=u_{1}+r_{i}\leq D(\mathcal{C})+r_{i}<\Delta(w_{i},w_{i+1})+r_{i}=w_{i+1}.

This shows that j^[wi,wi+1)\hat{j}\in[w_{i},w_{i+1}). Once we have this, the rest of the argument follows as in Lemma 9.

Now we move onto the second sub-case of Case 3, when the algorithm guesses incorrectly. Unlike the previous cases we have considered, this is different than Lemma 9, because j^\hat{j} may end up outside of [ri,ri+1)[r_{i},r_{i+1}). Without loss of generality, suppose that w^=wi\hat{w}=w_{i} but that j^\hat{j} has been set to j^2\hat{j}_{2}. (The other case is similar).

Claim 1.

In this sub-case, the following hold.

  • A.

    j^[ri1,ri)\hat{j}\in[r_{i-1},r_{i})

  • B.

    j<ri+D(𝒞)j<r_{i}+D(\mathcal{C})

  • C.

    j^ri1+2Δ(ci,ci1)+2D(𝒞)=rD(𝒞).\hat{j}\geq r_{i-1}+2\Delta(c_{i},c_{i-1})+2D(\mathcal{C})=r-D(\mathcal{C}).

Proof.

We begin with B. First, since w^=wi\hat{w}=w_{i}, this implies that c~1(gj)=c~2(gj)=wi\tilde{c}_{1}(g_{j})=\tilde{c}_{2}(g_{j})=w_{i}, so Lemma 5 (Case 3) implies that hi,j¯[0,D(𝒞))h_{i,\bar{j}}\in[0,D(\mathcal{C})). Then since j¯hi,j¯D(𝒞)\bar{j}\leq h_{i,\bar{j}}\leq D(\mathcal{C}), we have

j=j¯+riri+D(𝒞).j=\bar{j}+r_{i}\leq r_{i}+D(\mathcal{C}).

This proved B.

Next we prove C. This follows from the computation of j^2\hat{j}_{2} in Algorithm 2, along with the assumption that all full chunks are decoded correctly. Indeed, we have

j^=j^2=u2+2D(𝒞)+2Δ(c^1,c^2)+compute-r(ι^1).\hat{j}=\hat{j}_{2}=u_{2}+2D(\mathcal{C})+2\Delta(\hat{c}_{1},\hat{c}_{2})+\texttt{compute-r}(\hat{\iota}-1).

Since w^=wi\hat{w}=w_{i}, we are in the case where ι^=i\hat{\iota}=i, c^1=ci1\hat{c}_{1}=c_{i-1}, c^2=ci\hat{c}_{2}=c_{i}, and the above implies that

j^=u2+2D(𝒞)+2Δ(ci1,ci)+ri1.\hat{j}=u_{2}+2D(\mathcal{C})+2\Delta(c_{i-1},c_{i})+r_{i-1}.

The fact that u20u_{2}\geq 0 proves inequality in part C. The equality in part C follows since by the definition of 𝒲\mathcal{W}, we have

2Δ(ci,ci1)+2D(𝒞)=Δ(wi,wi1)D(𝒞).2\Delta(c_{i},c_{i-1})+2D(\mathcal{C})=\Delta(w_{i},w_{i-1})-D(\mathcal{C}).

Finally, we move onto A. The fact that j^ri1\hat{j}\geq r_{i-1} follows immediately from C. The fact that j^<ri\hat{j}<r_{i} follows from the fact that, by a computation similar to that above, we have

j^=j^2=u2+riD(𝒞),\hat{j}=\hat{j}_{2}=u_{2}+r_{i}-D(\mathcal{C}),

which is less than rir_{i} as u2<D(𝒞)u_{2}<D(\mathcal{C}). ∎

Given the claim, we can finish the proof of the lemma in this sub-case. First, we observe that |jj^|D(𝒞)|j-\hat{j}|\leq D(\mathcal{C}); indeed this follows directly from B and C in the claim.

Finally, we show that Δ(gj,gj^)=|jj^|\Delta(g_{j},g_{\hat{j}})=|j-\hat{j}|. To see this, we first write

gj+gj^=(gj+wi)+(gj^+wi).\|g_{j}+g_{\hat{j}}\|=\|(g_{j}+w_{i})+(g_{\hat{j}}+w_{i})\|.

We claim that gjg_{j} and wiw_{i} differ on only the indices in [0,D(𝒞))[0,D(\mathcal{C})). This follows from the fact that hi,j¯[0,D(𝒞))h_{i,\bar{j}}\in[0,D(\mathcal{C})), which we saw in the proof of Claim 1 (part B). Next, we claim that gj^g_{\hat{j}} and wiw_{i} differ only on the indices in [dD(𝒞),d)[d-D(\mathcal{C}),d). Indeed, part C of Claim 1 implies that rij^D(𝒞)r_{i}-\hat{j}\leq D(\mathcal{C}). Since j^[ri1,ri)\hat{j}\in[r_{i-1},r_{i}) (part A of Claim 1), this means that j^\hat{j} is in the last chunk (the s3s_{3} chunk) of [ri1,ri)[r_{i-1},r_{i}), which proves the claim. Thus, we have that

(gj+wi)+(gj^+wi)=gj+wi+gj^+wi,\|(g_{j}+w_{i})+(g_{\hat{j}}+w_{i})\|=\|g_{j}+w_{i}\|+\|g_{\hat{j}}+w_{i}\|,

as the two parts differ on disjoint sets. Moreover, since s1(wi)=s1(wi+1)¯s_{1}(w_{i})=\overline{s_{1}(w_{i+1})}, we have gj+wi=(jri)\|g_{j}+w_{i}\|=(j-r_{i}), since wi+1w_{i+1} and wiw_{i} differ on all of the first D(𝒞)D(\mathcal{C}) bits, so gjg_{j} and wiw_{i} differ on all of the first jrij-r_{i} bits. Similarly, gj^+wi=rij^\|g_{\hat{j}}+w_{i}\|=r_{i}-\hat{j}. Putting everything together, we conclude that

Δ(gj,gj^)=(jri)+(rij^)=jj^.\Delta(g_{j},g_{\hat{j}})=(j-r_{i})+(r_{i}-\hat{j})=j-\hat{j}.

Since j^<j\hat{j}<j in this case (as j^[wi1,wi)\hat{j}\in[w_{i-1},w_{i}), while j[wi,wi+1)j\in[w_{i},w_{i+1}), this proves the last component of the lemma.

The following lemma is included in [1]. We include a short proof for completeness.

Lemma 11 ([1]).

Let 𝒞𝔽2n\mathcal{C}\subseteq\mathbb{F}_{2}^{n} be a linear code with message length kk and minimum distance D(𝒞)D(\mathcal{C}). Further let p(0,1/2)p\in(0,1/2) and ηpBer(p)D(𝒞)\eta_{p}\sim\mathrm{Ber}(p)^{D(\mathcal{C})}. Then

Pr[ηp>D(𝒞)2]+12Pr[ηp=D(C)2]Pfail(𝒞).\Pr\left[\|\eta_{p}\|>\frac{D(\mathcal{C})}{2}\right]+\frac{1}{2}\Pr\left[\|\eta_{p}\|=\frac{D(C)}{2}\right]\leq P_{\text{fail}}(\mathcal{C}). (6)
Proof.

Let DecMLD\mathrm{Dec}_{MLD} be the maximum likelihood decoder for 𝒞\mathcal{C}. That is, given x𝔽2nx\in\mathbb{F}_{2}^{n}, DecMLD(x)=argminc𝒞Δ(x,c)\mathrm{Dec}_{MLD}(x)=\mathrm{argmin}_{c\in\mathcal{C}}\Delta(x,c). If there are multiple codewords cCc\in C that attain the minimum above, then DecMLD\mathrm{Dec}_{MLD} chooses randomly among them. Then

Pfail(𝒞)maxv𝔽2kPr[DecMLD(Enc𝒞(v)+ηp)v]=:pMLD.P_{\text{fail}}(\mathcal{C})\geq\max_{v\in\mathbb{F}_{2}^{k}}\Pr[\mathrm{Dec}_{MLD}(\mathrm{Enc}_{\mathcal{C}}(v)+\eta_{p})\neq v]=:p_{MLD}.

Fix a message v𝔽2kv\in\mathbb{F}_{2}^{k}, and let cv=Enc𝒞(v)c_{v}=\mathrm{Enc}_{\mathcal{C}}(v). Let v𝔽2kv^{\prime}\in\mathbb{F}_{2}^{k} be such that Δ(cv,cv)=D(𝒞)\Delta(c_{v},c_{v^{\prime}})=D(\mathcal{C}), where cv=Enc𝒞(v).c_{v^{\prime}}=\mathrm{Enc}_{\mathcal{C}}(v^{\prime}). Let Hv,v={i[n]:(cv)i(cv)i}H_{v,v^{\prime}}=\{i\in[n]:(c_{v})_{i}\neq(c_{v^{\prime}})_{i}\} be the set on which cvc_{v} and cvc_{v^{\prime}} disagree. Let ηpBer(p)n\eta^{\prime}_{p}\sim\mathrm{Ber}(p)^{n} be a noise vector, and define ηp=ηp[Hv,v]\eta_{p}=\eta^{\prime}_{p}[{H_{v,v^{\prime}}}], the restriction of ηp\eta^{\prime}_{p} to the positions indexed by Hv,vH_{v,v^{\prime}}. Observe that ηpBer(p)D(𝒞)\eta_{p}\sim\mathrm{Ber}(p)^{D(\mathcal{C})} as in the lemma statement. Suppose that ηp>D(𝒞)/2\|\eta_{p}\|>D(\mathcal{C})/2. Then vDecMLD(Enc𝒞(v)).v\neq\mathrm{Dec}_{MLD}(\mathrm{Enc}_{\mathcal{C}}(v)). On the other hand, if ηp=D(𝒞)/2\|\eta_{p}\|=D(\mathcal{C})/2, then with probability at least 1/21/2, vDecMLD(Enc𝒞(v)).v\neq\mathrm{Dec}_{MLD}(\mathrm{Enc}_{\mathcal{C}}(v)).

Together, we conclude that

Pfail(𝒞)pMLDPr[ηp>D(𝒞)/2]+12Pr[ηp=D(𝒞)/2].P_{\text{fail}}(\mathcal{C})\geq p_{MLD}\geq\Pr[\|\eta_{p}\|>D(\mathcal{C})/2]+\frac{1}{2}\Pr[\|\eta_{p}\|=D(\mathcal{C})/2].

Lemma 12.

Let ηBer(p)D(𝒞)\eta\sim\mathrm{Ber}(p)^{D(\mathcal{C})} be a vector in 𝔽2D(𝒞)\mathbb{F}_{2}^{D(\mathcal{C})}, for p(0,1/2)p\in(0,1/2). Let 𝒴\mathcal{Y} be the repetition code of length D(𝒞)D(\mathcal{C}), so that Enc𝒴:{0,1}{0D(𝒞),1D(𝒞)}\mathrm{Enc}_{\mathcal{Y}}:\{0,1\}\rightarrow\{0^{D(\mathcal{C})},1^{D(\mathcal{C})}\}. Then for any b{0,1}b\in\{0,1\},

Pr[MajD(𝒞)(Enc𝒴(b)+η)b]Pfail(𝒞),\Pr[\mathrm{Maj}_{D(\mathcal{C})}(\mathrm{Enc}_{\mathcal{Y}}(b)+\eta)\neq b]\leq P_{\text{fail}}(\mathcal{C}),

where we recall that MajD(𝒞)\mathrm{Maj}_{D(\mathcal{C})} denotes the majority function. Above, the randomness is over both the choice of η\eta and any randomness that MajD(𝒞)\mathrm{Maj}_{D(\mathcal{C})} uses to break ties.

Proof.

Fix b{0,1}b\in\{0,1\}. Suppose that MajD(𝒞)(Enc𝒴(b)+η)b\mathrm{Maj}_{D(\mathcal{C})}(\mathrm{Enc}_{\mathcal{Y}}(b)+\eta)\neq b. Then either η>D(𝒞)/2\|\eta\|>D(\mathcal{C})/2, or else η=D(𝒞)/2\|\eta\|=D(\mathcal{C})/2 and the random choice of MajD(𝒞)\mathrm{Maj}_{D(\mathcal{C})} was incorrect, which happens with probability 1/21/2. Thus,

Pr[MajD(𝒞)(Enc𝒴(b)+η)b]Pr[η>D(𝒞)2]+12Pr[η=D(𝒞)2],\Pr[\mathrm{Maj}_{D(\mathcal{C})}(\mathrm{Enc}_{\mathcal{Y}}(b)+\eta)\neq b]\leq\Pr\left[\|\eta\|>\frac{D(\mathcal{C})}{2}\right]+\frac{1}{2}\Pr\left[\|\eta\|=\frac{D(\mathcal{C})}{2}\right],

which by Lemma 11 is at most Pfail(𝒞)P_{\text{fail}}(\mathcal{C}). ∎

Before we prove our main theorem establishing correctness of Dec𝒢\mathrm{Dec}_{\mathcal{G}} with high probability (Theorem 1), we need one more concentration bound. We use the following from [1].

Lemma 13 ([1]).

Let x1,x2𝔽2dx_{1},x_{2}\in\mathbb{F}_{2}^{d}. Let ηBer(p)d\eta\sim\mathrm{Ber}(p)^{d} for p(0,1/2)p\in(0,1/2). Then

Pr[Δ(x2,x1+η)Δ(x1,x1+η)]exp((12p)24p+2Δ(x1,x2))\Pr[\Delta(x_{2},x_{1}+\eta)\leq\Delta(x_{1},x_{1}+\eta)]\leq\exp\left(-\frac{(1-2p)^{2}}{4p+2}\Delta(x_{1},x_{2})\right) (7)
Lemma 14.

Let gj𝒢g_{j}\in\mathcal{G}, and let j^=Dec𝒢(gj+ηp)\hat{j}=\mathrm{Dec}_{\mathcal{G}}(g_{j}+\eta_{p}). Suppose that all full chunks are decoded correctly. Then

Δ(gj+ηp,gj^)Δ(gj+ηp,gj).\Delta(g_{j}+\eta_{p},g_{\hat{j}})\leq\Delta(g_{j}+\eta_{p},g_{j}).
Proof.

By the analysis in the proof of Lemmas 9 and 10, if all full chunks are decoded correctly, then all the quantities computed in Algorithm 2 before uu (in Cases 1 and 2), or before u1,u2u_{1},u_{2} (in Case 3) are what they “should” be. That is, in Cases 1 and 2, all of the quantities computed before Lines 18 and 29, respectively are what the comments claim they should be. In Case 3, all of the comments computed before Line 39) are what the comments claim they should be. Thus, any error in j^\hat{j} comes from the estimates of uu (in Cases 1 or 2) or u1u_{1} and u2u_{2} (in Case 3).

We first work out Case 1. First, we observe that it suffices to look only on the set HH^{\prime} defined as in Algorithm 2. That is, it suffices to show that

Δ((gj+ηp)[H],gj^[H])Δ(gj+ηp)[H],gj[H]).\Delta((g_{j}+\eta_{p})[H^{\prime}],g_{\hat{j}}[H^{\prime}])\leq\Delta(g_{j}+\eta_{p})[H^{\prime}],g_{j}[H^{\prime}]).

Indeed, gjg_{j} and gj^g_{\hat{j}} differ only on HH^{\prime}. Next, recall from Observation 3 that (gj+wi)[hi]=Enc𝒰(j¯)(g_{j}+w_{i})[h_{i}]=\mathrm{Enc}_{\mathcal{U}}(\bar{j}); that is, restricted to the elements in hih_{i}, gj+wig_{j}+w_{i} has j¯\bar{j} ones followed by all zeros. Since j¯n+D(𝒞)\bar{j}\geq n+D(\mathcal{C}) in Case 1 (as shown in the proof of Lemma 9), (gj+wi)[H](g_{j}+w_{i})[H^{\prime}] is j¯(Δ(ci,ci+1)+D(𝒞))\bar{j}-(\Delta(c_{i},c_{i+1})+D(\mathcal{C})) ones followed by zeros. Thus,

x[H]+w^1[H]=gj[H]+η[H]+wi[H]x[H^{\prime}]+\hat{w}_{1}[H^{\prime}]=g_{j}[H^{\prime}]+\eta[H^{\prime}]+w_{i}[H^{\prime}]

is a vector of j¯(Δ(ci,ci+1)+D(𝒞))\bar{j}-(\Delta(c_{i},c_{i+1})+D(\mathcal{C})) ones followed by zeros, plus the noise from η[H]\eta[H^{\prime}]. Therefore,

u=Dec𝒰(x[H]+w^1[H])u=\mathrm{Dec}_{\mathcal{U}}(x[H^{\prime}]+\hat{w}_{1}[H^{\prime}])

is the decoding of Enc𝒰(j¯(Δ(ci,ci+1)+D(𝒞)))+ηp[H]\mathrm{Enc}_{\mathcal{U}}(\bar{j}-(\Delta(c_{i},c_{i+1})+D(\mathcal{C})))+\eta_{p}[H^{\prime}]. For notational convenience, in the following we will introduce the notation X=D(𝒞)+Δ(ci,ci+1)X=D(\mathcal{C})+\Delta(c_{i},c_{i+1}). With this notation (and the fact that Dec𝒰\mathrm{Dec}_{\mathcal{U}} returns the closest codeword in 𝒰\mathcal{U}), we conclude that

Δ(Enc𝒰(u),Enc𝒰(j¯X)+ηp[H])Δ(Enc𝒰(j¯X),Enc𝒰(j¯X)+ηp[H]).\Delta(\mathrm{Enc}_{\mathcal{U}}(u),\mathrm{Enc}_{\mathcal{U}}(\bar{j}-X)+\eta_{p}[H^{\prime}])\leq\Delta(\mathrm{Enc}_{\mathcal{U}}(\bar{j}-X),\mathrm{Enc}_{\mathcal{U}}(\bar{j}-X)+\eta_{p}[H^{\prime}]). (8)

We claim that in fact the first of the terms in (8) is equal to Δ(gj^[H],x[H])\Delta(g_{\hat{j}}[H^{\prime}],x[H^{\prime}]) and the second is equal to Δ(gj[H],x[H])\Delta(g_{j}[H^{\prime}],x[H^{\prime}]), which will immediately prove the statement in Case 1. To see the first part of the claim, first notice that in Algorithm 2 (using the fact that all the estimates are what they “should” be, as above), we have j^=u+X+ri\hat{j}=u+X+r_{i}, so u=j^¯X.u=\bar{\hat{j}}-X. Then

Δ(gj^[H],x[H])\displaystyle\Delta(g_{\hat{j}}[H^{\prime}],x[H^{\prime}]) =gj^[H]+gj[H]+ηp[H]\displaystyle=\|g_{\hat{j}}[H^{\prime}]+g_{j}[H^{\prime}]+\eta_{p}[H^{\prime}]\|
=Enc𝒰(j^¯X)+EncU(j¯X)+ηp[H]\displaystyle=\|\mathrm{Enc}_{\mathcal{U}}(\bar{\hat{j}}-X)+\mathrm{Enc}_{U}(\bar{j}-X)+\eta_{p}[H^{\prime}]\|
=Enc𝒰(u)+Enc𝒰(j¯X)+ηp[H]\displaystyle=\|\mathrm{Enc}_{\mathcal{U}}(u)+\mathrm{Enc}_{\mathcal{U}}(\bar{j}-X)+\eta_{p}[H^{\prime}]\|
=Δ(Enc𝒰(u),Enc𝒰(j¯X)+ηp[H])\displaystyle=\Delta(\mathrm{Enc}_{\mathcal{U}}(u),\mathrm{Enc}_{\mathcal{U}}(\bar{j}-X)+\eta_{p}[H^{\prime}])

Above, we used the fact that on HH^{\prime}, gj^g_{\hat{j}} and gjg_{j} differ precisely on the indices between j^¯X\bar{\hat{j}}-X and j^X\hat{j}-X. This proves the first part of the claim. For the next part, we have that

Δ(gj[H],x[H])\displaystyle\Delta(g_{j}[H^{\prime}],x[H^{\prime}]) =η[H],\displaystyle=\|\eta[H^{\prime}]\|,

which is the right hand side of (8). This finishes proving the claim, and the lemma in this case.

Case 2 is similar to Case 1 and we omit the analysis. In Case 3, we have two candidates, u1u_{1} and u2u_{2}. By an analysis similar to the above, at least one of the following statements hold:

  • w^1=wi\hat{w}_{1}=w_{i} and u1=Dec𝒰(Enc𝒰(j)+ηp),u_{1}=\mathrm{Dec}_{\mathcal{U}}(\mathrm{Enc}_{\mathcal{U}}(j)+\eta_{p}^{\prime}), or;

  • w^2=wi+1\hat{w}_{2}=w_{i+1} and u2=Dec𝒰(Enc𝒰(j2D(𝒞)2n)+ηp),u_{2}=\mathrm{Dec}_{\mathcal{U}}(\mathrm{Enc}_{\mathcal{U}}(j-2D(\mathcal{C})-2n)+\eta_{p}^{\prime}),

where in both cases ηp\eta_{p}^{\prime} has i.i.d. Ber(p)\mathrm{Ber}(p) coordinates. Thus, if the first is the case, we have that

Δ(gj+ηj,gj^1)Δ(gj+ηj,gj)\Delta(g_{j}+\eta_{j},g_{\hat{j}_{1}})\leq\Delta(g_{j}+\eta_{j},g_{j})

and in the second case we have (again with an analysis similar to that above) that

Δ(gj+ηj,gj^2)Δ(gj+ηj,gj).\Delta(g_{j}+\eta_{j},g_{\hat{j}_{2}})\leq\Delta(g_{j}+\eta_{j},g_{j}).

Thus, by the definition of j^\hat{j} in this case (Line 45), we have

Δ(gj+ηp,gj^)=min{Δ(gj+ηj,gj^1),Δ(gj+ηj,gj^2)}Δ(gj+ηj,gj),\Delta(g_{j}+\eta_{p},g_{\hat{j}})=\min\{\Delta(g_{j}+\eta_{j},g_{\hat{j}_{1}}),\Delta(g_{j}+\eta_{j},g_{\hat{j}_{2}})\}\leq\Delta(g_{j}+\eta_{j},g_{j}),

as desired. ∎

Theorem 1.

Fix p(0,1/2)p\in(0,1/2). Let 𝒞𝔽2n\mathcal{C}\subseteq\mathbb{F}_{2}^{n} be a linear code. Let 𝒢\mathcal{G} be defined as in Definition 6 from 𝒞\mathcal{C}. Let ηp𝔽2dBer(p)d\eta_{p}\in\mathbb{F}_{2}^{d}\sim\mathrm{Ber}(p)^{d} Then

Pr[|jDec𝒢(Enc𝒢(j)+ηp)|>t]γexp(αt)+5Pfail(𝒞)\Pr[|j-\mathrm{Dec}_{\mathcal{G}}(\mathrm{Enc}_{\mathcal{G}}(j)+\eta_{p})|>t]\leq\gamma\exp(-\alpha t)+5P_{\text{fail}}(\mathcal{C}) (9)

where Pfail(𝒞)P_{\text{fail}}(\mathcal{C}) is the block error probability of 𝒞\mathcal{C}, and α\alpha and γ\gamma are constants given by α=(12p)24p+2\alpha=-\frac{(1-2p)^{2}}{4p+2} and γ=21exp(α)\gamma=\frac{2}{1-\exp(-\alpha)}.

Proof.

Let 𝒮\mathcal{S} be the event that at least one of the full chunks in gj=Enc𝒢(j)g_{j}=\mathrm{Enc}_{\mathcal{G}}(j) is decoded incorrectly. Let j^=Dec𝒢(Enc𝒢(j)+ηp)\hat{j}=\mathrm{Dec}_{\mathcal{G}}(\mathrm{Enc}_{\mathcal{G}}(j)+\eta_{p}). Then

Pr[|jj^|>t]\displaystyle\Pr[|j-\hat{j}|>t] =Pr[|jj^|>t|𝒮¯]Pr[𝒮¯]+Pr[|jj^|>t|𝒮]Pr[𝒮]\displaystyle=\Pr\left[|j-\hat{j}|>t\,|\,\bar{\mathcal{S}}\right]\cdot\Pr[\bar{\mathcal{S}}]+\Pr\left[|j-\hat{j}|>t\,|\,\mathcal{S}\right]\cdot\Pr[\mathcal{S}]
Pr[|jj^|>t|𝒮¯]+Pr[𝒮]\displaystyle\leq\Pr\left[|j-\hat{j}|>t\,|\,\bar{\mathcal{S}}\right]+\Pr[\mathcal{S}]

Let i{0,,2k1}i\in\{0,\ldots,2^{k}-1\} be such that j[ri,ri+1)j\in[r_{i},r_{i+1}). We will bound each of the two terms above individually.

We begin with Pr[|jj^|>t|𝒮¯]\Pr\left[|j-\hat{j}|>t\,|\,\bar{\mathcal{S}}\right]. There are two scenarios, depending on whether jj is safely in the middle of the interval [ri,ri+1)[r_{i},r_{i+1}) (that is, in the middle three chunks), or if it is near the edges (the outermost chunks). In either case, if all full chunks are decoded correctly, then Δ(Enc𝒢(j),Enc𝒢(j^))=|jj^|\Delta(\mathrm{Enc}_{\mathcal{G}}({j}),\mathrm{Enc}_{\mathcal{G}}({\hat{j}}))=|j-\hat{j}|. Indeed, in the first case this follows from Lemma 9, while in the second case it follows from Lemma 10. Thus, we see that in either case, the probability Dec𝒢\mathrm{Dec}_{\mathcal{G}} of returning a particular j^\hat{j} is

Pr[j^|𝒮¯]\displaystyle\Pr\left[\hat{j}\,|\,\bar{\mathcal{S}}\right] Pr[Δ(Enc𝒢(j)+ηp,Enc𝒢(j^))Δ(Enc𝒢(j)+ηp,Enc𝒢(j))]\displaystyle\leq\Pr\left[\Delta(\mathrm{Enc}_{\mathcal{G}}(j)+\eta_{p},\mathrm{Enc}_{\mathcal{G}}(\hat{j}))\leq\Delta(\mathrm{Enc}_{\mathcal{G}}(j)+\eta_{p},\mathrm{Enc}_{\mathcal{G}}(j))\right]
exp(αΔ(Enc𝒢(j),Enc𝒢(j^)))\displaystyle\leq\exp(-\alpha\Delta(\mathrm{Enc}_{\mathcal{G}}(j),\mathrm{Enc}_{\mathcal{G}}(\hat{j})))
=exp(α|jj^|),\displaystyle=\exp(-\alpha|j-\hat{j}|),

Above, the first line follows from Lemma 14. The second line follows from Lemma 13, while the last line follows from the fact that Δ(Enc𝒢j,Enc𝒢(j^))=|jj^|\Delta(\mathrm{Enc}_{\mathcal{G}}{j},\mathrm{Enc}_{\mathcal{G}}(\hat{j}))=|j-\hat{j}| as noted above. Thus, for any integer zz that might be equal to |jj^||j-\hat{j}|, we have

Pr[|jj^|=z,𝒮¯]2exp(αz),\Pr[|j-\hat{j}|=z,\bar{\mathcal{S}}]\leq 2\exp(-\alpha z),

where the factor of two comes from the fact that j^\hat{j} might be either j+zj+z or jzj-z. Thus,

P[|jj^|t|𝒮¯]\displaystyle P[|j-\hat{j}|\geq t\,|\,\bar{\mathcal{S}}] z=t2exp(αz)=2exp(αt)1exp(α).\displaystyle\leq\sum_{z=t}^{\infty}2\exp(-\alpha z)=\frac{2\exp(-\alpha t)}{1-\exp(-\alpha)}.

Now we turn our attention to the second term, Pr[𝒮]\Pr[\mathcal{S}], the probability that at least one of the full chunks is decoded incorrectly. The full chunks c~(gj)\tilde{c}_{\ell}(g_{j}) for {1,2}\ell\in\{1,2\} are codewords in 𝒞\mathcal{C} and are decoding using Dec𝒞\mathrm{Dec}_{\mathcal{C}}. Thus, the probability that either of these chunks (assuming they are full chunks) are decoded incorrectly is at most twice the failure probability is Pfail(𝒞)P_{\text{fail}}(\mathcal{C}).

On the other hand, the full chunks ss_{\ell} for {1,2,3}\ell\in\{1,2,3\} are repetition codes of length Δ(𝒞)\Delta(\mathcal{C}). Then Lemma 12 that the probability that any of these (assuming it is a full chunk) is at most Pfail(𝒞)P_{\text{fail}}(\mathcal{C}), so the probability that any of these fail is at most 3Pfail(𝒞)3P_{\text{fail}}(\mathcal{C}). Altogether, the probability that at least one full chunk is decoded incorrectly is at most Pr[𝒮]5Pfail(𝒞).\Pr[\mathcal{S}]\leq 5P_{\text{fail}}(\mathcal{C}). Summing both terms up we see that

Pr[|jj^|t]2exp(αt)1exp(α)+5Pfail(𝒞),\Pr\left[|j-\hat{j}|\geq t\right]\leq\frac{2\exp(-\alpha t)}{1-\exp(-\alpha)}+5P_{\text{fail}}(\mathcal{C}),

which completes the proof of the theorem. ∎

Acknowledgment

MW and DF are partially supported by NSF Grants CCF-2231157 and CCF-2133154. The first author thanks Rasmus Pagh for bringing our attention to this problem.

References

  • [1] D. R. Lolck and R. Pagh, “Shannon meets gray: Noise-robust, low-sensitivity codes with applications in differential privacy,” in Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA).   SIAM, 2024, pp. 1050–1066.
  • [2] M. Aumüller, C. J. Lebeda, and R. Pagh, “Differentially private sparse vectors with low error, optimal space, and fast access,” in Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, 2021, pp. 1223–1236.
  • [3] J. Acharya, Y. Liu, and Z. Sun, “Discrete distribution estimation under user-level local differential privacy,” in International Conference on Artificial Intelligence and Statistics.   PMLR, 2023, pp. 8561–8585.
  • [4] J. Acharya, C. Canonne, Y. Liu, Z. Sun, and H. Tyagi, “Distributed estimation with multiple samples per user: Sharp rates and phase transition,” Advances in neural information processing systems, vol. 34, pp. 18 920–18 931, 2021.
  • [5] L. Xiao, X.-G. Xia, and Y.-P. Wang, “Exact and robust reconstructions of integer vectors based on multidimensional chinese remainder theorem (md-crt),” IEEE Transactions on Signal Processing, vol. 68, pp. 5349–5364, 2020.
  • [6] W. Wang and X.-G. Xia, “A closed-form robust chinese remainder theorem and its performance analysis,” IEEE Transactions on Signal Processing, vol. 58, no. 11, pp. 5655–5666, 2010.
  • [7] G. Reeves and H. D. Pfister, “Reed–muller codes on bms channels achieve vanishing bit-error probability for all rates below capacity,” IEEE Transactions on Information Theory, 2023.
  • [8] E. Arikan, “A performance comparison of polar codes and reed-muller codes,” IEEE Communications Letters, vol. 12, no. 6, pp. 447–449, 2008.
  • [9] V. Guruswami and P. Xia, “Polar codes: Speed of polarization and polynomial gap to capacity,” IEEE Transactions on Information Theory, vol. 61, no. 1, pp. 3–16, 2014.
  • [10] M. Mondelli, S. H. Hassani, and R. L. Urbanke, “Unified scaling of polar codes: Error exponent, scaling exponent, moderate deviations, and error floors,” IEEE Transactions on Information Theory, vol. 62, no. 12, pp. 6698–6712, 2016.
  • [11] H.-P. Wang, T.-C. Lin, A. Vardy, and R. Gabrys, “Sub-4.7 scaling exponent of polar codes,” IEEE Transactions on Information Theory, 2023.
  • [12] F. Gray, “Pulse code communication,” Mar. 17 1953, uS Patent 2,632,058.
  • [13] D. E. Knuth, The art of computer programming, volume 4A: combinatorial algorithms, part 1.   Pearson Education India, 2011.