{'fraction_non_alphanumeric': 0.05510946140443906, 'fraction_numerical': 0.01943034618589501, 'mean_word_length': 3.5381574424200757, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 19, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Properties of Codes with Two Homogeneous Weights

Delsarte showed that for any projective linear code over a finite field of characteristic p with two nonzero Hamming weights w1<w2 there exist positive integers u and s such that w1 = (p^s)u and w2 = (p^s)(u+1). Moreover, he showed that the additive group of such a code has a strongly regular Cayley graph. Here we show that for any proper regular projective linear code C over a finite Frobenius ring with two integral nonzero homogeneous weights w1<w2, there is a positive integer d, a divisor of the order of C, and positive integer u such that w1 = du and w2 = d(u+1). In doing so, we give a new proof of the known result that any proper regular projective two-weight code code yields a strongly regular graph. We apply these results to existence questions on two-weight codes.


Introduction
The homogeneous weight has been studied extensively in the context of ring-linear coding. The reader is invited to check the references (cf. [8,14,21]) for its different forms. In this paper we will use the definition given in [14]. The homogeneous weight can in some sense be viewed as a generalization of the Hamming weight; in fact it coincides with the Hamming weight when the underlying ring is a finite field and is the Lee weight when the underlying ring is Z 4 .
Many of the classical results for codes over finite fields for the Hamming weight have corresponding homogeneous weight versions for codes over finite rings. In particular, in [2] it was shown that strongly regular graphs can be constructed from codes over finite Frobenius rings with exactly two nonzero homogeneous weights.
In this paper, we examine properties of the parameters of a regular projective two-weight code over a finite Frobenius ring. In Section 3 we obtain the analogue of a result of Delsarte [11,Corollary 2], namely that such a code C must have nonzero homogenous weights of the form w 1 = du and w 2 = d(u + 1) (after scaling by |R × |), where d is a divisor of |C| and u is a positive integer. This emerges by an analysis of the eigenvalues of the Cayley graph Γ of C, which turns out to have exactly three distinct eigenvalues and is therefore strongly regular.
We then derive a number of constraints involving the parameters of a strongly regular graph srg(N, k, λ, µ) that can be constructed from a twoweight code and use these to examine the tables of feasible parameter sets of non-trivial strongly regular graphs from [1] to see which might arise as Cayley graphs defined from two-weight codes. The vast majority of these parameter sets could be eliminated without reference to the underlying ring. For the cases that remained after this, we searched for codes over R of length n determined by the size of the unit group of R and the graph parameters. An exhaustive search using the techniques described here is feasible only for rings of order not divisible by a fourth power (which are then all direct sums of chain rings). The open cases that remain are listed in Section 4 of the paper.
In the last section, we show that the known constructions of linear twoweight codes over a chain ring have no linear codes preimages under the Gray isometry.

Finite Rings and Homogeneous Weights
We recall some properties of finite rings that meet our purposes, many of which are discussed in [19]. An extensive treatment of ring theory can be read in [26]. See also [27,29]. For a finite ring R, we denote byR := Hom Z (R, C × ), the group of additive characters of R.R is an R-R bi-module according to the relations r χ(x) = χ(rx), χ r (x) = χ(xr) for all x, r ∈ R, χ ∈R. A character χ is called left (resp. right) generating if given any ϕ ∈R there is some r ∈ R satisfying ϕ = r χ (resp. ϕ = χ r ). The next result gives a characterization of finite Frobenius rings. Theorem 1. Let R be a finite ring. The following are equivalent.
Then RR = Rχ for some (left) generating character χ. It can be shown that any left generating character is also a right generating character (c.f. [34]).
For an arbitrary finite ring, the homogeneous weight is defined as follows [14]. See also [21], for a slightly different definition.
Right homogeneous weights are defined similarly.
Example 3. On every finite field GF(q) the Hamming weight is a homogeneous weight of average value γ = q−1 q .
Example 4. On the ring Z pq , p, q prime, a homogeneous weight with average value γ = 1 is given by otherwise.
In fact the homogeneous weight is unique up to choice of γ on any finite ring. The definition used in [8,14] uses the notion of a Möbius function on the set of left principal ideals of R, given the partial order induced by set inclusion. It an integer-valued function implicitly defined by µ(Rx, Rx) = 1 for all x ∈ R, µ(Ry, Rx) = 0 if Ry ≤ Rx, and Ry≤Rz≤Rx µ(Rz, Rx) = 0, if Ry < Rx.
Definition 5. Let µ denote the Möbius function on the partially ordered set of left principal ideals of R. For any r ∈ R the homogeneous weight of r is given by where γ is a real constant. We say that w is the normalized homogeneous weight for the case γ = 1.
Example 6. On a local Frobenius ring R with residue field GF(q), we have µ(0, Rx) = −1 for Rx = Soc R and µ(0, Rx) = 0 for x ∈ R\ Soc R. The homogeneous weight is given by where we choose γ = q − 1.
Lemma 7. Let R and S be finite rings. Let w R and w S be homogeneous weights on R and S respectively. Then the homogeneous weight of (r, s) ∈ R ⊕ S, denoted w R⊕S (r, s), satisfies for real numbers γ R⊕S , γ R and γ S .
Proof: The Möbius function on the partially ordered set of left principal ideals of R ⊕ S is given by where µ R and µ S are the Möbius functions on the partially ordered sets of left principal ideals of R and S, respectively. The rest follows directly from Definition 5.
A description of the homogeneous weight in terms of sums of generating characters is given by the following [19].
Theorem 8. Let R be a finite Frobenius ring with generating character χ. Then the homogeneous weights on R are precisely the functions where γ is a real number. The normalized homogeneous weight occurs for γ = 1.

Codes Over Rings
For the remainder, unless otherwise stated, we let R denote a finite Frobenius ring endowed with a homogeneous weight w. We extend w to a weight function on R n in the obvious way: We also let C ≤ R R n denote a left linear code. As usual, I and J will denote the real identity matrix and the real all-ones matrix, respectively. Definition 9. Let C have ℓ × n generator matrix Y = (y 1 |y 2 | . . . |y n ) over R (we do not assume that the rows of Y are linearly independent over R). C is called We remark that these notions are independent of the particular choice of Y .

Strongly Regular Graphs
We recall some elementary facts about strongly regular graphs. There are many texts on the subject. The reader is referred to [13], for example, for further details.
Definition 10. A graph G on N vertices is called strongly regular with parameters (N, k, λ, µ) if 1. G is regular of degree k, 2. every pair of adjacent vertices has exactly λ common neighbours, 3. every pair of non-adjacent vertices has exactly µ common neighbours.
A strongly regular graph G with parameters (N, k, λ, µ) is called trivial or imprimitive if either G or its complement is disconnected. If G is disconnected then µ = 0 and k = λ + 1, in which case it is the union of some number of complete graphs. If the complement of G is disconnected then k = µ.
Let A be the adjacency matrix of a graph G that is neither null nor complete. Then G is strongly regular if and only if An eigenvalue ρ = k is called restricted if it has eigenvector orthogonal to 1. It is well known that a connected regular graph of degree k is strongly regular if and only if it has exactly two distinct restricted eigenvalues. If G is strongly regular then (1) yields that any restricted eigenvalue ρ of A satisfies which immediately gives the following.
Lemma 11. Let G be a strongly regular graph with parameters (N, k, λ, µ). Let G have adjacency matrix with eigenvalues ρ 1 , ρ 2 , k. Then In particular, the parameters λ, µ are completely determined by k, ρ 1 , ρ 2 . It can be deduced from the fact that A has zero trace that if G is non-trivial, unless the ρ i occur with the same multiplicity, they are integers of opposite sign, say, k > ρ 2 > 0 > ρ 1 and further, that ρ 1 < −1.
In [11] it was shown that every projective code over a finite field with exactly two non-zero Hamming weights (also called a two-weight code) has a strongly regular Cayley graph.
Given a two-weight code C, with non-zero weights w 1 < w 2 , we denote by Γ(C) the graph whose vertices are the codewords of C and whose edges are pairs of vertices (c, c ′ ) such that w(c − c ′ ) = w 1 . Γ(C) is the Cayley graph of the set of codewords of weight w 1 in C. If C is a two-weight code, we say that C is imprimitive if Γ(C) is trivial. Otherwise we say that C is primitive.

Main Results
We now determine relations between the eigenvalues of Γ(C) and the weights of a two-weight code C.
Definition 12. The distance matrix of C is the |C| × |C| matrix D with rows and columns indexed by the elements of C and whose (u, v)-th entry The following is an extension of [11,Theorem 1]. The proof makes use of the character description of the homogeneous weight in the distance matrix of the code.
Theorem 13. Let C < R R n be regular and projective. Let J denote the |C| × |C| all-ones matrix. Then Proof: Let X be the |C| × n matrix whose rows are the codewords of C and let B be the |C| × |R × |n matrix B = [Xλ] λ∈R × . Each coefficient of B is indexed by the symbols c, (j, λ) for each c ∈ C, λ ∈ R × , j ∈ {1, . . . , n}, and we write B c,(j,λ) = c j λ. We write χ B to denote the complex |C| × |R × |n matrix whose components satisfy (χ B ) c,(λ,i) := χ(c i λ), i.e. χ B is obtained from B by applying the character χ to the coefficients of B. We write χ * B to denote the adjoint of χ B . Let π i : R n −→ R denote the projection onto the ith coordinate. Since C is regular, π i (C) = R and so . . , n}, and hence Let π ij : R n −→ R 2 be the projection of a word in R n onto the pair of coordinates indexed by i and j. For each λ, µ ∈ R × , define θ λ,µ : We can also relate χ B to the distance matrix of C: which gives Combining (4) and (6) we obtain DJ = γn|C|J.
Corollary 14. Let C be a proper, regular, projective two-weight code with nonzero weights w 1 < w 2 . Then Γ := Γ(C) is strongly regular and the eigenvalues k, ρ 1 , ρ 2 of the adjacency matrix of Γ satisfy A, D, J are real symmetric commuting matrices and can thus be simultaneously diagonalized by an orthogonal matrix. Applying Theorem 13, (i), we observe that 1 is an eigenvector of A with eigenvalue k satisfying (i), above.
Any eigenvector e of A orthogonal to 1 satisfies where ρ, θ are the associated eigenvalues for A and D, respectively. From Theorem 13, (ii), we have (D − nγ|C|I)(D)(D + γ|C| |R × | I) = 0, and hence D has exactly two eigenvalues θ 1 = 0 and θ 2 = − γ|C| |R × | corresponding to eigenvectors orthogonal to 1. That A 2 is the required linear combination of A, J, I follows from (7) and Theorem 13, (ii).
Corollary 15. Let C be a proper, regular, projective two-weight code with nonzero weights w 1 < w 2 . Let the adjacency matrix of Γ(C) have restricted eigenvalues ρ 1 < ρ 2 . Then For γ = |R × |, we get that the integer ρ 2 − ρ 1 divides |C|; since the values ρ 1 and ρ 2 are independent of this γ, this must hold true in general. Let d = w 2 − w 1 . Now solve for w 1 and w 2 using the equations dρ 1 = −w 2 and d = w 2 − w 1 .
Corollary 16. Let C be a proper, regular, projective two-weight code with nonzero weights w 1 < w 2 where the weight function is computed for γ = |R × |. Then there exists a positive integer d, a divisor of |C|, and positive integer t such that w 1 = dt and w 2 = d(t + 1).
Proof: For γ = |R × |, w 1 , w 2 are integers, and their difference d = w 2 − w 1 is a positive integer dividing |C|. Then from Corollary 14, (ii), and with the same notation, ρ 1 is a negative integer less than −1. Moreover, from Corollary 15, we get w 1 = d(−ρ 1 − 1) and w 2 = d(−ρ 1 ). The result follows with t = −(ρ 1 + 1). Proof: This follows immediately from Corollary 14 and the equations (cf. [13]) where Γ(C) is regular of degree k. We will use the following simple observation. Proof: Let I be a minimal right ideal of size p s . From the minimality we get I = aR with a ∈ R. For γ = |R × | we have So p s − 1 divides |R × |. Now let C be a proper, regular, projective two-weight code of order d i=1 p t i i with nonzero weights w 1 < w 2 where the weight function is computed for γ = |R × |. Let the largest restricted eigenvalue of the adjacency matrix of Γ(C) have multiplicity m 2 . Since C is an R-module, each p i divides |R| and since C is regular, |R| divides |C|. Therefore, R has a minimal right ideal a i R of order p s i i for some s i ≤ t i and for γ = |R × | we have Since C is regular, there is some c ∈ C with a unit entry in some coordinate.
Since the nonzero entries of a i c are unit multiples of a i in R we deduce that w(a i c) = ℓ i w(a i ) for some integer ℓ i ∈ {1, . . . , n}. Now w(a i c) ∈ {w 1 , w 2 }, so there is a j ∈ {1, 2} such that ℓ i divides w j , and by (8) Moreover, from Lemma 18, d i=1 (p s i i − 1) divides m 2 n = |R × |. Therefore, given a parameter set (N, k, λ, µ), we can often eliminate the possibility that the corresponding graph might arise from a two-weight code of length n without consideration of the underlying ring R. More generally, we have the following result.
. In particular for any T ⊆ {1, . . . , d} the number Proof: We identify the rings R i with their embeddings in R. For the first part, we use that R × is the direct product of the unit groups R × i and apply Lemma 18. For the second part, we denote a minimal right ideal of size p s i i in R i by M i . M i is also minimal when considered as a right ideal in R. By the minimality assumption, M i = a i R for some a i ∈ R. For T ⊆ {1, . . . , d} let a T = i∈T a i and M T be the right ideal i∈T M i . Then a T generates M T as a right ideal. Conversely, an element y ∈ M {1,...,d} generates M T as a right ideal if and only if y = i∈T y i for nonzero y i ∈ M i . Indeed M T = i∈T M i , and so from Lemma 7 it is easy to check that w(a T ) = W T . Furthermore, the right ideals of R contained in M T are exactly the right ideals M V with V ⊆ T . Since C is regular, there is a codeword c ∈ C with a unit entry in some coordinate.
Since c contains a unit and T = ∅, the codeword c T is not the zero word.
Using the fact that C is proper, the homogeneous weight of c T is Remark 20. Every finite ring is a direct product of rings of pairwise coprime prime power order. We call this its primary decomposition. Corollary 19 can always be applied to the primary decomposition of R.

