Isodual and Self-dual Codes from Graphs
Sudipta Mallik, Bahattin Yildiz

TL;DR
This paper explores the construction of binary linear codes from graphs, providing conditions for self-duality and analyzing their minimum distance through graph theory.
Contribution
It introduces graph-theoretic conditions for self-dual codes and offers a combinatorial interpretation of their minimum distance.
Findings
Graph-based construction of binary codes
Conditions for Type I and II self-duality
Examples from well-known graph classes
Abstract
Binary linear codes are constructed from graphs, in particular, by the generator matrix where is the adjacency matrix of a graph on vertices. A combinatorial interpretation of the minimum distance of such codes is given. We also present graph theoretic conditions for such linear codes to be Type I and Type II self-dual. Several examples of binary linear codes produced by well-known graph classes are given.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsCoding theory and cryptography · Error Correcting Code Techniques · graph theory and CDMA systems
Isodual and Self-dual Codes from Graphs
Sudipta Mallik Corresponding author Department of Mathematics and Statistics, Northern Arizona University, 801 S. Osborne Dr.
PO Box: 5717, Flagstaff, AZ 86011, USA [email protected], [email protected]
Bahattin Yildiz
Department of Mathematics and Statistics, Northern Arizona University, 801 S. Osborne Dr.
PO Box: 5717, Flagstaff, AZ 86011, USA [email protected], [email protected]
Abstract
Binary linear codes are constructed from graphs, in particular, by the generator matrix where is the adjacency matrix of a graph on vertices. A combinatorial interpretation of the minimum distance of such codes is given. We also present graph theoretic conditions for such linear codes to be Type I and Type II self-dual. Several examples of binary linear codes produced by well-known graph classes are given.
††footnotetext: *2010 Mathematics Subject Classification: 94B05, 94B25
Keywords: Self-dual codes, Isodual codes, Graphs, Adjacency matrix, Strongly regular graphs*
1 Introduction
There is a strong connection between graphs and codes. The adjacency matrix of a simple graph is a symmetric binary matrix which has made it suitable for constructing binary codes. Depending on the structure of the graphs, special types of codes can be obtained.
We start with some basic definitions about codes that will be used throughout the paper. Let be the binary field. A binary linear code of length is defined as a subspace of . If the dimension of is , we say is an -code. A matrix whose rows form a basis for is called a generator matrix for and is denoted by . We also denote by . By using elementary row and column operations, we can bring the generator matrix into a standard form where is a matrix. Two binary codes are said to be equivalent if one can be obtained from the other by a permutation of coordinates.
The Hamming weight of a vector is defined as the number of non-zero coordinates in . The Hamming distance between two vectors and in , denoted by , is defined as
[TABLE]
The minimum distance of a code , denoted by , is defined to be the minimum distance between distinct codewords in . We write the standard parameters to describe a code where denotes the length of , its dimension, and its minimum distance.
Definition 1.1**.**
Let be a binary linear code of length . The dual of , denoted by , is given by
[TABLE]
Note that, if is a linear -code, then is a linear -code.
Definition 1.2**.**
A binary linear code is self-orthogonal if and self-dual if
Definition 1.3**.**
Let be a self-dual binary code. If the Hamming weights of all the codewords in are divisible by , then is called Type II (or doubly-even), otherwise it is called Type I (or singly even).
The following theorem gives an upper bound for the minimum distance of self-dual codes:
Theorem 1.4**.**
[13]* Let and be the minimum distance of a Type I and Type II binary code of length . Then*
[TABLE]
and
[TABLE]
Self-dual codes that attain the bounds given in the previous theorem are called extremal.
Definition 1.5**.**
A binary code is said to be isodual if it is permutation equivalent to its dual.
Theorem 1.6**.**
If C is generated by , then the generator matrix of is given by .
is also called the parity-check matrix of , namely is given by
[TABLE]
There is a natural connection between the parity check matrix of a linear code and the minimum distance which is given by the following theorem:
Theorem 1.7**.**
Let be a linear code and a parity check matrix for . Then
(i)* if and only if any columns of are linearly independent.*
(ii)* if and only if has columns that are linearly dependent.*
Corollary 1.8**.**
If is a linear code and is a parity check matrix for , then has minimum distance if and only if any columns of are linearly independent and some columns of are linearly dependent.
The connection of codes and graphs has been explored from different aspects in the literature. The main theme in these works is to take a special class of graphs and construct codes from the adjacency matrix of the graph. The structure of the graph may lead to different types of codes as a result, such as self-dual codes, self-orthogonal codes, etc. We refer the reader to [2]–[12], [14] and [15] for some of these works.
In this work we focus on the following type of construction which was discussed in [15]. Let be the adjacency matrix of a simple graph on vertices. We construct the binary code from the generator matrix . Such a construction has several advantages which we can describe as follows:
The dimension of the codes is automatically determined as . So we are looking at -codes. 2. 2.
The parity-check matrix of such a code is given by since is symmetric 3. 3.
Note that a permutation of columns of will bring the matrix into , which means any such code is isodual. 4. 4.
Since the codes are isodual, to determine the conditions for self-duality, we just need to factor in the orthogonality conditions.
In addition to the conditions on the graph that would ensure self-duality of the constructed code, we also find upper bounds on the minimum distances of codes obtained via this construction. We give a combinatorial description to the exact minimum distances of such codes as well as codes obtained from just the adjacency matrix as the generator matrix. We give examples of isodual and self-dual codes obtained through this construction.
The rest of the work is organized as follows. In section 2, we give the upper bounds and combinatorial descriptions for the minimum distances of codes obtained from graphs. In section 3, we give necessary and sufficient conditions for the codes to be self-dual, Type I and Type II. In addition, we describe how the join operation on graphs affects the self-duality conditions. We give several examples of self-dual codes obtained through the construction.
2 The construction for codes
As was mentioned in the Introduction, we focus mainly on the construction of binary codes generated by where is the adjacency matrix of a simple graph. We start with the following observation:
Observation 2.1**.**
Linear codes generated by and , where is a permutation matrix, are not necessarily the same. For example, consider the graph with adjacency matrix and permutation matrix generated by :
[TABLE]
[TABLE]
It is not obvious that and have the same minimum distance.
The following result gives an upper bound of the minimum distance of a binary code in terms of the -rank (see [1]) of the corresponding graph.
Theorem 2.2**.**
Let be the adjacency matrix of a graph on vertices and let be the binary linear code generated by . Then we have
[TABLE]
where denotes the rank of as a matrix over .
Proof.
Let be the generator matrix of . Then is the parity-check matrix of . By the definition of the rank, any set of columns of are linearly dependent. By Theorem 1.6, . ∎
To get a combinatorial interpretation of the minimum distance of , we study the following set of vertices of a graph with adjacency matrix and vertex set : for a nonempty subset of , the set of vertices of with odd number of neighbors in is denoted by , i.e.,
[TABLE]
where denotes the set of neighbors of the vertex in . Note that and have no inclusion-exclusion relationship that holds for all graphs as evident in the following examples.
Example 2.3**.**
Consider with vertices consecutively adjacent. For , . For , . For , . 2. 2.
Consider with vertex set . For , . For , . For with even , . For with odd , .
Definition 2.4**.**
Two vertices and of a graph are called duplicate vertices if they are not adjacent and , i.e., they have the same neighbors.
Observation 2.5**.**
Let be a graph. If is a set of two duplicate vertices of , then .
Proof.
Let be the adjacency matrix of and denote the column of . Without loss of generality let . If and are duplicate vertices, then which implies . ∎
Linear dependency relations among columns of a matrix associated with graphs have been studied in [11]. We study the same in connection with .
Theorem 2.6**.**
Let be a graph with vertex set and adjacency matrix . Let be a nonempty subset of . If , then the columns of corresponding to are linearly dependent. Conversely, if the columns of corresponding to are minimally linearly dependent, then .
Proof.
Suppose and . Then
[TABLE]
which implies columns of are linearly dependent.
Conversely, suppose and are minimally linearly dependent. Then . If , then
[TABLE]
a contradiction. Thus . ∎
Corollary 2.7**.**
Let be a graph with vertex set and adjacency matrix . Let be a nonempty subset of . The columns of corresponding to are minimally linearly dependent if and only if one of the following is true:
- (a)
* consists of a single isolated vertex of .* 2. (b)
* for each and there is no proper subset of for which for each .*
Now we discuss linear dependence among columns of where is the adjacency matrix of a graph on vertices.
Theorem 2.8**.**
Let be a graph on vertices with vertex set and adjacency matrix . If is a nonempty subset of , then the columns of indexed by and the columns of indexed by are linearly dependent columns of . Conversely, if the set of columns of indexed by the set is minimally linearly dependent, then it is the union of the columns of indexed by and the columns of indexed by for some nonempty subset of , in other words .
Proof.
Let . Let be the sum of columns of indexed by . Then , the th entry of , is the number of vertices of adjacent to vertex . Therefore if vertex is adjacent to an even number of vertices in , then . Similarly if vertex is adjacent to an odd number of vertices in , then . Thus the only entries of that are correspond to . So if we add with the columns of with indices corresponding to , the sum would be a zero vector.
Conversely, suppose the set of columns of indexed by the set is minimally linearly dependent. Without loss of generality suppose is the union of , and .
Case 1. (i.e., )
Since are minimally linearly dependent, . It suffices to show that . If not, let . Then
[TABLE]
a contradiction.
Case 2.
Let and be column of for . Since are minimally linearly dependent,
[TABLE]
Then
[TABLE]
which implies because are columns of . Thus . ∎
As a consequence of the preceding theorem, we have the following result.
Theorem 2.9**.**
Let be the adjacency matrix of a graph on vertices with vertex set . Let be the binary linear code generated by . Then the minimum distance of is given by
[TABLE]
Proof.
First note that is the parity-check matrix of . By Theorem 2.8, a code word in with weight corresponds to minimally dependent columns of indexed by for some nonempty subset of . Then
[TABLE]
If there is a nonempty subset of for which , then by Theorem 2.8 we find linearly dependent columns of giving a codeword of with weight less than , a contradiction. Thus the equality holds. ∎
Corollary 2.10**.**
Let be the adjacency matrix of a graph on vertices. Let be an permutation matrix. Then the binary linear codes generated by and are not necessarily the same but they have the same minimum distance.
Proof.
The graph with adjacency matrix is isomorphic to . Then the binary linear codes generated by and have the same minimum distance by Theorem 2.9. ∎
By Theorem 2.2 and Theorem 2.9, we have the following lower bound of the -rank of a graph:
Corollary 2.11**.**
Let be the adjacency matrix of a graph with vertex set . Then
[TABLE]
Question 2.12**.**
Characterize the graphs with the adjacency matrix and the vertex set for which
[TABLE]
Example 2.13**.**
The following are examples of binary linear code generated by where is the adjacency matrix of a graph on vertices.
For , where and .
For , where and . 2. 2.
When is a tree on vertices, where consisting of a pendant vertex and where is adjacent to . 3. 3.
For , where and .
For , where and .
For , where and . 4. 4.
For , where and . 5. 5.
For star centered at , where and . 6. 6.
For , where and because of duplicate vertices 1 and 2. Recall . 7. 7.
For centered at , where and .
For , where and .
For , where and . 8. 8.
When is the Petersen graph which is the , where and where the outer vertices are 1,2,3,4 in the standard drawing.
Remark 2.14**.**
Suppose is the vertex set of and let . It is easy to observe that
[TABLE]
Observation 2.15**.**
Let be the adjacency matrix of a graph on vertices with vertex set . Let be the binary linear code generated by and be a nonempty subset of for which . From the preceding remark for , we have either or . At least one of these two properties seems to hold for other graphs also.
Conjecture 2.16**.**
Let be the adjacency matrix of a graph on vertices with vertex set . Let be the binary linear code generated by . Suppose is a nonempty subset of for which . Then either or .
The following observation may be helpful for the future work on the preceding conjecture.
Observation 2.17**.**
If and , then
[TABLE]
3 Self-dual codes from graphs
We start by observing that if is an matrix, then the binary code generated by is a self-dual code if and only if , where the matrix multiplication is done in . If is the adjacency matrix of a simple graph, then this condition is reduced to . We first give some results on the graphs for which this condition is satisfied.
Theorem 3.1**.**
Let be a graph on vertices with adjacency matrix . Then if and only if the following are true:
- (a)
* is odd for all vertices (This implies is even).* 2. (b)
* is even for all vertices .*
Proof.
Suppose . Then for all , , i.e., is odd and consequently is odd. Since every graph has an even number of odd-degree vertices, is even by (a). Since , for all vertices , is even and consequently is even. The converse follows by similar arguments. ∎
We prove the following lemma which will be used in the proof of the subsequent theorem:
Lemma 3.2**.**
Let be a self-orthogonal code and assume are two codewords with
[TABLE]
Then .
Proof.
Since is self-orthogonal, we have , which implies the weight of the entry-wise product of and is even. Thus we have
[TABLE]
∎
We are now ready to prove the following theorem which gives a necessary and sufficient condition for a graph to generate a Type II code:
Theorem 3.3**.**
Let be the adjacency matrix of a simple graph on vertices, which satisfies the hypothesis of Theorem 3.1. Then generates a Type II code if and only if for all vertices of the graph.
Proof.
The necessity being clear, we proceed to proving the sufficiency.
Suppose for all vertices . Then each row of has weight divisible by . Suppose the rows of are denoted by . So we have for . Then we claim that all the codewords will have weight divisible by . Note that every codeword of is obtained from a sum of the form , where and . We proceed by induction on .
If , then we have just the rows , which all have weights divisible by 4.
Assume the assertion to be true for all sums with summands.
Let
[TABLE]
By induction hypothesis, has weight divisible by . Note that both and are codewords in , which is self-dual and both codewords have weights divisible by . So by Lemma 3.2, the weight of is divisible by . ∎
Since Type II binary self-dual codes only exist for lengths that are multiple of , we have the following combinatorial result as a consequence of the previous theorem:
Corollary 3.4**.**
Let . Then a simple graph on vertices that satisfies the hypotheses of Theorem 3.1 has at least one vertex whose degree is .
In the following theorem, we explore the special case of complete graphs.
Theorem 3.5**.**
Let be the code generated by , where is the adjacency matrix of . is a self-dual code if and only if is even. Moreover, if we have
a)* is a Type II self-dual code of parameters if is divisible by .*
b)* is a Type I self-dual code of parameters if is not divisible by .*
Proof.
By Theorem 3.1, is self-dual if and only if is even.
a) If , then the degree of every vertex of is , which, by Theorem 3.3, implies that the code generated by is Type II. This means . But the sum of any two rows of has weight 4, which means .
b) If with , then every row of has weight , which makes Type I. To find the minimum distance, we use Theorem 2.9. Let be a nonempty subset of the vertices of . If , then , which means .
If , then , which means .
If , then , which means .
If , then . Thus the minimum distance is 4. ∎
Corollary 3.6**.**
The code generated by is an extremal Type II self-dual code for and . The code generated by is an extremal Type I self-dual code for .
Example 3.7**.**
Consider the regular graph which is the with the following adjacency matrix . Since and each vertex of has degree , the binary code is an extremal Type II self-dual code by Theorems 3.1, 3.3, and 1.4.
[TABLE]
Theorem 3.8**.**
Let be a strongly regular graph with parameters and adjacency matrix . Suppose is a linear code generated by . Then is self-dual if and only if is odd and are even.
Proof.
For a strongly regular graph with parameters , for all and is or for all . Thus if and only if is odd and are even by Theorem 3.1. ∎
Question 3.9**.**
Let be a strongly regular graph with parameters and adjacency matrix . Find the minimum distance of the linear code in terms of .
Now we explore effects of graph operations on corresponding linear codes. In particular, we study the join of two graphs and with disjoint vertex sets and respectively. Note that has the vertex set and the edge set consisting of all edges of and together with all edges between them. For example, is the join of and .
Theorem 3.10**.**
Let and be two graphs on and vertices with adjacency matrices and respectively. Suppose is the join of and with adjacency matrix . If and are self-dual codes, then so is .
Proof.
First note that
[TABLE]
Suppose and are self-dual codes. By Theorem 3.1, and which imply and degree of each vertex in and is . Then
[TABLE]
[TABLE]
[TABLE]
Thus is a self-dual code by Theorem 3.1. ∎
The following theorem describes the type of the join of self-dual codes.
Theorem 3.11**.**
Let and be two graphs on and vertices and with generator matrices and respectively. Suppose that is the generator matrix of .
- (a)
When , is Type II if and only if both and are Type II. 2. (b)
When , if is Type II, then both and are Type I and the converse is true if each vertex of and has degree . 3. (c)
If exactly one of and is divisible by , then is Type I.
Proof.
First we observe that for any vertex in , the degree of in is . Similarly for any vertex in , the degree of in is . Then the cases and follow from Theorem 3.3.
Now consider the case when exactly one of and is divisible by . Then we have , which implies . Since Type II codes only exist for lengths that are multiples of 8, is not Type II, hence Type I. ∎
We end by the following results about the minimum distance of and its connection to the minimum distances of and .
Theorem 3.12**.**
Let and be two graphs with disjoint vertex sets and of sizes and respectively. Let , , and be the adjacency matrices of , , and respectively. Suppose that , and are the minimum distances of the codes generated by , , and respectively.
- (a)
Suppose is a nonempty subset of for which for . If is even for some , then
[TABLE]
If and are odd, then
[TABLE] 2. (b)
Suppose is a nonempty subset of for which where and . If at least one of and is even, then
[TABLE]
Proof.
(a) We prove this by the following cases:
Case 1. is even.
For in , we have in . Then by Theorem 2.9,
[TABLE]
Case 2. is even.
For in , we have in . Then by Theorem 2.9,
[TABLE]
Case 3. and are odd.
In , let . Thus . Then by Theorem 2.9,
[TABLE]
Similarly
[TABLE]
(b) We prove this by the following cases:
Case 1. and are even.
is the union of in and in . Then by Theorem 2.9,
[TABLE]
Case 2. is odd and is even.
is the union of and in . Then by Theorem 2.9,
[TABLE]
Case 3. is even and is odd.
Similar to Case 2, we have
[TABLE]
∎
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] A. Abiad, W. H. Haemers, “Switched symplectic graphs and their 2-ranks”, Des. Codes Crypt. , vol. 81, no. 1, pp. 35–41, 2016.
- 2[2] D. Crnković, B.G. Rodrigues, S. Rukavina and L. Simčić, “Ternary codes from the strongly regular (45, 12, 3, 3) graphs and orbit matrices of 2-(45, 12, 3) designs”, Discrete Math. , vol. 312, no. 20, pp. 3000–3010, 2012.
- 3[3] D. Crnković, M. Maximović, B. Rodrigues and S. Rukavina, “Self-orthogonal codes from the strongly regular graphs on up to 40 vertices”, Adv. Math. Communications , vol. 10, no. 3, pp. 555–582, 2016.
- 4[4] P. Dankelmann, J.D. Key and B. G. Rodrigues, “A Characterization of Graphs by Codes from their Incidence Matrices”, Elect. J. Combinatorics , vol. 20, no. 3, P 18, 2013.
- 5[5] W. Fish, R. Fray and E. Mwambene, “Binary codes from the complements of the triangular graphs”, Quaestiones Mathematicae , vol. 33, no. 4, pp. 399–408, 2010.
- 6[6] G. D. Forney, “Codes on Graphs: Fundamentals”, ar Xiv:1306.6264
- 7[7] C. D. Godsil and G. F. Royle, “Chromatic Number and the 2-Rank of a Graph ”, J. Comb. Series B , vol. 81, pp. 142–149, 2001.
- 8[8] M. Grassl and M. Harada, “New self-dual additive 𝔽 4 subscript 𝔽 4 \mathbb{F}_{4} -codes constructed from circulant graphs”, Discrete Math. , vol. 340, no. 3, pp.399–403, 2017.
