This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Conflict-Avoiding Codes of Prime Lengths and Cyclotomic Numbers

Liang-Chung Hsia Department of Mathematics, National Taiwan Normal University, Taipei 11677, Taiwan, ROC [email protected] Hua-Chieh Li Department of Mathematics, National Taiwan Normal University, Taipei 11677, Taiwan, ROC [email protected]  and  Wei-Liang Sun Department of Mathematics, National Taiwan Normal University, Taipei 11677, Taiwan, ROC [email protected]
Abstract.

The problem to construct optimal conflict-avoiding codes of even lengths and the Hamming weight 33 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 nn and (Hamming) weight ww is as follows. Let n=/n\mathbb{Z}_{n}=\mathbb{Z}/n\mathbb{Z} be the additive group of \mathbb{Z} modulo nn. For a ww-subset 𝐱={x1,,xw}{\bf x}=\{x_{1},\ldots,x_{w}\} of n\mathbb{Z}_{n}, denote the difference set of 𝐱{\bf x} by Δ(𝐱)={xixjij}\Delta({\bf x})=\{x_{i}-x_{j}\mid i\neq j\}. A CAC of length nn and weight ww is a collection 𝒞\mathcal{C} of ww-subsets of n\mathbb{Z}_{n} such that Δ(𝐱)Δ(𝐲)=\Delta({\bf x})\cap\Delta({\bf y})=\varnothing for every distinct 𝐱,𝐲{\bf x},{\bf y} of 𝒞\mathcal{C}. Each 𝐱{\bf x} 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 11 or 22, there is no difficulty to find the optimal size. For weights more than 22, however, finding an optimal CAC and determining its size is still an open problem. The first challenge is the weight 33 and we introduce its development below.

Assume that the weight w=3w=3. 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 nn is odd, the multiplicative order of 22 in the multiplicative group of units of p\mathbb{Z}_{p} for prime divisors pp of nn becomes a key role in constructing an optimal CAC. For convenience, we denote p×\mathbb{Z}_{p}^{\times} by the multiplicative group of p\mathbb{Z}_{p} and op(2)o_{p}(2) by the multiplicative order of 22 in p×\mathbb{Z}_{p}^{\times} for an odd prime pp. A construction of optimal CAC is found in [LT05] for prime length pp such that 4op(2)4\mid o_{p}(2). Later, the construction is improved in [Lev07] for composite number length where every prime divisor pp of the length satisfies 4op(2)4\mid o_{p}(2).

The remaining situation is that the length has a prime divisor pp such that 4op(2)4\nmid o_{p}(2). In [FLS14], the authors prove that the problem of such length can be reduced to the problem of length nn such that every prime divisor pp of nn satisfies 4op(2)4\nmid o_{p}(2). They also prove that an optimal CAC of length n=pkn=p^{k} can be constructed from an optimal CAC of length pp where pp is a non-Wieferich prime (that 2p11(modp2)2^{p-1}\not\equiv 1\pmod{p^{2}}). However, the construction for prime length pp 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 33.

For an odd prime length p>3p>3, a difference set Δ(𝐱)\Delta({\bf x}) would have size 44 or 66 for a 33-subset 𝐱{\bf x} of p\mathbb{Z}_{p}. Without loss of generality, we can assume the codeword 𝐱{\bf x} to be {0,α,β}\{0,\alpha,\beta\} for some α,βp×\alpha,\beta\in\mathbb{Z}_{p}^{\times}. Then |Δ(𝐱)|=4|\Delta({\bf x})|=4 if and only if 𝐱={0,α,2α}{\bf x}=\{0,\alpha,2\alpha\} for some α\alpha. In this case, 𝐱{\bf x} is called an equi-difference codeword. To have an optimal CAC, it is natural to have equi-difference codewords as many as possible. If Me(p)M^{e}(p) denotes the maximal size among all CACs consisting of equi-difference codewords only, then one has

Me(p)=p12O(p)4M^{e}(p)=\frac{p-1-2O(p)}{4}

where O(p)=0O(p)=0 if 44 divides |1,2|\left|\langle-1,2\rangle\right| and O(p)=(p1)/|1,2|O(p)=(p-1)/\left|\langle-1,2\rangle\right| otherwise. Moreover, [FLS14, Lemma 3] provides

(1) Me(p)M(p)Me(p)+O(p)3\displaystyle M^{e}(p)\leq M(p)\leq M^{e}(p)+\left\lfloor\frac{O(p)}{3}\right\rfloor

where M(p)M(p) denotes the maximal size among all CACs. Thus, if O(p)<3O(p)<3, then a CAC consisting of equi-difference codewords only must be optimal. It remains to consider O(p)3O(p)\geq 3. The authors of [FLS14] propose an algorithm for constructing nonequi-difference codewords. They conjecture that the algorithm always works for prime length pp for constructing O(p)3\left\lfloor\frac{O(p)}{3}\right\rfloor nonequi-difference codewords. Then p12O(p)4\frac{p-1-2O(p)}{4} 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 1,2\langle-1,2\rangle, generated by 1-1 and 22, in the multiplicative group p×=p{0}\mathbb{Z}_{p}^{\times}=\mathbb{Z}_{p}\setminus\{0\}.

Conjecture A ([FLS14, Conjecture 1]).

Let pp be a non-Wieferich prime. Then there are 3O(p)33\left\lfloor\frac{O(p)}{3}\right\rfloor cosets A1,B1,C1,,AO(p)3,BO(p)3,CO(p)3A_{1},B_{1},C_{1},\ldots,A_{\left\lfloor\frac{O(p)}{3}\right\rfloor},B_{\left\lfloor\frac{O(p)}{3}\right\rfloor},C_{\left\lfloor\frac{O(p)}{3}\right\rfloor} of the subgroup 1,2\langle-1,2\rangle in p×\mathbb{Z}_{p}^{\times} such that for each ii there exists (ai,bi,ci)Ai×Bi×Ci(a_{i},b_{i},c_{i})\in A_{i}\times B_{i}\times C_{i} satisfying

ai+bi=ciin p.a_{i}+b_{i}=c_{i}\quad\text{in }\mathbb{Z}_{p}.

We remark that each (ai,bi,ci)(a_{i},b_{i},c_{i}) corresponds to the nonequi-difference codeword 𝐱i={0,ai,ci}{\bf x}_{i}=\{0,a_{i},c_{i}\} where Δ(𝐱i)={±ai,±bi,±ci}\Delta({\bf x}_{i})=\{\pm a_{i},\pm b_{i},\pm c_{i}\}. Those triples (ai,bi,ci)(a_{i},b_{i},c_{i}) 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 p=73p=73 and weight 33 where O(p)=4O(p)=4. First, there are four cosets of 1,2\langle-1,2\rangle in 73×\mathbb{Z}_{73}^{\times}:

1,2,31,2,51,2,111,2.\langle-1,2\rangle,\quad 3\langle-1,2\rangle,\quad 5\langle-1,2\rangle,\quad 11\langle-1,2\rangle.

We pick elements a,b,ca,b,c in three different cosets respectively such that a+b=ca+b=c. For example, we choose a=2a=2, b=3b=3 and c=5c=5 from the first three cosets. Let 𝐱={0,2,5}{\bf x}=\{0,2,5\}. Then 𝐱{\bf x} is a nonequi-difference codeword and Δ(𝐱)={±2,±3,±5}\Delta({\bf x})=\{\pm 2,\pm 3,\pm 5\}. The elements in 1,2Δ(𝐱)\langle-1,2\rangle\setminus\Delta({\bf x}) lead to four equi-difference codewords

𝐱1={0,22,23},𝐱2={0,24,25},𝐱3={0,26,27},𝐱4={0,28,29}.{\bf x}_{1}=\{0,2^{2},2^{3}\},\quad{\bf x}_{2}=\{0,2^{4},2^{5}\},\quad{\bf x}_{3}=\{0,2^{6},2^{7}\},\quad{\bf x}_{4}=\{0,2^{8},2^{9}\}.