Computer Search
In this section, a 'two-weight code' will mean a primitive, proper, regular, projective two-weight code.
Corollaries 15, 17 and 19 can be used to analyse tables of feasible parameters of strongly regular graphs to see which might arise from two-weight codes over rings. Feasible parameter sets for graphs of order at most 1300 can be read at [1]. In the following, we consider a feasible parameter set (N, k, λ, µ) of a strongly regular graph G with restricted eigenvalues ρ 1 < ρ 2 of multiplicities m 1 and m 2 , respectively. If G = Γ(C) for a proper, regular projective code C of order N , length n and nonzero weights w 1 < w 2 of respective frequencies k and N − k − 1 then Moreover, for γ = |R × | we have w 1 = −(ρ 1 + 1)θ and w 2 = −ρ 1 θ. Let N = |C| = d i=1 p t i i for some distinct primes p i and positive integers t i . We apply Corollary 19 to the primary decomposition of R: The values |R × | and s 1 , . . . , s d satisfy There exists a solution (x T ) T ⊆{1,...,d} in Corollary 19(b).
Note that these constraints allow extensive searching through the listings of feasible parameter sets without further specifying the underlying ring.
In the remaining cases we may fix a candidate ring satisfying the above and search for a generator matrix of a two-weight code of length n = m 2 |R × | . The search algorithm for the required generator matrices models the problem in terms of a system of Diophantine equations.

