Hadamard code: Difference between revisions

Content deleted Content added
m References: -typo
Ehqdein (talk | contribs)
 
(13 intermediate revisions by 9 users not shown)
Line 1:
{{Short description|Error-correcting code}}
{{Lead too long|date=May 2020}}
{{use dmy dates|date=June 2021|cs1-dates=y}}
Line 24 ⟶ 25:
}}
[[File:Hadamard-Code.svg|thumb|250 px|Matrix of the Augmented Hadamard code [32, 6, 16] for the [[Reed–Muller code]] (1, 5) of the NASA space probe [[Mariner 9]]]]
[[File:MultigradeVariadic operatorlogical XOR.svg|thumb|250px|[[Exclusive or|XOR]] operations<br/>Here the white fields stand for 0<br/>and the red fields for 1]]
 
The '''Hadamard code''' is an [[error-correcting code]] named after the French mathematician [[Jacques Hadamard]] that is used for [[error detection and correction]] when transmitting messages over very noisy or unreliable channels. In 1971, the code was used to transmit photos of Mars back to Earth from the NASA space probe [[Mariner 9]].<ref name="Malek_2006"/> Because of its unique mathematical properties, the Hadamard code is not only used by engineers, but also intensely studied in [[coding theory]], [[mathematics]], and [[theoretical computer science]].
The Hadamard code is also known under the names '''Walsh code''', '''Walsh family''',<ref name="Amadei-Manzoli-Merani_2002"/> and '''Walsh–Hadamard code'''<ref name="Arora-Barak_2009"/> in recognition of the American mathematician [[Joseph Leonard Walsh]].
 