It is similar to 31,2Δ(𝐱)3\langle-1,2\rangle\setminus\Delta({\bf x}), 51,2Δ(𝐱)5\langle-1,2\rangle\setminus\Delta({\bf x}) and 111,2Δ(𝐱)11\langle-1,2\rangle\setminus\Delta({\bf x}) that

𝐱i+4={0,322i,322i+1},𝐱i+8={0,522i,522i+1},𝐱i+12={0,1122i,1122i+1},{\bf x}_{i+4}=\{0,3\cdot 2^{2i},3\cdot 2^{2i+1}\},\quad{\bf x}_{i+8}=\{0,5\cdot 2^{2i},5\cdot 2^{2i+1}\},\quad{\bf x}_{i+12}=\{0,11\cdot 2^{2i},11\cdot 2^{2i+1}\},

respectively, for i=1,2,3,4i=1,2,3,4. The difference sets of all codewords 𝐱,𝐱1,,𝐱16{\bf x},{\bf x}_{1},\ldots,{\bf x}_{16} are pairwisely disjoint. By the upper bound of M(p)M(p) in (1), the collection 𝒞={𝐱,𝐱1,,𝐱16}\mathcal{C}=\{{\bf x},{\bf x}_{1},\ldots,{\bf x}_{16}\} forms an optimal CAC which consists of 11 nonequi-difference codeword and 1616 equi-difference codewords. If we choose a=6a=6, b=5b=5 and c=11c=11 such that a+b=ca+b=c, then 𝐱={0,6,11}{\bf x}=\{0,6,11\} and Δ(𝐱)={±6,±5,±11}\Delta({\bf x})=\{\pm 6,\pm 5,\pm 11\}. The same procedure will lead to another 1616 equi-difference codewords. Different choices of a,b,ca,b,c will give different optimal CACs.

The authors of [MZS14] independently give a similar thought to the existence of the triples (Ai,Bi,Ci)(A_{i},B_{i},C_{i}) in Conjecture A in terms of the group structure of the quotient group p×/1,2\mathbb{Z}_{p}^{\times}/\langle-1,2\rangle. They notice that p×/1,2\mathbb{Z}_{p}^{\times}/\langle-1,2\rangle is a cyclic group because p×\mathbb{Z}_{p}^{\times} is cyclic.

Conjecture B ([MZS14, Conjecture]).

Let pp be an odd prime. If [p×:1,2]3\left[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle\right]\geq 3, then there is a generator t1,2t\langle-1,2\rangle of the cyclic group p×/1,2\mathbb{Z}_{p}^{\times}/\langle-1,2\rangle for some tp×t\in\mathbb{Z}_{p}^{\times} such that

1+b=c1+b=c

for some bt1,2b\in t\langle-1,2\rangle and ct21,2c\in t^{2}\langle-1,2\rangle.

Note that [p×:1,2]3\left[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle\right]\geq 3 implies either O(p)=0O(p)=0 or O(p)3O(p)\geq 3. Moreover, if Conjecture B holds for a prime pp, then one can set A1=t01,2A_{1}=t^{0}\langle-1,2\rangle, B1=t11,2B_{1}=t^{1}\langle-1,2\rangle, C1=t21,2C_{1}=t^{2}\langle-1,2\rangle, A2=t31,2A_{2}=t^{3}\langle-1,2\rangle, B2=t41,2B_{2}=t^{4}\langle-1,2\rangle, C2=t51,2C_{2}=t^{5}\langle-1,2\rangle and so on to obtain t3i+t3ib=t3ict^{3i}+t^{3i}b=t^{3i}c for each ii where (t3i,t3ib,t3ic)Ai×Bi×Ci(t^{3i},t^{3i}b,t^{3i}c)\in A_{i}\times B_{i}\times C_{i}. Hence, Conjecture B implies Conjecture A. For the previous example that p=73p=73, tt can be chosen as 55. Then b=5b=5, c=6521,2c=6\in 5^{2}\langle-1,2\rangle and 1+5=61+5=6 in p\mathbb{Z}_{p}. Moreover, pp is not assumed to be non-Wieferich. In [MZS14], the authors have checked in computer that Conjecture B holds for prime p230p\leq 2^{30}.

The motivation of this article is to study Conjecture B. Throughout this article, we denote

=[p×:1,2]=|p×/1,2|\ell=\left[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle\right]=\left|\mathbb{Z}_{p}^{\times}/\langle-1,2\rangle\right|

for a given prime pp. The existence of bb and cc in Conjecture B is strongly related to the so-called cyclotomic numbers A(i,j)A(i,j) of order \ell with respect to a primitive root where i,ji,j are integers. In particular, both bb and cc exist if and only if A(i,2i)0A(i,2i)\neq 0 for certain ii. More precisely, Conjecture B is equivalent to the following statement. See Section 2 for detail.

Conjecture.

Let pp be an odd prime and let =[p×:1,2]\ell=\left[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle\right]. If 3\ell\geq 3, then A(i,2i)0A(i,2i)\neq 0 for some 1i11\leq i\leq\ell-1 with (i,)=1(i,\ell)=1.

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 A(i,2i)0A(i,2i)\neq 0 because it is difficult either to find a suitable Diophantine system or to write down the formulas of cyclotomic numbers when \ell 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 pp be an odd prime and let =[p×:1,2]\ell=[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle]. If \ell is an odd prime, then A(i,2i)0A(i,2i)\neq 0 for some 1i11\leq i\leq\ell-1 with (i,)=1(i,\ell)=1.

This not only answers Conjecture B but Conjecture A for a class of primes pp. Moreover, the size M(p)M(p) of optimal CAC can be determined as follows, while O(p)=O(p)=\ell if 4op(2)4\nmid o_{p}(2).

Theorem B.

Let pp be an odd prime with 4op(2)4\nmid o_{p}(2). If =[p×:1,2]\ell=[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle] is an odd prime, then an optimal conflict-avoiding code of length pp and weight 33 has the size

p124+3.\frac{p-1-2\ell}{4}+\left\lfloor\frac{\ell}{3}\right\rfloor.

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 \ell. In Section 4, we will see that the number of squares in a certain subset of p\mathbb{Z}_{p} 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 \ell.

2. Preliminaries

In this article, pp is an odd prime and p\mathbb{Z}_{p} is the finite field of pp elements. Throughout this article, we denote

L=1,2L=\langle-1,2\rangle

the subgroup of p×=p{0}\mathbb{Z}_{p}^{\times}=\mathbb{Z}_{p}\setminus\{0\} generated by 1-1 and 22, and then =[p×:L]\ell=\left[\mathbb{Z}_{p}^{\times}:L\right] is the index of LL in p×\mathbb{Z}_{p}^{\times}. We always assume

3.\ell\geq 3.

A generator of p×\mathbb{Z}_{p}^{\times} is also called a primitive root of p\mathbb{Z}_{p}. Fix a primitive root gg. Define the number

A(i,j)=|{(m,n)0m,np11 and 1+gi+m=gj+n}|A(i,j)=\left|\left\{(m,n)\mid 0\leq m,n\leq\frac{p-1}{\ell}-1\text{ and }1+g^{i+m\ell}=g^{j+n\ell}\right\}\right|

for i,ji,j\in\mathbb{Z}. These numbers A(i,j)A(i,j) are called cyclotomic numbers of order \ell with respect to gg. We can rewrite A(i,j)A(i,j) as follows. Note that |L|=p1|L|=\frac{p-1}{\ell} and LL consists of all \ell-th power of elements of p×\mathbb{Z}_{p}^{\times}. Thus, both gm,gnLg^{m\ell},g^{n\ell}\in L for 0m,n|L|10\leq m,n\leq|L|-1. It follows that

A(i,j)=|(1+giL)gjL|A(i,j)=\left|(1+g^{i}L)\cap g^{j}L\right|

