• Tidak ada hasil yang ditemukan

Computing 𝐹 𝐻

Chapter VI: Robust Indexing: Optimal Codes Correcting Deletion/Insertion

6.4 Computing 𝐹 𝐻

(3) Since s2 is recovered, the strings {(π‘₯𝑖,1, . . . , π‘₯𝑖, 𝐿′)}𝑀

𝑖=1 = {a𝑖}𝑀

𝑖=1 are known.

Sort{(π‘₯𝑖,1, . . . , π‘₯𝑖, 𝐿′)}𝑀

𝑖=1lexicographically in descending order. For each𝑖 ∈ [𝑀], find the uniqueπœ‹(𝑖) ∈ [𝑀]such that𝑑𝐻( (π‘₯β€²

πœ‹(𝑖),1, . . . , π‘₯β€²

πœ‹(𝑖), 𝐿′),

(π‘₯𝑖,1, . . . , π‘₯𝑖, 𝐿′)) ≀ π‘˜ (note that𝑖0 = πœ‹(1)). Similar to Step (1), we conclude that the stringxβ€²πœ‹(𝑖) is an erroneous copy ofx𝑖,𝑖 ∈ [𝑀], since the Hamming distance betweenx𝑗 andx𝑖 is at least 2π‘˜ +1 for 𝑗 ≠𝑖. Hence, the identify of {(π‘₯𝑖,1, . . . , π‘₯𝑖, 𝐿′)}𝑀

𝑖=1are determined from{(π‘₯β€²

𝑖,1, . . . , π‘₯β€²

𝑖, 𝐿′)}𝑀

𝑖=1.

(4) Since xβ€²πœ‹(𝑖) is an erroneous copy of x𝑖, 𝑖 ∈ [𝑀], it follows that the con- catenation sβ€² = (xβ€²πœ‹(1), . . . ,xβ€²πœ‹(𝑀)) is an erroneous copy of (x1, . . . ,x𝑀) = (m, 𝑅 π‘†π‘˜(m)), where m is defined in Step (4) in the encoding procedure.

Therefore,(x1, . . . ,x𝑀)and thusd2can be recovered from(xβ€²πœ‹(1), . . . ,xβ€²πœ‹(𝑀)) by using the Reed-Solomon decoder.

(5) Output(𝑑1,d2).

Therefore, the codeword{x𝑖}𝑀

𝑖=1can be recovered. The redundancy of the code is π‘Ÿ(C)=log

2𝐿 𝑀

βˆ’log⌈(2𝐿′ βˆ’π‘€ 𝑄)π‘€βˆ’1

(π‘€βˆ’1)! βŒ‰ βˆ’ [𝑀(πΏβˆ’πΏβ€²) βˆ’4π‘˜ πΏβ€²βˆ’2π‘˜βŒˆlog𝑀 πΏβŒ‰]

(6.2)

(π‘Ž)

≀2π‘˜log𝑀 𝐿+ (12π‘˜+2)log𝑀+𝑂(π‘˜3) +𝑂(π‘˜log log𝑀 𝐿), (6.3) where(π‘Ž)will be proved in Appendix6.7. The complexity of the encoding/decoding is that of computing the function 𝐹𝐻

𝑆 , which as will be discussed in Sec. 6.4, is 𝑝 π‘œπ‘™ 𝑦(𝑀 , 𝐿 , π‘˜).

consists of two steps. In the first step we map the integer 𝑑 ∈ [ ⌈(2

𝐿′

βˆ’π‘€ 𝑄)π‘€βˆ’1 (π‘€βˆ’1)! βŒ‰]

into 𝑀 βˆ’ 1 integers π‘ž1, . . . , π‘žπ‘€ ∈ [2𝐿′] such that π‘ž1 = 2𝐿′ and π‘žπ‘–+1 ≀ π‘žπ‘– βˆ’π‘„ for 𝑖 ∈ [𝑀 βˆ’ 1]. In the second step, we use π‘žπ‘– to generate a𝑖 sequentially for𝑖 ∈ [2, 𝑀]. The first step is given in the following lemma.

Lemma 6.4.1. There exists an invertible map 𝐹𝐻

𝑄 : [ ⌈(2

𝐿′

βˆ’π‘€ 𝑄)π‘€βˆ’1

(π‘€βˆ’1)! βŒ‰] β†’ [2𝐿

β€²] 𝑀