Choice of R
In order to conduct a complete search for a given feasible parameter set (N, k, λ, µ) of a strongly regular graph with restricted eigenvalues ρ m 1 1 , ρ m 2 2 we first must have a classification of all possible rings R over which there exists an R-module of size N . Using the primary decomposition of R, this amounts to a classification problem on rings of prime power order. For rings of order p, p 2 , p 3 for a prime p a complete classification can be read in [31]; those with the Frobenius property are listed below.
where for the ring Z p 2 [X]/(X 2 − αp, X 3 ), p is odd and α ∈ Z p 2 is not a square modulo p.
The finite Frobenius rings of order p 4 and p 5 can be derived from [12] and [9,10], respectively; the classification for such rings is much more complex. A general classification for arbitrary prime power order is not known.

Choice of the isomorphism type of C as an R-module
Once R is fixed, a complete feasible search requires knowledge of the structure of submodules of R n in terms of a canonical information set and generator matrix. Therefore, we restrict the search to modules over direct products of chain rings; specifically we restrict the search to modules over rings of order not divisible by a fourth prime power. 4 This still allows us to address existence of two-weight codes of most orders less than 1300. In addition, we exclude the case when R is isomorphic to a finite field from the search as this is a return to the classical case.
A finite chain ring is one whose ideals are linearly ordered. Such rings have prime power order. See [7,28,29] for more on the theory of finite chain 4 The order of a finite Frobenius ring that is not a direct product of finite chain rings necessarily is divisible by the fourth power of some prime, for example, the matrix ring Z 2×2 p . rings. For the remainder of this section we assume that R is a direct product of chain rings R 1 , . . . , R s where for each i, R i has residue field GF(q i ), chain length ℓ i and ideal chain 0 Let π i : R → R be the projection to the i-th component of R, that is π i canonically extends to mappings on vectors over R. In particular every left R-module M has a unique expression in the form M = s i=1 π i (M ). The following follows directly from [23,Theorem 2.2]. It describes the form of a generator matrix of a module over a direct sum of chain rings. As usual, we write λ ⊢ t if λ is a partition of t. By ℓ(µ) we denote the length of a partition µ, that is, the number of its non-zero summands.
M is the row space of an (e 1 + . . . + e s ) × n matrix Y over R, whose columns are elements of s i=1 e i j=1 I(i, λ i j ). Each element of M can be uniquely written in the form xY , where x is a row vector in The Λ of Lemma 22 is called the shape of the module M over R. To generate all possible isomorphism types of C as an R-module, we loop over all shapes Λ given by Lemma 22 leading to an R-module of size N . Knowing the shape of a code means we may assume that C is given by a generator matrix Y as in Lemma 22. Thus only certain vectors of R n may appear as columns in Y . There are further restrictions we can impose on Λ. Since C is projective, we have λ i 1 = ℓ i for all i. Furthermore if R i = R j for some i = j, the ring R has an automorphism interchanging the i-th and the j-th component, so up to code isomorphism we may assume λ i ≤ λ j with respect to some fixed linear ordering on the partitions.