for i,ji,j\in\mathbb{Z}. If ii^{\prime} and jj^{\prime} are integers such that ii(mod)i^{\prime}\equiv i\pmod{\ell} and jj(mod)j^{\prime}\equiv j\pmod{\ell}, then giL=giLg^{i^{\prime}}L=g^{i}L and gjL=gjLg^{j^{\prime}}L=g^{j}L. We have A(i,j)=A(i,j)A(i^{\prime},j^{\prime})=A(i,j). Hence, it is convenient to consider i,ji,j modulo \ell.

As gg is a primitive root and =[p×:L]\ell=\left[\mathbb{Z}_{p}^{\times}:L\right], the quotient group p×/L\mathbb{Z}_{p}^{\times}/L consists of elements g0L=L,g1L,,g1Lg^{0}L=L,g^{1}L,\ldots,g^{\ell-1}L. In particular, the set

{giL1i and (i,)=1}\left\{g^{i}L\mid 1\leq i\leq\ell\text{ and }(i,\ell)=1\right\}

is a complete set of generators of p×/L\mathbb{Z}_{p}^{\times}/L where (,)(\cdot,\cdot) denotes the greatest common divisor of two given integers. Let tp×t\in\mathbb{Z}_{p}^{\times}. Then tLtL generates p×/L\mathbb{Z}_{p}^{\times}/L if and only if tL=giLtL=g^{i}L for some 1i1\leq i\leq\ell with (i,)=1(i,\ell)=1. Moreover,

|(1+tL)t2L|=|(1+giL)g2iL|=A(i,2i).\left|(1+tL)\cap t^{2}L\right|=\left|(1+g^{i}L)\cap g^{2i}L\right|=A(i,2i).

Thus, Conjecture B holds for pp if and only if A(i,2i)0A(i,2i)\neq 0 for some 1i1\leq i\leq\ell with (i,)=1(i,\ell)=1. Because each A(i,2i)A(i,2i) is nonnegative, it is enough to consider the following sum

s()=1i,(i,)=1A(i,2i).s(\ell)=\sum_{\begin{subarray}{c}1\leq i\leq\ell,\\ (i,\ell)=1\end{subarray}}A(i,2i).

The argument above actually shows the following lemma.

Lemma 2.1.

Let pp and \ell be as above. Then s()0s(\ell)\neq 0 if and only if Conjecture B holds for this pp.

The sum s()s(\ell) is defined with respect to a given primitive root gg. In fact, we can freely compute s()s(\ell) 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 s()s(\ell) is independent on the choices of primitive roots.

Proof.

Let hh be a primitive root of p\mathbb{Z}_{p}. Denote A(i,j)=|(1+hiL)hjL|A^{\prime}(i,j)=|(1+h^{i}L)\cap h^{j}L| and s()s^{\prime}(\ell) the sum of A(i,2i)A^{\prime}\left(i,2i\right) for i=1,,i=1,\ldots,\ell with (i,)=1(i,\ell)=1. Since hLhL also generates p×/L\mathbb{Z}_{p}^{\times}/L, hL=gkLhL=g^{k}L for some 1k1\leq k\leq\ell with (k,)=1(k,\ell)=1. Then hiL=gkiLh^{i}L=g^{ki}L and thus A(i,j)=A(ki,kj)A^{\prime}(i,j)=A(ki,kj) for i,ji,j\in\mathbb{Z}. Recall that {1i(i,)=1}\{1\leq i\leq\ell\mid(i,\ell)=1\} is a reduced residue system modulo \ell. Since (k,)=1(k,\ell)=1, it follows that {ki1i and (i,)=1}\{ki\mid 1\leq i\leq\ell\text{ and }(i,\ell)=1\} is also a reduced residue system modulo \ell. Thus,

s()=1i,(i,)=1A(i,2i)=1i,(i,)=1A(ki,k(2i))=1i,(i,)=1A(i,2i)=s().s^{\prime}(\ell)=\sum_{\begin{subarray}{c}1\leq i\leq\ell,\\ (i,\ell)=1\end{subarray}}A^{\prime}(i,2i)=\sum_{\begin{subarray}{c}1\leq i\leq\ell,\\ (i,\ell)=1\end{subarray}}A\left(ki,k(2i)\right)=\sum_{\begin{subarray}{c}1\leq i\leq\ell,\\ (i,\ell)=1\end{subarray}}A(i,2i)=s(\ell).

As we have mentioned, one of main problems on the theory of cyclotomic numbers is to find explicit formulas for all A(i,j)A(i,j) in terms of solutions of certain Diophantine systems. For example, consider p1(mod3)p\equiv 1\pmod{3} such that =3\ell=3. It is well-known that the Diophantine system

