Skip to content

Commit

Permalink
nrt, poset + subspace as root code
Browse files Browse the repository at this point in the history
  • Loading branch information
valbert4 committed Sep 11, 2024
1 parent 77b901f commit 5f7f376
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 49 deletions.
42 changes: 42 additions & 0 deletions codes/classical/properties/block/block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,48 @@ description: |
An alternative more stringent definition (not used here) is in terms of a map encoding logical information from \(\Sigma^k\) into \(\Sigma^n\), yielding an \((n,k,d)_{\Sigma}\) block code, where \(d\) is the code distance.
\subsection{Finite-field alphabet}
\begin{defterm}{Finite fields}
\label{topic:finite-fields}
The most common alphabets used in block codes Galois or finite fields \(GF(q)=\mathbb{F}_q\), which are sets of \(q\) elements closed under addition and multiplication.
They are finite analogues of the real or complex numbers, and a unique field exists for every power \(q=p^m\) of a prime \(p\).
The prime-field case reduces to \(\mathbb{Z}_p\), a group under addition that is promoted to a field by defining multiplication modulo \(p\); the case \(p=2\) yields the binary field \(\mathbb{Z}_2\).
Every finite field comes with a 0 element (additive identity), a 1 element (multiplicative identity), and additive (multiplicative) inverses for all (nonzero) elements.
An element whose powers exhaust all nonzero field elements is called \textit{primitive}.
Fields come with a trace operation, the \textit{field trace}, which maps elements \(\gamma \in GF(q)\) to elements of \(GF(p)\) as
\begin{align}
\text{tr}(\gamma)=\sum_{k=0}^{m-1}\gamma^{p^{k}}~.
\end{align}
The field trace can be thought of as an averaging over the field's Galois group, which is the cyclic group generated by \(\gamma\to\gamma^p\) \cite[pg. 113]{preset:MacSlo}.
Fields also come with a \textit{field norm},
\begin{align}
N(\gamma)=\prod_{k=0}^{m-1}\gamma^{p^{k}}=\gamma^{(p^{m}-1)/(p-1)}~.
\end{align}
In the case of the complex numbers, analogues of the field trace and field norm are the real part and norm squared of a complex number, respectively.
Any field \(GF(q)\) can be thought of as an \(m\)-dimensional vector space over \(GF(p)\) a.k.a. the \(m\)th \textit{extension} of \(GF(p)\) (similar to the complex numbers being an extension of the reals).
Conversely, \(GF(p)\) is an example of a \textit{subfield} of \(GF(q)\).
Certain field elements are chosen to be the \textit{basis} of \(GF(q)\) over \(GF(p)\), and all other elements are expressed as linear combinations of these basis elements.
More generally, elements of fields such as \(GF(p^{ml})\) can be written as \(m\)-dimensional vectors over \(GF(p^l)\) or \((m\times l)\)-dimensional matrices over \(GF(p)\).
This idea is used to convert between ordinary block codes and matrix-based codes such as disk array codes and rank-metric codes.
The field norm and field trace can likewise be defined for fields \(GF(q^m)\) that are extensions of \(GF(q)\) for non-prime \(q\).
\end{defterm}
An example of a field is the quaternary Galois field \(GF(4) = \{0,1,\omega, \omega^2=\bar{\omega}\}\) with \(p=m=2\).
In this case, \(\omega\) can be interpreted as a third root of unity, but more formally it is defined as a solution to the polynomial equation \(1+x+x^2=0\).
Field elements can be represented as two-dimensional vectors with binary elements, \(GF(4)=GF(2^2)\), using the basis \(1\cong(1,0)\) and \(\omega\cong(0,1)\):
\begin{align}
0&\leftrightarrow(0,0)\cong0\cdot1+0\cdot\omega\\1&\leftrightarrow(0,1)\cong0\cdot1+1\cdot\omega\\\omega&\leftrightarrow(1,1)\cong1\cdot1+1\cdot\omega\\\bar{\omega}&\leftrightarrow(1,0)\cong1\cdot1+0\cdot\omega~.
\end{align}
In this way, the field elements form the Klein four group \(\mathbb{Z}_2\times\mathbb{Z}_2\) under addition.
One can check that the trace operation, \(\text{tr}(\gamma) = \gamma + \gamma^2\), outputs either 0 or 1 for any element \(\gamma\in GF(4)\).
Two \(q\)-ary codes are \textit{equivalent} if the codewords of one code can be mapped into those of the other under a combination of a coordinate permutation and a permutation of the elements of each coordinate.
The full group of such composite permutations is \(S_q \wr S_n\) \cite[Def. 1.8.8]{preset:HKSbasics}\cite{preset:HKSclass}.
# The field trace in this case is similar to taking the real part of a complex number, \(\text{tr}(\gamma) = \gamma + \gamma^2\) for any element \(\gamma\).