, computable in 𝑝 π‘œπ‘™ 𝑦(𝐿′, 𝑀) time, that maps and integer𝑑 ∈ [ ⌈(2

𝐿′

βˆ’π‘€ 𝑄)π‘€βˆ’1

(π‘€βˆ’1)! βŒ‰] to an integer tuple(π‘ž1, . . . , π‘žπ‘€) such thatπ‘ž1=2𝐿′ andπ‘žπ‘– β‰₯ π‘žπ‘–+1+𝑄 for𝑖 ∈ [π‘€βˆ’1]. Proof. Recall thecombinatorial numbering map πΉπ‘π‘œπ‘š that maps an integer in the range [ 𝑛

π‘š

] to a set of π‘š different and unordered integers in the range [𝑛] for integers 𝑛 and π‘š ≀ 𝑛. Since (2

𝐿′

βˆ’π‘€ 𝑄)π‘€βˆ’1

(π‘€βˆ’1)! ≀ 2𝐿

β€²βˆ’π‘€ 𝑄+π‘€βˆ’1 π‘€βˆ’1

, we can map 𝑑 ∈ [ ⌈(2

𝐿′

βˆ’π‘€ 𝑄)π‘€βˆ’1

(π‘€βˆ’1)! βŒ‰] to𝑀 βˆ’1 integers πΉπ‘π‘œπ‘š(𝑑) ={π‘žβ€²

2, . . . , π‘žβ€²

𝑀} such that 2𝐿′ βˆ’ 𝑀 𝑄+ 𝑀 βˆ’ 1 β‰₯ π‘žβ€²

2 > π‘žβ€²

3 > . . . > π‘žβ€²

𝑀. Let π‘ž1 = 2𝐿′, π‘žπ‘– = π‘žβ€²

𝑖 + (𝑀 βˆ’ 𝑖 +1) (𝑄 βˆ’ 1) for𝑖 ∈ [2, 𝑀], and 𝐹𝐻

𝑄(𝑑) = {π‘ž1, . . . , π‘žπ‘€}. Then we have thatπ‘ž2 ≀ 2𝐿′ βˆ’π‘„ and thatπ‘žπ‘– β‰₯ π‘žπ‘–+1+𝑄for𝑖 ∈ [2, π‘€βˆ’1]. Since the mapπΉπ‘π‘œπ‘šis invertible and computed in 𝑝 π‘œπ‘™ 𝑦(𝐿′, 𝑀) time, so is the map𝐹𝐻

𝑄. β–‘

We now turn to the second step. Given the integers 𝐹𝐻

𝑄(𝑑) = (π‘ž1, . . . , π‘žπ‘€), we generate the indexing bits{a𝑖 = (π‘₯𝑖,1, . . . , π‘₯𝑖, 𝐿′)}𝑀

𝑖=1 ∈ S𝐻. First, we have thata1= 1𝐿′. The algorithm generates the indexing string a𝑖 sequentially for 𝑖 ∈ [2, 𝑀]. Each indexing stringa𝑖 is generated bit by bit in a recursive manner. We first give the following definition, on which the algorithm is based.

For a set of strings 𝐴 βŠ‚ {0,1}𝐿′ and a stringa∈ {0,1}β„“ of lengthβ„“ ∈ [𝐿′]. Denote 𝑁𝐻(a, 𝐴)= βˆ‘οΈ

c:c∈𝐴

|{cβ€²: (𝑐′

1, . . . , 𝑐′

β„“)=aand𝑑𝐻(cβ€²,c) ≀2π‘˜}|

as the sum of the number of sequences that have prefixaand have Hamming distance at most 2π‘˜ fromcoverc ∈ 𝐴. The number 𝑁𝐻(a, 𝐴) has the following properties that will be useful in our proof. The first property implies that

2πΏβ€²βˆ’β„“βˆ’π‘π»(a, 𝐴) =(2πΏβ€²βˆ’β„“βˆ’1βˆ’ 𝑁𝐻( (a,0), 𝐴)) + (2πΏβ€²βˆ’β„“βˆ’1βˆ’π‘π»( (a,1), 𝐴)), (6.4) which enables a recursion to generate each sequence a𝑖. The second property provides a way to compute𝑁𝐻(a, 𝐴).

Lemma 6.4.2. 1. For any sequence a ∈ {0,1}β„“ of length β„“ ∈ [𝐿′ βˆ’ 1] and set𝐴 βŠ‚ {0,1}𝐿′, we have

𝑁𝐻(a, 𝐴) =𝑁𝐻( (a,0), 𝐴) +𝑁𝐻( (a,1), 𝐴), (6.5)