{4p=X2+27Y2,X1(mod3)\left\{\begin{array}[]{c}4p=X^{2}+27Y^{2},\\ X\equiv 1\pmod{3}\end{array}\right.

has a solution (a,b)(a,b) with unique aa, where p<a<p-p<a<p. [Gau01, Section 358] gives that

A(0,0)=19(p8+a),A(0,0)=\frac{1}{9}(p-8+a),
A(0,1)=A(1,0)=A(2,2)=118(2p4a+9b),A(0,1)=A(1,0)=A(2,2)=\frac{1}{18}(2p-4-a+9b),
A(0,2)=A(1,1)=A(2,0)=118(2p4a9b),A(0,2)=A(1,1)=A(2,0)=\frac{1}{18}(2p-4-a-9b),
A(1,2)=A(2,1)=19(p+1+a)A(1,2)=A(2,1)=\frac{1}{9}(p+1+a)

where the sign of bb depends of the choices of primitive roots. In this case, A(1,2)=A(2,1)>0A(1,2)=A(2,1)>0 and thus

s(3)=A(1,2)+A(2,4)=A(1,2)+A(2,1)>0,s(3)=A(1,2)+A(2,4)=A(1,2)+A(2,1)>0,

while A(2,4)=A(2,1)A(2,4)=A(2,1) because 41(mod)4\equiv 1\pmod{\ell}. However, the formulas for large \ell will be extremely complicated and hard to find. For instance, the formulas for =11\ell=11 are presented in [LW75]. But it is not obvious whether s(11)0s(11)\neq 0 or not for p1(mod11)p\equiv 1\pmod{11}. See also Example 4.5.

We deduce the following useful properties.

Lemma 2.3.

For i,ji,j modulo \ell,

A(i,j)=A(i,ji)andA(i,j)=A(j,i).A(i,j)=A(-i,j-i)\quad\text{and}\quad A(i,j)=A(j,i).
Proof.

For α(1+giL)gjL\alpha\in(1+g^{i}L)\cap g^{j}L, write α=1+gia=gjb\alpha=1+g^{i}a=g^{j}b for some a,bLa,b\in L. One has 1+(α1)1=1+gia11+giL1+(\alpha-1)^{-1}=1+g^{-i}a^{-1}\in 1+g^{-i}L. Moreover, 1+(α1)1=(gia+1)gia1=(gjb)(gia1)=gji(ba1)gjiL1+(\alpha-1)^{-1}=(g^{i}a+1)g^{-i}a^{-1}=(g^{j}b)(g^{-i}a^{-1})=g^{j-i}(ba^{-1})\in g^{j-i}L. This gives a map φ\varphi from (1+giL)gjL(1+g^{i}L)\cap g^{j}L into (1+giL)gjiL(1+g^{-i}L)\cap g^{j-i}L given by φ(α)=1+(α1)1\varphi(\alpha)=1+(\alpha-1)^{-1}. One can deduce that φ\varphi is a bijection. Hence, the first equality holds.

For the second equality, observe that 1α=1+gj(b)=gi(a)(1+gjL)giL1-\alpha=1+g^{j}(-b)=g^{i}(-a)\in(1+g^{j}L)\cap g^{i}L as 1L-1\in L. Then α1α\alpha\mapsto 1-\alpha gives a bijection from (1+giL)gjL(1+g^{i}L)\cap g^{j}L onto (1+gjL)giL(1+g^{j}L)\cap g^{i}L. ∎

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 \ell.

For a given primitive root of p\mathbb{Z}_{p}, the cyclotomic matrix is an \ell-by-\ell matrix defined as follows

(A(i,j))×for i,j=0,1,,1.(A(i,j))_{\ell\times\ell}\quad\text{for }i,j=0,1,\ldots,\ell-1.

It is convenient to give a variation of the cyclotomic matrix. We define the extended cyclotomic matrix B=(bi,j)×B=(b_{i,j})_{\ell\times\ell} as follows

bi,j={A(0,0)+1if i=j=0;A(i,j)otherwise.b_{i,j}=\left\{\begin{array}[]{ll}A(0,0)+1&\text{if $i=j=0$;}\\ A(i,j)&\text{otherwise}.\end{array}\right.

For i,ji,j modulo \ell, Lemma 2.3 gives the relation for entries:

(2) bi,j=bi,ji=bji,i=bij,j=bj,ij=bj,i.\displaystyle b_{i,j}=b_{-i,j-i}=b_{j-i,-i}=b_{i-j,-j}=b_{-j,i-j}=b_{j,i}.

For convenience, the row (bi,0,bi,1,,bi,1)(b_{i,0},b_{i,1},\ldots,b_{i,\ell-1}) of BB is said to be indexed by ii for i=0,,1i=0,\ldots,\ell-1. This matrix BB has following nice properties.

Lemma 3.1.

Let BB be the extended cyclotomic matrix as above.

  1. (i)

    BB is symmetric with nonnegative integer entries and b0,0>0b_{0,0}>0.

  2. (ii)

    The diagonal entries after b0,0b_{0,0} is the reverse of the row indexed by 0:

    (b1,1,b2,2,,b1,1)=(b0,1,b0,2,,b0,1).(b_{1,1},b_{2,2},\ldots,b_{\ell-1,\ell-1})=(b_{0,\ell-1},b_{0,\ell-2},\ldots,b_{0,1}).
  3. (iii)

    For 1i11\leq i\leq\ell-1, the row indexed by i\ell-i is shifted ii times to the left by the row indexed by ii:

    (bi,0,bi,1,,bi,1)=(bi,i,bi,i+1,,bi,1,bi,0,,bi,i1)(b_{\ell-i,0},b_{\ell-i,1},\ldots,b_{\ell-i,\ell-1})=(b_{i,i},b_{i,i+1},\ldots,b_{i,\ell-1},b_{i,0},\ldots,b_{i,i-1})
  4. (iv)

    The trace, the sum of each row and the sum of each column are all |L|=p1|L|=\frac{p-1}{\ell}.

Proof.

(i), (ii) and (iii) are obvious from (2) that bi,j=bj,ib_{i,j}=b_{j,i}, bi,i=b0,ib_{i,i}=b_{0,\ell-i} and bi,j=bi,j+ib_{\ell-i,j}=b_{i,j+i}.

For (iv), let gg be the given primitive root. Then the group p×\mathbb{Z}_{p}^{\times} is the disjoint union of g0L,g1L,,g1Lg^{0}L,g^{1}L,\ldots,g^{\ell-1}L. Since 11+L1\not\in 1+L, the sum of row indexed by 0 is

j=01b0,j=1+j=01A(0,j)=1+j=01|(1+L)gjL|=1+|(1+L)p×|=|L|.\sum_{j=0}^{\ell-1}b_{0,j}=1+\sum_{j=0}^{\ell-1}A(0,j)=1+\sum_{j=0}^{\ell-1}\left|(1+L)\cap g^{j}L\right|=1+\left|(1+L)\cap\mathbb{Z}_{p}^{\times}\right|=|L|.

Moreover, the sum of row indexed by ii for i0i\neq 0 is

j=01bi,j=j=01A(i,j)=j=01|(1+giL)gjL|=|(1+giL)p×|=|L|.\sum_{j=0}^{\ell-1}b_{i,j}=\sum_{j=0}^{\ell-1}A(i,j)=\sum_{j=0}^{\ell-1}\left|(1+g^{i}L)\cap g^{j}L\right|=\left|(1+g^{i}L)\cap\mathbb{Z}_{p}^{\times}\right|=|L|.

The trace of BB is also |L||L| by (ii). Finally, the sum of each column is |L||L| by (i). ∎

Recall the sum s()s(\ell) and we have

s()=1i,(i,)=1bi,2i.s(\ell)=\sum_{\begin{subarray}{c}1\leq i\leq\ell,\\ (i,\ell)=1\end{subarray}}b_{i,2i}.

The relations (2) and Lemma 3.1 lead us to answer that s()>0s(\ell)>0 for small \ell.

Proposition 3.2.

For =3,4,5\ell=3,4,5, we have s()>0s(\ell)>0.

Proof.

Using (2) and (i), (ii), (iii) of Lemma 3.1, we make the matrix BB less complicated. For convenience, we denote rir_{i} by the row indexed by ii.

For =3\ell=3,

B=(b0,0b0,1b0,2b1,0b1,1b1,2b2,0b2,1b2,2).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}\\ b_{1,0}&b_{1,1}&b_{1,2}\\ b_{2,0}&b_{2,1}&b_{2,2}\end{matrix}\right).

By symmetry, b1,0=b0,1b_{1,0}=b_{0,1}, b2,0=b0,2b_{2,0}=b_{0,2} and b2,1=b1,2b_{2,1}=b_{1,2}. By Lemma 3.1(ii), (b1,1,b2,2)=(b0,2,b0,1)(b_{1,1},b_{2,2})=(b_{0,2},b_{0,1}). Thus,

B=(b0,0b0,1b0,2b0,1b0,2b1,2b0,2b1,2b0,1).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}\\ b_{0,1}&b_{0,2}&b_{1,2}\\ b_{0,2}&b_{1,2}&b_{0,1}\end{matrix}\right).

By Lemma 3.1(iv), the sums of r0r_{0} and r1r_{1} are equal. We have b0,0=b1,2b_{0,0}=b_{1,2}. We obtain s(3)=b1,2+b2,4b1,2=b0,0>0.s(3)=b_{1,2}+b_{2,4}\geq b_{1,2}=b_{0,0}>0.

For =4\ell=4,

B=(b0,0b0,1b0,2b0,3b1,0b1,1b1,2b1,3b2,0b2,1b2,2b2,3b3,0b3,1b3,2b3,3).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}&b_{0,3}\\ b_{1,0}&b_{1,1}&b_{1,2}&b_{1,3}\\ b_{2,0}&b_{2,1}&b_{2,2}&b_{2,3}\\ b_{3,0}&b_{3,1}&b_{3,2}&b_{3,3}\end{matrix}\right).

By Lemma 3.1(ii), b1,1=b0,3b_{1,1}=b_{0,3}. By (2), we can deduce that b1,3=b1,2b_{1,3}=b_{1,2}. So r1r_{1} becomes (b1,0,b0,3,b1,2,b1,2)(b_{1,0},b_{0,3},b_{1,2},b_{1,2}). According to Lemma 3.1(iii), r2r_{2} satisfies (b2,0,b2,1,b2,2,b2,3)=(b2,2,b2,3,b2,0,b2,1)(b_{2,0},b_{2,1},b_{2,2},b_{2,3})=(b_{2,2},b_{2,3},b_{2,0},b_{2,1}) and then it is (b2,0,b2,1,b2,0,b2,1)(b_{2,0},b_{2,1},b_{2,0},b_{2,1}). Moreover, r3=(b0,3,b1,2,b1,2,b1,0)r_{3}=(b_{0,3},b_{1,2},b_{1,2},b_{1,0}) by a shifting of r1r_{1}. Thus, by symmetry, we have

