From f9d1c4afcac22ff14129b6c70f877ce8a4e9b299 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Fri, 18 Nov 2016 22:49:55 +0000 Subject: [PATCH] implemented Brouwer's construction Recognition from parameters not done yet --- .../graphs/generators/classical_geometries.py | 121 ++++++++++++++++++ src/sage/graphs/graph_generators.py | 2 + 2 files changed, 123 insertions(+) diff --git a/src/sage/graphs/generators/classical_geometries.py b/src/sage/graphs/generators/classical_geometries.py index a7de697f5f1..dccdd4f3175 100644 --- a/src/sage/graphs/generators/classical_geometries.py +++ b/src/sage/graphs/generators/classical_geometries.py @@ -1325,3 +1325,124 @@ def CossidentePenttilaGraph(q): format='list_of_edges', multiedges=False) G.name('CossidentePenttila('+str(q)+')') return G + +def Nowhere0WordsTwoWeightCodeGraph(q, hyperoval=None, field=None, check_hyperoval=True): + r""" + Return the subgraph of nowhere 0 words from two-weight code of projective plane hyperoval + + Let `q=2^k` and `\Pi=PG(2,q)`. Fix a + `hyperoval `__ + `O \subset \Pi`. Let `V=F_q^3` and `C` the two-weight 3-dimensional linear code + over `F_q` with words `c(v)` obtained from `v\in V` by computing + + ..math:: + + c(v)=(,...,), o_j \in O. + + `C` contains `q(q-1)^2/2` words without 0 entries. The subgraph of the strongly + regular graph of `C` induced on the latter words is also strongly regular, + assuming `q>4`. This is a construction due to A.E.Brouwer [AB16]_, and leads + to graphs with parameters also given by a constrution in [HHL09]_. + + INPUT: + + - ``q`` -- a power of two + + - ``hyperoval`` -- a hyperoval (i.e. a complete 2-arc; a set of points in the plane + meeting every line in 0 or 2 points) in `PG(2,q)` over the field ``field``. + Each point of ``hyperoval`` must be a length 3 + vector over ``field`` with 1st non-0 coordinate equal to 1. By default, ``hyperoval`` and + ``field`` are not specified, and constructed on the fly. In particular, ``hyperoval`` + we build is the classical one, i.e. a conic with the point of intersection of its + tangent lines. + + - ``field`` -- an instance of a finite field of order `q`, must be provided + if ``hyperoval`` is provided. + + - ``check_hyperoval`` -- (default: ``True``) if ``True``, + check ``hyperoval`` for correctness. + + + EXAMPLES: + + using the built-in construction:: + + sage: g=graphs.Nowhere0WordsTwoWeightCodeGraph(8); g + Nowhere0WordsTwoWeightCodeGraph(8): Graph on 196 vertices + sage: g.is_strongly_regular(parameters=True) + (196, 60, 14, 20) + sage: g=graphs.Nowhere0WordsTwoWeightCodeGraph(16) # not tested (long time) + sage: g.is_strongly_regular(parameters=True) # not tested (long time) + (1800, 728, 268, 312) + + supplying your own hyperoval:: + + sage: F=GF(8) + sage: O=[vector(F,(0,0,1)),vector(F,(0,1,0))]+[vector(F, (1,x^2,x)) for x in F] + sage: g=graphs.Nowhere0WordsTwoWeightCodeGraph(8,hyperoval=O,field=F); g + Nowhere0WordsTwoWeightCodeGraph(8): Graph on 196 vertices + sage: g.is_strongly_regular(parameters=True) + (196, 60, 14, 20) + + TESTS:: + + sage: F=GF(8) # repeating a point... + sage: O=[vector(F,(1,0,0)),vector(F,(0,1,0))]+[vector(F, (1,x^2,x)) for x in F] + sage: graphs.Nowhere0WordsTwoWeightCodeGraph(8,hyperoval=O,field=F) + Traceback (most recent call last): + ... + RuntimeError: incorrect hyperoval size + sage: O=[vector(F,(1,1,0)),vector(F,(0,1,0))]+[vector(F, (1,x^2,x)) for x in F] + sage: graphs.Nowhere0WordsTwoWeightCodeGraph(8,hyperoval=O,field=F) + Traceback (most recent call last): + ... + RuntimeError: incorrect hyperoval + + REFERENCES: + + .. [HHL09] \T. Huang, L. Huang, M.I. Lin + On a class of strongly regular designs and quasi-semisymmetric designs. + In: Recent Developments in Algebra and Related Areas, ALM vol. 8, pp. 129–153. + International Press, Somerville (2009) + + .. [AB16] \A.E. Brouwer + Personal communication, 2016 + + """ + from sage.combinat.designs.block_design import ProjectiveGeometryDesign as PG + from sage.modules.free_module_element import free_module_element as vector + from sage.matrix.constructor import matrix + + p, k = is_prime_power(q,get_data=True) + if k==0 or p!=2: + raise ValueError('q must be a power of 2') + if k<3: + raise ValueError('q must be a at least 8') + if field is None: + F = FiniteField(q, 'a') + else: + F = field + + Theta = PG(2, 1, F, point_coordinates=1) + Pi = Theta.ground_set() + if hyperoval is None: + hyperoval = filter(lambda x: x[0]+x[1]*x[2]==0 or (x[0]==1 and x[1]==0 and x[2]==0), Pi) + O = set(hyperoval) + else: + map(lambda x: x.set_immutable(), hyperoval) + O = set(hyperoval) + if check_hyperoval: + if len(O) != q+2: + raise RuntimeError("incorrect hyperoval size") + for L in Theta.blocks(): + if set(L).issubset(Pi): + if not len(O.intersection(L)) in [0,2]: + raise RuntimeError("incorrect hyperoval") + M = matrix(hyperoval) + C = filter(lambda x: not F.zero() in x, map(lambda x: M*x, F**3)) + for x in C: + x.set_immutable() + G = Graph([C, lambda x,y: not F.zero() in x+y]) + G.name('Nowhere0WordsTwoWeightCodeGraph('+str(q)+')') + G.relabel() + return G diff --git a/src/sage/graphs/graph_generators.py b/src/sage/graphs/graph_generators.py index 9816ca18b98..f8958b00bb2 100644 --- a/src/sage/graphs/graph_generators.py +++ b/src/sage/graphs/graph_generators.py @@ -257,6 +257,7 @@ def __append_to_doc(methods): "TaylorTwographDescendantSRG", "TaylorTwographSRG", "T2starGeneralizedQuadrangleGraph", + "Nowhere0WordsTwoWeightCodeGraph", "HaemersGraph", "CossidentePenttilaGraph", "UnitaryDualPolarGraph", @@ -2032,6 +2033,7 @@ def quadrangulations(self, order, minimum_degree=None, minimum_connectivity=None staticmethod(sage.graphs.generators.classical_geometries.TaylorTwographDescendantSRG) TaylorTwographSRG = staticmethod(sage.graphs.generators.classical_geometries.TaylorTwographSRG) T2starGeneralizedQuadrangleGraph = staticmethod(sage.graphs.generators.classical_geometries.T2starGeneralizedQuadrangleGraph) + Nowhere0WordsTwoWeightCodeGraph = staticmethod(sage.graphs.generators.classical_geometries.Nowhere0WordsTwoWeightCodeGraph) HaemersGraph = staticmethod(sage.graphs.generators.classical_geometries.HaemersGraph) CossidentePenttilaGraph = staticmethod(sage.graphs.generators.classical_geometries.CossidentePenttilaGraph) UnitaryDualPolarGraph = staticmethod(sage.graphs.generators.classical_geometries.UnitaryDualPolarGraph)