where (a,0)or (a,1)is the concatenation ofaand a0or1bit respectively.

2. For anya ∈ {0,1}β„“ and𝐴 βŠ‚ {0,1}𝐿′, we have

𝑁𝐻(a, 𝐴) = βˆ‘οΈ

c:c∈𝐴

2π‘˜βˆ’π‘‘π»(a,(𝑐1,...,𝑐ℓ))

βˆ‘οΈ

𝑖=0

πΏβ€²βˆ’β„“ 𝑖

. (6.6)

Proof. Note that for any sequence c, the β„“ + 1-th bit of any sequence cβ€² satisfy- ing(𝑐′

1, . . . , 𝑐′

β„“) =ais either 0 or 1. Hence

|{cβ€²:(𝑐′

1, . . . , 𝑐′

β„“) =aand𝑑𝐻(cβ€²,c) ≀ 2π‘˜}|

=|{cβ€²:(𝑐′

1, . . . , 𝑐′

β„“+1) =(a,0)and𝑑𝐻(cβ€²,c) ≀2π‘˜}|

+ |{cβ€²:(𝑐′

1, . . . , 𝑐′

β„“+1) = (a,1)and𝑑𝐻(cβ€²,c) ≀2π‘˜}|,

which implies Eq. (6.5). Moreover, for any sequencec∈ {0,1}𝐿′, we have that

|{cβ€²: (𝑐′

1, . . . , 𝑐′

β„“)=aand𝑑𝐻(cβ€²,c) ≀2π‘˜}| =

2π‘˜βˆ’π‘‘π»(a,(𝑐1,...,𝑐ℓ))

βˆ‘οΈ

𝑖=0

πΏβ€²βˆ’β„“ 𝑖

. Hence the number 𝑁𝐻(a, 𝐴)can be computed by Eq. (6.6). β–‘ Next, we present the algorithm that takes𝐹𝐻

𝑄 (𝑑) = (π‘ž1, . . . , π‘žπ‘€) as input and out- putsa𝑖 such that{a1, . . . ,a𝑀} ∈ S𝐻 and that the decimal presentation decimal(a𝑖) ofa𝑖, 𝑖 ∈ [𝑀] satisfies

decimal(a𝑖) =π‘žπ‘–βˆ’1+ βˆ‘οΈ

β„“:π‘Žπ‘– ,β„“=1andβ„“βˆˆ[𝐿′]

𝑁𝐻( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,β„“βˆ’1,0),{a𝑗}π‘–βˆ’1

𝑗=1). (6.7) We then show that the sequencesa𝑖, 𝑖 ∈ [𝑀]satisfying (6.7) are decodable, i.e., we can recover the tuple(π‘ž1, . . . , π‘žπ‘€)from{a1, . . . ,a𝑀}.

Encoding:

for𝑖 ∈ [𝑀], do π‘ž =π‘žπ‘–.

forβ„“ ∈ [𝐿′], do

if 2πΏβ€²βˆ’β„“ βˆ’π‘π»( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,β„“βˆ’1,0),{a𝑗}π‘–βˆ’1

𝑗=1) β‰₯ π‘ž, thenπ‘Žπ‘–,β„“ =0.

else

π‘ž =π‘žβˆ’ (2πΏβ€²βˆ’β„“ βˆ’π‘π»( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,β„“βˆ’1,0),{a𝑗}π‘–βˆ’1

𝑗=1)), π‘Žπ‘–,β„“ =1.

end if end for end for

return{a1, . . . ,a𝑀}.

The generation of a𝑖, 𝑖 ∈ [𝑀] in the encoding procedure can be intuitively char- acterized as walking on a complete binary tree of 𝐿′+1 layers. The walk starts at layer 1, i.e., the root of the binary tree, and ends at layer 𝐿′+1 at one of the leaf nodes. At each step, it goes to one of its two child nodes, which represent the bits 0 and 1 respectively. Each string a𝑖, 𝑖 ∈ [𝑀] is represented by the path of a walk. For each patha𝑖 = (π‘Žπ‘–,1, . . . , π‘Žπ‘–, 𝐿′) and each layer β„“ ∈ [𝐿′], assign the weight𝑀(π‘Žπ‘–,β„“) =2πΏβ€²βˆ’β„“ βˆ’π‘π»( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,β„“),{a𝑗}π‘–βˆ’1