B=(b0,0b0,1b0,2b0,3b0,1b0,3b1,2b1,2b0,2b1,2b0,2b1,2b0,3b1,2b1,2b0,1).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}&b_{0,3}\\ b_{0,1}&b_{0,3}&b_{1,2}&b_{1,2}\\ b_{0,2}&b_{1,2}&b_{0,2}&b_{1,2}\\ b_{0,3}&b_{1,2}&b_{1,2}&b_{0,1}\end{matrix}\right).

Suppose that s(4)=b1,2+b3,2=0s(4)=b_{1,2}+b_{3,2}=0. Then b1,2=0b_{1,2}=0 and

B=(b0,0b0,1b0,2b0,3b0,1b0,300b0,20b0,20b0,300b0,1).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}&b_{0,3}\\ b_{0,1}&b_{0,3}&0&0\\ b_{0,2}&0&b_{0,2}&0\\ b_{0,3}&0&0&b_{0,1}\end{matrix}\right).

By Lemma 3.1(iv), the sums of r0r_{0} and r1r_{1} are equal. We obtain b0,0=0b_{0,0}=0. This contradicts to b0,0>0b_{0,0}>0. Thus, s(4)0s(4)\neq 0.

For =5\ell=5,

B=(b0,0b0,1b0,2b0,3b0,4b1,0b1,1b1,2b1,3b1,4b2,0b2,1b2,2b2,3b2,4b3,0b3,1b3,2b3,3b3,4b4,0b4,1b4,2b4,3b4,4).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}&b_{0,3}&b_{0,4}\\ b_{1,0}&b_{1,1}&b_{1,2}&b_{1,3}&b_{1,4}\\ b_{2,0}&b_{2,1}&b_{2,2}&b_{2,3}&b_{2,4}\\ b_{3,0}&b_{3,1}&b_{3,2}&b_{3,3}&b_{3,4}\\ b_{4,0}&b_{4,1}&b_{4,2}&b_{4,3}&b_{4,4}\end{matrix}\right).

By Lemma 3.1(ii), b1,1=b0,4b_{1,1}=b_{0,4} and b2,2=b0,3b_{2,2}=b_{0,3}. By (2), we can deduce that b1,4=b1,2b_{1,4}=b_{1,2} and b2,3=b2,4=b1,3b_{2,3}=b_{2,4}=b_{1,3}. Thus, r1=(b1,0,b0,4,b1,2,b1,3,b1,2)r_{1}=(b_{1,0},b_{0,4},b_{1,2},b_{1,3},b_{1,2}) and r2=(b2,0,b2,1,b0,3,b1,3,b1,3)r_{2}=(b_{2,0},b_{2,1},b_{0,3},b_{1,3},b_{1,3}). By Lemma 3.1(iii), r3=(b0,3,b1,3,b1,3,b2,0,b2,1r_{3}=(b_{0,3},b_{1,3},b_{1,3},b_{2,0},b_{2,1} and r4=(b0,4,b1,2,b1,3,b1,2,b1,0)r_{4}=(b_{0,4},b_{1,2},b_{1,3},b_{1,2},b_{1,0}) by shifting r2r_{2} and r1r_{1}, respectively. Hence, by symmetry, we have

B=(b0,0b0,1b0,2b0,3b0,4b0,1b0,4b1,2b1,3b1,2b0,2b1,2b0,3b1,3b1,3b0,3b1,3b1,3b0,2b1,2b0,4b1,2b1,3b1,2b0,1).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}&b_{0,3}&b_{0,4}\\ b_{0,1}&b_{0,4}&b_{1,2}&b_{1,3}&b_{1,2}\\ b_{0,2}&b_{1,2}&b_{0,3}&b_{1,3}&b_{1,3}\\ b_{0,3}&b_{1,3}&b_{1,3}&b_{0,2}&b_{1,2}\\ b_{0,4}&b_{1,2}&b_{1,3}&b_{1,2}&b_{0,1}\end{matrix}\right).

Suppose that s(5)=b1,2+b2,4+b3,1+b4,3=0s(5)=b_{1,2}+b_{2,4}+b_{3,1}+b_{4,3}=0. Then b1,2=b1,3=0b_{1,2}=b_{1,3}=0 and we have

B=(b0,0b0,1b0,2b0,3b0,4b0,1b0,4000b0,20b0,300b0,300b0,20b0,4000b01).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}&b_{0,3}&b_{0,4}\\ b_{0,1}&b_{0,4}&0&0&0\\ b_{0,2}&0&b_{0,3}&0&0\\ b_{0,3}&0&0&b_{0,2}&0\\ b_{0,4}&0&0&0&b_{01}\end{matrix}\right).

By Lemma 3.1(iv), the sums of r0r_{0} and r1r_{1} are equal. We obtain b0,0=0b_{0,0}=0, a contradiction. Thus, s(5)0s(5)\neq 0. ∎

According to Lemma 2.1, a prime pp will satisfy Conjecture B, as well as Conjecture A, if s()0s(\ell)\neq 0. Thus we have the following conclusion on the size of optimal CAC.

Corollary 3.3.

Let pp be an odd prime such that 4op(2)4\nmid o_{p}(2). If =[p×:1,2]=3,4,5\ell=\left[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle\right]=3,4,5, then the size of optimal conflict-avoiding codes of length pp and weight 33 is p124+1\frac{p-1-2\ell}{4}+1.

Corollary 3.3 is also known in [MZS14, Corollary 4.8] in a different method. When 6\ell\geq 6, the above approach is not enough to check whether s()0s(\ell)\neq 0. In the next section, we discover more properties on s()s(\ell).

4. The number of squares

In the previous section, we have seen that the sum s()s(\ell) of particular cyclotomic numbers actually answers Conjecture A and B for some \ell. In this section, we will see how s()s(\ell) connects to squares of p\mathbb{Z}_{p} and answer both conjectures for more \ell. First of all, let us back to the equation 1+b=c1+b=c in Conjecture B where btLb\in tL and ct2Lc\in t^{2}L for tp×t\in\mathbb{Z}_{p}^{\times} such that p×/L=tL\mathbb{Z}_{p}^{\times}/L=\langle tL\rangle. In this case, (1+tL)t2L(1+tL)\cap t^{2}L is nonempty. Write b=tβb=t\beta and c=t2γc=t^{2}\gamma for β,γL\beta,\gamma\in L. It gives t2γtβ1=0t^{2}\gamma-t\beta-1=0. Viewing the equation as a quadratic polynomial in tt, the discriminant provides that β2+4γ\beta^{2}+4\gamma is a square. Equivalently, 1+4β2γ1+4\beta^{-2}\gamma is a square. Since 2L2\in L, it follows that 1+4β2γ1+4\beta^{-2}\gamma is a square in LL. This leads us to think of squares in 1+L1+L. In general, if 1+α1+\alpha is a square for αL\alpha\in L, namely 1+α=(s1)21+\alpha=(s-1)^{2} for some sp×s\in\mathbb{Z}_{p}^{\times}, then we have 1+s(2α1)=s2α11+s(2\alpha^{-1})=s^{2}\alpha^{-1} which gives an element of (1+sL)s2L(1+sL)\cap s^{2}L because 2α1,α1L2\alpha^{-1},\alpha^{-1}\in L. Note that sL=giLsL=g^{i}L for some 0i10\leq i\leq\ell-1 where gg is a given primitive root. It follows that A(i,2i)0A(i,2i)\neq 0. Consequently, every square of 1+L1+L (if exists) leads to a nonzero cyclotomic number A(i,2i)A(i,2i) for some 0i10\leq i\leq\ell-1. We will see A(i,2i)0A(i,2i)\neq 0 for some i0i\neq 0. It follows that s()0s(\ell)\neq 0 when \ell is prime.