# The group of isometries of \(q\)-ary Hamming space is a combination of the monomial group, the Galois group of \(GF(q)\), and the group formed by the action of the space on itself (under addition) \cite{preset:HKSclass}.

# A common family of codes are the \textit{block codes}, intended to encode a piece, or block, of a data stream.
# A block code encodes strings of length \(k\), where each character in the string an element of some fixed alphabet \(\Sigma\), into strings of length \(n\). In other words, a block code encoding is a map from \(\Sigma^k\) to \(\Sigma^n\), where \(N = |\Sigma|^n\), \(K=|\Sigma|^k\), and \(|\Sigma|\) is the number of elements in the alphabet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ notes:
- 'See Refs. \cite{arxiv:1906.07887,doi:10.1109/TIT.2021.3056317}\cite[Sec. 22.7]{preset:HKSmetrics} for more details.'


# Codewords are q-ary strings, so q-ary parent
relations:
parents:
- code_id: q-ary_digits_into_q-ary_digits
Expand Down
28 changes: 28 additions & 0 deletions codes/classical/q-ary_digits/alternative_metrics/poset/nrt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#######################################################
## This is a code entry in the error correction zoo. ##
## https://github.com/errorcorrectionzoo ##
#######################################################

code_id: nrt
physical: q-ary_digits
logical: q-ary_digits

name: 'Niederreiter-Rosenbloom-Tsfasman (NRT) code'
short_name: 'NRT code'
introduced: '\cite{doi:10.1007/BF01294651,doi:10.1016/0012-365X(91)90315-S,doi:10.1016/0012-365X(92)90566-X,manual:{M. Yu. Rosenbloom, M. A. Tsfasman, “Codes for the m-Metric”, Probl. Peredachi Inf., 33:1 (1997), 55–63; Problems Inform. Transmission, 33:1 (1997), 45–52}}'

description: |
A poset code based on the total ordering of \([n]\), i.e., \(1\leq 2\leq \cdots \leq n\).
relations:
parents:
- code_id: poset


# Begin Entry Meta Information
_meta:
# Change log - most recent first
changelog:
- user_id: VictorVAlbert
date: '2024-09-11'
43 changes: 43 additions & 0 deletions codes/classical/q-ary_digits/alternative_metrics/poset/poset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#######################################################
## This is a code entry in the error correction zoo. ##
## https://github.com/errorcorrectionzoo ##
#######################################################

code_id: poset
physical: q-ary_digits
logical: q-ary_digits

name: 'Poset code'
introduced: '\cite{doi:10.1016/0012-365X(94)00228-B}'

description: |
Encodes \(K\) states (codewords) in \(n\) \(q\)-ary coordinates over the field \(GF(q)\), with its distance evaluated in the poset metric.
protection: |
Poset codes are quantified with respect to the poset metric \cite{preset:HKSmetrics}.
This metric is based on a partial ordering \(\leq\) on subsets of \([n]=\{1,2,\cdots,n\}\) and the notion of ideals generated by the support of an element of a \(q\)-ary string.
An ideal \(\langle \text{supp}(x) \rangle\) generated by \(x\in GF(q)^n\) contains all subsets of \([n]\) that are less than or equal to the subset in the support of \(x\) in the partial ordering.
The \textit{poset metric} between two strings \(x,y\) is then the cardinality of the ideal generated by the difference between the supports of \(x\) and \(y\), \(d_P(x,y) = |\langle \text{supp}(x-y) \rangle|\).
Generalizations of various bounds for ordinary \(q\)-ary codes have been developed for poset codes, including generalizations of \hyperref[topic:weight-enumerator]{MacWilliams identities} \cite{arXiv:1205.1090}; see \cite{preset:HKSmetrics}.
notes:
- 'See book \cite{doi:10.1007/978-3-319-93821-9} for more details.'


