Pseudo-random number sampling: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Sun Creator
m Finite discrete distributions: Typo fixing and checking, typos fixed: , → , using AWB (8097)
 
en>Srich32977
Reverted good faith edits by Hakanhaberdar (talk): Same reason as another rollback -- not an acceptable WP:ELNO. (TW)
Line 1: Line 1:
Private Tutors and Educators Theodore Duttweiler from Beresford, loves to spend some time legos, opal and base jumping. Finds the charm in going to places throughout the  world, recently just coming back from Robben Island.<br><br>My web site ... [http://comoganhardinheiropelainternet.comoganhardinheiro101.com como ganhar dinheiro]
In [[coding theory]], '''generalized minimum-distance (GMD) decoding''' provides an efficient [[algorithm]] for decoding [[concatenated code]]s, which is based on using an [[error]]s-and-[[Erasure code|erasures]] [[decoder]] for the [[outer code]].
 
A [[Concatenated error correction code#Decoding concatenated codes|naive decoding algorithm]] for concatenated codes can not be an optimal way of decoding because it does not take into account the information that [[maximum likelihood decoding]] (MLD) gives. In other words, in the naive algorithm, inner received [[codeword]]s are treated the same regardless of the difference between their [[hamming distance]]s. Intuitively, the outer decoder should place higher confidence in symbols whose inner [[code|encodings]] are close to the received word. [[David Forney]] in 1966 devised a better algorithm called generalized minimum distance (GMD) decoding which makes use of those information better. This method is achieved by measuring confidence of each received codeword, and erasing symbols whose confidence is below a desired value. And GMD decoding algorithm was one of the first examples of [[soft-decision decoder]]s. We will present three versions of the GMD decoding algorithm. The first two will be [[randomized algorithm]]s while the last one will be a [[deterministic algorithm]].
 
==Setup==
# [[Hamming distance]] : Given two [[Euclidean vector|vector]]s <math>u, v\in\sum^n</math> the Hamming distance between u and v, denoted by <math>\Delta(u, v)</math>, is defined to be the number of positions in which u and v differ.
# Minimum distance : Let <math>C\subseteq\sum^n</math> be a [[code]]. The minimum distance of code C is defined to be <math>d = \min{\Delta(c_1, c_2)}</math> where <math>c_1 \ne c_2 \in C</math>
# Code concatenation : Given <math>m = (m_1, \ldots, m_K) \in [Q]^K</math>, consider two codes which we call outer code and inner code <math>C_\text{out} = [Q]^K \rightarrow [Q]^N, C_\text{in} : [q]^k \rightarrow [q]^n</math>, and  their distances are <math>D</math> and <math>d</math>. A concatenated code can be achieved by <math>C_\text{out} \circ C_\text{in} (m) = (C_\text{in} (C_\text{out} (m)_1), \ldots, C_\text{in} (C_\text{out} (m)_N ))</math> where <math>C_\text{out}(m) = ((C_\text{out} (m)_1, \ldots, (m)_N ))</math>. Finally we will take <math>C_\text{out}</math> to be [[Reed Solomon|RS code]], which has an errors and erasure decoder, and <math>K = O(\log{N})</math>, which in turn implies that MLD on the inner code will be poly(<math>N</math>) time.
# Maximum likelihood decoding(MLD) : MLD is a decoding method for error correcting codes, which outputs the codeword closest to the received word in Hamming distance. The MLD function denoted by <math>D_{MLD} : \sum^n \rightarrow C</math> is defined as follows. For every <math>y\in\sum_n</math>, <math>D_{MLD}(y) = \arg \min_{c \in C}\Delta(c, y)</math>.
# [[Probability density function]] : A [[probability distribution]] <math>\Pr[\bullet]</math> on a sample space <math>S</math> is a mapping from events of <math>S</math> to [[real number]]s such that <math>\Pr[A] \ge 0</math> for any event <math>A</math>, <math>\Pr[S] = 1</math>, and <math>\Pr[A \cup B] = \Pr[A] + \Pr[B]</math> for any two mutually exclusive events <math>A</math> and <math>B</math>
# [[Expected value]] : The expected value of a [[discrete random variable]] <math>X</math> is <math>\mathbb{E} = \sum_x\Pr[X = x]</math>.
 
==Randomized algorithm==
Consider the received word <math>\mathbf{y} = (y_1,\ldots,y_N) \in [q^n]^N</math> which corrupted by [[noisy channel]]. The following is the algorithm description for the general case. In this algorithm, we can decode y by just declaring an erasure at every bad position and running the errors and erasure decoding algorithm for <math>C_\text{out}</math> on the resulting vector.
 
'''Randomized_Decoder'''
<br />'''Given : '''<math>\mathbf{y} = (y_1,\dots,y_N) \in [q^n]^N</math>.
# For every <math>1 \le i \le N</math>, compute <math>y_i^\prime = MLD_{C_\text{in}}(y_i)</math>.
# Set <math>\omega_i = \min(\Delta(C_\text{in}(y_i^\prime), y_i), {d\over2})</math>.
# For every <math>1 \le i \le N</math>, repeat : With probability <math>2\omega_i \over d</math>, set <math>y_i^{\prime\prime} \leftarrow</math> ?, otherwise set <math>y_i^{\prime\prime} = y_i'</math>.
# Run errors and erasure algorithm for <math>C_\text{out}</math> on <math>\mathbf{y}^{\prime\prime} = (y_1^{\prime\prime}, \ldots, y_N^{\prime\prime})</math>.
 
'''Theorem 1.''' ''Let y be a received word such that there exists a [[codeword]]'' <math>\mathbf{c} = (c_1,\ldots, c_N) \in C_\text{out}\circ{C_\text{in}} \subseteq  [q^n]^N</math> ''such that'' <math>\Delta(\mathbf{c}, \mathbf{y}) < \frac{Dd}{2}</math>. ''Then the deterministic GMD algorithm outputs'' <math>\mathbf{c}</math>.
 
Note that a [[Concatenated codes|naive decoding algorithm for concatenated codes]] can correct up to <math>Dd \over 4</math> errors.
 
'''Lemma 1.''' ''Let the assumption in Theorem 1 hold. And if'' <math>\mathbf{y^{\prime\prime}}</math> ''has'' <math>e'</math> ''errors and'' <math>s'</math> ''erasures(when compared with'' <math>\mathbf{c}</math>'') after'' '''Step 1''', ''then'' <math>\mathbb{E}[2e' + s'] < D</math>.
 
If <math>2e' + s' < D</math>, then the algorithm in '''Step 2''' will output <math>\mathbf{c}</math>. The lemma above says that in expectation, this is indeed the case. Note that this is not enough to prove '''Theorem 1''', but can be crucial in developing future variations of the algorithm.
 
'''Proof of lemma 1.''' For every <math>1 \le i \le N</math>, define <math>e_i = \Delta(y_i, c_i)</math>. This implies that
 
<math>\sum_{i=1}^N e_i <  \frac{Dd}{2} \qquad\qquad (1)</math>
 
Next for every <math>1 \le i \le N</math>, we define two [[indicator variable]]s:
 
: <math>X{_i^?} = 1</math> iff <math>y_i^{\prime\prime} = ?,</math>
 
and
 
: <math>X{_i^e} = 1</math> iff <math>C_\text{in}(y_i^{\prime\prime}) \ne c_i</math>
 
and
 
: <math>y_i^{\prime\prime} \ne ?.</math>
 
We claim that we are done if we can show that for every <math>1 \le i \le N</math>:
 
: <math>\mathbb{E}[2X{_i^e + X{_i^?}}] \le {{2e_i} \over d}\qquad\qquad (2)</math>
 
Clearly, by definition <math>e' = \sum_{i}X{_i^e}</math> and <math>s' = \sum_{i}X{_i^?}</math>. Further, by the [[linear]]ity of expectation, we get <math>\mathbb{E}[2e' + s'] \le {2 \over d}\sum_ie_i < D</math>. We consider two cases to prove (2) : <math>i'th</math> block is correctly decoded('''Case 1'''), <math>i'th</math> block is incorrectly decoded('''Case 2''')
 
'''Case 1:''' <math>(c_i = C_\text{in}(y_i'))</math>
 
Note that if <math>y_i^{\prime\prime} = ?</math> then <math>X_i^e = 0</math>, and <math>\Pr[y_i^{\prime\prime} = ?] = {2\omega_i \over d}</math> implies
<math>\mathbb{E}[X_i^?] = \Pr[X_i^? = 1] = {2\omega_i \over d}</math>, and <math>\mathbb{E}[X_i^e] = \Pr[X_i^e = 1] = 0</math>.
 
Further, by definition we have
 
: <math>\omega_i = \min(\Delta(C_\text{in}(y_i'), y_i), {d \over 2}) \le \Delta(C_\text{in}(y_i'), y_i) = \Delta(c_i, y_i) = e_i</math>
 
'''Case 2:''' <math>(c_i \ne C_\text{in}(y_i'))</math>
 
In this case,
 
: <math>\mathbb{E}[X_i^?] = {2\omega_i \over d}</math>and <math>\mathbb{E}[X_i^e] = \Pr[X_i^e = 1] = 1 - {2\omega_i \over d}.</math>
 
Since <math>c_i \ne C_\text{in}(y_i')</math>, <math>e_i + \omega_i \ge d</math>. This follows [http://www.cse.buffalo.edu/~atri/courses/coding-theory/lectures/lect28.pdf another case analysis] when <math>(\omega_i = \Delta(C_\text{in}(y_i'),  y_i) < {d \over 2})</math> or not.
 
Finally, this implies
 
: <math>\mathbb{E}[2X_i^e + X_i^?] = 2 - {2\omega_i \over d} \le {2e_i \over d}.</math>
 
In the following sections, we will finally show that the deterministic version of the algorithm above can do unique decoding of <math>C_\text{out} \circ C_\text{in}</math> up to half its design distance.
 
==Modified randomized algorithm==
Note that, in the previous version of the GMD algorithm in step "3", we do not really need to use "fresh" [[randomness]] for each <math>i</math>. Now we come up with another randomized version of the GMD algorithm that uses the ''same'' randomness for every <math>i</math>. This idea follows the algorithm below.
 
'''Modified_Randomized_Decoder'''
<br />'''Given : '''<math>\mathbf{y} = (y_1, \ldots,y_N) \in [q^n]^N</math>, pick <math>\theta \in [0, 1]</math> at random. Then every for every <math>1 \le i \le N</math>:
# Set <math>y_i^\prime = MLD_{C_\text{in}}(y_i)</math>.
# Compute <math>\omega_i = \min(\Delta(C_\text{in}(y_i^\prime), y_i), {d\over2})</math>.
# If <math>\theta</math> < <math>{2\omega_i \over d}</math>, set <math>y_i^{\prime\prime} \leftarrow</math> ?, otherwise set <math>y_i^{\prime\prime} = y_i'</math>.
# Run errors and erasure algorithm for <math>C_\text{out}</math> on <math>\mathbf{y}^{\prime\prime} = (y_1^{\prime\prime},\ldots, y_N^{\prime\prime})</math>.
 
For the proof of '''[[Lemma (mathematics)|Lemma 1]]''', we only use the randomness to show that
 
: <math>\Pr[y_i^{\prime\prime} = ?] = {2\omega_i \over d}.</math>
 
In this version of the GMD algorithm, we note that
 
: <math>\Pr[y_i^{\prime\prime} = ?] = \Pr[\theta \in [0, {2\omega_i \over d}]] = {2\omega_i \over d}.</math>
 
The second [[Equality (mathematics)|equality]] above follows from the choice of <math>\theta</math>. The proof of '''Lemma 1''' can be also used to show <math>\mathbb{E}[2e' + s']</math> < <math>D</math> for version2 of GMD.
In the next section, we will see how to get a deterministic version of the GMD algorithm by choosing θ from a polynomially sized set as opposed to the current infinite set <math>[0, 1]</math>.
 
==Deterministic algorithm==
Let <math>Q = \{0,1\} \cup \{{2\omega_1 \over d}, \ldots,{2\omega_N \over d}\}</math>. Since for each <math>i, \omega_i = \min(\Delta(\mathbf{y_i'}, \mathbf{y_i}), {d \over 2})</math>, we have
 
: <math>Q = \{0, 1\} \cup \{q_1, \ldots,q_m\}</math>
 
where <math>q_1 < q_2 < \cdots < q_m</math> for some <math>m \le \left \lfloor \frac{d}{2} \right \rfloor</math>. Note that for every <math>\theta \in [q_i, q_{i+1}]</math>, the step 1 of the second version of randomized algorithm outputs the same <math>\mathbf{y^{\prime\prime}}</math>. Thus, we need to consider all possible value of <math>\theta \in Q</math>. This gives the deterministic algorithm below.
 
'''Deterministic_Decoder'''
<br />'''    Given : '''<math>\mathbf{y} = (y_1,\ldots,y_N) \in [q^n]^N</math>, for every <math>\theta \in Q</math>, repeat the following.
# Compute <math>y_i^\prime = MLD_{C_\text{in}}(y_i)</math> for <math>1 \le i \le N</math>.
# Set <math>\omega_i = \min(\Delta(C_\text{in}(y_i^\prime), y_i), {d\over2})</math> for every <math>1 \le i \le N</math>.
# If <math>\theta</math> < <math>{2\omega_i \over d}</math>, set <math>y_i^{\prime\prime} \leftarrow</math> ?, otherwise set <math>y_i^{\prime\prime} = y_i'</math>.
# Run errors-and-erasures algorithm for <math>C_\text{out}</math> on <math>\mathbf{y^{\prime\prime}} = (y_1^{\prime\prime}, \ldots, y_N^{\prime\prime})</math>. Let <math>c_\theta</math> be the codeword in <math>C_\text{out} \circ C_\text{in}</math> corresponding to the output of the algorithm, if any.
# Among all the <math>c_\theta</math> output in 4, output the one closest to <math>\mathbf{y}</math>
 
Every loop of 1~4 can be run in [[polynomial time]], the algorithm above can also be computed in polynomial time.
Specifically, each call to an errors and erasures decoder of <math><dD/2</math> errors takes <math>O(d)</math> time. Finally, the runtime of the algorithm above is <math>O(NQn^{O(1)} + NT_\text{out})</math> where <math>T_\text{out}</math> is the running time of the outer errors and erasures decoder.
 
==See also==
#[[Concatenated code]]s
#[[Reed Solomon|Reed Solomon error correction]]
#[[Berlekamp–Welch algorithm|Welch Berlekamp algorithm]]
 
==References==
#[http://www.cse.buffalo.edu/~atri/courses/coding-theory/lectures University at Buffalo Lecture Notes on Coding Theory – Atri Rudra]
#[http://people.csail.mit.edu/madhu/FT01 MIT Lecture Notes on Essential Coding Theory – Madhu Sudan]
#[http://www.cs.washington.edu/education/courses/cse533/06au University of Washington – Venkatesan Guruswami]
#G. David Forney. Generalized Minimum Distance decoding. ''IEEE Transactions on Information Theory'', 12:125–131, 1966
 
{{DEFAULTSORT:Generalized minimum distance decoding}}
[[Category:Error detection and correction]]
[[Category:Coding theory]]
[[Category:Finite fields]]
[[Category:Information theory]]

Revision as of 23:04, 19 May 2013

In coding theory, generalized minimum-distance (GMD) decoding provides an efficient algorithm for decoding concatenated codes, which is based on using an errors-and-erasures decoder for the outer code.

A naive decoding algorithm for concatenated codes can not be an optimal way of decoding because it does not take into account the information that maximum likelihood decoding (MLD) gives. In other words, in the naive algorithm, inner received codewords are treated the same regardless of the difference between their hamming distances. Intuitively, the outer decoder should place higher confidence in symbols whose inner encodings are close to the received word. David Forney in 1966 devised a better algorithm called generalized minimum distance (GMD) decoding which makes use of those information better. This method is achieved by measuring confidence of each received codeword, and erasing symbols whose confidence is below a desired value. And GMD decoding algorithm was one of the first examples of soft-decision decoders. We will present three versions of the GMD decoding algorithm. The first two will be randomized algorithms while the last one will be a deterministic algorithm.

Setup

  1. Hamming distance : Given two vectors u,vn the Hamming distance between u and v, denoted by Δ(u,v), is defined to be the number of positions in which u and v differ.
  2. Minimum distance : Let Cn be a code. The minimum distance of code C is defined to be d=minΔ(c1,c2) where c1c2C
  3. Code concatenation : Given m=(m1,,mK)[Q]K, consider two codes which we call outer code and inner code Cout=[Q]K[Q]N,Cin:[q]k[q]n, and their distances are D and d. A concatenated code can be achieved by CoutCin(m)=(Cin(Cout(m)1),,Cin(Cout(m)N)) where Cout(m)=((Cout(m)1,,(m)N)). Finally we will take Cout to be RS code, which has an errors and erasure decoder, and K=O(logN), which in turn implies that MLD on the inner code will be poly(N) time.
  4. Maximum likelihood decoding(MLD) : MLD is a decoding method for error correcting codes, which outputs the codeword closest to the received word in Hamming distance. The MLD function denoted by DMLD:nC is defined as follows. For every yn, DMLD(y)=argmincCΔ(c,y).
  5. Probability density function : A probability distribution Pr[] on a sample space S is a mapping from events of S to real numbers such that Pr[A]0 for any event A, Pr[S]=1, and Pr[AB]=Pr[A]+Pr[B] for any two mutually exclusive events A and B
  6. Expected value : The expected value of a discrete random variable X is 𝔼=xPr[X=x].

Randomized algorithm

Consider the received word y=(y1,,yN)[qn]N which corrupted by noisy channel. The following is the algorithm description for the general case. In this algorithm, we can decode y by just declaring an erasure at every bad position and running the errors and erasure decoding algorithm for Cout on the resulting vector.

Randomized_Decoder
Given : y=(y1,,yN)[qn]N.

  1. For every 1iN, compute yi=MLDCin(yi).
  2. Set ωi=min(Δ(Cin(yi),yi),d2).
  3. For every 1iN, repeat : With probability 2ωid, set yi ?, otherwise set yi=yi.
  4. Run errors and erasure algorithm for Cout on y=(y1,,yN).

Theorem 1. Let y be a received word such that there exists a codeword c=(c1,,cN)CoutCin[qn]N such that Δ(c,y)<Dd2. Then the deterministic GMD algorithm outputs c.

Note that a naive decoding algorithm for concatenated codes can correct up to Dd4 errors.

Lemma 1. Let the assumption in Theorem 1 hold. And if y has e errors and s erasures(when compared with c) after Step 1, then 𝔼[2e+s]<D.

If 2e+s<D, then the algorithm in Step 2 will output c. The lemma above says that in expectation, this is indeed the case. Note that this is not enough to prove Theorem 1, but can be crucial in developing future variations of the algorithm.

Proof of lemma 1. For every 1iN, define ei=Δ(yi,ci). This implies that

i=1Nei<Dd2(1)

Next for every 1iN, we define two indicator variables:

Xi?=1 iff yi=?,

and

Xie=1 iff Cin(yi)ci

and

yi?.

We claim that we are done if we can show that for every 1iN:

𝔼[2Xie+Xi?]2eid(2)

Clearly, by definition e=iXie and s=iXi?. Further, by the linearity of expectation, we get 𝔼[2e+s]2diei<D. We consider two cases to prove (2) : ith block is correctly decoded(Case 1), ith block is incorrectly decoded(Case 2)

Case 1: (ci=Cin(yi))

Note that if yi=? then Xie=0, and Pr[yi=?]=2ωid implies 𝔼[Xi?]=Pr[Xi?=1]=2ωid, and 𝔼[Xie]=Pr[Xie=1]=0.

Further, by definition we have

ωi=min(Δ(Cin(yi),yi),d2)Δ(Cin(yi),yi)=Δ(ci,yi)=ei

Case 2: (ciCin(yi))

In this case,

𝔼[Xi?]=2ωidand 𝔼[Xie]=Pr[Xie=1]=12ωid.

Since ciCin(yi), ei+ωid. This follows another case analysis when (ωi=Δ(Cin(yi),yi)<d2) or not.

Finally, this implies

𝔼[2Xie+Xi?]=22ωid2eid.

In the following sections, we will finally show that the deterministic version of the algorithm above can do unique decoding of CoutCin up to half its design distance.

Modified randomized algorithm

Note that, in the previous version of the GMD algorithm in step "3", we do not really need to use "fresh" randomness for each i. Now we come up with another randomized version of the GMD algorithm that uses the same randomness for every i. This idea follows the algorithm below.

Modified_Randomized_Decoder
Given : y=(y1,,yN)[qn]N, pick θ[0,1] at random. Then every for every 1iN:

  1. Set yi=MLDCin(yi).
  2. Compute ωi=min(Δ(Cin(yi),yi),d2).
  3. If θ < 2ωid, set yi ?, otherwise set yi=yi.
  4. Run errors and erasure algorithm for Cout on y=(y1,,yN).

For the proof of Lemma 1, we only use the randomness to show that

Pr[yi=?]=2ωid.

In this version of the GMD algorithm, we note that

Pr[yi=?]=Pr[θ[0,2ωid]]=2ωid.

The second equality above follows from the choice of θ. The proof of Lemma 1 can be also used to show 𝔼[2e+s] < D for version2 of GMD. In the next section, we will see how to get a deterministic version of the GMD algorithm by choosing θ from a polynomially sized set as opposed to the current infinite set [0,1].

Deterministic algorithm

Let Q={0,1}{2ω1d,,2ωNd}. Since for each i,ωi=min(Δ(yi,yi),d2), we have

Q={0,1}{q1,,qm}

where q1<q2<<qm for some md2. Note that for every θ[qi,qi+1], the step 1 of the second version of randomized algorithm outputs the same y. Thus, we need to consider all possible value of θQ. This gives the deterministic algorithm below.

Deterministic_Decoder
Given : y=(y1,,yN)[qn]N, for every θQ, repeat the following.

  1. Compute yi=MLDCin(yi) for 1iN.
  2. Set ωi=min(Δ(Cin(yi),yi),d2) for every 1iN.
  3. If θ < 2ωid, set yi ?, otherwise set yi=yi.
  4. Run errors-and-erasures algorithm for Cout on y=(y1,,yN). Let cθ be the codeword in CoutCin corresponding to the output of the algorithm, if any.
  5. Among all the cθ output in 4, output the one closest to y

Every loop of 1~4 can be run in polynomial time, the algorithm above can also be computed in polynomial time. Specifically, each call to an errors and erasures decoder of <dD/2 errors takes O(d) time. Finally, the runtime of the algorithm above is O(NQnO(1)+NTout) where Tout is the running time of the outer errors and erasures decoder.

See also

  1. Concatenated codes
  2. Reed Solomon error correction
  3. Welch Berlekamp algorithm

References

  1. University at Buffalo Lecture Notes on Coding Theory – Atri Rudra
  2. MIT Lecture Notes on Essential Coding Theory – Madhu Sudan
  3. University of Washington – Venkatesan Guruswami
  4. G. David Forney. Generalized Minimum Distance decoding. IEEE Transactions on Information Theory, 12:125–131, 1966