Given a primitive root gg of p\mathbb{Z}_{p}, we generally consider squares in 1+gkL1+g^{k}L for 0k10\leq k\leq\ell-1. Fix kk and let rpr\in\mathbb{Z}_{p} such that r21+gkLr^{2}\in 1+g^{k}L. Then r21gkLr^{2}-1\in g^{k}L. Observe that r21=(r1)(r+1)r^{2}-1=(r-1)(r+1) and r±1r\neq\pm 1 since 0gkL0\not\in g^{k}L. Thus, r1giLr-1\in g^{i}L and r+1gjLr+1\in g^{j}L for some i,ji,j satisfying i+jk(mod)i+j\equiv k\pmod{\ell} as (giL)(gjL)=gkL(g^{i}L)(g^{j}L)=g^{k}L. In particular, r(1+giL)(1+gjL)r\in(1+g^{i}L)\cap(-1+g^{j}L). Conversely, if r(1+giL)(1+gjL)r^{\prime}\in(1+g^{i}L)\cap(-1+g^{j}L) and i+jk(mod)i+j\equiv k\pmod{\ell}, then we have r21+gkL{r^{\prime}}^{2}\in 1+g^{k}L. Let

R(i,j)=(1+giL)(1+gjL)R(i,j)=(1+g^{i}L)\cap(-1+g^{j}L)

for integers i,ji,j and let SkS_{k} be the set of squares of 1+gkL1+g^{k}L. The discussion above provides a surjective map

fk:0i,j1,i+jk(mod )R(i,j)Skrr2.\begin{array}[]{cccc}f_{k}:&\displaystyle\bigcup_{\begin{subarray}{c}0\leq i,j\leq\ell-1,\\ i+j\equiv k\;(\text{mod }\ell)\end{subarray}}R(i,j)&\to&S_{k}\\ &r&\mapsto&r^{2}.\end{array}
Lemma 4.1.

Let R(i,j)R(i,j) be as above.

  1. (i)

    For 0i,i,j,j10\leq i,i^{\prime},j,j^{\prime}\leq\ell-1, if either iii\neq i^{\prime} or jjj\neq j^{\prime}, then R(i,j)R(i,j)=R(i,j)\cap R(i^{\prime},j^{\prime})=\varnothing. Thus, the domain of fkf_{k} is a disjoint union of R(i,j)R(i,j).

  2. (ii)

    For i,ji,j modulo \ell, |R(i,j)|=A(i,j).|R(i,j)|=A(i,j).

Proof.

For (i), when iii\neq i^{\prime}, one has (1+giL)(1+giL)=(1+g^{i}L)\cap(1+g^{i^{\prime}}L)=\varnothing because giLgiL=g^{i}L\cap g^{i^{\prime}}L=\varnothing. Similarly, when jjj\neq j^{\prime}, one also has (1+gjL)(1+gjL)=(-1+g^{j}L)\cap(-1+g^{j^{\prime}}L)=\varnothing. The result follows.

For (ii), consider the map

ψ:R(i,j)(1+giL)gjLr21(1+r).\begin{array}[]{cccc}\psi:&R(i,j)&\to&(1+g^{i}L)\cap g^{j}L\\ &r&\mapsto&2^{-1}(1+r).\end{array}

It is easy to see that ψ\psi is injective. For every s(1+giL)gjLs\in(1+g^{i}L)\cap g^{j}L, 1+2sT(i,j)-1+2s\in T(i,j) since 2L2\in L. Moreover, ψ(1+2s)=s\psi(-1+2s)=s. Hence, ψ\psi is a bijection and the result follows by the definition of A(i,j)A(i,j). ∎

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 1+L1+L is

12+12i=01A(i,i).\frac{1}{2}+\frac{1}{2}\sum_{i=0}^{\ell-1}A(i,-i).

For 1k11\leq k\leq\ell-1, the number of squares of 1+gkL1+g^{k}L is

12i=01A(i,ki).\frac{1}{2}\sum_{i=0}^{\ell-1}A(i,k-i).
Proof.

Let R(i,j)R(i,j), SkS_{k} and fkf_{k} be as above. Note that if 0R(i,j)0\in R(i,j), then 01+giL0\in 1+g^{i}L and 01+gjL0\in-1+g^{j}L. As 1,1L1,-1\in L, we deduce that 0R(i,j)0\in R(i,j) if and only if i=j=0i=j=0. Recall from Lemma 4.1(i) that the domain of fkf_{k} is a disjoint union of R(i,j)R(i,j) for 0i,j10\leq i,j\leq\ell-1 and i+jk(mod)i+j\equiv k\pmod{\ell}. We discuss into two cases that i=ji=j and iji\neq j.

Case 1: i=ji=j. Clearly, we have R(i,i)=R(i,i)R(i,i)=-R(i,i). Moreover, fk(r)=r2=fk(r)f_{k}(r)=r^{2}=f_{k}(-r). Thus, the restriction of fkf_{k} to R(i,i){0}R(i,i)\setminus\{0\} is two-to-one. If 0R(i,i)0\in R(i,i), then i=0i=0 and this holds only for k=0k=0. So the image of R(i,i)R(i,i) under f0f_{0} has the size 12+12A(0,0)\frac{1}{2}+\frac{1}{2}A(0,0) if i=0i=0 and the size 12A(i,i)\frac{1}{2}A(i,i) if i0i\neq 0. For k=1,,1k=1,\ldots,\ell-1, the image of R(i,i)R(i,i) under fkf_{k} has the size 12A(i,i)\frac{1}{2}A(i,i).

Case 2: iji\neq j. In this case, R(i,j)R(j,i)R(i,j)\neq R(j,i) and R(j,i)=R(i,j)R(j,i)=-R(i,j). Thus, the restriction of fkf_{k} to R(i,j)R(j,i)R(i,j)\cup R(j,i) is also two-to-one. It follows that the image of R(i,j)R(j,i)R(i,j)\cup R(j,i) under fkf_{k} has the size 12(A(i,j)+A(j,i))\frac{1}{2}(A(i,j)+A(j,i)).

Since fkf_{k} is surjective, Case 1 and 2 lead to

|S0|=12+120i,j1,i+j0(mod )A(i,j)and|Sk|=120i,j1,i+jk(mod )A(i,j)|S_{0}|=\frac{1}{2}+\frac{1}{2}\sum_{\begin{subarray}{c}0\leq i,j\leq\ell-1,\\ i+j\equiv 0\;(\text{mod }\ell)\end{subarray}}A(i,j)\quad\text{and}\quad|S_{k}|=\frac{1}{2}\sum_{\begin{subarray}{c}0\leq i,j\leq\ell-1,\\ i+j\equiv k\;(\text{mod }\ell)\end{subarray}}A(i,j)

for k=1,,1k=1,\ldots,\ell-1. Finally, each ii leads to a unique jj such that jki(mod)j\equiv k-i\pmod{\ell}. The proof is completed. ∎

Example 4.3.

Let p=31p=31. Then L={±1,±2,±22,±23,±24}L=\{\pm 1,\pm 2,\pm 2^{2},\pm 2^{3},\pm 2^{4}\} and =3\ell=3. Choose g=3g=3 a primitive root. Then the sets SkS_{k} of squares of 1+gkL1+g^{k}L are as follows:

S0={0,2,5,9,16,28},S1={4,7,8,18,20,25},S2={10,14,19}.S_{0}=\{0,2,5,9,16,28\},\quad S_{1}=\{4,7,8,18,20,25\},\quad S_{2}=\{10,14,19\}.

On the other hand, the cyclotomic matrix (Section 3) is

(A(0,0)A(0,1)A(0,2)A(1,0)A(1,1)A(1,2)A(2,0)A(2,1)A(2,2))=(342424244).\left(\begin{matrix}A(0,0)&A(0,1)&A(0,2)\\ A(1,0)&A(1,1)&A(1,2)\\ A(2,0)&A(2,1)&A(2,2)\end{matrix}\right)=\left(\begin{matrix}3&4&2\\ 4&2&4\\ 2&4&4\end{matrix}\right).