# Codewords are q-ary strings, so q-ary parent
relations:
parents:
- code_id: q-ary_digits_into_q-ary_digits
cousins:
- code_id: subspace
detail: 'Poset-code and subspace-code distance metric families intersect only at the Hamming metric \cite{preset:HKSmetrics}.'


# Begin Entry Meta Information
_meta:
# Change log - most recent first
changelog:
- user_id: VictorVAlbert
date: '2024-09-11'
10 changes: 6 additions & 4 deletions codes/classical/q-ary_digits/alternative_metrics/subspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ physical: q-ary_digits
logical: q-ary_digits

name: 'Subspace code'
introduced: \cite{doi:10.1109/TIT.2008.926449}
introduced: '\cite{doi:10.1109/TIT.2008.926449}'

description: |
A code that is a set of subspaces of a projective space \(PG(n-1,q)\).
A code that is a set of subspaces of \(GF(q)^n\).
protection: |
Subspace codes are quantified with respect to the subspace distance \cite{doi:10.1109/TIT.2008.926449} or injection distance \cite{arxiv:0805.3824}.'
Subspace codes are quantified with respect to the subspace distance \cite{doi:10.1109/TIT.2008.926449} or injection distance \cite{arxiv:0805.3824}.
Generalizations of various bounds for ordinary \(q\)-ary codes have been developed for subspace codes; see \cite{preset:HKSnetwork}.
Expand All @@ -25,9 +25,11 @@ features:
realizations:
- 'Packet-based transmission over networks \cite{preset:HKSnetwork}.'


# 20240911: Codewords are subspaces, not elements of field, so q-ary is not parent
relations:
parents:
- code_id: q-ary_digits_into_q-ary_digits
- code_id: ecc_finite
cousins:
- code_id: projective
detail: 'Subspace codes are sets of subspaces of a projective space \(PG(n-1,q)\).'
Expand Down
49 changes: 4 additions & 45 deletions codes/classical/q-ary_digits/q-ary_digits_into_q-ary_digits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,53 +10,12 @@ logical: q-ary_digits
name: '\(q\)-ary code'

