Sara Asensio, Giulia Gaggero, Naveena Ragunathan, Abhilash Saha, Adam Van Tuyl
SARA ASENSIO, GIULIA GAGGERO, NAVEENA RAGUNATHAN, ABHILASH SAHA, AND ADAM VAN TUYL
ABSTRACT. Jaramillo-Velez recently introduced edge codes, a new class of toric evaluation codes constructed from the edges of a (hyper)graph H. In the case that H is a tree, Jaramillo-Velez computed both the minimum distance and the weight distribution of the associated code. In this paper, we study edge codes associated to unicyclic graphs. Our most striking result is that computing the parameters of these codes is subtle in the case that the induced cycle has an even length because these values will depend on certain conditions regarding the length of the cycle and the size of the base field.
1. INTRODUCTION
Originally introduced by Høholdt, van Lint and Pellikaan as a generalization of one-point algebraic geometry codes [8], evaluation codes have evolved into a broad and active area of research. Evaluation codes have been investigated in several algebraic frameworks, including affine variety codes and order domain codes [4, 5], and they are now studied in their own right [9].
The codewords of an evaluation code are constituted by the evaluations of the elements of a polynomial vector space L⊆K[t1,…,ts] on a geometric object X⊆Ks, where K=Fq is a finite field. A large family of evaluation codes is the family of toric codes introduced by Hansen in 2000 [7]. In this case, X is the affine torus T=(K∗)s, and there are two main cases that have been studied with this choice of X. In the first case, the vector space L is derived from d-hypersimplices [2, 3, 9, 12], and in the second case, it is generated by squarefree monomials [9, 12].
Recently, Jaramillo-Velez introduced a new family of toric codes [10]. In this case L is parametrized by the set of edges of a hypergraph. Given any hypergraph H on the vertex set V={t1,…,ts}, its edges E are subsets of V of any cardinality. Given an edge {ti1,…,tiℓ}⊆V, one can associate to it a monomial ti1⋯tiℓ∈K[t1,…,ts]. Let L be the polynomial vector space
KE(H)=spanK{ti1⋯tiℓ:{ti1,…,tiℓ}∈E}.
Therefore, the evaluation map for this family of codes is
ev:KE(H)→K∣T∣,f↦(f(P1),…,f(P∣T∣)),
where T={P1,…,P∣T∣}, and the corresponding edge toric code is CH=ev(KE(H))⊆K∣T∣.
An edge toric code CH is a linear code of length ∣T∣, i.e., it is a subspace of K∣T∣. Thanks to the correspondence between the codewords and the polynomials of the K-vector space KE(H), the dimension and the minimum distance of CH can also be related to properties of H. In particular, it can be proved that studying the weight distribution of the edge code associated to a hypergraph H is equivalent to studying the zeroes of all polynomials in KE(H) over the affine torus. Studying zeroes of polynomials is a general problem in algebraic geometry and there are recent works focused on this, see e.g. [1,11].
Key words and phrases. edge codes, evaluation codes, toric codes, unicyclic graphs.
S. ASENSIO, G. GAGGERO, N. RAGUNATHAN, A. SAHA, AND A. VAN TUYL
Jaramillo-Velez provided estimations for the minimum distance of edge codes coming from d-uniform clutters and computed the minimum distances of all edge codes of graphs with five vertices. Additionally, given a tree G on s vertices, he computed the number of zeroes of every polynomial in KE(G). This allows one to compute the weight distribution of CG when G is a tree. While this is not explicitly done in [10], we provide the details in Theorem 2.4.
The goal of this note is to extend Jaramillo-Velez's work to a larger family, namely the family of unicyclic graphs, that is graphs with exactly one induced cycle. In particular, we consider the problem of computing the minimum distance and weight distribution of codes constructed from unicyclic graphs, see Theorems 5.1 and 5.2. Interestingly, the weight distribution of CG will depend upon the parity of the size of the induced cycle in G. When the induced cycle has an odd length, then the number of zeroes of f∈KE(G) will only depend upon the number of terms in f, but not the coefficients of f. This result contrasts to the case that there is an even induced cycle in G because the number of zeroes of f∈KE(G) will depend both on the number of terms in f and its coefficients.
A similar question has been answered by Carvalho and Patanker in [3] for toric codes defined over hypersimplices. They computed the number of minimal and next-to-minimal codewords for a large family of hypersimplices. Notice that, even if their result can be considered more general because it applies to a larger number of codes, ours is more complete because we give the full weight distribution and not only the first two values of the distribution for edge toric codes constructed from unicyclic graphs.
The paper is organized as follows. In Section 2 we recall the remaining background. In Section 3, we consider the relationship between the edge toric code of a graph G with a leaf t with that of G∖{t}, the graph with the leaf removed. This analysis leads to Theorem 3.5, a general technique to remove leaves from a graph G to create a new graph G′′ such that we can relate the zeroes of f∈KE(G) with those of a polynomial g∈KE(G′′). In Section 4 we compute the weight distribution of the edge toric code CCs, where Cs is an s-cycle. Finally, in Section 5, we combine these results to describe the weight distribution of CG for any unicyclic graph G.
2. BACKGROUND
We recall the background on edge toric codes that we need for the later sections. While edge toric codes, as introduced by Jaramillo-Velez [10], can be defined using any hypergraph, we only present the definition in the case of graphs. Throughout this paper, K=Fq denotes a finite field and K∗=(Fq)∗ denotes the multiplicative group of units of K. We also make the assumption that q>2 throughout this paper to avoid some degenerate cases; for instance, see Example 4.8.
Let G=(V,E) denote a finite simple graph on the vertex set V={t1,…,ts} and edge set E={e1,…,er}. Each edge ei has the form ei={ti1,ti2}⊆V for some ti1=ti2. We say that ti1 and ti2 are adjacent. A graph G is said to be a tree if it is connected and contains no cycles, while a forest is a disjoint union of trees. The cycle of length s is the graph Cs whose vertex and egde sets are V(Cs)={t1,…,ts} and E(Cs)={{ti,ti+1}:1≤i≤s−1}∪{{t1,ts}}, respectively. A cycle is said to be induced if there are no edges joining two non-consecutive vertices of the cycle. The main goal of this paper is to study unicyclic graphs, which are graphs containing exactly one induced cycle.
Let S=K[t1,…,ts] denote the polynomial ring over the field K. Note that we are abusing notation by letting ti represent both a vertex of the graph and a variable in the polynomial ring. Using G, we define the following K-vector space of polynomials:
KE(G)=spanK{titj:{ti,tj}∈E}.
Now consider the affine torus T=(K∗)s. This torus has ∣T∣=(q−1)s distinct points, and we put an order on the elements of T, say T={P1,…,P∣T∣}. We define the evaluation map to be
ev:KE(G)→K∣T∣givenbyf↦(f(P1),…,f(P∣T∣)).
In other words, we evaluate f at all points in T.
We can now recall the following definition due to Jaramillo-Velez [10, Definition A].
Definition 2.1. The edge (toric) code CG of the graph G is the image of the evaluation map, that is, CG:=ev(KE(G))⊆K∣T∣.
A linear code of length n and dimension k is a subspace C⊆Kn where dimKC=k. Elements of C are called codewords. Given a codeword c∈C, the Hamming weight of c is the number of non-zero coordinates in c. For 1≤i≤n, let Ai(C) be the number of codewords in C with Hamming weight i. The vector (A1(C),…,An(C)) is the weight distribution of C. The minimum distance of C is the smallest i such that Ai(C)=0. We denote the minimum distance by δ(C). A linear code of length n, dimension k and minimum distance δ is usually called an [n,k,δ]-code. Albeit all the previous definitions hold for any field K, the standard choice for coding theory is K=Fq, where Fq is the finite field with q elements.
As we mentioned in the introduction, for an edge code CG, Jaramillo-Velez related its length, dimension and minimum distance to properties of G. To state his result, we let VT(f) denote the affine variety of all zeroes of f in T, that is,
VT(f)={P∈T:f(P)=0}⊆T.
With this notation, we have:
Lemma 2.2. Let CG be the edge code of a graph G=(V,E) on s vertices, and let T=(K∗)s. Then
(1) the length of CG is ∣T∣=(q−1)s;
(2) the dimension of CG is ∣E∣; and
(3) the Hamming weight of the codeword corresponding to a polynomial f∈KE(G) is (q−1)s−∣VT(f)∣, which implies that the minimum distance of CG is
δ(CG)=(q−1)s−f∈KE(G)max∣VT(f)∣.
(4) A∣T∣(CG)≥∣E∣.
Proof. Statements (1) – (3) can be found in [10, Proposition 3.1]. For (4), notice that for any edge {ti,tj}∈E, we have titj∈KE(G) and VT(titj)=∅, so the codeword associated to titj only has non-zero coordinates. Hence each e∈E gives a codeword of Hamming weight ∣T∣.
The formula for δ(CG) tells us that determining the minimum distance of the code CG is equivalent to finding the largest number of roots in the affine torus a polynomial in KE(G) can have. Furthermore, computing the number of roots of all polynomials in KE(G) allows to determine the code's weight distribution. Our goal is to find these distributions for all edge codes associated to unicyclic graphs.
When the graphs under consideration are trees, Jaramillo-Velez determined the number of roots of all polynomials associated to them. We summarize these results since we shall also need them for the unicyclic case. In fact, we will give a new proof for Proposition 2.3 using the techniques of the next section.
Proposition 2.3 ([10, Proposition 3.14]). Let G be a tree with s≥2 vertices. For each f∈KE(G) with r∈{1,2,…,s−1} non-zero terms,
∣VT(f)∣=i=1∑r−1(−1)i+1(q−1)s−i.
S. ASENSIO, G. GAGGERO, N. RAGUNATHAN, A. SAHA, AND A. VAN TUYL
From Lemma 2.2 and Proposition 2.3, we can obtain the weight distribution of the edge code associated to a tree.
Theorem 2.4. Let G be a tree with s≥2 vertices. The weight distribution of CG satisfies
Consequently, the minimum distance is given by δ(CG)=(q−1)s−1(q−2), and it corresponds to r=2, that is, it is achieved with all polynomials with two non-zero terms.
Proof. Notice that a tree on s vertices has s−1 edges, and there are (rs−1)(q−1)r polynomials in KE(G) with exactly r non-zero terms.
Jaramillo-Velez also proved the following result for graphs containing 4-cycles as subgraphs.
Theorem 2.5 ([10, Theorem 3.7]). Let q>2 and let G be a finite simple graph on s≥4 vertices containing a 4-cycle (not necessarily induced). Then the minimum distance of the edge code CG is given by
δ(CG)=(q−2)2(q−1)s−2.
In the following sections, we provide an extension of the previous result to more families of graphs. In particular, we work towards studying the family of unicyclic graphs.
3. EDGE CODES OF GRAPHS WITH A LEAF
We now examine the edge codes of graphs with a leaf. Recall that we say that a vertex t∈V of a graph G is a leaf if there is exactly one edge e∈E with t∈e. For any vertex t∈V, the graph G′=G∖{t} is the graph formed by removing t and all the edges of G that contain t. The main result of this section is to relate the edge code CG with that of CG′ when t is a leaf. As a consequence, by repeatedly removing leaves, we can reduce the study of edge codes of graphs to smaller graphs.
We begin by relating the number of zeroes of a polynomial f∈KE(G) to those of a polynomial in KE(G′). Some of the ideas of Lemma 3.1 are implicit in the proof of [10, Proposition 3.14] which only dealt with trees. However, the result applies more generally to any graph with a leaf.
Lemma 3.1. Let G be a graph on vertices {t1,…,ts,ts+1}, where ts+1 is a leaf that is adjacent to ts. Set G′=G∖{ts+1}. Let f∈KE(G), and write
f(t1,⋯,ts,ts+1)=f′(t1,⋯,ts)+βtsts+1,
with f′∈KE(G′) and β∈Fq. Let T=(Fq∗)s+1 and T′=(Fq∗)s. Then
Since β,as,as+1∈Fq∗, the right-hand side is non-zero. Therefore, the left-hand side is also non-zero. In other words, f′(a1,…,as)=0, and thus ϕ(a1,…,as+1)∈T′∖VT′(f′).
To show the map is injective, suppose ϕ(a1,…,as+1)=ϕ(a1′,…,as+1′). This directly gives ai=ai′ for i=1,…,s. Furthermore,
Finally, for the surjectivity of ϕ, given (a1,…,as)∈T′∖VT′(f′), let
as+1=−βasf′(a1,…,as)=0.
By construction, (a1,…,as+1)∈VT(f), and ϕ(a1,…,as+1)=(a1,…,as).
The above result can be used to derive some consequences for the corresponding weight distributions.
Theorem 3.2. Let G be a graph on vertices {t1,…,ts,ts+1}, where ts+1 is a leaf that is adjacent to ts. Set G′=G∖{ts+1}, and let T=(Fq∗)s+1 and T′=(Fq∗)s.
Let ACG=(A1(CG),…,A∣T∣(CG)) be the weight distribution vector of CG, and similarly, let ACG′=(A1(CG′),…,A∣T′∣(CG′)) be the weight distribution vector of CG′. Then:
(1) If Ai(CG′)=0, then Ai(CG′)≤Ai(q−1)(CG).
(2) If Ai(CG)=0 and i=∣T∣, then either A(q−1)i(CG′)=0 or A∣T∣−i(CG′)=0.
Proof. (1) Suppose that Ai(CG′)=0. Let Bi′ be the set of all f∈KE(G′) with ∣T′∣−∣VT′(f)∣=i. By definition, we have ∣Bi′∣=Ai(CG′). Consider the natural injection ϕ:KE(G′)→KE(G) given by ϕ(f)=f+0tsts+1∈KE(G). Let Bi=ϕ(Bi′). For any ϕ(f)∈Bi, we have ∣VT(ϕ(f))∣=(q−1)∣VT′(f)∣ by Lemma 3.1. But then
∣T∣−∣VT(ϕ(f))∣=(q−1)∣T′∣−(q−1)∣VT′(f)∣=(q−1)i.
So, the codeword associated to every ϕ(f)∈Bi has (q−1)i non-zero coordinates. Hence
Ai(q−1)(CG)≥∣Bi∣=∣Bi′∣=Ai(CG′).
(2) Suppose that Ai(CG)=0 with i=∣T∣. Thus there exists an f∈KE(G) such that ∣T∣−∣VT(f)∣=i. Because i=∣T∣, this implies that f has more than one non-zero term. Indeed, if f had a single non-zero term, then VT(f)=∅, and thus i=∣T∣−∣VT(f)∣=∣T∣. Write f as f=f′(t1,…,ts)+βtsts+1. If β=0, then by Lemma 3.1
Note that f′ must have at least one non-zero term, so ∣VT′(f′)∣=∣T′∣. But this then implies that A∣T∣−i(CG′)=0 with ∣T∣−i=0.
Corollary 3.3. Let G be a graph on vertices {t1,…,ts,ts+1}, where ts+1 is a leaf that is adjacent to ts. Set G′=G∖{ts+1}. Then:
(1) δ(CG)≤(q−1)δ(CG′).
(2) δ(CG′)≤δ(CG)/(q−1) or δ(CG′)≤∣T∣−δ(CG).
In particular, if there exists an f∈KE(G) with f=f′(t1,…,ts)+0tsts+1 such that δ(CG)=∣T∣−∣VT(f)∣, then δ(CG)=(q−1)δ(CG′).
S. ASENSIO, G. GAGGERO, N. RAGUNATHAN, A. SAHA, AND A. VAN TUYL
Proof. For the first part, apply Theorem 3.2 (1) to i=δ(CG′). The second part follows from Theorem 3.2 (2) when i=δ(CG). As shown within the proof of Theorem 3.2, the first of the two inequalities in the second part will occur if the coefficient of tsts+1 in f is zero.
Remark 3.4. As an easy observation, the first inequality in Corollary 3.3 (2) always holds if ∣T∣−δ(CG)≤q−1δ(CG), which is equivalent to δ(CG)≥∣T∣qq−1. When q is arbitrarily large, this would mean δ(CG) is close to ∣T∣, which is the length of the code. However, if we use the Singleton bound, this would imply low dimension (that is, a small number of edges in G) and this case wouldn't be very interesting.
We now consider a more general situation. Let G be a graph on the vertex set {t1,…,ts}. Suppose that at the vertices ti1,…,tin, a “tree” is attached. More specifically, for each j=1,…,n, there are sj vertices zj,1,…,zj,sj such that the induced subgraph on {tij,zj,1,…,zj,sj} is a tree, which we denote as Tij. Note that each Tij has sj edges and sj+1 vertices. We let H denote the graph G with the attached trees and write it as H=G∪Ti1∪⋯∪Tin. In other words, H is the graph on the vertex set
{t1,…,ts}∪{zj,k:1≤j≤n,1≤k≤sj}
with s+s1+⋯+sn vertices. See Figure 1 for a representation of such a graph.
FIGURE 1. A graph G with trees attached at the vertices ti1,…,tin
If H is such a graph and f∈KE(H), then we can write f as
with g∈KE(G) and g′∈KE(Ti1∪⋯∪Tin). The polynomial g′ can have up to s1+⋯+sn non-zero terms since each tree Tij has sj edges. By repeated use of Lemma 3.1, we can relate the zeroes of f to those of g. Consequently, the next result allows us to remove “trees” attached to G if we are interested in finding the number of zeroes of f∈KE(H).
Theorem 3.5. Let G be any graph on s vertices. With the notation as above, let H=G∪Ti1∪⋯∪Tin, where Tij is a tree with sj edges attached at vertex tij for j=1,…,n. For any f∈KE(H), write
Proof. We begin by noting that the number of vertices of H is m and the number of edges in Ti1∪⋯∪Tin is p. Thus, if g′ has r non-zero terms, we must have 0≤r≤p.
We will do induction on p. If p=1, then there is exactly one vertex ti1 in G with a tree attached to it, and a single vertex z1,1 such that the induced graph on {ti1,z1,1} is a tree. Thus, z1,1 is a leaf and we are in the situation of Lemma 3.1. Hence, if g′ has r=0 non-zero terms, we have
In both cases, the formula in the statement holds. Note that in both of these formulas, we are using the fact that m=s+1.
We now assume that p=s1+⋯+sn>1. Without loss of generality, we can assume that all sj>0 (if sj=0, that would mean that no tree is attached to tij). Thus H=G∪Ti1∪⋯∪Tin, where Tij is a tree attached at tij and has sj edges. In Tin, we can find a vertex z that is a leaf in H. Suppose z is adjacent to z′, so zz′∈KE(Ti1∪⋯∪Tin).
Set H′=H∖{z}. We now consider the cases: 1) the term zz′ appears in g′ or 2) the term zz′ does not appear in g′. In the first case, we have f=g+g′, and g′=g′′+βzz′ with β=0. Here, g′′ is a polynomial that does not involve z and must have r−1 non-zero terms. By Lemma 3.1 we have
∣V(Fq∗)m(f)∣=(q−1)m−1−∣V(Fq∗)m−1(g+g′′)∣.
Now g+g′′∈KE(H′), where the number of vertices of H′ is m−1 and the number of edges among the attached trees is p−1. Since g′′ has r−1 non-zero terms, induction now implies that
The proof for the second case is similar. For completeness, we work out all the details. In this case, g′=g′′+βzz′=g′′ since β=0. By Lemma 3.1 we have
∣V(Fq∗)m(f)∣=(q−1)∣V(Fq∗)m−1(g+g′′)∣.
As above, g+g′′∈KE(H′) where the number of vertices of H′ is m−1 and the number of edges among the attached trees is p−1. Since g′ has r terms, so does g′′. Induction then implies
One of the main results of [10] is now a corollary of the previous result.
Corollary 3.6 ([10, Proposition 3.14]). If G is a tree on s≥2 vertices, and if f∈KE(G) has r∈{1,2,…,s−1} non-zero terms, then
∣V(Fq∗)s(f)∣=i=1∑r−1(−1)i+1(q−1)s−i.
Proof. Let t be any leaf of G and let G′ be the graph consisting of just the vertex t. Then G can be viewed as the graph obtained by attaching a tree with s−1 edges to the graph G′ at the vertex t. So m=s and p=s−1. We apply Theorem 3.5, where we highlight that we are applying the theorem to the graph G′ with exactly one vertex. If f∈KE(G) has r non-zero terms, then by Theorem 3.5,
Before moving on to the study of arbitrary unicyclic graphs, we will begin by considering the simplest of them: cycles.
Given a positive integer s, we denote by Cs the cycle of length s. To determine the weight distribution of the edge code CCs, we consider the K-vector space KE(Cs) and compute the number of zeroes in the affine torus of all polynomials in this K-vector space.
It is clear that if f∈KE(Cs) has less than s non-zero terms, then the edges corresponding to all non-zero terms in f constitute a tree and the number of zeroes in the affine torus is already known in this case by Proposition 2.3 (or Corollary 3.6).
Consequently, we have to focus on those polynomials whose terms correspond to all the edges of the cycle. The number of roots of these polynomials can be computed recursively, as we show in the next result:
From the previous expression, it is easy to see that fs=0 if and only if one of the two following situations holds:
Case (1): α1,2t2+α1,sts=0 and α2,3t2t3+⋯+αs−1,sts−1ts=0.
In this situation, t2 is determined by the value of ts and the second condition can be rewritten as −α1,2α2,3α1,stst3+⋯+αs−1,sts−1ts=0, where the left-hand side is a polynomial associated to a cycle of length s−2. Since t1 can be arbitrarily chosen, the number of zeroes of fs corresponding to this situation is ∣V(Fq∗)s−1(fs)∣=(q−1)∣V(Fq∗)s−2(fs−2)∣.
Case (2): α1,2t2+α1,sts=0, α2,3t2t3+⋯+αs−1,sts−1ts=0 and t1=−α1,2t2+α1,stsα2,3t2t3+⋯+αs−1,sts−1ts.
In this situation, t1 will be determined by the remaining variables and we have to compute the number of (s−1)-tuples (t2,t3,…,ts) satisfying the first two conditions. If we denote g:=α1,2t2+α1,sts and h:=α2,3t2t3+⋯+αs−1,sts−1ts, then the number of zeroes of fs corresponding to this situation is
This recursive formula for computing the number of zeroes in the affine torus T of every polynomial associated to a cycle leads us to different results depending on whether s is odd or even. This fact will follow from the different behaviors of the codes constructed from C3 and C4.
4.1. Odd cycles. In the case of cycles of odd length, we first obtain an explicit formula for the number of zeroes in the affine torus of every polynomial associated to the complete cycle.
S. ASENSIO, G. GAGGERO, N. RAGUNATHAN, A. SAHA, AND A. VAN TUYL
Proposition 4.2. Let s≥3 be an odd number, and let fs be a polynomial whose terms are in one-to-one correspondence with all the edges of Cs. Then
with αi,j∈Fq∗ for all i,j. Then f=0 if and only if α1,2t2+α1,3t3=0 and t1=−α1,2t2+α1,3t3α2,3t2t3. Hence t1 is determined by the remaining variables, and there is a forbidden value for t2. This implies that
Assume now that the result is true for every odd number smaller than some odd number s, and let us prove it for s. Applying Proposition 4.1 and the induction hypothesis for ∣V(Fq∗)s−2(fs−2)∣, we get
If we now combine Lemma 2.2 and Propositions 2.3 and 4.2, we can completely determine the weight distribution of the edge code associated to an odd cycle:
Theorem 4.3. Let s≥3 be an odd number. If f∈KE(Cs) has r non-zero terms with r∈{1,2,…,s}, then
∣V(Fq∗)s(f)∣=i=1∑r−1(−1)i+1(q−1)s−i.
Then the weight distribution of CCs can be expressed as follows:
Consequently, the minimum distance of CCs corresponds to r = 2, that is,
δ(CCs)=(q−1)s−1(q−2),
and it is achieved with all polynomials f∈KE(Cs) with two non-zero terms.
4.2. Even cycles. In the case of polynomials associated to cycles of odd length, we have shown in the previous subsection that all of them have the same number of zeroes in the corresponding affine torus, regardless of their coefficients. However, this is no longer true when considering cycles of even length. In this case, we need to distinguish two big families of polynomials depending on certain condition on the coefficients. We will show that all polynomials in each family have the same number of zeroes in the affine torus. The first example illustrating this behavior corresponds to the cycle of length four.
Proposition 4.4. Let f=α1,2t1t2+α2,3t2t3+α3,4t3t4+α1,4t1t4 be a polynomial associated to C4, with αi,j∈Fq∗ for all i,j. Then
Proof. Since f=t1(α1,2t2+α1,4t4)+t3(α2,3t2+α3,4t4), it is clear that f=0 if and only if one of the two following situations holds:
Case (1): α1,2t2+α1,4t4=0 and α2,3t2+α3,4t4=0.
This system of linear equations has a non-trivial solution if and only if α1,2α3,4−α2,3α1,4=0. The number of zeroes of f corresponding to this situation is ∣V(Fq∗)4,1(f)∣=(q−1)3 since the value of t2 is determined by the value of t4.
Case (2): α1,2t2+α1,4t4=0, α2,3t2+α3,4t4=0 and t1=−α1,2t2+α1,4t4t3(α2,3t2+α3,4t4).
In this situation, t1 will be determined by the remaining variables and we just have to consider the two conditions t2=−α1,2α1,4t4 and t2=−α2,3α3,4t4.
If α1,2α1,4=α2,3α3,4 (which is equivalent to the condition α1,2α3,4−α2,3α1,4=0 appearing in Case (1)), then we only have one restriction for t2 and the number of zeroes of f corresponding to this situation is ∣V(Fq∗)4,2.1(f)∣=(q−1)2(q−2).
If α1,2α1,4=α2,3α3,4, then we have two restrictions for t2 and the number of zeroes of f corresponding to this situation is ∣V(Fq∗)4,2.2(f)∣=(q−1)2(q−3).
S. ASENSIO, G. GAGGERO, N. RAGUNATHAN, A. SAHA, AND A. VAN TUYL
Proof. We proceed by induction on k. If k = 2, this result is just Proposition 4.4.
Assume now that the result is true for certain k−1≥2, and let us prove it for k. By Proposition 4.1 we have that ∣V(Fq∗)2k(f2k)∣=q∣V(Fq∗)2k−2(f2k−2)∣+d2k, where f2k−2 satisfies that αi,i+12k−2=αi+2,i+32k for all i∈{1,2,…,2k−3} and α1,2k−22k−2=−α1,22kα2,32kα1,2k2k. By the induction hypothesis, we can distinguish two different possibilities for ∣V(Fq∗)2k−2(f2k−2)∣:
Case (1): If ∏i∈{1,…,2k−3}αi,i+12k−2+(−1)k−2α1,2k−22k−2∏i∈{1,…,2k−4}αi,i+12k−2=0, which is equivalent to ∏i∈{1,…,2k−1}αi,i+12k+(−1)k−1α1,2k2k∏i∈{1,…,2k−2}αi,i+12k=0 by taking into account the description of the coefficients αi,j2k−2, then
and similarly as we did above, we get ∣V(Fq∗)2k(f2k)∣=qk−2(q−1)2(q−3)+∑i=0k−3qid2k−2i. □
It is clear from the previous proposition that the value of ∣V(Fq∗)s(fs)∣ is larger when the condition \prod_{i\in\{1,\ldots,2k-1\}}\alpha_i^s_{i,i+1}+(-1)^{k-1}\alpha_1^s_{1,s}\prod_{i\in\{1,\ldots,2k-2\}}\alpha_i^s_{i,i+1}=0 is satisfied. Now, to determine the minimum distance of CCs in this case we first need to determine the largest among the two quantities qk−2[(q−1)3+(q−1)2(q−2)]+∑i=0k−3qids−2i and (q−1)s−1, where the latter corresponds to the number of zeroes of all polynomials with two non-zero terms. In order to compare these two quantities, we first present the following technical lemma which allows us to obtain a more explicit representation of the first quantity.
Lemma 4.6. If we denote dm=(∑i=1m−2(−1)i+1(q−1)m−i)−(q−1)m−2, then
If we now combine Lemmas 2.2 and 4.6 and Propositions 2.3 and 4.5, we can completely determine the weight distribution of the edge code associated to an even cycle:
Theorem 4.7. Let s=2k≥4 be an even number. Then the weight distribution of CCs can be expressed as follows:
Example 4.8. Recall that we are assuming that q>2 throughout this paper. We make this assumption since many of our formulas fail for q=2, partly because the affine torus only has one point in this case. For example, let G=C3 and T=(F2∗)3={(1,1,1)}. Then we only have two codewords, (0) and (1), but we have several polynomials giving rise to each of them, such as x1x2, x2x3 and x1x3. In this case, A1(CG)=1 and this does not coincide with our formula. If q>2, then different polynomials give rise to different codewords and we do not run into these issues.
Example 4.9. In Theorem 4.7, the condition that qk(q−2)+1≥(q−1)2k−2 can only hold for small values of k since the term on the right-hand side is a polynomial in q of degree 2k−2, but the left-hand side is a polynomial of degree k+1. In fact, if k≥5, then the inequality only holds for the prime q=2, the case we are excluding. So if s≥10, then δ(Cs)=(q−1)s−1(q−2). If k=4, then qk(q−2)+1≥(q−1)2k−2 if and only if q=2,3. Because we are excluding the case q=2, when q=3 we have
Using the results in the previous sections, we determine the weight distribution of all edge codes associated to unicyclic graphs, i.e., to graphs containing exactly one induced cycle. Since these graphs can be obtained by successively adding leaves to a cycle, our main tool is Theorem 3.5.
Theorem 5.1. Let G be a unicyclic graph on s vertices with induced cycle Cn with n odd. Then for any f∈KE(G) with r non-zero terms,
∣V(Fq∗)s(f)∣=i=1∑r−1(−1)i+1(q−1)s−i.
Then the weight distribution of CG can be expressed as follows:
Consequently, the minimum distance of CG corresponds to r = 2, that is,
δ(CG)=(q−1)s−1(q−2),
and it is achieved with all polynomials f∈KE(G) with two non-zero terms.
Proof. We denote by n≤s the length of the induced cycle of G and proceed by induction on s. If n=s, then G is an odd cycle and the result follows from Theorem 4.3.
Assume now that the result is true for certain s≥n and let us prove it for s+1. In this case, G can be obtained from a unicyclic graph on s vertices with an odd induced cycle of length n by adding one leaf to any of its vertices. Thus, every f∈KE(G) with r non-zero terms is of the form f(t1,…,ts,ts+1)=f′(t1,…,ts)+βtits+1 for some i∈{1,…,s}, β∈Fq and f′∈KE(G′), where G′ is a unicyclic graph on s vertices with an odd induced cycle of length n.
Now we distinguish two possibilities and use the induction hypothesis to finish the first part of the proof. If β=0, then f′ has r non-zero terms. Consequently,
Because G has s vertices and is unicyclic, it has also s edges. The formula for the weight distribution now follows from the fact that there are (s)(q−1)r polynomials in KE(G) with exactly r non-zero terms.
Theorem 5.2. Let G be a unicyclic graph on s vertices with induced cycle Cn with n even. Suppose that after relabeling, the induced graph on {t1,…,tn} is Cn with edges {{ti,ti+1}:i=1,…,n}∪{{t1,tn}}. Let f∈KE(G) be a polynomial with f=fn+f′, where
with ∣V(Fq∗)n(fn)∣ given as in Proposition 4.5.
Proof. Let f=fn+f′∈KE(G) be a polynomial with r non-zero terms.
If at least one of the coefficients of fn is zero, then the terms of f correspond to a tree with r edges. More precisely, if the term titi+1 (or t1tn) does not appear in fn, then f can be viewed as a polynomial in KE(G′) where G′ is the graph G with the edge {ti,ti+1} (or {t1,tn}) removed. Then G′ is a tree, also on s vertices, so the result then follows by Proposition 2.3 (or Corollary 3.6).
Suppose that all the coefficients of fn are non-zero, which means that f′ has r−n non-zero terms. Note that we can view G as an n-cycle with trees attached at various vertices. In the notation of Theorem 3.5, our cycle Cn plays the role of G, and we have a collection of trees on
S. ASENSIO, G. GAGGERO, N. RAGUNATHAN, A. SAHA, AND A. VAN TUYL
s−n vertices attached to G. Again, translating the statement of Theorem 3.5 to our situation, we are letting fn=g, f′=g′,m=s and p=s−n. Making these substitutions, we get the formula in the statement.
The computation of ∣V(Fq∗)n(fn)∣ will depend upon the coefficients of fn, as described in Proposition 4.5.
Remark 5.3. By using Theorem 5.2 and Theorem 4.7 one can explicitly write out the weight distribution A(CG) also in the case of unicyclic graphs where the induced cycle has an even length. The formulas are almost the same as those in Theorem 4.7, but one needs to use the facts that if 1≤r≤n−1, then there are (rs)(q−1)r polynomials with r non-zero terms which correspond to trees in G; if n≤r≤s, then there are (rs)(q−1)r−(r−ns−n)(q−1)r polynomials with r non-zero terms which correspond to trees in G; there are (r−ns−n)(q−1)r−1 polynomials with r non-zero terms that correspond to an induced subgraph that contains the cycle and such that fn falls into the first case of Proposition 4.5; and (r−ns−n)[(q−1)r−(q−1)r−1] polynomials with r non-zero terms that correspond to an induced subgraph that contains the cycle and such that fn falls into the other case of Proposition 4.5. We leave the details for an interested reader.
ACKNOWLEDGEMENTS
The results in this paper were inspired by experiments in Macaulay2 [6]; some of our code was created using Claude (Opus 4.7). Asensio is partially supported by the grant PID2022-137283NB-C22 funded by MICIU/AEI/10.13039/501100011033 and by ERDF/EU; and by European Social Fund Plus, Programa Operativo de Castilla y León and Junta de Castilla y León via its Consejería de Educación (and also via the project with reference CLU-2025-1-02-IMUVA). Gaggero is funded by SNF Postdoc.Mobility grant P500PT_225436. Van Tuyl's research is supported by NSERC Discovery Grant 2024-05299.
REFERENCES
[1] Yves Aubry and Marc Perret. Maximum number of rational points on hypersurfaces in weighted projective spaces over finite fields. Journal of Algebra and Its Applications, 24(13n14):2541015, 2025.
[2] Cícero Carvalho and Nupur Patanker. Next-to-minimal weight of toric codes defined over hypersimplices. Journal of Algebra and Its Applications, 24(13n14):2541014, 2025.
[3] Cícero Carvalho and Nupur Patanker. On the number of minimal and next-to-minimal weight codewords of toric codes over hypersimplices. Designs, Codes and Cryptography, 94(4):70, 2026.
[4] Carlos Galindo, Fernando Hernando, and Carlos Munuera. Locally recoverable j-affine variety codes. Finite Fields and Their Applications, 64:101661, 2020.
[5] Olav Geil. Evaluation codes from an affine variety code perspective. In Edgar Martínez-Moro, Carlos Munuera, and Diego Ruano, editors, Advances in Algebraic Geometry Codes, volume 5 of Coding Theory and Cryptology, pages 153–180. World Scientific, 2008.
[6] Daniel R. Grayson and Michael E. Stillman. Macaulay2, a software system for research in algebraic geometry. Available at https://macaulay2.com/.
[7] Johan P. Hansen. Toric surfaces and error-correcting codes. In Johannes Buchmann, Tom Høholdt, Henning Stichtenoth, and Horacio Tapia-Recillas, editors, Coding Theory, Cryptography and Related Areas, pages 132–142. Springer Berlin Heidelberg, 2000.
[8] Tom Høholdt, Jacobus H. van Lint, and Ruud Pellikaan. Algebraic geometry codes. In V.S. Pless and W.C. Huffman, editors, Handbook of Coding Theory, volume 1, pages 871–961. Elsevier Amsterdam, 1998.
[9] Delio Jaramillo, Maria Vaz Pinto, and Rafael H. Villarreal. Evaluation codes and their basic parameters. Designs, Codes and Cryptography, 89(2):269–300, 2021.
[10] Delio Jaramillo-Velez. The edge code of hypergraphs. Journal of Algebra and Its Applications, 24(13n14):2541003, 2025.
[11] Jade Nardi and Rodrigo San-José. Maximum number of zeroes of polynomials on weighted projective spaces over a finite field. Bulletin of the London Mathematical Society, 58(6):e70417, 2026.
[12] Nupur Patanker and Sanjay Kumar Singh. Generalized Hamming weights of toric codes over hypersimplices and squarefree affine evaluation codes. Advances in Mathematics of Communications, 17(3):626–643, 2023.
(S. Asensio) INSTITUTO DE INVESTIGACIÓN EN MATEMÁTICAS (IMUVA), UNIVERSIDAD DE VALLADOLID, VALLADOLID, SPAIN