Indeed, |S0|=12+12(A(0,0)+A(1,2)+A(2,1))|S_{0}|=\frac{1}{2}+\frac{1}{2}(A(0,0)+A(1,2)+A(2,1)), |S1|=12(A(0,1)+A(1,0)+A(2,2))|S_{1}|=\frac{1}{2}(A(0,1)+A(1,0)+A(2,2)) and |S2|=12(A(0,2)+A(1,1)+A(2,0))|S_{2}|=\frac{1}{2}(A(0,2)+A(1,1)+A(2,0)).

Let us concentrate on 1+L1+L. According to Lemma 2.3, A(i,i)=A(i,i)=A(i,2i)A(i,-i)=A(-i,i)=A(i,2i). Thus, the number of squares of 1+L1+L is also

12+12i=01A(i,2i).\frac{1}{2}+\frac{1}{2}\sum_{i=0}^{\ell-1}A(i,2i).

Recall that

s()=1i,(i,)=1A(i,2i).s(\ell)=\sum_{\begin{subarray}{c}1\leq i\leq\ell,\\ (i,\ell)=1\end{subarray}}A(i,2i).

We have the following conclusion.

Proposition 4.4.

If \ell is an odd prime, then the number of squares of 1+L1+L is 12(1+A(0,0)+s())\frac{1}{2}(1+A(0,0)+s(\ell)).

Note that 1+L1+L contains at least one square, says 0. When \ell is an odd prime, Proposition 4.4 provides that we will have s()0s(\ell)\neq 0 if A(0,0)A(0,0) is small enough compared to the number of squares of 1+L1+L. Let us see an example below.

Example 4.5.

Let p=331p=331. Then |L|=30|L|=30 and =11\ell=11. One can check that A(0,0)=|(1+L)L|=5A(0,0)=|(1+L)\cap L|=5. Thus, 1+L1+L has 3+s(11)23+\frac{s(11)}{2} squares by Proposition 4.4. Note that 1+L1+L contains at least 44 squares such as 0, 1+4=23321+4=233^{2}, 14=6321-4=63^{2} and 1+8=321+8=3^{2}. We have s(11)0s(11)\neq 0. Indeed, if we pick a primitive root g=3g=3, then one can compute A(1,2)=3A(1,2)=3. This also illustrates s(11)0s(11)\neq 0 since it is independent on the choices of primitive roots by Lemma 2.2.

We now focus on A(0,0)A(0,0) and the number of squares of 1+L1+L. In [BHKM13], the authors study upper bounds of cyclotomic numbers. They determine A(i,j)A(i,j) by computing the rank of certain matrix with entries in p\mathbb{Z}_{p}. Estimating the rank provides an upper bound of A(i,j)A(i,j) for general \ell. We use their result for A(0,0)A(0,0) below.

Lemma 4.6 ([BHKM13, Theorem 1.1(iii)]).

If 3\ell\geq 3, then

A(0,0)p121A(0,0)\leq\left\lceil\frac{p-1}{2\ell}\right\rceil-1

where \lceil\cdot\rceil denotes the smallest integer larger than or equal to a given number.

In our situation, p1=|L|\frac{p-1}{\ell}=|L| and |L||L| is even as 1L-1\in L. Thus, Lemma 4.6 implies

A(0,0)|L|21.A(0,0)\leq\frac{|L|}{2}-1.

We study the number of squares of 1+L1+L in a different way from cyclotomic numbers. Denote (p)\left(\frac{\cdot}{p}\right) the Legendre symbol by