description: |
Encodes \(K\) states (codewords) in \(n\) \(q\)-ary coordinates over the field \(GF(q)\) and has distance \(d\). Usually denoted as \((n,K,d)_q\). The (Hamming) distance is the minimum number of coordinates where two strings in the code differ.
\subsection{Finite-field alphabet}
\begin{defterm}{Finite fields}
\label{topic:finite-fields}
Galois or finite fields \(GF(q)=\mathbb{F}_q\) are sets of \(q\) elements closed under addition and multiplication.
They are finite analogues of the real or complex numbers, and a unique field exists for every power \(q=p^m\) of a prime \(p\).
The prime-field case reduces to \(\mathbb{Z}_p\), a group under addition that is promoted to a field by defining multiplication modulo \(p\).
Every finite field comes with a 0 element (additive identity), a 1 element (multiplicative identity), and additive (multiplicative) inverses for all (nonzero) elements.
An element whose powers exhaust all nonzero field elements is called \textit{primitive}.
Fields come with a trace operation, the \textit{field trace}, which maps elements \(\gamma \in GF(q)\) to elements of \(GF(p)\) as
\begin{align}
\text{tr}(\gamma)=\sum_{k=0}^{m-1}\gamma^{p^{k}}~.
\end{align}
The field trace can be thought of as an averaging over the field's Galois group, which is the cyclic group generated by \(\gamma\to\gamma^p\) \cite[pg. 113]{preset:MacSlo}.
Fields also come with a \textit{field norm},
\begin{align}
N(\gamma)=\prod_{k=0}^{m-1}\gamma^{p^{k}}=\gamma^{(p^{m}-1)/(p-1)}~.
\end{align}
In the case of the complex numbers, analogues of the field trace and field norm are the real part and norm squared of a complex number, respectively.
Any field \(GF(q)\) can be thought of as an \(m\)-dimensional vector space over \(GF(p)\) a.k.a. the \(m\)th \textit{extension} of \(GF(p)\) (similar to the complex numbers being an extension of the reals).
Conversely, \(GF(p)\) is an example of a \textit{subfield} of \(GF(q)\).
Certain field elements are chosen to be the \textit{basis} of \(GF(q)\) over \(GF(p)\), and all other elements are expressed as linear combinations of these basis elements.
More generally, elements of fields such as \(GF(p^{ml})\) can be written as \(m\)-dimensional vectors over \(GF(p^l)\) or \((m\times l)\)-dimensional matrices over \(GF(p)\).
This idea is used to convert between ordinary block codes and matrix-based codes such as disk array codes and rank-metric codes.
The field norm and field trace can likewise be defined for fields \(GF(q^m)\) that are extensions of \(GF(q)\) for non-prime \(q\).
\end{defterm}
An example of a field is the quaternary Galois field \(GF(4) = \{0,1,\omega, \omega^2=\bar{\omega}\}\) with \(p=m=2\).
In this case, \(\omega\) can be interpreted as a third root of unity, but more formally it is defined as a solution to the polynomial equation \(1+x+x^2=0\).
Field elements can be represented as two-dimensional vectors with binary elements, \(GF(4)=GF(2^2)\), using the basis \(1\cong(1,0)\) and \(\omega\cong(0,1)\):
\begin{align}
0&\leftrightarrow(0,0)\cong0\cdot1+0\cdot\omega\\1&\leftrightarrow(0,1)\cong0\cdot1+1\cdot\omega\\\omega&\leftrightarrow(1,1)\cong1\cdot1+1\cdot\omega\\\bar{\omega}&\leftrightarrow(1,0)\cong1\cdot1+0\cdot\omega~.
\end{align}
In this way, the field elements form the Klein four group \(\mathbb{Z}_2\times\mathbb{Z}_2\) under addition.
One can check that the trace operation, \(\text{tr}(\gamma) = \gamma + \gamma^2\), outputs either 0 or 1 for any element \(\gamma\in GF(4)\).
Two \(q\)-ary codes are \textit{equivalent} if the codewords of one code can be mapped into those of the other under a combination of a coordinate permutation and a permutation of the elements of each coordinate.
The full group of such composite permutations is \(S_q \wr S_n\) \cite[Def. 1.8.8]{preset:HKSbasics}\cite{preset:HKSclass}.
# The field trace in this case is similar to taking the real part of a complex number, \(\text{tr}(\gamma) = \gamma + \gamma^2\) for any element \(\gamma\).

# The group of isometries of \(q\)-ary Hamming space is a combination of the monomial group, the Galois group of \(GF(q)\), and the group formed by the action of the space on itself (under addition) \cite{preset:HKSclass}.
Encodes \(K\) states (codewords) in \(n\) \(q\)-ary coordinates over the field \(GF(q)\), i.e., \(q\)-ary strings.
Their error-correcting performance is quantified by some distance \(d\), which in turn is defined using a metric.
The default distance is the Hamming distance \(d\), the weight (i.e., number of nonzero coordinates) of the lowest-weight nonzero codeword; such codes are usually denoted as \((n,K,d)_q\).
The corresponding Hamming metric between two \(q\)-ary strings is the number of coordinates in which they differ.
protection: |
The standard metric for \(q\)-ary codes is the Hamming metric, but other metrics also exist \cite{arxiv:2212.00431,preset:HKSmetrics}.
A code detects errors on up to \(d-1\) coordinates, corrects erasure errors on up to \(d-1\) coordinates, and corrects general errors on up to \(\left\lfloor (d-1)/2 \right\rfloor\) coordinates.
Often, the relative distance \(\delta=d/n\) is used to compare codes of different lengths.
Expand Down
1 change: 1 addition & 0 deletions codetree/kingdoms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ kingdoms_by_domain_id:
name: 'Galois-field Kingdom'
root_codes:
- code_id: q-ary_digits_into_q-ary_digits
- code_id: subspace

- kingdom_id: matrices_into_matrices
name: 'Matrix Kingdom'
Expand Down

0 comments on commit 5f7f376

Please sign in to comment.