Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
On the minimum distance of q-ary nonlinear codes
On the minimum distance of q-arynonlinear codes
Jaume Pujol, Merce Villanueva, Fanxuan Zeng
Combinatorics, Coding and Security Group (CCSG)Department of Information and Communications Engineering (dEIC)
Autonomous University of Barcelona (UAB)
June 10-13, CanaDAM 2013, St.John’s
On the minimum distance of q-ary nonlinear codes
Outline
Introduction
Minimum weight and minimum distance
Improvements on minimum weight and minimum distance
Minimum weight and minimum distance of q-ary codes
Conclusions and future research
On the minimum distance of q-ary nonlinear codes
Introduction
Introduction
Hamming Weight: or simply weight, of a vector v = (v1, ..., vn)is the number of its entries which are nonzero.Hamming Distance: or simply distance, between two vectorsv = (v1, ..., vn) and w = (w1, ..., wn) is the number of entrieswhere they differ.
An (n,M, d)q code C is a subset of Fnq , where Fq is a finite field of
q elements.We start from Binary Codes, which are subsets of Fn
2 .
On the minimum distance of q-ary nonlinear codes
Introduction
Introduction
Given a code C, the problem of storing C in memory and findingout the minimum (Hamming) weight w(C) and minimum(Hamming) distance d(C) are well-known problems.
• If C is linear, then it can be compactly represented using agenerator matrix. Moreover, d(C) = w(C).
• If C is nonlinear, then a solution would be to know whether ithas another structure or not.
For example, there are binary codes which have a Z4-linear orZ2Z4-linear structure and, therefore, they can also be compactlyrepresented using a quaternary generator matrix.
On the minimum distance of q-ary nonlinear codes
Introduction
Introduction
Given a code C, the problem of storing C in memory and findingout the minimum (Hamming) weight w(C) and minimum(Hamming) distance d(C) are well-known problems.
• If C is linear, then it can be compactly represented using agenerator matrix. Moreover, d(C) = w(C).
• If C is nonlinear, then a solution would be to know whether ithas another structure or not.
For example, there are binary codes which have a Z4-linear orZ2Z4-linear structure and, therefore, they can also be compactlyrepresented using a quaternary generator matrix.
On the minimum distance of q-ary nonlinear codes
Introduction
Introduction
In general, binary codes without any of these structures can berepresented as the union of cosets of a binary linear subcode of C.
C =
t⋃
i=0
(
K + ci
)
,
where c0 = 0, t+ 1 = M/2k, M = |C| and
K = {x ∈ Zn2 | x+ C = C}.
The kernel K is the largest linear subcode for which it is true.The coset leaders are given by the set of t vectors: {c1, . . . , ct}.
On the minimum distance of q-ary nonlinear codes
Introduction
Introduction
Since K is linear, the binary code C can be represented by thegenerator matrix of K and the set of coset leaders instead of a setof all its codewords.
Then, the code C take up a memory space of order O(n(k + t)).
Example 1
Memory space of binary codes of length n, M = 219 codewordsand different dimension of kernel:
dimension of kernel k 0 1 ... 17 19
number coset leaders t 219 218 − 1 ... 3 0
memory space 219n 218n ... 20n 19n
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Minimum weight and distance
• For linear codes, the best algorithm to obtain the minimumweight/distance based on the enumeration of some codewords isthe Brouwer-Zimmermann algorithm.
• For nonlinear codes, there is no other algorithms but theenumeration of all codeswords, that is, the brute force algorithm.
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
A short introduction to Brouwer-Zimmermann’s Algorithm
��
���
��
��
��
��
��
����
���
� ��
� ���
���������� ��������������������
������������������������������ �����
���������� �
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Minimum weight and distance
Extend Coset: Given a binary code C and a vector v, denoteKv = K ∪ (K + v) as an extend coset of C. Since K is linear,then Kv is also linear, and can be constructed as 〈Basis(K), v〉.
Let C =⋃t
i=0
(
K + ci)
with t ≥ 2.
Proposition / Algorithm 1 (MinW)
The minimum weight of C is min({w(Kci) | 1 ≤ i ≤ t}).
Proposition / Algorithm 2 (MinD)
The minimum distance of C ismin({w(Kci) | 1 ≤ i ≤ t} ∪ {w(Kci+cj) | 1 ≤ i < j ≤ t}).
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Explanation of Algorithm 2(MinD)
������
���
�
�
�������� ����
���������
�������� ����
���������
�������� ����
���������
�������� ����
���������
���
������������
�� ��
������������
�� ��
������
���
� �� �� � ���� ���� ������� ��
������������
�� ��
� ��� �
��
� �
� �
������
���� ���
� ��� �
� �
� �
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Example 2
Let K be the binary linear code of length n = 31, dimensionk = 5, and d(K) = 16, constructed as the dual of the binaryHamming code of length n = 31. Let C =
⋃
3
i=0
(
K + ci)
, wherec0 = 0, and the coset leaders are:
c1 = (0010001110011010011110001011110)
c2 = (0101101010111100101110100111101)
c3 = (0000011100011101101000111101011)
It is easy to check that the minimum weight of C is w(C) = 10and its minimum distance d(C) = 8.
minimum weight minimum distance
Brute Force 0.00018s 0.00840s
Algorithm 1 / 2 0.00060s 0.00126s
Note that sometimes a brute force calculation can be a faster way
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Example 2
Let K be the binary linear code of length n = 31, dimensionk = 5, and d(K) = 16, constructed as the dual of the binaryHamming code of length n = 31. Let C =
⋃
3
i=0
(
K + ci)
, wherec0 = 0, and the coset leaders are:
c1 = (0010001110011010011110001011110)
c2 = (0101101010111100101110100111101)
c3 = (0000011100011101101000111101011)
It is easy to check that the minimum weight of C is w(C) = 10and its minimum distance d(C) = 8.
minimum weight minimum distance
Brute Force 0.00018s 0.00840s
Algorithm 1 / 2 0.00060s 0.00126s
Note that sometimes a brute force calculation can be a faster way
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Time of computing w(C) using Algorithm 1(MinW) comparedwith brute force, for binary nonlinear codes of length n = 100, sizeM = 215 · 31, and kernel of dimension k ∈ {7, . . . , 15}.
7 8 9 10 11 12 13 14 150
1
2
3
4
5
6
7
Dimension of kernel
Tim
e: s
Algorithm MinWBrute force
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Time of computing d(C) using Algorithm 2(MinD) compared withbrute force, for binary nonlinear codes of length n = 100, sizeM = 27 · 31, and kernel of dimension k ∈ {3, . . . , 7}.
3 4 5 6 70
20
40
60
80
100
120
140
Dimension of kernel
Tim
e: s
Algorithm MinDBrute force
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Work factor
All these algorithms are based on the enumeration of codewords,adding together codewords and deciding the minimum weight ofcodewords.
The performance measurement of these computations is referred aswork. An estimate of the total work an algorithm requires isreferred as work factor.
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Work factor of binary linear codes
For a binary linear code K of length n and dimension k, theminimum weight and minimum distance are the same, the workfactor of computing them using Zimmermann algorithm is:
WFZim = (n− k)⌈n/k⌉
r∑
r=1
(
k
r
)
where r is the smallest natural number such that
⌊n/k⌋(r + 1) +max(0, r + 1− (k − n mod k)) ≥ w(C).
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Work factor of minimum weight
For a binary nonlinear code of length n, dimension of kernel k andnumber of coset leaders t, we can estimate the work factor:
Brute Force Algorithm: Enumerating every codeword of the codeand examining their weights, the work factor is:
n ·M = n · (t+ 1) · 2k
Algorithm MinW: The work factor is:
t∑
i=1
(
(n− (k + 1))⌈n/(k + 1)⌉
ri∑
r=1
(
k + 1
r
)
)
where ri is the smallest natural number such that
⌊n/(k + 1)⌋(ri+1)+max(0, ri+1−(k+1−n mod k+1)) ≥ w(Kci).
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Work factor of minimum distance
Brute Force Algorithm: Enumerating every pair of codewords ofthe code, and exam the distance between them, the work factor is:
n ·
(
M
2
)
= n ·
(
2k(t+ 1)
2
)
Algorithm MinD: The work factor is:
t−1∑
i=0
(
t∑
j=i+1
(
(n− (k + 1))⌈n/(k + 1)⌉
ri,j∑
r=1
(
k + 1
r
)
))
where ri,j is the smallest natural number such that
⌊n/(k + 1)⌋(ri,j+1)+max(0, ri,j+1−(k+1−n mod k+1)) ≥ w(Kci+cj).
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Work factor upper bounds
The minimum weight of an extend coset Kv = K ∪ (K + v) relieson the minimum weight of itself, so it is hard to estimate the workfactor.
However, note that w(Kv) ≤ w(K), where w(K) is the minimumweight of the kernel. Therefore, we can obtain an upper bound byreplacing w(Kv) with w(K).
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Work factor upper bounds
Minimum Weight Upper Bound:
t ·(
(n− (k + 1))⌈n/(k + 1)⌉r
∑
r=1
(
k + 1
r
)
)
Minimum Distance Upper Bound:
(
t+ 1
2
)
·(
(n− (k + 1)) · ⌈n/(k + 1)⌉
r∑
r=1
(
k + 1
r
)
)
where r is the smallest natural number such that
⌊n/(k + 1)⌋(r+1)+max(0, r+1−(k+1−n mod k+1)) ≥ w(K).
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Work factor and work factor upper bound of minimum weight forbinary codes of length n = 100, size M = 217 · 31, and dimensionof kernel k ∈ {7, . . . , 17}.
7 8 9 10 11 12 13 14 15 16 170
0.5
1
1.5
2
2.5x 10
9
Dimension of kernel
Wor
k F
acto
r
Upper bound of Algorighm MinWAlgorithm MinW
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance
Work factor and work factor upper bound of minimum distance forbinary codes of length n = 100, size M = 27 · 31, and dimension ofkernel k ∈ {3, . . . , 7}.
3 4 5 6 70
2
4
6
8
10
12x 10
8
Dimension of kernel
Wor
k F
acot
r
Upper bound of Algorithm MinDAlgorithm MinD
On the minimum distance of q-ary nonlinear codes
Improvements on minimum weight and minimum distance
Improvement on Algorithm MinW and MinD
According to Algorithm MinW and MinD, we can obtain theminimum weight and distance of a binary code with t coset leadersby getting the minimum weight of several extend cosets.
Therefore, the codewords in the kernel are checked several times:• t times for minimum weight in Algorithm MinW.•(
t+1
2
)
times for minimum distance in Algorithm MinD.
On the minimum distance of q-ary nonlinear codes
Improvements on minimum weight and minimum distance
An improved algorithm is brought to avoid the repetition.
Algorithm 3 (IMinD)
1. Add the all-zero codeword into the set of coset leaders.2. Add a coset leader to the basis of the kernel to form a binarylinear code of rank k + 1(for the added all-zero coset leader, therank is still k).3. Use Gaussian elimination to make the coordinates ofinformation set on the coset leader be 0. Then delete thesecoordinates in all rows.4. During every stage of enumerating r rows in Zimmermann’salgorithm, select r rows from the basis of the kernel and alwaysselect the coset leader row.
On the minimum distance of q-ary nonlinear codes
Improvements on minimum weight and minimum distance
Explanation of Algorithm 3(IMinD)
��
���
��
��
��
��
��
���
���
�
���
�
�
��
� ��
��
� �� �
�
� ��
� ��
��
� ��
� ��
��
����
On the minimum distance of q-ary nonlinear codes
Improvements on minimum weight and minimum distance
Work factor and upper bounds of Algorithm IMinD
Minimum Distance:
t∑
i=0
(
t∑
j=i+1
(
(n− k)⌈n/k⌉
ri,j∑
r=1
(
k
r
)
))
where ri,j is the smallest natural number such that
⌊n/k⌋(ri,j + 1) +max(0, ri,j + 1− (k − n mod k)) ≥ w(Kci+cj).
Upper Bounds:
(
(
t+ 1
2
)
+ 1) · (n− k) · ⌈n/k⌉r
∑
r=1
(
k
r
)
.
where r is the smallest natural number such that
⌊n/k⌋(r + 1) +max(0, r + 1− (k − n mod k)) ≥ w(K).
On the minimum distance of q-ary nonlinear codes
Improvements on minimum weight and minimum distance
Work factor of minimum distance using Algorithm 2(MinW) and 3on codes of length n = 100, kernel k ∈ {7, . . . , 15}, sizeM = 217 · 31.
3 4 5 6 70
2
4
6
8
10
12
14x 10
8
Dimension of kernel
wor
k fa
ctor
Upper bound of Algorithm MinDAlgorithm MinDUpper bound of Algorithm IMinDAlgorithm IMinDBrute force
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance of q-ary codes
Minimum weight/distance of q-ary codes
Problem: If K is a linear code,Binary Codes: K ∪ (K + c) is a linear code which can beobtained by adding c in the generator matrix.q-ary Codes: K ∪ (K + c) is not necessarily a linear code, and itcan not be obtained by adding c in the generator matrix.
Lemma 3
For a [n, k, d]q code K and a vector v ∈ Fnq , the code
Kv = 〈Basis(K), v〉 is a linear code, and the minimum weightw(Kv) = w(K(v)), where K(v) = K ∪ (K + v).
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance of q-ary codes
Minimum weight/distance of q-ary codes
Let C =⋃t
i=0
(
K + ci)
be an (n,M, d)q code given by kernel Kand a list of coset leaders {c1, c2, ..., ct}.
Proposition / Algorithm 4 (MinWq)
The minimum weight of C is min({w(Kci) | 1 ≤ i ≤ t}).
Proposition / Algorithm 5 (MinDq)
The minimum distance of C ismin({w(Kci) | 1 ≤ i ≤ t} ∪ {w(Kci+cj) | 1 ≤ i < j ≤ t}).
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance of q-ary codes
Improved minimum weight/distance of q-ary codes
Let C =⋃t
i=0
(
K + ci)
be an (n,M, d)q code given by kernel Kand a list of coset leaders {c1, c2, ..., ct}.
Proposition / Algorithm 6 (IMinWq)
The minimum weight of C is min({w(K + ci) | 1 ≤ i ≤ t}).
Proposition / Algorithm 7 (IMinDq)
The minimum distance of C ismin({w(K + ci) | 1 ≤ i ≤ t} ∪ {w(K + ci + cj) | 1 ≤ i < j ≤ t}).
Note that for the q-ary codes, since the coset K + ci contains only1/q codewords as Kv, this improvement save much time.
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance of q-ary codes
Minimum distance work factor of Algorithm IMinDq
Work Factor:
t∑
i=0
(
t∑
j=i+1
(
(n− k)⌈n/k⌉
ri,j∑
r=1
(
k
r
)
(q − 1)r−1))
where ri,j is the smallest natural number such that
⌊n/k⌋(ri,j + 1) +max(0, ri,j + 1− (k − n mod k)) ≥ w(Kci+cj).
Upper Bound:
(
(
t+ 1
2
)
+ 1) · (n− k) · ⌈n/k⌉r
∑
r=1
(
k
r
)
(q − 1)r−1.
where r is the smallest natural number such that
⌊n/k⌋(r + 1) +max(0, r + 1− (k − n mod k)) ≥ w(K).
On the minimum distance of q-ary nonlinear codes
Minimum weight and minimum distance of q-ary codes
Upper bounds of work factor of minimum distance using AlgorithmIMinDq and brute force on codes over F3 of length n = 100,dimension of kernel k ∈ {3, . . . , 9}, size M = 39 · 31, andw(K) = 35.
2 3 4 5 6 70
0.5
1
1.5
2
2.5
3x 10
11
Dimension of kernel
Wor
k fa
ctor
Upper bound of Algorithm IMinDqBrute force
On the minimum distance of q-ary nonlinear codes
Conclusions and future research
Conclusions
• We applied the structure of the kernel and a set of coset leadersto represent a code C to store it more compactly.
• Based on this structure, we developed several algorithms todecide the minimum weight and minimum distance of a code C.
• We evaluated the performance of the algorithms in theory andpartly in practical test.
On the minimum distance of q-ary nonlinear codes
Conclusions and future research
Future research
• Apply the algorithms, especially for the general q-ary codes.
• Try to find a point based on the parameters from where we candecide to use the improved algorithms.
• Use the minimum weight to decode nonlinear binary codes.
• Use these algorithms to look for better nonlinear codes with bigminimum distance.
On the minimum distance of q-ary nonlinear codes
Bibliography
H. Bauer, B. Ganter and F. Hergert, ”Algebraic techniques for nonlinearcodes,” Combinatorica, vol. 3, pp. 21-33, 1983.
J. J. Cannon and W. Bosma (Eds.), Handbook of Magma Functions,Edition 2.13, 4350 pages, 2006.
M. Grassl, Searching for linear codes with large minimum distance, in: W.Bosma and J. Cannon (Eds.) Discovering Mathematics with Magma,Springer, 2006.
O. Heden, “On perfect p-ary codes of length p+ 1,” Designs, Codes and
Cryptography, vol. 46, no. 1, pp. 45-56, 2008.
G. White, “Enumeration-based Algorithms in Coding Theory,” PhDThesis, University of Sydney, 2006.
K.-H. Zimmermann, “Integral Hecke Modules, Integral GeneralizedReed-Muller Codes, and Linear Codes,” Tech. Rep. 3-96, TechnischeUniversitat Hamburg-Harburg, 1996.
A. Betten, H. Fripertinger, A. Kerber, A. Wassermann, and K.-H.
Zimmermann, Codierungstheorie: Konstruktionen und Auwendungen
linearer Codes, Berlin: Springer, 1998.
On the minimum distance of q-ary nonlinear codes
Bibliography
Thank you !