(xp)=xp12={0if x=0;1if x0 is a square;1if x0 is not a square,\left(\frac{x}{p}\right)=x^{\frac{p-1}{2}}=\left\{\begin{array}[]{cl}0&\text{if }x=0;\\ 1&\text{if $x\neq 0$ is a square};\\ -1&\text{if $x\neq 0$ is not a square,}\end{array}\right.

for xpx\in\mathbb{Z}_{p}. Then xx is a square in p\mathbb{Z}_{p} if and only if (xp)=0,1\left(\frac{x}{p}\right)=0,1. Thus, for every x,ypx,y\in\mathbb{Z}_{p}, the collection {x,y,xy}\{x,y,xy\} must contain at least one square because of the multiplication

(xp)(yp)=(xyp)\left(\frac{x}{p}\right)\cdot\left(\frac{y}{p}\right)=\left(\frac{xy}{p}\right)

holds (see also [Bur11, Chapter 9]). We have the following conclusion.

Lemma 4.7.

If x,ypx,y\in\mathbb{Z}_{p} and xy0xy\neq 0, then

12(1+(xp))+12(1+(yp))+12(1+(xyp))1.\frac{1}{2}\left(1+\left(\frac{x}{p}\right)\right)+\frac{1}{2}\left(1+\left(\frac{y}{p}\right)\right)+\frac{1}{2}\left(1+\left(\frac{xy}{p}\right)\right)\geq 1.

We have a lower bound of the number of squares of 1+L1+L as follows.

Lemma 4.8.

The number of squares of 1+L1+L is greater than 14|L|\frac{1}{4}|L|.

Proof.

Let m=|1+L|=|L|m=|1+L|=|L| and let α\alpha be a generator of LL. The integer mm is even because 1L-1\in L. Moreover, αm2=1\alpha^{\frac{m}{2}}=-1. Denote MM the number of squares of 1+L1+L. Then

M=1+i=0,im2m112(1+(1+αip))M=1+\sum_{\begin{subarray}{c}i=0,\\ i\neq\frac{m}{2}\end{subarray}}^{m-1}\frac{1}{2}\left(1+\left(\frac{1+\alpha^{i}}{p}\right)\right)

where the starting 11 corresponds to 1+αm2=01+\alpha^{\frac{m}{2}}=0. Since 1L-1\in L, 1+L=1L1+L=1-L and we also have

M=1+i=1m112(1+(1αip))M=1+\sum_{i=1}^{m-1}\frac{1}{2}\left(1+\left(\frac{1-\alpha^{i}}{p}\right)\right)

where the starting 11 corresponds to 1α0=01-\alpha^{0}=0.

For every i=0,1,,m1i=0,1,\ldots,m-1, the collection {1+αi,1αi,1α2i}\{1+\alpha^{i},1-\alpha^{i},1-\alpha^{2i}\} must contain at least one square since (1+αi)(1αi)=1α2i(1+\alpha^{i})(1-\alpha^{i})=1-\alpha^{2i}. By Lemma 4.7,

i=1,im2m112(1+(1+αip))+12(1+(1αip))+12(1+(1α2ip))m2.\sum_{\begin{subarray}{c}i=1,\\ i\neq\frac{m}{2}\end{subarray}}^{m-1}\frac{1}{2}\left(1+\left(\frac{1+\alpha^{i}}{p}\right)\right)+\frac{1}{2}\left(1+\left(\frac{1-\alpha^{i}}{p}\right)\right)+\frac{1}{2}\left(1+\left(\frac{1-\alpha^{2i}}{p}\right)\right)\geq m-2.

The first two sums of 12(1+(1+αip))\frac{1}{2}\left(1+\left(\frac{1+\alpha^{i}}{p}\right)\right) and 12(1+(1αip))\frac{1}{2}\left(1+\left(\frac{1-\alpha^{i}}{p}\right)\right) are partial sums of M1M-1 with nonnegative terms. It follows that 2(M1)+Mm22(M-1)+M^{\prime}\geq m-2 where

M=i=1,im2m112(1+(1α2ip)).M^{\prime}=\sum_{\begin{subarray}{c}i=1,\\ i\neq\frac{m}{2}\end{subarray}}^{m-1}\frac{1}{2}\left(1+\left(\frac{1-\alpha^{2i}}{p}\right)\right).

Observe that α2i=α2(m2+i)\alpha^{2i}=\alpha^{2(\frac{m}{2}+i)} for i=1,,m21i=1,\ldots,\frac{m}{2}-1. Thus,

M=2i=1m2112(1+(1α2ip)).M^{\prime}=2\sum_{i=1}^{\frac{m}{2}-1}\frac{1}{2}\left(1+\left(\frac{1-\alpha^{2i}}{p}\right)\right).

The set {1α2ii=1,,m21}\{1-\alpha^{2i}\mid i=1,\ldots,\frac{m}{2}-1\} is a subset of 1L1-L and then M2\frac{M^{\prime}}{2} is a partial sum of M1M-1. We obtain M2(M1)M^{\prime}\leq 2(M-1). As a consequence, we have 4(M1)m24(M-1)\geq m-2. Hence, Mm4+12M\geq\frac{m}{4}+\frac{1}{2}, as desired. ∎

Now we can prove the main theorem below.

Theorem 4.9.

Let pp be an odd prime. If =[p×:1,2]\ell=[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle] is an odd prime, then s()0s(\ell)\neq 0.

Proof.

According to Proposition 4.4, the number of squares of 1+L1+L is 12(1+A(0,0)+s())\frac{1}{2}(1+A(0,0)+s(\ell)). By Lemma 4.8, this number is greater than 14|L|\frac{1}{4}|L| and then 1+A(0,0)+s()>12|L|1+A(0,0)+s(\ell)>\frac{1}{2}|L|. From the below of Lemma 4.6, 1+A(0,0)12|L|1+A(0,0)\leq\frac{1}{2}|L|. Therefore, s()>0s(\ell)>0. ∎

Theorem 4.9 provides the positivity of Conjecture B for primes pp such that [p×:1,2][\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle] is a prime. This also answers Conjecture A for such primes. Thus we have the following consequence.

Corollary 4.10.

Let pp be an odd prime such that 4op(2)4\nmid o_{p}(2). If =[p×:1,2]\ell=[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle] is an odd prime, then the optimal conflict-avoiding codes of length pp and weight 33 has the size

p124+3.\frac{p-1-2\ell}{4}+\left\lfloor\frac{\ell}{3}\right\rfloor.

For example, if p=1229241823>230p=1229241823>2^{30}, then op(2)o_{p}(2) is odd and =18307\ell=18307 is a prime. Thus, we can easily conclude that the size of optimal conflict-avoiding codes of length pp and weight 33 is 307307404307307404. Indeed, one can check that A(1,2)=4A(1,2)=4 with the primitive root 33. One element of (1+3L)9L(1+3L)\cap 9L is 1+321128543547=922497797301+3\cdot 2^{1128543547}=9\cdot 2^{249779730}.

An optimal CAC of length pkp^{k}, k1k\geq 1, can be constructed from an optimal CAC of length pp by [FLS14, Theorem 8]. Applying Corollary 4.10 to [FLS14, Theorem 8], we obtain the following conclusion.

Corollary 4.11.

Let p>3p>3 be a non-Wieferich prime such that 4op(2)4\nmid o_{p}(2). If =[p×:1,2]\ell=[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle] is an odd prime, then an optimal conflict-avoiding code of length pkp^{k} and weight 33 has the size

pk12k4+k3\frac{p^{k}-1-2k\ell}{4}+k\left\lfloor\frac{\ell}{3}\right\rfloor

for every kk\in\mathbb{N}.

5. Conclusion Remark

According to Corollary 3.3 and 4.10, we now know the size of optimal CAC of prime length pp and weight 33 where 4op(2)4\nmid o_{p}(2) and either =[p×:1,2]=4\ell=\left[\mathbb{Z}_{p}^{\times}:\langle-1,2\rangle\right]=4 or \ell is an odd prime. For composite number 6\ell\geq 6, it is not easy to determine whether s()0s(\ell)\neq 0 or not. For example, let =6\ell=6 and using properties given in Section 3, the extended cyclotomic matrix can be simplified such as

B=(b0,0b0,1b0,2b0,3b0,4b0,5b0,1b0,5b1,2b1,3b1,4b1,2b0,2b1,2b0,4b1,4b2,4b1,3b0,3b1,3b1,4b0,3b1,3b1,4b0,4b1,4b2,4b1,3b0,2b1,2b0,5b1,2b1,3b1,4b1,2b0,1).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}&b_{0,3}&b_{0,4}&b_{0,5}\\ b_{0,1}&b_{0,5}&b_{1,2}&b_{1,3}&b_{1,4}&b_{1,2}\\ b_{0,2}&b_{1,2}&b_{0,4}&b_{1,4}&b_{2,4}&b_{1,3}\\ b_{0,3}&b_{1,3}&b_{1,4}&b_{0,3}&b_{1,3}&b_{1,4}\\ b_{0,4}&b_{1,4}&b_{2,4}&b_{1,3}&b_{0,2}&b_{1,2}\\ b_{0,5}&b_{1,2}&b_{1,3}&b_{1,4}&b_{1,2}&b_{0,1}\end{matrix}\right).

Suppose that s(6)=b1,2+b5,4=0s(6)=b_{1,2}+b_{5,4}=0. Then

B=(b0,0b0,1b0,2b0,3b0,4b0,5b0,1b0,50b1,3b1,40b0,20b0,4b1,4b2,4b1,3b0,3b1,3b1,4b0,3b1,3b1,4b0,4b1,4b2,4b1,3b0,20b0,50b1,3b1,40b0,1).B=\left(\begin{matrix}b_{0,0}&b_{0,1}&b_{0,2}&b_{0,3}&b_{0,4}&b_{0,5}\\ b_{0,1}&b_{0,5}&0&b_{1,3}&b_{1,4}&0\\ b_{0,2}&0&b_{0,4}&b_{1,4}&b_{2,4}&b_{1,3}\\ b_{0,3}&b_{1,3}&b_{1,4}&b_{0,3}&b_{1,3}&b_{1,4}\\ b_{0,4}&b_{1,4}&b_{2,4}&b_{1,3}&b_{0,2}&0\\ b_{0,5}&0&b_{1,3}&b_{1,4}&0&b_{0,1}\end{matrix}\right).

By Lemma 3.1(iv), we will obtain that

{b0,0+b0,2+b0,3+b0,4=b1,3+b1,4,b0,1+b0,5=b0,2+b0,4+b2,4=2b0,3+b1,3+b1,4,b0,3+b1,3+b1,4=|L|2.\left\{\begin{array}[]{l}b_{0,0}+b_{0,2}+b_{0,3}+b_{0,4}=b_{1,3}+b_{1,4},\\ b_{0,1}+b_{0,5}=b_{0,2}+b_{0,4}+b_{2,4}=2b_{0,3}+b_{1,3}+b_{1,4},\\ b_{0,3}+b_{1,3}+b_{1,4}=\frac{|L|}{2}.\end{array}\right.

This gives the equality

b2,4=b0,0+3b0,3.b_{2,4}=b_{0,0}+3b_{0,3}.

On the other hand, according to Lemma 4.2, the number of squares of 1+L1+L is

12(b0,0+b0,3+2b2,4).\frac{1}{2}(b_{0,0}+b_{0,3}+2b_{2,4}).

By Lemma 4.8, this number is greater than 14|L|\frac{1}{4}|L| and then b0,0+b0,3+2b2,4>12|L|b_{0,0}+b_{0,3}+2b_{2,4}>\frac{1}{2}|L|. Using the equality above, we obtain 3b0,0+7b0,3>12|L|3b_{0,0}+7b_{0,3}>\frac{1}{2}|L|. However, the upper bound for b0,0b_{0,0} given in Lemma 4.7 (or for b0,3b_{0,3} given in [BHKM13]) can not give further information in this case. For composite numbers 6\ell\geq 6, 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 ee 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 33. 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 n=4mn=4m 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 tt active users out of nn 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 n0n\equiv 0 (mod 1616) and weight 33. 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 33. 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 33. 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 n=2k±1n=2^{k}\pm 1 and weight 33. J. Combin. Des., 21(6):223–231, 2013. doi:10.1002/jcd.21332.