𝑗=1)to nodeπ‘Žπ‘–,β„“ in theβ„“-th layer, and the weight𝑀(π‘ŽΒ―π‘–,β„“) =2πΏβ€²βˆ’β„“βˆ’π‘π»( (π‘Žπ‘–,1, . . . ,1βˆ’π‘Žπ‘–,β„“),{a𝑗}π‘–βˆ’1

𝑗=1)to the brother node of nodeπ‘Žπ‘–,β„“, i.e., the node that shares the same parent node withπ‘Žπ‘–,β„“. From Eq. (6.5) we have that 𝑀(π‘Žπ‘–,β„“) = 𝑀(π‘Žπ‘–,β„“+1) +𝑀(π‘ŽΒ―π‘–,β„“+1) forβ„“ ∈ [πΏβ€²βˆ’1]. Moreover, we have that 0 < π‘ž ≀ 𝑀(π‘Žπ‘–,β„“) after theβ„“-th inner for loop in the𝑖-th outer for loop. This is formalized in the following lemma, which can be used to prove that Eq. (6.7) holds and that{a1, . . . ,a𝑀} ∈ S𝐻.

Lemma 6.4.3. After theβ„“-th,β„“ ∈ [𝐿′], inner for loop in the𝑖-th,𝑖 ∈ [𝑀], outer for loop in the encoding procedure, we have that

0< π‘ž ≀2πΏβ€²βˆ’β„“βˆ’π‘π»( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,β„“),{a𝑗}π‘–π‘—βˆ’1=1). (6.8) At the end of the𝑖-th outer for loop, we have thatπ‘ž =1.

Proof. We prove Eq. (6.8) by induction onβ„“. Forβ„“ =1, according to Lemma6.4.1, we have 0 < π‘ž = π‘žπ‘– ≀ 2𝐿′ βˆ’ (𝑖 βˆ’1)𝑄 at the beginning of the 𝑖-th outer for loop.

If π‘Žπ‘–,1 = 0, then according to the if condition in the encoding procedure, we have that 0 < π‘ž ≀ 2πΏβ€²βˆ’β„“ βˆ’ 𝑁𝐻(0,{a𝑗}π‘–βˆ’1

𝑗=1) for β„“ = 1, which proves (6.8). Otherwise ifπ‘Žπ‘–,1=1, we have

0 < π‘ž=π‘žπ‘–βˆ’ (2πΏβ€²βˆ’β„“βˆ’π‘π»(0,{a𝑗}π‘–βˆ’1

𝑗=1))

≀ 2𝐿′ βˆ’ (π‘–βˆ’1)π‘„βˆ’ (2πΏβ€²βˆ’β„“βˆ’π‘π»(0,{a𝑗}π‘–βˆ’1

𝑗=1))

(π‘Ž)

=(2πΏβ€²βˆ’1βˆ’π‘π»(1,{a𝑗}π‘–βˆ’1𝑗=1)),

where(π‘Ž)holds since by definition of𝑁𝐻(a, 𝐴), we have that 𝑁𝐻(0,{a𝑗}π‘–π‘—βˆ’1=1) +𝑁𝐻(1,{a𝑗}π‘–π‘—βˆ’1=1) =

π‘–βˆ’1

βˆ‘οΈ

𝑗=1

|{c:𝑑𝐻(c,a𝑗) ≀ 2π‘˜}|

=

π‘–βˆ’1

βˆ‘οΈ

𝑗=1

𝑄

= (π‘–βˆ’1)𝑄 .

Hence the claim holds forβ„“ =1. Suppose Eq. (6.8) holds forβ„“ =π‘š. Forβ„“ =π‘š+1, ifπ‘Žπ‘–,π‘š+1=0, then from Step (3), we have 0< π‘ž ≀ 2πΏβ€²βˆ’π‘šβˆ’1βˆ’π‘π»( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,π‘š,0), {a𝑗}π‘–βˆ’1

𝑗=1). Otherwise if π‘Žπ‘–,π‘š+1=1, we have that

0 < π‘ž=π‘žπ‘–βˆ’ (2πΏβ€²βˆ’π‘šβˆ’1βˆ’ 𝑁𝐻( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,β„“,0),{a𝑗}π‘–βˆ’1

𝑗=1))

≀ 2πΏβ€²βˆ’π‘š βˆ’π‘π»( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,π‘š),{a𝑗}π‘–βˆ’π‘—=11)

βˆ’ (2πΏβ€²βˆ’π‘šβˆ’1βˆ’π‘π»( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,π‘š,0),{a𝑗}π‘–π‘—βˆ’1=1))