Diophantine equation system
Once the base ring R and the shape Λ = (λ 1 , . . . , λ s ) with partitions λ i = (λ i 1 , . . . , λ i e i ) is fixed, the existence problem for the two-weight code C can be reformulated as a Diophantine equation system. This is done by adapting the method of [24].
By Lemma 22, C has a generator matrix Y ∈ R (e 1 +...+es)×n whose columns are elements of the module M = s i=1 e i j=1 I(i, λ j i ), and each codeword of C can be uniquely written in the form xY , where x is a row Let O be a set of right-projective representatives of the regular vectors in M . Let r = |O| and let t = |X|. Let v ∈ {0, 1} r be the characteristic vector of the columns of Y in O whose entries are labelled by the elements of O. That is, for each y ∈ O, v y = 1 if y is right projectively equivalent to a column of Y and is zero otherwise. Since C is regular and projective, each column of Y corresponds to exactly one element of O. In particular, any two codes determine the same characteristic vector if and only if they are monomially equivalent.
Define a matrix W ∈ Z (t−1)×r whose rows are labelled by the elements of X \{0}, whose columns are labelled by the elements of O and which satisfies W x,y = w( x, y ) = w((xM ) y ) for each x ∈ X and y ∈ O. The weight of the codeword xY is given by w(xY ) = (W v) x . Let 0 < w 1 < w 2 ∈ Z. Let Z be the (t − 1) × (t − 1) diagonal matrix (w 2 − w 1 )I. Then C is a two-weight code of the given parameters if and only if there is a vector u ∈ {0, 1} t−1 of auxiliary variables such that (v, u) ∈ {0, 1} r+t−1 is a solution of the Diophantine equation system Therefore, the existence of C can be decided by applying an integer linear program solver to this equation system. In the case that a solution exists, the solution part v gives us the columns of a generator matrix of a suitable code C. The solver we used is described in [32,33].

