Non-Projective Two-Weight Codes

It has been known since the 1970’s that the difference of the non-zero weights of a projective Fq-linear two-weight code has to be a power of the characteristic of the underlying field. Here, we study non-projective two-weight codes and, e.g., show the same result under mild extra conditions. For small dimensions we give exhaustive enumerations of the feasible parameters in the binary case.


INTRODUCTION
It has been known since the 1970's that the two non-zero weights of a projective F q -linear two-weight code C can be written as w 1 = up t and w 2 = (u + 1)p t , where u ∈ N ≥1 and p is the characteristic of the underlying finite field F q , see [19, Corollary 2].So, especially the weight difference w 2 − w 1 is a power of the characteristic p.Here we want to consider F q -linear two-weight codes C with non-zero weights w 1 < w 2 which are not necessarily projective.In [12] it was observed that if w 2 − w 1 is not a power of the characteristic p, then the code C has to be non-projective, which settles a question in [36].Here we given projective code, e.g.we can take complements or add simplex codes of the same dimension.Our obtained results may be rephrased in the language of the BvE-dual transform by restricting to a canonical choice of the involved parameters.For further literature on the dual transform see e.g.[5,9,13,38].For a variant that is rather close to our presentation we refer to [10].
With respect to further related literature we remark that a special subclass of (non-projective) twoweight codes was completely characterized in [30].A conjecture by Vega [39] states that all two-weight cyclic codes are the "known" ones, c.f. [22].Another stream of literature considers the problem whether all projective two-weight codes that have the parameters of partial k-spreads indeed have to be partial k-spreads.Those results can be found in papers considering extendability results for partial k-spreads or classifying minihypers, see e.g.[24].Several non-projective two-weight codes appear also as minimum length examples for divible minimal codes [35]. 1 Two-weight codes have also been considered over rings instead of finite fields, see e.g.[15].
The remaining part of this paper is structured as follows.In Section 2 we introduce the necessary preliminaries for linear two-weight codes and their geometric counterpart called two-character multisets in projective spaces.In general multisets of points, corresponding to general linear codes, can be described via so-called characteristic functions and we collect some of their properties in Section 3. Examples and constructions for two-character multisets are given in Section 4. In Section 5 we present our main results.We close with enumeration results for two-character multisets in PG(k − 1, q) for small parameters in Section 6.We will mainly use geometric language and arguments.For the for the ease of the reader we only use elementary arguments and give (almost) all proof details.In an appendix we list all candidates for sets of parameters of two-character sets in PG(k − 1, 2) for 4 ≤ k ≤ 12 and state corresponding constructions from the literature.A few cases are left open for k ∈ {11, 12}.

