Conflict-Avoiding Codes of Prime Lengths and Cyclotomic Numbers
Abstract.
The problem to construct optimal conflict-avoiding codes of even lengths and the Hamming weight is completely settled. On the contrary, it is still open for odd lengths. It turns out that the prime lengths are the fundamental cases needed to be constructed. In the article, we study conflict-avoiding codes of prime lengths and give a connection with the so-called cyclotomic numbers. By having some nonzero cyclotomic numbers, a well-known algorithm for constructing optimal conflict-avoiding codes will work for certain prime lengths. As a consequence, we are able to answer the size of optimal conflict-avoiding code for a new class of prime lengths.
Keywords: binary protocol sequence, multiple-access collision channel without feedback, optimal conflict-avoiding code, cyclotomic numbers, cyclotomic matrices, squares.
1. Introduction
A binary protocol sequence set for transmitting data packets over a multiple-access collision channel without feedback is called a conflict-avoiding code (CAC) in information theory and has been studied few decades ago by [Mat90, NGM92, GV93, TR02, LT05, Lev07]. A mathematical model for CACs of length and (Hamming) weight is as follows. Let be the additive group of modulo . For a -subset of , denote the difference set of by . A CAC of length and weight is a collection of -subsets of such that for every distinct of . Each is called a codeword. A CAC is said to be optimal if it has the maximal size among all CACs of the same length and weight. When the weight is or , there is no difficulty to find the optimal size. For weights more than , however, finding an optimal CAC and determining its size is still an open problem. The first challenge is the weight and we introduce its development below.
Assume that the weight . The construction of an optimal CAC of an arbitrary even length is completely found by many authors [LT05, JMJ+07, MFU09, FLM10]. However, the known results for odd lengths are still far from completion. In the case that the length is odd, the multiplicative order of in the multiplicative group of units of for prime divisors of becomes a key role in constructing an optimal CAC. For convenience, we denote by the multiplicative group of and by the multiplicative order of in for an odd prime . A construction of optimal CAC is found in [LT05] for prime length such that . Later, the construction is improved in [Lev07] for composite number length where every prime divisor of the length satisfies .
The remaining situation is that the length has a prime divisor such that . In [FLS14], the authors prove that the problem of such length can be reduced to the problem of length such that every prime divisor of satisfies . They also prove that an optimal CAC of length can be constructed from an optimal CAC of length where is a non-Wieferich prime (that ). However, the construction for prime length is not completely found. For other odd lengths one can refer to [Mom07, WF13, LMSJ14, MM17, HLS] for the constructions. It turns out that the prime lengths are fundamental objects needed to be solved. This leads us to study CACs prime lengths and weight .
For an odd prime length , a difference set would have size or for a -subset of . Without loss of generality, we can assume the codeword to be for some . Then if and only if for some . In this case, is called an equi-difference codeword. To have an optimal CAC, it is natural to have equi-difference codewords as many as possible. If denotes the maximal size among all CACs consisting of equi-difference codewords only, then one has
where if divides and otherwise. Moreover, [FLS14, Lemma 3] provides
(1) |
where denotes the maximal size among all CACs. Thus, if , then a CAC consisting of equi-difference codewords only must be optimal. It remains to consider . The authors of [FLS14] propose an algorithm for constructing nonequi-difference codewords. They conjecture that the algorithm always works for prime length for constructing nonequi-difference codewords. Then equi-difference codewords could be further obtained and this CAC would be optimal by the upper bound in (1). For our purpose, we rephrase the statement of their conjecture in terms of cosets of the subgroup , generated by and , in the multiplicative group .
Conjecture A ([FLS14, Conjecture 1]).
Let be a non-Wieferich prime. Then there are cosets of the subgroup in such that for each there exists satisfying
We remark that each corresponds to the nonequi-difference codeword where . Those triples above correspond to a hypergraph matching in an auxiliary hypergraph in their terminology. We give an example to illustrate how Conjecture A and their algorithm work for constructing an optimal CAC.
Consider CACs of length and weight where . First, there are four cosets of in :
We pick elements in three different cosets respectively such that . For example, we choose , and from the first three cosets. Let . Then is a nonequi-difference codeword and . The elements in lead to four equi-difference codewords
It is similar to , and that
respectively, for . The difference sets of all codewords are pairwisely disjoint. By the upper bound of in (1), the collection forms an optimal CAC which consists of nonequi-difference codeword and equi-difference codewords. If we choose , and such that , then and . The same procedure will lead to another equi-difference codewords. Different choices of will give different optimal CACs.
The authors of [MZS14] independently give a similar thought to the existence of the triples in Conjecture A in terms of the group structure of the quotient group . They notice that is a cyclic group because is cyclic.
Conjecture B ([MZS14, Conjecture]).
Let be an odd prime. If , then there is a generator of the cyclic group for some such that
for some and .
Note that implies either or . Moreover, if Conjecture B holds for a prime , then one can set , , , , , and so on to obtain for each where . Hence, Conjecture B implies Conjecture A. For the previous example that , can be chosen as . Then , and in . Moreover, is not assumed to be non-Wieferich. In [MZS14], the authors have checked in computer that Conjecture B holds for prime .
The motivation of this article is to study Conjecture B. Throughout this article, we denote
for a given prime . The existence of and in Conjecture B is strongly related to the so-called cyclotomic numbers of order with respect to a primitive root where are integers. In particular, both and exist if and only if for certain . More precisely, Conjecture B is equivalent to the following statement. See Section 2 for detail.
Conjecture.
Let be an odd prime and let . If , then for some with .
The cyclotomic numbers was considered by C.F. Gauss [Gau01] and later L.E. Dickson [Dic35b, Dic35a, Dic35c] studied these numbers in the context of Waring’s problem. One of the central problems is to determine these numbers in terms of solutions of a certain Diophantine systems. See also the surveys [Raj80, Kat02, AT20]. However, it is still not obvious whether because it is difficult either to find a suitable Diophantine system or to write down the formulas of cyclotomic numbers when is getting larger. Recently, cyclotomic numbers are developed into a secured public-key cryptography model [ATP21].
In this article, we study the conjecture above and we will prove the following result.
Theorem A.
Let be an odd prime and let . If is an odd prime, then for some with .
This not only answers Conjecture B but Conjecture A for a class of primes . Moreover, the size of optimal CAC can be determined as follows, while if .
Theorem B.
Let be an odd prime with . If is an odd prime, then an optimal conflict-avoiding code of length and weight has the size
This article is organized as follows. In Section 2, we introduce cyclotomic numbers and see how these numbers connect to Conjecture B. The cyclotomic numbers will lead to an interesting matrix in Section 3. This matrix can be used to answer Conjecture B, as well as Conjecture A, for primes with small . In Section 4, we will see that the number of squares in a certain subset of can be represented to a particular sum of cyclotomic numbers. By counting squares and using an upper bound of cyclotomic numbers given in [BHKM13], we will be able to prove Theorem A. Finally, we remark how an obstacle is encountered for primes with composite number .
2. Preliminaries
In this article, is an odd prime and is the finite field of elements. Throughout this article, we denote
the subgroup of generated by and , and then is the index of in . We always assume
A generator of is also called a primitive root of . Fix a primitive root . Define the number
for . These numbers are called cyclotomic numbers of order with respect to . We can rewrite as follows. Note that and consists of all -th power of elements of . Thus, both for . It follows that
for . If and are integers such that and , then and . We have . Hence, it is convenient to consider modulo .
As is a primitive root and , the quotient group consists of elements . In particular, the set
is a complete set of generators of where denotes the greatest common divisor of two given integers. Let . Then generates if and only if for some with . Moreover,
Thus, Conjecture B holds for if and only if for some with . Because each is nonnegative, it is enough to consider the following sum
The argument above actually shows the following lemma.
Lemma 2.1.
Let and be as above. Then if and only if Conjecture B holds for this .
The sum is defined with respect to a given primitive root . In fact, we can freely compute when picking an arbitrary primitive root. This helps a lot in practice. We leave a proof below for the readers because we do not find any reference for this fact.
Proposition 2.2.
The sum is independent on the choices of primitive roots.
Proof.
Let be a primitive root of . Denote and the sum of for with . Since also generates , for some with . Then and thus for . Recall that is a reduced residue system modulo . Since , it follows that is also a reduced residue system modulo . Thus,
∎
As we have mentioned, one of main problems on the theory of cyclotomic numbers is to find explicit formulas for all in terms of solutions of certain Diophantine systems. For example, consider such that . It is well-known that the Diophantine system
has a solution with unique , where . [Gau01, Section 358] gives that
where the sign of depends of the choices of primitive roots. In this case, and thus
while because .
However, the formulas for large will be extremely complicated and hard to find. For instance, the formulas for are presented in [LW75]. But it is not obvious whether or not for . See also Example 4.5.
We deduce the following useful properties.
Lemma 2.3.
For modulo ,
Proof.
For , write for some . One has . Moreover, . This gives a map from into given by . One can deduce that is a bijection. Hence, the first equality holds.
For the second equality, observe that as . Then gives a bijection from onto . ∎
3. Extended Cyclotomic Matrices
The modulo relation and properties of cyclotomic numbers lead us to an interesting matrix. This will provide a new insight to the conflict-avoiding code problem. In this section, we will be able to easily answer Conjecture B for small .
For a given primitive root of , the cyclotomic matrix is an -by- matrix defined as follows
It is convenient to give a variation of the cyclotomic matrix. We define the extended cyclotomic matrix as follows
For modulo , Lemma 2.3 gives the relation for entries:
(2) |
For convenience, the row of is said to be indexed by for . This matrix has following nice properties.
Lemma 3.1.
Let be the extended cyclotomic matrix as above.
-
(i)
is symmetric with nonnegative integer entries and .
-
(ii)
The diagonal entries after is the reverse of the row indexed by :
-
(iii)
For , the row indexed by is shifted times to the left by the row indexed by :
-
(iv)
The trace, the sum of each row and the sum of each column are all .
Proof.
(i), (ii) and (iii) are obvious from (2) that , and .
For (iv), let be the given primitive root. Then the group is the disjoint union of . Since , the sum of row indexed by is
Moreover, the sum of row indexed by for is
The trace of is also by (ii). Finally, the sum of each column is by (i). ∎
Proposition 3.2.
For , we have .
Proof.
Using (2) and (i), (ii), (iii) of Lemma 3.1, we make the matrix less complicated. For convenience, we denote by the row indexed by .
For ,
By symmetry, , and . By Lemma 3.1(ii), . Thus,
By Lemma 3.1(iv), the sums of and are equal. We have . We obtain
According to Lemma 2.1, a prime will satisfy Conjecture B, as well as Conjecture A, if . Thus we have the following conclusion on the size of optimal CAC.
Corollary 3.3.
Let be an odd prime such that . If , then the size of optimal conflict-avoiding codes of length and weight is .
4. The number of squares
In the previous section, we have seen that the sum of particular cyclotomic numbers actually answers Conjecture A and B for some . In this section, we will see how connects to squares of and answer both conjectures for more . First of all, let us back to the equation in Conjecture B where and for such that . In this case, is nonempty. Write and for . It gives . Viewing the equation as a quadratic polynomial in , the discriminant provides that is a square. Equivalently, is a square. Since , it follows that is a square in . This leads us to think of squares in . In general, if is a square for , namely for some , then we have which gives an element of because . Note that for some where is a given primitive root. It follows that . Consequently, every square of (if exists) leads to a nonzero cyclotomic number for some . We will see for some . It follows that when is prime.
Given a primitive root of , we generally consider squares in for . Fix and let such that . Then . Observe that and since . Thus, and for some satisfying as . In particular, . Conversely, if and , then we have . Let
for integers and let be the set of squares of . The discussion above provides a surjective map
Lemma 4.1.
Let be as above.
-
(i)
For , if either or , then . Thus, the domain of is a disjoint union of .
-
(ii)
For modulo ,
Proof.
For (i), when , one has because . Similarly, when , one also has . The result follows.
For (ii), consider the map
It is easy to see that is injective. For every , since . Moreover, . Hence, is a bijection and the result follows by the definition of . ∎
The following lemma provides a connection between a particular sum of cyclotomic numbers and the number of squares.
Lemma 4.2.
The number of squares of is
For , the number of squares of is
Proof.
Let , and be as above. Note that if , then and . As , we deduce that if and only if . Recall from Lemma 4.1(i) that the domain of is a disjoint union of for and . We discuss into two cases that and .
Case 1: . Clearly, we have . Moreover, . Thus, the restriction of to is two-to-one. If , then and this holds only for . So the image of under has the size if and the size if . For , the image of under has the size .
Case 2: . In this case, and . Thus, the restriction of to is also two-to-one. It follows that the image of under has the size .
Since is surjective, Case 1 and 2 lead to
for . Finally, each leads to a unique such that . The proof is completed. ∎
Example 4.3.
Let . Then and . Choose a primitive root. Then the sets of squares of are as follows:
On the other hand, the cyclotomic matrix (Section 3) is
Indeed, , and .
Let us concentrate on . According to Lemma 2.3, . Thus, the number of squares of is also
Recall that
We have the following conclusion.
Proposition 4.4.
If is an odd prime, then the number of squares of is .
Note that contains at least one square, says . When is an odd prime, Proposition 4.4 provides that we will have if is small enough compared to the number of squares of . Let us see an example below.
Example 4.5.
We now focus on and the number of squares of . In [BHKM13], the authors study upper bounds of cyclotomic numbers. They determine by computing the rank of certain matrix with entries in . Estimating the rank provides an upper bound of for general . We use their result for below.
Lemma 4.6 ([BHKM13, Theorem 1.1(iii)]).
If , then
where denotes the smallest integer larger than or equal to a given number.
In our situation, and is even as . Thus, Lemma 4.6 implies
We study the number of squares of in a different way from cyclotomic numbers. Denote the Legendre symbol by
for . Then is a square in if and only if . Thus, for every , the collection must contain at least one square because of the multiplication
holds (see also [Bur11, Chapter 9]). We have the following conclusion.
Lemma 4.7.
If and , then
We have a lower bound of the number of squares of as follows.
Lemma 4.8.
The number of squares of is greater than .
Proof.
Let and let be a generator of . The integer is even because . Moreover, . Denote the number of squares of . Then
where the starting corresponds to . Since , and we also have
where the starting corresponds to .
For every , the collection must contain at least one square since . By Lemma 4.7,
The first two sums of and are partial sums of with nonnegative terms. It follows that where
Observe that for . Thus,
The set is a subset of and then is a partial sum of . We obtain . As a consequence, we have . Hence, , as desired. ∎
Now we can prove the main theorem below.
Theorem 4.9.
Let be an odd prime. If is an odd prime, then .
Proof.
Theorem 4.9 provides the positivity of Conjecture B for primes such that is a prime. This also answers Conjecture A for such primes. Thus we have the following consequence.
Corollary 4.10.
Let be an odd prime such that . If is an odd prime, then the optimal conflict-avoiding codes of length and weight has the size
For example, if , then is odd and is a prime. Thus, we can easily conclude that the size of optimal conflict-avoiding codes of length and weight is . Indeed, one can check that with the primitive root . One element of is .
An optimal CAC of length , , can be constructed from an optimal CAC of length by [FLS14, Theorem 8]. Applying Corollary 4.10 to [FLS14, Theorem 8], we obtain the following conclusion.
Corollary 4.11.
Let be a non-Wieferich prime such that . If is an odd prime, then an optimal conflict-avoiding code of length and weight has the size
for every .
5. Conclusion Remark
According to Corollary 3.3 and 4.10, we now know the size of optimal CAC of prime length and weight where and either or is an odd prime. For composite number , it is not easy to determine whether or not. For example, let and using properties given in Section 3, the extended cyclotomic matrix can be simplified such as
Suppose that . Then
By Lemma 3.1(iv), we will obtain that
This gives the equality
On the other hand, according to Lemma 4.2, the number of squares of is
By Lemma 4.8, this number is greater than and then . Using the equality above, we obtain . However, the upper bound for given in Lemma 4.7 (or for given in [BHKM13]) can not give further information in this case. For composite numbers , we think that finding smaller upper bounds for cyclotomic numbers may lead to a better approach. We hope that these ideas could give some inspiration for doing this problem.
Acknowledgment
We would like to thank Professor Yuan-Hsun Lo for bringing [FLS14] to our attention. The first named author is partially supported by MOST grant 110-2115-M-003-007-MY2. The second named author is partially supported by MOST grant 111-2115-M-003-005. The third named author is supported MOST grant 111-2811-M-003-028.
References
- [AT20] M.H. Ahmed and J. Tanti. Cyclotomic numbers and jacobi sums: a survey. In Class groups of number fields and related topics, pages 119–140. Springer, Singapore, 2020. doi:10.1007/978-981-15-1514-9_12.
- [ATP21] M.H. Ahmed, J. Tanti, and S. Pushp. A public key cryptosystem using cyclotomic matrices. In Coding Theory - Recent Advances, New Perspectives and Applications, pages 86–132. IntechOpen, 2021. doi:10.5772/intechopen.101105.
- [BHKM13] K. Betsumiya, M. Hirasaka, T. Komatsu, and A. Munemasa. Upper bounds on cyclotomic numbers. Linear Algebra Appl., 438(1):111–120, 2013. doi:10.1016/j.laa.2012.06.045.
- [Bur11] D.M. Burton. Elementary Number Theory. McGraw-Hill, New York, 2011.
- [Dic35a] L.E. Dickson. Cyclotomy and trinomial congruences. Trans. Amer. Math. Soc., 37(3):363–380, 1935. doi:10.1090/S0002-9947-1935-1501791-3.
- [Dic35b] L.E. Dickson. Cyclotomy, higher congruences, and Waring’s problem. Amer. J. Math., 57(2):391–424, 1935. doi:10.2307/2371217.
- [Dic35c] L.E. Dickson. Cyclotomy when is composite. Trans. Amer. Math. Soc., 38(2):187–200, 1935. doi:10.1090/S0002-9947-1935-1501808-6.
- [FLM10] H.-L. Fu, Y.-H. Lin, and M. Mishima. Optimal conflict-avoiding codes of even length and weight . IEEE Trans. Inform. Theory, 56(11):5747–5756, 2010. doi:10.1109/TIT.2010.2069270.
- [FLS14] H.-L. Fu, Y.-H. Lo, and S.W. Shum. Optimal conflict-avoiding codes of odd length and weight three. Des. Codes Cyptogr., 72(2):289–309, 2014. doi:10.1007/s10623-012-9764-5.
- [Gau01] C.F. Gauss. Disquisitiones arithmeticae. 1801. Translated and with a preface by Arthur A. Clarke. Revised by William C. Waterhouse, Cornelius Greither and A. W. Grootendorst and with a preface by Waterhouse. Springer-Verlag, New York, 1986. doi:10.1007/978-1-4939-7560-0.
- [GV93] L. Györfi and I. Vajda. Constructions of protocol sequences for multiple access collision channel without feedback. IEEE Trans. Inform. Theory, 39(5):1762–1765, 1993. doi:10.1109/18.259673.
- [HLS] L.-C. Hsia, H.-C. Li, and W.-L. Sun. Certain diagonal equations and conflict-avoiding codes of prime lengths. preprint.
- [JMJ+07] M. Jimbo, M. Mishima, S. Janiszewski, A.Y. Teymorian, and V.D. Tonchev. On conflict-avoiding codes of length for three active users. IEEE Trans. Inform. Theory, 53(8):2732–2742, 2007. doi:10.1109/TIT.2007.901233.
- [Kat02] S.A. Katre. The cyclotomic problem. In Currents trends in number theory, pages 59–72. Hindustan Book Agency, New Delhi, 2002. doi:10.1007/978-93-86279-09-5_5.
- [Lev07] V.I. Levenshtein. Conflict-avoiding codes and cyclic triple systems. Probl. Inf. Transm., 43(3):199–212, 2007. doi:10.1134/S0032946007030039.
- [LMSJ14] Y. Lin, M. Mishima, J. Satoh, and M. Jimbo. Optimal equi-difference conflict-avoiding codes of odd length and weight three. Finite Fields Appl., 26:49–68, 2014. doi:10.1016/j.ffa.2013.11.001.
- [LT05] V.I. Levenshtein and V.D. Tonchev. Optimal conflict-avoiding codes for three active users. Proc. IEEE Int. Symp. Inform. Theory, pages 535–537, 2005. doi:10.1109/ISIT.2005.1523392.
- [LW75] P.A. Leonard and K.S. Williams. The cyclotomic numbers of order eleven. Acta Arith., 26(4):365–383, 1975. doi:10.4064/aa-26-4-365-383.
- [Mat90] P. Mathys. A class of codes for a active users out of multiple-access communication system. IEEE Trans. Inform. Theory, 36(6):1206–1219, 1990. doi:10.1109/18.59923.
- [MFU09] M. Mishima, H.-L. Fu, and S. Uruno. Optimal conflict-avoiding codes of length (mod ) and weight . Des. Codes Cryptogr., 52(3):275–291, 2009. doi:10.1007/s10623-009-9282-2.
- [MM17] M. Mishima and K. Momihara. A new series of optimal tight conflict-avoiding codes of weight . Discrete Math., 340(4):617–629, 2017. doi:10.1016/j.disc.2016.12.003.
- [Mom07] K. Momihara. Necessary and sufficient conditions for tight equi-difference conflict-avoiding codes of weight three. Des. Codes Cryptogr., 45(3):379–390, 2007. doi:10.1007/s10623-007-9139-5.
- [MZS14] W. Ma, C. Zhao, and D. Shen. New optimal constructions of conflict-avoiding codes of odd length and weight . Des. Codes Cyptogr., 73(3):791–804, 2014. doi:10.1007/s10623-013-9827-2.
- [NGM92] Q.A. Nguyen, L. Györfi, and J.L. Massey. Constructions of binary constant-weight cyclic codes and cyclically permutable codes. IEEE Trans. Inform. Theory, 38(3):940–949, 1992. doi:10.1109/18.135636.
- [Raj80] A.R. Rajwade. Cyclotomy–a survey article. Math. Student, 48(1):70–115, 1980.
- [TR02] B.S. Tsybakov and A.R. Rubinov. Some constructions of conflict-avoiding codes. Probl. Inf. Transm., 38(4):268–279, 2002. doi:10.1023/A:1022045812079.
- [WF13] S.-L. Wu and H.-L. Fu. Optimal tight equi-difference conflict-avoiding codes of length and weight . J. Combin. Des., 21(6):223–231, 2013. doi:10.1002/jcd.21332.