Content deleted Content added
m →References: HTTP → HTTPS for Carnegie Mellon CS, replaced: http://www.cs.cmu.edu/ → https://www.cs.cmu.edu/ |
Changed "punctured Hadamard code" to "augmented Hadamard code" to match standard coding theory usage of the words augmented and punctured. |
||
Line 11:
}}
{{infobox code
| name =
| namesake = [[Jacques Hadamard]]
| type = [[Linear code|Linear]] [[block code]]
Line 21:
| notation = <math>[2^k,k+1,2^{k-1}]_2</math>-code
}}
[[File:Hadamard-Code.svg|thumb|250 px|Matrix of the
[[File:Multigrade operator XOR.svg|thumb|250px|[[Exclusive or|XOR]] operations<br>Here the white fields stand for 0<br>and the red fields for 1]]
Line 28:
It is also known under the names '''Walsh code''', '''Walsh family''',<ref>See, e.g., {{Harvtxt|Amadei|Manzoli|Merani|2002}}</ref> and '''Walsh–Hadamard code'''<ref>See, e.g., {{Harvtxt|Arora|Barak|2009|loc=Section 19.2.2}}.</ref> in recognition of the American mathematician [[Joseph Leonard Walsh]].
The Hadamard code is an example of a [[linear code]]
In this article, the first case is called the '''Hadamard code''' while the second is called the '''augmented Hadamard code'''.
The Hadamard code is unique in that each non-zero codeword has a [[Hamming weight]] of exactly <math>2^{k-1}</math>, which implies that the [[Block code#The distance d|distance]] of the code is also <math>2^{k-1}</math>.
In standard [[Block code#Popular notation|coding theory notation]] for [[block code]]s, the Hadamard code is a <math>[2^k,k,2^{k-1}]_2</math>-code, that is, it is a [[linear code]] over a [[binary set|binary alphabet]], has [[Block code#The block length n|block length]] <math>2^k</math>, [[Block code#The message length k|message length]] (or dimension) <math>k</math>, and [[Block code#The distance d|minimum distance]] <math>2^k/2</math>.
The block length is very large compared to the message length, but on the other hand, errors can be corrected even in extremely noisy conditions.
In
The '''
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.
Line 67 ⟶ 70:
[[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]].
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.
Line 87 ⟶ 90:
:<math>\text{Had}(x) = \Big(\langle x , y \rangle\Big)_{y\in\{0,1\}^k}</math>
As mentioned above, the ''
This is because, if the first bit of <math>y</math> is zero, <math>y_1=0</math>, then the inner product contains no information whatsoever about <math>x_1</math>, and hence, it is impossible to fully decode <math>x</math> from those positions of the codeword alone.
On the other hand, when the codeword is restricted to the positions where <math>y_1=1</math>, it is still possible to fully decode <math>x</math>.
Hence it makes sense to restrict the Hadamard code to these positions, which gives rise to the ''
===Construction using a generator matrix===
Line 116 ⟶ 119:
The matrix <math>G</math> is a <math>(k\times 2^k)</math>-matrix and gives rise to the [[linear operator]] <math>\text{Had}:\{0,1\}^k\to\{0,1\}^{2^k}</math>.
The generator matrix of the ''
For example, the generator matrix for the
:<math>
Line 129 ⟶ 132:
Then <math>\text{pHad}:\{0,1\}^k\to\{0,1\}^{2^{k-1}}</math> is a linear mapping with <math>\text{pHad}(x)= x \cdot G'</math>.
For general <math>k</math>, the generator matrix of the
Hence an alternative way to define the Hadamard code is in terms of its parity-check matrix: the parity-check matrix of the Hadamard code is equal to the generator matrix of the Hamming code.
Line 135 ⟶ 138:
Generalized Hadamard codes are obtained from an ''n''-by-''n'' [[Hadamard matrix]] ''H''. In particular, the 2''n'' codewords of the code are the rows of ''H'' and the rows of −''H''. To obtain a code over the alphabet {0,1}, the mapping −1 ↦ 1, 1 ↦ 0, or, equivalently, ''x'' ↦ (1 − ''x'')/2, is applied to the matrix elements. That the minimum distance of the code is ''n''/2 follows from the defining property of Hadamard matrices, namely that their rows are mutually orthogonal. This implies that two distinct rows of a Hadamard matrix differ in exactly ''n''/2 positions, and, since negation of a row does not affect orthogonality, that any row of ''H'' differs from any row of −''H'' in ''n''/2 positions as well, except when the rows correspond, in which case they differ in ''n'' positions.
To get the
==Distance==
Line 147 ⟶ 150:
Then, when conditioned on the values of <math>y_2,\dots,y_k</math>, the event is equivalent to <math>y_1 \cdot x_1 = b</math> for some <math>b\in\{0,1\}</math> depending on <math>x_2,\dots,x_k</math> and <math>y_2,\dots,y_k</math>. The probability that <math>y_1=b</math> happens is exactly <math>1/2</math>. Thus, in fact, ''all'' non-zero codewords of the Hadamard code have relative Hamming weight <math>1/2</math>, and thus, its relative distance is <math>1/2</math>.
The relative distance of the ''
==Local decodability ==
|