Line 42 ⟶ 43:
Normally, Hadamard codes are based on [[Hadamard matrix#Sylvester's construction|Sylvester's construction of Hadamard matrices]], but the term “Hadamard code” is also used to refer to codes constructed from arbitrary [[Hadamard matrix|Hadamard matrices]], which are not necessarily of Sylvester type.
In general, such a code is not linear.
Such codes were first constructed by [[R.Raj C.Chandra Bose]] and [[Sharadchandra Shankar Shrikhande|S. S. Shrikhande]] in 1959.<ref name="Bose_1959Bose-Shrikhande_1959"/>
If ''n'' is the size of the Hadamard matrix, the code has parameters <math>(n,2n,n/2)_2</math>, meaning it is a not-necessarily-linear binary code with 2''n'' codewords of block length ''n'' and minimal distance ''n''/2. The construction and decoding scheme described below apply for general ''n'', but the property of linearity and the identification with Reed–Muller codes require that ''n'' be a power of 2 and that the Hadamard matrix be equivalent to the matrix constructed by Sylvester's method.
 
Line 48 ⟶ 49:
Since the relative distance of the Hadamard code is 1/2, normally one can only hope to recover from at most a 1/4 fraction of error. Using [[list decoding]], however, it is possible to compute a short list of possible candidate messages as long as fewer than <math>\frac{1}{2}-\epsilon</math> of the bits in the received word have been corrupted.
 
In [[code -division multiple access]] (CDMA) communication, the Hadamard code is referred to as Walsh Code, and is used to define individual [[communication channel]]s. It is usual in the CDMA literature to refer to codewords as “codes”. Each user will use a different codeword, or “code”, to modulate their signal. Because Walsh codewords are mathematically [[orthogonal]], a Walsh-encoded signal appears as [[random noise]] to a CDMA capable mobile [[terminal (telecommunication)|terminal]], unless that terminal uses the same codeword as the one used to encode the incoming [[signal (information theory)|signal]].<ref name="Langton_2002"/>
 
==History==
Line 61 ⟶ 62:
[[James Joseph Sylvester]] developed his construction of Hadamard matrices in 1867, which actually predates Hadamard's work on Hadamard matrices. Hence the name ''Hadamard code'' is disputed and sometimes the code is called ''Walsh code'', honoring the American mathematician [[Joseph Leonard Walsh]].
 
An augmented Hadamard code was used during the 1971 [[Mariner 9]] mission to correct for picture transmission errors. The databinary wordsvalues used during this mission were 6 bits long, which represented 64 [[grayscale]] values.
 
Because of limitations of the quality of the alignment of the transmitter at the time (due to Doppler Tracking Loop issues) the maximum useful data length was about 30 bits. Instead of using a [[repetition code]], a [32, 6, 16] Hadamard code was used.
 
Errors of up to 7 bits per 32-bit word could be corrected using this scheme. Compared to a 5-[[repetition code]], the error correcting properties of this Hadamard code are much better, yet its rate is comparable. The efficient decoding algorithm was an important factor in the decision to use this code.
 
The circuitry used was called the "Green Machine". It employed the [[fast Fourier transform]] which can increase the decoding speed by a factor of three. Since the 1990s use of this code by space programs has more or less ceased, and the [[NASA Deep Space Network]] does not support this error correction scheme for its dishes that are greater than 26&nbsp;m.
Line 87 ⟶ 88:
 
===Construction using a generator matrix===
The Hadamard code is a linear code, and all linear codes can be generated by a [[generator matrix]] <math>G</math>. This is a matrix such that <math>\text{Had}(x)= x\cdot G</math> holds for all <math>x\in\{0,1\}^k</math>, where the message <math>x</math> is viewed as a row vector and the vector-matrix product is understood in the [[vector space]] over the [[finite field]] <math>\mathbb F_2</math>. In particular, an equivalent way to write the inner product definition for the Hadamard code arises by using the generator matrix whose columns consist of ''all'' strings <math>y</math> of length <math>k</math>, that is,
 
:<math>G =
Line 155 ⟶ 156:
 
===Proof of lemma 1===
----
Let <math>C(x) = c = (c_0,\dots,c_{2^n-1})</math> be the codeword in <math>C</math> corresponding to message <math>x</math>.
 
Line 168:
 
===Proof of theorem 1===
----
To prove theorem 1 we will construct a decoding algorithm and prove its correctness.
 
Line 175 ⟶ 174:
 
For each <math>i \in \{1, \dots, n\}</math>:
# Pick <math>j \in \{0, \dots, 2^n-1\}</math> uniformly at random.
# Pick <math>k \in \{0, \dots, 2^n-1\}</math> such that <math>j+k = e_i</math>, where <math>e_i</math> is the <math>i</math>-th [[standard basis|standard basis vector]] and <math>j+k</math> is the bitwise ''xor'' of <math>j</math> and <math>k</math>.
# <math>x_i \gets y_j+y_k</math>.
 
'''Output:''' Message <math>x = (x_1, \dots, x_n)</math>
Line 186 ⟶ 185:
By lemma 1, <math>c_j+c_k = c_{j+k} = x\cdot g_{j+k} = x\cdot e_i = x_i</math>. Since <math>j</math> and <math>k</math> are picked uniformly, the probability that <math>y_j \not = c_j</math> is at most <math>\delta</math>. Similarly, the probability that <math>y_k \not = c_k</math> is at most <math>\delta</math>. By the [[union bound]], the probability that either <math>y_j</math> or <math>y_k</math> do not match the corresponding bits in <math>c</math> is at most <math>2\delta</math>. If both <math>y_j</math> and <math>y_k</math> correspond to <math>c</math>, then lemma 1 will apply, and therefore, the proper value of <math>x_i</math> will be computed. Therefore, the probability <math>x_i</math> is decoded properly is at least <math>1-2\delta</math>. Therefore, <math>\epsilon = \frac{1}{2} - 2\delta</math> and for <math>\epsilon</math> to be positive, <math>0 \leq \delta \leq \frac{1}{4}</math>.
 
Therefore, the Walsh–Hadamard code is <math>(2, \delta, \frac{1}{2}-2\delta)</math> locally decodable for <math>0\leq \delta \leq \frac{1}{4}</math>.
 
==Optimality==
Line 196 ⟶ 195:
==References==
{{Reflist|refs=
<ref name="Malek_2006">{{cite book |title=Coding Theory |chapter=HadarmarkHadamard Codes |author-first=Massoud |author-last=Malek |date=2006 |url=http://www.mcs.csueastbay.edu/~malek/TeX/Hadamard.pdf |url-status=dead |archive-url=https://web.archive.org/web/20200109044013/http://www.mcs.csueastbay.edu/~malek/TeX/Hadamard.pdf |archive-date=2020-01-09}}</ref>
<ref name="Amadei-Manzoli-Merani_2002">{{Cite book |title=Global Telecommunications Conference, 2002. GLOBECOM'02. IEEE |volume=1 |author-last1=Amadei |author-first1=M. |author-last2=Manzoli |author-first2=U.Umberto |author-last3=Merani |author-first3=M.Maria L.Luisa |chapter=On the assignment of Walsh and quasi-orthogonal codes in a multicarrier DS-CDMA system with multiple classes of users |publisher=[[IEEE]] |isbn=0-7803-7632-3 |doi=10.1109/GLOCOM.2002.1188196 |date=2002-11-17 |pages=841–845}}</ref>
<ref name="Arora-Barak_2009">{{Cite book |title=Computational Complexity: A Modern Approach |chapter=Section 19.2.2 |author-last1=Arora |author-first1=Sanjeev |author-link1=Sanjeev Arora |author-last2=Barak |author-first2=Boaz |publisher=[[Cambridge University Press]] |date=2009 |isbn=978-0-521-42426-4 |url=http://www.cs.princeton.edu/theory/complexity/}}</ref>
<ref name="Guruswami_2009">{{Cite book |title=List decoding of binary codes |author-last1=Guruswami |author-first1=Venkatesan |date=2009 |page=3 |url=https://www.cs.cmu.edu/~venkatg/pubs/papers/ld-binary-ms.pdf}}</ref>
<ref name="Bose_1959Bose-Shrikhande_1959">{{cite journal |title=A note on a result in the theory of code construction |author-last1=Bose |author-first1=R.Raj C.Chandra |author-link1=Raj Chandra Bose |author-last2=Shrikhande |author-first2=S.Sharadchandra S.Shankar |author-link2=Sharadchandra Shankar Shrikhande |journal=[[Information and Control]] |volume=2 |issue=2 |date=June 1959 |doi=10.1016/S0019-9958(59)90376-6 |citeseerx=10.1.1.154.2879 |pages=183–194}}</ref>
<ref name="Langton_2002">{{cite web |title=CDMA Tutorial: Intuitive Guide to Principles of Communications |author-first=Charan |author-last=Langton |author-link=:d:Q61476932|date=2002 |url=http://complextoreal.com/wp-content/uploads/2013/01/CDMA.pdf |publisher=Complex to Real |access-date=2017-11-10 |url-status=live |archive-url=https://web.archive.org/web/20110720084646/http://www.complextoreal.com/CDMA.pdf |archive-date=2011-07-20}}</ref>
<ref name="Jaffe-Bouyukliev_2007">{{cite web |title=Optimal binary linear codes of dimension at most seven |author-first=David B. |author-last=Jaffe |author-first2=Iliya |author-last2=Bouyukliev |url=http://www.math.unl.edu/~djaffe2/papers/sevens.html |access-date=2007-08-21 |url-status=dead |archive-url=https://web.archive.org/web/20070808235329/http://www.math.unl.edu/~djaffe2/papers/sevens.html |archive-date=2007-08-08}}</ref>
}}
Line 213 ⟶ 212:
[[Category:Coding theory]]
[[Category:Error detection and correction]]
 
[[de:Walsh-Code]]
[[ja:直交符号]]