PRELIMINARIES
An [n, k] q -code C is a k-dimensional subspace of F n q , i.e., C is assumed to be F q -linear.Here n is called the length and k is called the dimension of C. Elements c ∈ C are called codewords and the weight wt(c) of a codeword is given by the number of non-zero coordinates.Clearly, the all-zero vector 0 has weight zero and all other codewords have a positive integer weight.A two-weight code is a linear code with exactly two non-zero weights.A generator matrix for C is an k × n matrix G such that its rows span C. We say that C is of full length if for each index 1 ≤ i ≤ n there exists a codeword c ∈ C whose ith coordinate c i is non-zero, i.e., all columns of a generator matrix of C are non-zero.The dual code C ⊥ of C is the (n − k)-dimensional code consisting of the vectors orthogonal to all codewords of C w.r.t. the inner product ⟨u, v⟩ = n i=1 u i v i .Now let C be a full-length [n, k] q -code with generator matrix G.Each column g of G is an element of F k q and since g ̸ = 0 we can consider ⟨g⟩ as point in the projective space PG(k − 1, q).Using the geometric language we call 1-, 2-, 3-, and (k − 1)-dimensional subspaces of F k q points, lines, planes, and hyperplanes in PG(k − 1, q).Instead of an l-dimensional space we also speak of an l-space.By P we denote the set of points and by H we denote the set of hyperplanes of PG(k − 1, q) whenever k and q are clear from the context.A multiset of points in PG(k − 1, q) is a mapping M : P → N, i.e., to each point P ∈ P we assign its multiplicity M(P ) ∈ N. By #M = P ∈P M(P ) we denote the cardinality of M. The support supp(M) is the set of all points with non-zero multiplicity.We say that M is spanning if the set of points in the support of M span PG(k − 1, q).Clearly permuting columns of a generator matrix G or multiplying some columns with non-zero elements in F ⋆ q := F q \{0} yields an equivalent code.Besides that we get an one-to-one correspondence between full length [n, k] q -codes and spanning multisets of points M in PG(k − 1, q) with cardinality #M = n.Moreover, two linear [n, k] q -codes C and C ′ are equivalent iff their corresponding multisets of points M and M ′ are.For details we refer e.g. 1 Minimal codes are linear codes where all non-zero codewords are minimal, i.e., whose support is not properly contained in the support of another codeword.
to [21].A linear code C is projective iff its corresponding multiset of points satisfies M(P ) ∈ {0, 1} for all P ∈ P. We also speak of a set of points in this case.The multisets of points with M(P ) = 0 for all P ∈ P are called trivial.
Geometrically, for a non-zero codeword c ∈ C the set c • F ⋆ q corresponds to a hyperplane H ∈ H and wt(c) = #M − M(H), where we extend the function M additively.i.e., M(S) := P ∈S M(P ) for every subset S ⊆ P of points.We call M(H) the multiplicity of hyperplane H ∈ H and have M(V ) = #M for the entire ambient space V := P. The number of hyperplanes #H, as well as the number of points #P, in PG(k − 1, q) is given by [k] q := q k −1 q−1 .A two-character multiset is a multiset of points M such that exactly two different hyperplane multiplicities M(H) occur.I.e., a multiset of points M is a two-character multiset iff its corresponding code C is a two-weight code.If M actually is a set of points, i.e. if we have M(P ) ∈ {0, 1} for all points P ∈ P, then we speak of a two-character set.We say that an A one-weight code is an [n, k] q -code C such that all non-zero codewords have the same weight w.One-weight codes have been completely classified in [3] and are given by repetitions of so-called simplex codes.Geometrically, the multiset of points M in PG(k − 1, q) corresponding to a one-weight code C satisfies M(P ) = l for all P ∈ P. I.e., we have where l > 1, and non-repetitive otherwise.A given multiset of points M is called repeated if its corresponding code is.More directly, a non-trivial multiset of points M is repeated iff the greatest common divisor of all point multiplicities is larger than one.We say that a multiset of points M or its corresponding linear code C has full support iff supp(M) = P, i.e., if M(P ) > 0 for all P ∈ P. So, for each non-repetitive one-weight code C with length n, dimension k, and non-zero weight w we have n = [k] q and w = q k−1 .Each non-trivial one-weight code, i.e., one with dimension at least 1, has full support.The aim of this paper is to characterize the possible parameters of non-repetitive two-weight codes (with or without full support).For the correspondence between [n, k] q -codes and multisets of points M in PG(k − 1, q) we have assumed that M is spanning.If M is not spanning, then there exists a hyperplane containing the entire support, so that M is twocharacter multiset iff M induces a one-character multiset in the span of supp(M) cf.Proposition 4.1.The structure of the set of all two-character multisets where the larger hyperplane multiplicity is attained for a prescribed subset of the hyperplanes is considered in Section 5.

CHARACTERISTIC FUNCTIONS
Fixing the field size q and the dimension k of the ambient space, a multiset of points in PG(k − 1, q) is a mapping M : P → N. By F we denote the Q-vector space consisting of all functions F : P → Q, where addition and scalar multiplication is defined pointwise.I.e., (F 1 + F 2 )(P ) := F 1 (P ) + F 2 (P ) and (x • F 1 )(P ) := x • F 1 (P ) for all P ∈ P, where F 1 , F 2 ∈ F and x ∈ Q are arbitrary.For each non-empty subset S ⊆ P the characteristic function χ S is defined by χ S (P ) = 1 if P ∈ S and χ S (P ) otherwise.Clearly the set of functions χ P for all P ∈ P forms a basis of F for ambient space PG(k − 1, q) for all k ≥ 1.Note that there are no hyperplanes if k = 1 and hyperplanes coincide with points for k = 2.We also extend the functions F ∈ F additively, i.e., we set F (S) = P ∈S F (P ) for all S ⊆ P. Our next aim is to show the well-known fact that also the set of functions χ H for all hyperplanes H ∈ H forms a basis of F for ambient space PG(k − 1, q) for all k ≥ 2. In other words, also M(P ) can be reconstructed from the M(H): Lemma 3.1.Let M ∈ F for ambient space PG(k − 1, q), where k ≥ 2.Then, we have for all points P ∈ P.
PROOF.W.l.o.g.we assume k ≥ 3. Since each point q hyperplanes that contain P , we have so that . Thus, we can conclude the stated formula using □ As an example we state that in PG(3 − 1, 2) we have Lemma 3.2.Let M ∈ F for ambient space PG(k − 1, q), where k ≥ 2. Then there exist α H ∈ Q for all hyperplanes H ∈ H such that Moreover, the coefficients α H are uniquely determined by M.