(𝑏)= (2πΏβ€²βˆ’π‘šβˆ’1βˆ’π‘π»( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,π‘š,1),{a𝑗}π‘–π‘—βˆ’1=1)),

where(𝑏)follows from Eq. (6.5). Therefore, Eq. (6.8) holds forβ„“ =π‘š+1 and thus holds forβ„“ ∈ [𝐿′]. Hence at the end of Step (2) we have that

0< π‘ž ≀ 2πΏβ€²βˆ’πΏβ€²βˆ’π‘π»(a𝑖,{a𝑗}π‘–βˆ’1𝑗=1) ≀1. (6.9)

Henceπ‘žequals 1 at the end of Step (2). β–‘

We now show that the strings {a1, . . . ,a𝑀} generated in the encoding procedure belong toS𝐻. By Lemma6.4.3, we have

π‘ž =2πΏβ€²βˆ’πΏβ€² βˆ’π‘π»(a𝑖,{a𝑗}π‘–βˆ’1

𝑗=1) =1,

at the end of each round of Step (2) in the encoding procedure. This implies that𝑁𝐻(a𝑖,{a𝑗}π‘–βˆ’1

𝑗=1) =0 and thus𝑑𝐻(a𝑖,a𝑗) β‰₯2π‘˜+1 for𝑖 ∈ [2, 𝑀]and 𝑗 ∈ [π‘–βˆ’1]. Moreover, sinceπ‘ž1=2𝐿′, we have thata1=1𝐿′. Therefore,{a𝑖}𝑀

𝑖=1∈ S𝐻. Next, we use Lemma6.4.3to show that the strings{a𝑖}𝑀

𝑖=1satisfy Eq. (6.7).

Lemma 6.4.4. The output{a𝑖}𝑀

𝑖=1of the encoding algorithm satisfies Eq.(6.7).

Proof. Note that in each inner for loop, the number π‘ž is subtracted by 2πΏβ€²βˆ’β„“ βˆ’ 𝑁𝐻( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,β„“βˆ’1,0),{a𝑗}π‘–βˆ’1

𝑗=1) only when π‘Žπ‘–,β„“ = 1 and β„“ ∈ [𝐿′]. Since the numberπ‘žequalsπ‘žπ‘– at the beginning of each outer for loop, and from Lemma6.4.3 equals 1 at the end of each outer for loop, hence we have that

π‘žπ‘–βˆ’ βˆ‘οΈ

β„“:π‘Žπ‘– ,β„“=1andβ„“βˆˆ[𝐿′]

(2πΏβ€²βˆ’β„“βˆ’π‘π»( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,β„“βˆ’1,0),{a𝑗}π‘–π‘—βˆ’1=1)) =1,

which implies (6.7). β–‘

Remark 6.4.1. By definition of𝑁𝐻(a, 𝐴), we have the following alternative char- acterization ofdecimal(a𝑖),𝑖 ∈ [𝑀].

decimal(a𝑖)=π‘žπ‘–βˆ’1+

π‘–βˆ’1

βˆ‘οΈ

𝑗=1

|{c:𝑑𝑒 𝑐𝑖 π‘š π‘Žπ‘™(c) < 𝑑𝑒 𝑐𝑖 π‘š π‘Žπ‘™(a𝑖)and𝑑𝐻(c,a𝑗) ≀2π‘˜}|, (6.10) which is π‘žπ‘– βˆ’1 plus the sum of number of strings that are lexicographically less thana𝑖and have Hamming distance at most2π‘˜ froma𝑗 over 𝑗 < 𝑖.

Lemma6.4.4immediately implies a decoding algorithm that transforms{a𝑖}𝑀

𝑖=1back to(π‘ž1, . . . , π‘žπ‘€).

Decoding:

(1) Order the strings{a𝑖}𝑀

𝑖=1such thata1 > a2 > . . . >a𝑀. (2) For𝑖 ∈ [𝑀],

π‘žπ‘– =decimal(a𝑖) +1+ βˆ‘οΈ

β„“:π‘Žπ‘– ,β„“=1andβ„“βˆˆ[𝐿′]

𝑁𝐻( (π‘Žπ‘–,1, . . . , π‘Žπ‘–,β„“βˆ’1,0),{a𝑗}π‘–βˆ’1

𝑗=1). (6.11) To show that the decoding is correct, we prove that the stringa𝑖,𝑖 ∈ [𝑀] generated in the encoding procedure satisfies