Results
We performed a search for two-weight codes C of order at most 1300 as follows: 1. We listed all parameter sets (N, k, λ, µ), ρ m 1 1 , ρ m 2 2 given in [1] satisfying the integrality condition (10). 2. For each such paramter set in the above list, we write N = d i=1 p t i i with p i pairwise distinct primes and assume that the underlying ring has the primary decomposition R = R 1 ⊕ . . . ⊕ R d with |R i | = p r i i and 1 ≤ r i ≤ t i (since C is projective and regular over R). We listed all possibilities for the tuples (|R × |, s 1 , . . . , s d ) satisfying the conditions (11), (12) and (13). 3. For each tuple (|R × |, s 1 , . . . , s d ) in the above list, using Lemma 21 we generated all finite Frobenius rings • R has the prescribed number of units.
• For all i ∈ {1, . . . , d}, R i has a minimal right ideal of size p s i i . • R is not a finite field and |R| is not divisible by a fourth prime power.
4. For each such ring R we listed all the potential shapes Λ of C as discussed in Section 4.2. 5. For each such shape Λ we sought a solution to a system of Diophantine equations as in (14).
In every case that a two-weight code was found, N was the square of a prime power. 5 The computations were completed successfully for all orders N except 256, 324, 486, 512, 576, 640, 729, 768, 800, 1024, 1296.
For each of the above orders, there is some parameter set that yields an equation system too large for the solver to terminate within a reasonable time limit.
If N = p 4 1 p 2 . . . p t for distinct primes p i and all computations were successfully completed under the assumption that |R| is not divisible by a fourth power, then we have the following additional existence criteria: If there exists a two-weight C over R such that Γ(C) is an (N, K, λ, µ) strongly regular graph then N = |C| = |R| and hence n = 1 as C is projective. Then the equation system in Corollary 15(b) must have a solution for n = 1. This eliminates the putative parameter sets (162, 92, 46, 60), (162, 138, 117, 120) and (162, 140, 121, 120) as arising from a two-weight code.
There are currently 2960 (up to complements: 1514) feasible parameter sets for strongly regular graphs on at most 1300 vertices for which the actual existence of a corresponding graph is not yet known [1]. After applying (10), there remain 867 such parameter sets. Filtering further for conditions (11), (12) and (13), we are left with 129 parameter sets. In the end, there are only 82 cases where it is not known whether or not such a graph may arise from a two-weight code. We remark that this existence question is not invariant under taking complements. Among the 82 cases there are no selfcomplementary parameter sets (recall we must have ρ 1 < ρ 2 ), and exactly 6 pairs of parameter sets complementary to each other, these are: (729,140,13,30) and ( C is a primitive proper regular projective two-weight code with homogeneous weight enumerator 0 1 8 9 12 6 (scaling factor γ set to |R × | = 3). As an Rmodule, C is isomorphic to R(1, 0) ⊕ R(0, 1) ⊕ R(0, 1), so C is not free. The strongly regular graph generated by C is isomorphic to the 4 2 -graph. In fact, it turns out that the code C is a member of an infinite family of two-weight codes codes over base rings of the form GF(p k ) × GF(p l ), which generate strongly regular graphs having the parameters of those determined by orthogonal arrays of strength 2. Details will be published in a forthcoming paper.

Gray Isometries
An immediate consequence of Corollary 16 is given by the following.
Corollary 23. Let R have prime power order p s for some prime p and positive integer s. Let C be a proper, regular, projective two-weight code over R with nonzero weights w 1 < w 2 , where the weight function is computed for γ = |R × |. Then there exist integers r and t, r ≥ 0, t > 0, satisfying w 1 = p r t and w 2 = p r (t + 1).
One question that arises from Corollary 23 concerns whether or not a two-weight code of prime power order yields a graph isomorphic to one arising from a finite field.
We now consider the possibility that some of the known constructions of linear two-weight codes over a finite field are images of linear codes over a finite chain ring under the Gray isometry. A number of authors have looked into extending the standard Gray isometry between (Z 4 , w Lee ) and (Z 2 2 , w Ham ) for the case of a finite chain ring (c.f. [17,21,22,30]). The Gray map for more general rings has been considered in [21]. If R is a finite chain ring of length n and residue field GF(q) there is an isometric embedding of R for the homogeneous weight into GF(q) q n−1 for the Hamming weight (which of course is homogeneous over GF(q)), in which case the image of R is the generalized Reed-Muller code GRM(1, n − 1).