PROOF. From
for each point P ∈ P and we conclude the existence of the α H ∈ Q.Since the functions (χ P ) P ∈P form a basis of the Q-vector space F , which is also generated by the functions (χ H ) H∈H , counting #P = [k] q = #H yields that also (χ H ) H∈H forms a basis and the coefficients α H are uniquely determined by M. □ If M ∈ F is given by the representation M = P ∈P α P • χ P with α P ∈ Q we can easily decide whether M is a multiset of points.The necessary and sufficient conditions are given by α P ∈ N for all P ∈ P (including the case of a trivial multiset of points).If a multiset of points is characterized by coefficients α H for all hyperplanes H ∈ H as in Lemma 3.2 then some α H may be fractional or negative.For two-character multisets we will construct a different unique representation involving the characteristic functions χ H of hyperplanes, see Theorem 5.11.
Let us state a few observations about operations for multisets of points that yield multisets of points again.
Lemma 3.3.For two multisets of points M 1 , M 2 of PG(k − 1, q) and each non-negative integer n ∈ N the functions M 1 + M 2 and n • M 1 are multisets of points of PG(k − 1, q).In order to say something about the subtraction of multisets of points we denote the minimum point multiplicity of a multiset of points M by µ(M) and the maximum point multiplicity by γ(M).Whenever M is clear from the context we also just write µ and γ instead of µ(M) and µ(γ).Lemma 3.4.Let M 1 and M 2 be two multisets of points of Definition 3.5.Let M be a multiset of points in PG(k − 1, q).If l is an integer with l ≥ γ(M), then the l-complement M l−C of M is defined by M l−C (P ) := l − M(P ) for all points P ∈ P.
One can easily check that M l−C is a multiset of points with cardinality l • [k] q − #M, maximum point multiplicity γ M l−C = l − µ(M), and minimum point multiplicity µ M l−C = l − γ(M).Using characteristic functions we can write M l−C = l • χ V − M, where V = P denotes the set of all points of the ambient space.
Given an arbitrary function M ∈ F there always exist α ∈ Q\{0} and

EXAMPLES AND CONSTRUCTIONS FOR TWO-CHARACTER MULTISETS
The aim of this section is to list a few easy constructions for two-character multisets of points M in PG(k−1, q).We will always abbreviate n = #M and denote the two occurring hyperplane multiplicities by s and t, where we assume s > t by convention.Proposition 4.1.For integers 1 ≤ l < k let L be an arbitrary l-space in PG(k − 1, q).Then χ L is a two-character set with n = [l] q , γ = 1, µ = 0, s = [l] q , and t = [l − 1] q .
Note that for the case l = k we have the one-character set χ V , which can be combined with any two-character multiset.Lemma 4.2.Let M be a two-character multiset of points in PG(k − 1, q).Then, for each integer 0 ≤ a ≤ µ(M), each b ∈ N , and each integer c ≥ γ(M) the functions and c • χ V − M are two-character multisets of points.
For the first and the fourth construction we also spell out the implications for the parameters of a given two-character multiset: Lemma 4.3.Let M be a multiset of points in PG(k−1, q) such that M(H) ∈ {s, t} for every hyperplane H ∈ H.If M(P ) ≥ l for every point P ∈ P, i.e., l ≤ µ(M), then M Let M be a multiset of points in PG(k−1, q) such that M(H) ∈ {s, t} for every hyperplane H ∈ H.If M(P ) ≤ u, i.e. ≤ γ(M) for every point P ∈ P, then the u-complement We can also use two (almost) arbitrary subspaces to construct two-character multisets: Proposition 4.5.Let a ≥ b ≥ 1 and 0 ≤ i ≤ b − 1 be arbitrary integers, A be an a-space and B be an b-space with dim(A ∩ B) = i in PG(k − 1, q), where k = a + b − i, Then, M = χ A + q a−b • χ B satisfies M(H) ∈ {s, t} for all H ∈ H, where s = [a − 1] q + q a−b • [b − 1] q and t = s + q a−1 .If i = 0, then γ = q a−b and γ = q a−b + 1 otherwise.In general, we have n = [a] q + q a−b • [b] q and µ = 0.
Based on hyperplanes we can construct large families of two-character multisets: By allowing H ′ to be a multiset of hyperplanes, we end up with (τ + 1)-character sets, where τ is the maximum number of occurrences of a hyperplane in H ′ .
Applying Lemma 4.3 yields: In some cases we obtain two-character multisets where all point multiplicities have a common factor g > 1.
Here we can apply the following general construction: Lemma 4.9.Let M be a multiset of points in PG(k−1, q) such that M(H) ∈ {s, t} for every hyperplane H ∈ H.If M(P ) ≡ 0 (mod g) for every point P ∈ P, then Interestingly enough, it will turn out that we can construct all two-character multisets by combining Lemma 4.7 with Lemma 4.2 and Lemma 4.9, see Theorem 5.11 and Theorem 5.13.