a1 > a2> . . . >a𝑀. (6.12) Then we conclude that the string a𝑖 obtained by ordering{a𝑖}𝑀

𝑖=1in Step (1) in the decoding procedure satisfies Eq. (6.7). Hence we have Eq. (6.23) and thus π‘žπ‘–, 𝑖 ∈ [𝑀]can be recovered. Suppose on the contrary, there exista𝑖1 > a𝑖2for some𝑖1> 𝑖2.

Letβ„“βˆ—be the most significant bit wherea𝑖1 anda𝑖2 differ, i.e.,(π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“βˆ—βˆ’1) = (π‘Žπ‘–

2,1, . . . , π‘Žπ‘–

2,β„“βˆ—βˆ’1) andπ‘Žπ‘–

1,β„“βˆ— = 1 andπ‘Žπ‘–

2,β„“βˆ— =0. Then according to the if statement in the encoding procedure, we have that

π‘žπ‘–

1βˆ’ βˆ‘οΈ

β„“:π‘Žπ‘–

1,β„“=1andβ„“βˆˆ[β„“βˆ—]

(2πΏβ€²βˆ’β„“βˆ’π‘π»( (π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“βˆ’1,0),{a𝑗}𝑖1βˆ’1

𝑗=1)) > 0 and π‘žπ‘–

2βˆ’ βˆ‘οΈ

β„“:π‘Žπ‘–

1,β„“=1andβ„“βˆˆ[β„“βˆ—]

(2πΏβ€²βˆ’β„“βˆ’π‘π»( (π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“βˆ’1,0),{a𝑗}𝑖2βˆ’1

𝑗=1)) ≀0, which implies that

π‘žπ‘–

2βˆ’π‘žπ‘–

1 <

βˆ‘οΈ

β„“:π‘Žπ‘–

1,β„“=1andβ„“βˆˆ[β„“βˆ—]

(2πΏβ€²βˆ’β„“ βˆ’π‘π»( (π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“βˆ’1,0),{a𝑗}𝑖2βˆ’1

𝑗=1))

βˆ’ βˆ‘οΈ

β„“:π‘Žπ‘–

1,β„“=1andβ„“βˆˆ[β„“βˆ—]

(2πΏβ€²βˆ’β„“ βˆ’π‘π»( (π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“βˆ’1,0),{a𝑗}𝑖1βˆ’1

𝑗=1))

= βˆ‘οΈ

β„“:π‘Žπ‘–

1,β„“=1andβ„“βˆˆ[β„“βˆ—]

(𝑁𝐻( (π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“βˆ’1,0),{a𝑗}𝑖1βˆ’1

𝑗=1)

βˆ’π‘π»( (π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“βˆ’1,0),{a𝑗}𝑖2βˆ’1

𝑗=1))

= βˆ‘οΈ

β„“:π‘Žπ‘–

1,β„“=1andβ„“βˆˆ[β„“βˆ—]

𝑁𝐻( (π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“βˆ’1,0),{a𝑗}𝑖𝑗=𝑖1βˆ’1

2)

(π‘Ž)

≀

𝑖1βˆ’1

βˆ‘οΈ

𝑗=𝑖2

|c: 𝑑𝐻(c,a𝑗) ≀2π‘˜|

=(𝑖1βˆ’π‘–2)𝑄 , (6.13)

where (π‘Ž) follows from the definition of 𝑁𝐻(a, 𝐴) and the fact that the strings which have(π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“1βˆ’1,0)and(π‘Žπ‘–

1,1, . . . , π‘Žπ‘–

1,β„“2βˆ’1,0)as prefixes, respectively, whereπ‘Žπ‘–

1,β„“1=1, π‘Žπ‘–

1,β„“2=1 andβ„“1 β‰  β„“2, are different. Eq. (6.13) contradicts to the fact that the integers(π‘ž1, . . . , π‘žπ‘€) =𝐹𝐻

𝑄 (𝑑)satisfyπ‘žπ‘–βˆ’π‘žπ‘–+1 > 𝑄for𝑖 ∈ [π‘€βˆ’1], which impliesπ‘žπ‘–

1βˆ’π‘žπ‘–

2 β‰₯ (𝑖1βˆ’π‘–2)𝑄.

Since the calculation of𝑁𝐻(a, 𝐴)has polynomial complexity, the complexity of the encoding/decoding procedure is polynomial in 𝑀and 𝐿′.