GEOMETRIC DUALS AND SETS OF FEASIBLE PARAMETERS FOR TWO-CHARACTER MULTISETS
To each two-character multiset M in PG(k − 1, q), i.e., {M(H) : H ∈ H} = {s, t} for some s, t ∈ N we can assign a set of points M by using the geometric dual, i.e., interchanging hyperplanes and points.More precisely, fix a non-degenerated billinear form ⊥ and consider pairs of points and hyperplanes (P, H) that are perpendicular w.r.t. to ⊥.We write H = P ⊥ for the geometric dual of a point.We define M via M(P ) = 1 iff M(H) = s, where H = P ⊥ , and M(P ) = 0 otherwise, i.e., if M(H) = t. 2 Of course we have some freedom how we order s and t.So, we may also write M(P ) = (M(H) − t) /(s − t) ∈ {0, 1} for all P ∈ P, where H = P ⊥ .Noting the asymmetry in s and t we may also interchange the role of s and t or replace M by its complement.Note that in principle several multisets of points with two hyperplane multiplicities can have the same corresponding point set M.
For the other direction we can start with an arbitrary set of points M, i.e., M(P ) ∈ {0, 1} for all P ∈ P. The multiset of points with two hyperplane multiplicities M is then defined via M(H) = s if M(P ) = 1, where H = P ⊥ , and M(H) = t if M(P ) = 0. I.e., we may set ( While we have M(H) ∈ N for all s, t ∈ N, the point multiplicities M(P ) induced by the hyperplane multiplicities M(H), see Lemma 3.1, are not integral or non-negative in general.For suitable choices of s and t they are, for others they are not.
Directly from Lemma 4.2 we can conclude: Before we study the general structure of L(M) and show that it can generated by a single element (s 0 , t 0 ) in the above sense, we consider all non-isomorphic examples in PG(3 − 1, 2) (ignoring the constraint s ≥ t).
Example 5.3.Let M be a multiset of points in PG(2, 2) uniquely characterized by M(L) = s ∈ N for some line L and M(L ′ ) = t ∈ N for all other lines L ′ ̸ = L.For each point P ∈ L we have and for each point Q / ∈ L we have Since M(P ), M(Q) ∈ N we set x := M(P ) = s 3 and y := M(Q) = 3t−s 6 , so that s = 3x and t = 2y + x.With this we have n = 3x + 4y, γ = max{x, y}, and For Example 5.3 the set of all feasible (s, t)-pairs assuming s ≥ t is given by ⟨(3, 1)⟩ N + ⟨(3, 3)⟩ N .If we assume t ≥ s, then the set of feasible (s, t)-pairs is given by ⟨(0, 2)⟩ N + ⟨(3, 3)⟩ N .The vector (0, 2) can be computed from (3, 1) by computing a suitable complement.
Due to Lemma 4.3 we can always assume the existence of a point of multiplicity 0 as a normalization.So, in Example 5.3 we may assume x = 0 or y = 0, so that Due to Lemma 4.9 we can always assume that the greatest common divisor of all point multiplicities is 1 as a normalization (excluding the degenerated case of an empty multiset of points).Applying both normalizations to the multisets of points in Example 5.3 leaves the two possibilities χ L and χ E − χ L , i.e., point sets.
Due to Lemma 4.4 we always can assume #M ≤ γ(M)•[k] q /2.Applying also the third normalization to the multisets of points in Example 5.3 leaves only the possibility χ L , i.e., a subspace construction, see Proposition 4.1, where s = 3, t = 1, n = 3, and s − t = 2.
Example 5.4.Let M be a multiset of points in PG (2,2) for each point and for each point R / ∈ L 1 ∪ L 2 we have Since M(Q), M(R) ∈ N we set x := M(Q) = s+t 6 and y := M(R) = 2t−s 3 , so that s = 4x − y and t = 2x + y.With this we have n = 6x + 7y and s − t = 2(x − y).Of course we need to have y ≤ 2x so that M(P ) ≥ 0, which implies s ≥ 0.
• M(P ) = 0: y = 2x, so that , and the greatest common divisor of M(P ), M(Q), and M(R) is equal to x.Thus, we can assume x = 1, y = 2, so that and M(L ′ ) = t ∈ N for all other lines.We have and for all points Q ̸ = P .Since M(P ), M(Q) ∈ N we set x := M(P ) = s − 2t 3 and y := M(Q) = t 3 , so that s = x + 2y and t = 3y.With this we have n = x + 6y and s − t = x − y.
So, also Example 5.5 can be explained by the subspace construction in Proposition 4.1.
Example 5.6.Let M be a multiset of points in PG(2, 2) uniquely characterized by and M(L ′ ) = t ∈ N for all other lines.For each point P that is contained on exactly two lines L i we have for each point Q that is contained on exactly one line L i we have and for the unique point R that is contained on none of the lines L i we have Since M(P ), M(Q) ∈ N we set x := M(P ) = 3s−t 6 and y := M(Q) = t 3 , so that s = 2x + y and t = 3y.With this we have n = 2x + 5y and s − t = 2(x − y).
So, also Example 5.6 can be explained by the construction in Proposition 4.5.
In Examples 5.3-5.6 we have considered all cases of 1 ≤ #M ≤ 3 up to symmetry.The cases #M ∈ {0, 7} give one-character multisets.By considering the complement M ′ = χ V − M we see that examples for 4 ≤ #M ≤ 6 do not give something new.Since the dimension of the ambient space is odd, we cannot apply the construction in Proposition 4.6.Now let us consider the general case.Given the set M of hyperplanes with multiplicity s we get an explicit expression for the multiplicity M(P ) of every point P ∈ P depending on the two unknown hyperplane multiplicities s and t.
Lemma 5.7.Let M be a set of points in PG(k − 1, q), where k ≥ 3, and M be a multiset of points in Denoting the number of hyperplanes H ∋ P with M(H) = s by φ(P ) and setting r := #M, ∆ := s − t ∈ Z, we have PROOF.Counting gives that [k − 1] q − φ(P ) hyperplanes through P have multiplicity t, from the q k−1 hyperplanes not containing P exactly r − φ(P ) have multiplicity M(H) = s and q k−1 − r + φ(P ) have multiplicity M(H) = t.With this we can use Lemma 3.1 to compute □ Note that φ(P ) = M(P ⊥ ) for all P ∈ P.
Lemma 5.8.Let M be a set of points in PG(k − 1, q), where k ≥ 3, and M be a multiset of points in 0 for all hyperplanes H ∈ H. Denote the number of hyperplanes H ∋ P with M(H) = s by φ(P ) and uniquely choose m ∈ N, I ⊆ N with 0 ∈ I such that {φ(P ) : P ∈ P} = {m + i : i ∈ I}.If s > t and there exists a point Q ∈ P with M(Q) = 0, then we have and for all points P ∈ P where i := φ(P ) − m, r := #M, and PROOF.Using ∆ > 0 we observe that the expression for M(P ) in Equation ( 17) is increasing in φ(P ).So, we need to choose a point Q ∈ P which minimizes φ(Q) to normalize using M(Q) = 0 since otherwise we will obtain points with negative multiplicity.So, choosing a point Q ∈ P with φ(Q) = m we require which yields Equation (18).Using i := φ(P ) − m and the expression for t we compute for all P ∈ P. Note that if f > 1 is a divisor of ∆ that is coprime to q, then all point multiplicities of M are divisible by f .If ∆ = q k−2 • f for an integer f > 1, then all point multiplicities of M are divisible by f .Thus, we have that Lemma 5.9.Let M be a set of points in PG(k − 1, q), where k ≥ 3 and M be a multiset of points in PG(k − 1, q) such that M(H) = s if M(H ⊥ ) = 1 and M(H) = t if M(H ⊥ ) = 0 for all hyperplanes H ∈ H. Using the notation from Lemma 5.8 we set If s > t, then we have and there exists a point Q ∈ P with M ′ (Q) = 0. Clearly, we have (s ′ , t ′ ) ∈ N 2 and s ′ > t ′ .From Lemma 5.8 we conclude the existence of an integer for all P ∈ P. Since M ′ (P ) ∈ N for all P ∈ P we have that we observe that M ′ (P ) is divisible by f and we set M ′′ := 1 f • M ′ .With this, we can check that M ′′ is a two-character multiset corresponding to (s 0 , t 0 ) ∈ L(M).□ Note that it is not necessary to explicitly check t 0 ∈ N since M ′′ (P ) ∈ N is sufficient to this end.
Before we consider the problem whether L(M) ⊆ N 2 contains an element (s, t) with s > t we treat the so far excluded case k = 2 separately.Lemma 5.10.Let M be a set of points in PG(1, q).Then, we have where s 0 = 0 if #M ∈ {0, q + 1} and s 0 = 1 otherwise.
PROOF.If #M ∈ {0, q + 1}, then a two-character multiset M corresponding to (s, t) ∈ M actually is a one-character multiset and there exist some integer x ∈ N such that M = x • χ v .
Otherwise we observe that in PG(1, q) points and hyperplanes coincide and the image of M is {0, 1}.Note that we have M = t • χ V + P ∈P (s − t) • M(P ) • χ P for each two-character multiset M corresponding to (s, t) ∈ L(M) by definition.We can easily check (s, t) ∈ ⟨(1, 0)⟩ N +⟨(q + 1, q + 1)⟩ N .The proof is completed by choosing s = 1 and t = 0 in our representation of M. □ Theorem 5.11.Let M be a set of points in Setting µ := µ(M) and g := gcd({M(P ) − µ : P ∈ P}) the function is a two-character multiset corresponding to (s 2 , and g divides q k−2 .Moreover, we have PROOF.We can easily check for all H ∈ H as well as #M = r[k − 1] q directly from the definition of M. Using Lemma 4.3 and Lemma 4.9 we conclude that M ′ is a two-character multiset with the stated parameters.For k = 2 Lemma 5.10 our last statement.For k ≥ 3 we can apply Lemma 5.8 to conclude g = gcd({i ∈ I}) and use the proof of Lemma 5.9 to conclude our last statement.Since s, t ∈ N and s > t we have that g divides g(s − t) = q k−2 .□ Using the notation from Lemma 5.8 applied to to the multiset of points M−µ•χ V from Theorem 5.11 we observe #I ≥ 2 for #M / ∈ {0, [k] q }.Using the fact that g := gcd({M(P ) − µ : P ∈ P}), that g divides q k−2 , and Equation ( 19) we conclude where Using the classification of one-character multisets we conclude from Theorem 5.11: Corollary 5.12.Let M be a set of points in PG(k − 1, q), where k ≥ 2.Then, there exist (s Theorem 5.13.Let M be a two-character multiset in PG(k − 1, q), where k ≥ 2.Then, there exist unique u, v , where s 0 , t 0 are as in Theorem 5.11.From Lemma 3.1 we then conclude □ Note that for a one-character multiset M there exists a unique v ∈ N such that M = v •χ V .Given a set of points M we call M ′ the canonical representant of the set of two-character multisets M corresponding to (s, t) ∈ L(M).If M = M ′ we just say that M is the canonical two-character multiset.
Theorem 5.14.Let w 1 < w 2 be the non-zero weights of a non-repetitive [n, k] q two-weight code C without full support.Then, there exist integers f and u such that w 1 = up f and w 2 = (u + 1)p f , where p is the characteristic of the underlying field F q .
PROOF.Let M be the two-character multiset in PG(k − 1, q) corresponding to C. Choose unique u, v ∈ N such that M = u • M ′ + v • χ V as in Theorem 5.13.Since C does not have full support, we have v = 0 and since C is non-repetitive we have u = 1.With this we can use Theorem 5.11 to compute and where f is chosen such that q k−2 g = p f .I.e., we can choose u = r − qµ − 1. □ We have seen in Equation ( 27) that we can compute the parameter g directly from the set of points M. If we additionally assume that M is spanning, then we can consider the corresponding projective [n, k] q -code C, where n = #M. 3Note that we have M(H) ≡ m (mod g) for all H ∈ H and that g is maximal with this property.If m ≡ n (mod g), then g would simply be the maximal divisibility constant of the weights of C. From [29, Theorem 7] or [40,Theorem 3] we can conclude m ≡ n (mod g).Thus, we have g = gcd wt(c) : The argument may also be based on the following lemma (using the fact that C is projective): 3 If M is not spanning then we can consider the lowerdimensional subspace spanned by supp(M).
Lemma 5.15.Let C be an [n, k] q -code of full length such that we have wt(c) ≡ m (mod ∆) for all non-zero codewords c ∈ C. If ∆ is a power of the characteristic of the underlying field F q , then we have m ≡ 0 (mod min{∆, q}).Moreover, if additionally q divides ∆ and k ≥ 2, then the non-zero weights in each residual code are congruent to m/q modulo ∆/q.
PROOF.Let M be the multiset of points in PG(k − 1, q) corresponding to C. For each hyperplane H we have n − M(H) ≡ m (mod ∆), which is equivalent to M(H) ≡ n − m (mod ∆).The weight of a non-zero codeword in a residual code is given by a subspace K of codimension 2 and a hyperplane H with K ≤ H.With this, the weight is given by M(H) − M(K) ≡ n − m − M(K) (mod ∆).Counting the hyperplane multiplicities of the q + 1 hyperplanes that contain K yields and □ Given Equation (30) we might be interested in projective divisible codes (with a large divisibility constant).For enumerations for the binary case we refer to [27] and for a more general survey we refer to e.g.[34].Note that the only point sets M in PG(k − 1, q) that are q k−1 -divisible are given by #M ∈ {0, [k] q }, i.e., the empty and the full set.All other point sets are at most q k−2 -divisible, as implied by Theorem 5.11.

ENUMERATION OF TWO-CHARACTER MULTISETS IN
Since all two-character multisets in PG(1, q) can be parameterized as M = b • χ V + P ∈P (a − b) • M(P ) • χ P for integers a > b ≥ 0 and a set of points M in PG(k − 1, q), see Lemma 5.10 and its proof, we assume k ≥ 3 in the following.Due to Theorem 5.13 every two-character multiset in PG(k − 1, q) can be written as u • M ′ + v • χ V , where u, v ∈ N and M ′ is characterized in Theorem 5.11.So, we further restrict out considerations on canonical two-character multisets where we have u = 1 and v = 0.For k = 2 all canonical two-character multisets in PG(k − 1, q) are indeed sets of points and given by the construction in Proposition 4.6 (with r = 1).
It can be easily checked that two isomorphic sets of points in PG(k − 1, q) yield isomorphic canonical two-character multisets M ′ .So, for the full enumeration of canonical two-character multisets in PG(k − 1, q) we just need to loop over all non-isomorphic sets of points M in PG(k −1, q) and use Theorem 5.11 to determine M, M ′ , and their parameters.We remark that the numbers of non-isomorphic projective codes per length, dimension, and field size are e.g.listed in [1, Tables 6.10-6.12](for small parameters).For the binary case and dimensions at most six some additional data can be found in [4].Here we utilize the software package LINCODE [6] to enumerate these codes.
From the data in Table 1 and Table 2 we can guess the the maximum possible point multiplicity γ(M ′ ) of M ′ : Proposition 6.1.Let M be a canonical two-character multiset in PG(k − 1, q), where k ≥ 2.Then, we have γ(M) ≤ q k−2 .

APPENDIX A. FEASIBLE PARAMETERS FOR BINARY PROJECTIVE TWO-WEIGHT CODES
In this appendix we want to utilize our parameterization for the parameters of two-character multisets in order to determine the set of feasible parameters of two-character sets being equivalent to projective two-weight codes.
Starting with the sum of the characteristic functions of r different hyperplanes in PG(k − 1, q), where k ≥ 3, we have n = r[k − 1] q for the cardinality and s = r[k − 2] q + q k−2 , t = r[k − 2] q for the two different hyperplane multiplicities.Our first condition is since since there are only [k] q different hyperplanes in PG(k − 1, q), r = 0 yields the trivial multiset of points with cardinality 0, and r = [k] q yields the multiset of points [k − 1] q • χ V , which is a complement if the trivial multiset of points.For the canonical multiset of points we also need the parameters µ and g to state for the cardinality and for the hyperplane multiplicities.Clearly, we have the conditions as well as and since there are only [k] q different points in P G(k − 1, q).Let us denote the number of hyperplanes with multiplicity s 0 by a s and the number of hyperplanes with multiplicity t 0 by a t , so that a s + a t = [k] q and s 0 a s − t 0 a t = n ′ [k − 1] q .Thus, we have so that we can require a s , a t ∈ N ≥1 .
The, so-called, standard equations for sets of points in PG(k − 1, q) are completed by So, in order to enumerate all possible candidates for the parameters of two-character sets and all divisors g of q k−2 , compute n ′ , s 0 , t 0 , a s , a t , and check the mentioned conditions.We remark that the weights of the corresponding two-weight codes c ′ are given by w 1 = n ′ − s 0 and w 2 = n ′ − t 0 , so that C ′ is q k−2 /g-divisible and projective.
In the subsequent sections we list the obtained candidates and mention corresponding constructions from the literature.It turns out that for the binary case our necessary conditions are also sufficient for Before we start to state the numerical details we would like to mention two parametric series of constructions (assuming that the parameters k and q are clear from the context).For 1 ≤ i ≤ k − 1 we may consider the characteristic function S i := χ S of an i-space S with parameters n ′ = [i] q , s 0 = [i] q , and t 0 = [i − 1] q , see [16, Construction SU], as well as the complement χ Whenever the dimension k of the ambient space is even we can consider the characteristic function P i of partial (k/2)-spreads consisting of i pairwise disjoint (k/2)-spaces, where 0 < i < [k] q /[k/2] q = q k/2 + 1, see [16,Construction SU2].The parameters are given by n ′ = i[k/2] q , s 0 = i[k/2 − 1] q + q k/2−1 , and t 0 = i[k/2 − 1] q .Note that P 1 has the same parameters as S k/2 , P [k]q−1 has the same parameters as the complement of S k/2 , and the complement of P i has the same parameters as P q k/2 +1−i .In general we can have lots of different non-isomorphic two-character sets with the same parameters, so that different parametric constructions may also cover the same parameters.For a third possible series K i we currently need to assume q = 2 and an even dimension k of the ambient space.Moreover, no explicit construction is known.However, the parameters n ′ = i • q k/2 + 1 , s 0 = i • q k/2−1 + 1 , and t 0 = i • q k/2−1 + 1 − q k/2−1 show a clear pattern.In principle we may choose 0 < i < [k/2] q but it will turn out that rather small and rather large values of i have to be excluded.Note that the complementary parameters of K i are given by K [k/2]q−i .We will discuss explicit constructions attaining the parameters of K i when considering explicit dimensions k ≡ 0 (mod 2).Finally, we remark that for a two-character set M the corresponding set M of hyperplanes with the maximum hyperplane multiplicity is also a two-character set, so that interchanging the roles of M and M gives another general construction.
A.1.Feasible parameters of two-character sets in PG (3,2).In Table 5 we have listed the feasible parameters of two-character sets in PG (3,2).We have tried to arrange those parameters in several series so that patterns become visible.While parameters of the complementary set of parameters can be easily computed we will mostly state them nevertheless.The first block consists of the parameters for the multisets S i for 1 ≤ i ≤ 3 obtained from the subspace construction and their complements.The second block consists of the parameters for the multisets P i for 2 ≤ i ≤ 3 obtained from the partial spread construction.Note that P 1 has the same parameters as S 2 , P 4 has the same parameters as the complement of S 2 , and the complement of P i has the same parameters as P 5−i .The third block has the parameters of r µ g n ′ s 0 t 0 a s a t construction 7 3  A.3.Feasible parameters of two-character sets in PG(5, 2).In Table 7 we have listed the feasible parameters of two-character sets in PG (5,2).The first block consists of the parameters for the multisets S i for 1 ≤ i ≤ 5 obtained from the subspace construction and their complements.The second block consists of the parameters for the multisets P i for 2 ≤ i ≤ 7 obtained from the partial spread construction.The third block has the parameters of K i for 2 ≤ i ≤ 5.The parameters for K 1 as well as the complementary parameters for K 6 cannot be attained: PROOF.Apply e.g.[31,Theorem 1].□ A.4. Feasible parameters of two-character sets in PG(6, 2).In Table 8 we have listed the feasible parameters of two-character sets in PG(6, 2).Here we have just one block with attaining examples S 1 , . . ., S 6 and their complements.
A.5. Feasible parameters of two-character sets in PG(7, 2).In Table 9 we have listed the feasible parameters of two-character sets in PG(7, 2) that are not covered by P i for 2 ≤ i ≤ 15, S i for 1 ≤ i ≤ 7, or their complements.There remains one block corresponding to the parameters of K i for 1 ≤ i ≤ 14.
The parameters for K 1 , K 2 as well as the complementary parameters for K 14 , K 13 cannot be attained: Lemma A.  10.Feasible parameters for two-character sets in PG(8, 2) excluding those for S i and their complements.
The result is concluded from the non-existence of a [69, 9, 32] 2 -code applied to the residual code of a codeword of weight 96 c.f. [26,Section 3.4].
A.8. Feasible parameters of two-character sets in PG (10,2).In Table 12 we have listed the feasible parameters of two-character sets in PG(10, 2) that are not covered by S i for 1 ≤ i ≤ 10, or their complements.
We remark that a projective 32-divisible binary code of length 712 and a projective 16-divisible binary code of length 267 indeed exist, see [34].However, the currently known constructions use more than two weights.

TABLE 4 .
Feasible parameters for canonical two-character multisets in PG(4, 2) with γ ′ ≤ 4 -part 2. k ≤ 5.For larger dimensions we have to exclude a few cases and also leave a few cases open for k ∈ {11, 12}.

TABLE 7 .
(8,2)ble parameters of two-character sets in PG(8,2).In Table10we have listed the feasible parameters of two-character sets in PG(8, 2) that are not covered by S i for 1 ≤ i ≤ 8, or their complements.A.7.Feasible parameters of two-character sets in PG(9, 2).In Table11we have listed the feasible parameters of two-character sets in PG(9, 2) that are not covered by P i for 2 ≤ i ≤ 31, S i for 1 ≤ i ≤ 9, or their complements.There remains one block corresponding to the parameters of K i for 1 ≤ i ≤ 30.The parameters for K 1 , . . ., K 5 as well as the complementary parameters for K 30 , . . ., K 26 cannot be attained: Feasible parameters for two-character sets in PG(5, 2).

TABLE 9 .
Feasible parameters for two-character sets in PG(7, 2) excluding those for P i , S i , and their complements.

TABLE 11 .
Feasible parameters for two-character sets in PG(9, 2) excluding those for P i , S i , and their complements.