Ejemplo n.º 1
0
 def automorphism_group(self):
     """
     Returns the subgroup of the automorphism group of the incidence
     graph which respects the P B partition. This is (isomorphic to) the
     automorphism group of the block design, although the degrees
     differ.
     
     EXAMPLES::
     
         sage: from sage.combinat.designs.block_design import BlockDesign
         sage: BD = BlockDesign(7,[[0,1,2],[0,3,4],[0,5,6],[1,3,5],[1,4,6],[2,3,6],[2,4,5]])
         sage: G = BD.automorphism_group(); G
         Permutation Group with generators [(4,5)(6,7), (4,6)(5,7), (2,3)(6,7), (2,4)(3,5), (1,2)(5,6)]
         sage: BD = BlockDesign(4,[[0],[0,1],[1,2],[3,3]],test=False)
         sage: G = BD.automorphism_group(); G
         Permutation Group with generators [()]
         sage: BD = BlockDesign(7,[[0,1,2],[0,3,4],[0,5,6],[1,3,5],[1,4,6],[2,3,6],[2,4,5]])
         sage: G = BD.automorphism_group(); G
         Permutation Group with generators [(4,5)(6,7), (4,6)(5,7), (2,3)(6,7), (2,4)(3,5), (1,2)(5,6)]
     """
     from sage.groups.perm_gps.partn_ref.refinement_matrices import MatrixStruct
     from sage.groups.perm_gps.permgroup import PermutationGroup
     from sage.groups.perm_gps.permgroup_named import SymmetricGroup
     M1 = self.incidence_matrix()
     M2 =  MatrixStruct(M1)
     M2.run()
     gens = M2.automorphism_group()[0]
     v = len(self.points())
     G = SymmetricGroup(v)
     gns = []
     for g in gens:
         L = [j+1 for j in g]
         gns.append(G(L))
     return PermutationGroup(gns)
Ejemplo n.º 2
0
    def automorphism_group(self):
        """
        Returns the subgroup of the automorphism group of the incidence
        graph which respects the P B partition. This is (isomorphic to) the
        automorphism group of the block design, although the degrees
        differ.

        EXAMPLES::

            sage: from sage.combinat.designs.block_design import BlockDesign
            sage: BD = BlockDesign(7,[[0,1,2],[0,3,4],[0,5,6],[1,3,5],[1,4,6],[2,3,6],[2,4,5]])
            sage: G = BD.automorphism_group(); G
            Permutation Group with generators [(4,5)(6,7), (4,6)(5,7), (2,3)(6,7), (2,4)(3,5), (1,2)(5,6)]
            sage: BD = BlockDesign(4,[[0],[0,1],[1,2],[3,3]],test=False)
            sage: G = BD.automorphism_group(); G
            Permutation Group with generators [()]
            sage: BD = BlockDesign(7,[[0,1,2],[0,3,4],[0,5,6],[1,3,5],[1,4,6],[2,3,6],[2,4,5]])
            sage: G = BD.automorphism_group(); G
            Permutation Group with generators [(4,5)(6,7), (4,6)(5,7), (2,3)(6,7), (2,4)(3,5), (1,2)(5,6)]
        """
        from sage.groups.perm_gps.partn_ref.refinement_matrices import MatrixStruct
        from sage.groups.perm_gps.permgroup import PermutationGroup
        from sage.groups.perm_gps.permgroup_named import SymmetricGroup
        M1 = self.incidence_matrix()
        M2 =  MatrixStruct(M1)
        M2.run()
        gens = M2.automorphism_group()[0]
        v = len(self.points())
        G = SymmetricGroup(v)
        gns = []
        for g in gens:
            L = [j+1 for j in g]
            gns.append(G(L))
        return PermutationGroup(gns)
Ejemplo n.º 3
0
    def automorphism_group(self):
        """
        Returns the subgroup of the automorphism group of the incidence graph
        which respects the P B partition. It is (isomorphic to) the automorphism
        group of the block design, although the degrees differ.

        EXAMPLES::

            sage: P = designs.DesarguesianProjectivePlaneDesign(2); P
            Incidence structure with 7 points and 7 blocks
            sage: G = P.automorphism_group()
            sage: G.is_isomorphic(PGL(3,2))
            True
            sage: G
            Permutation Group with generators [(2,3)(4,5), (2,4)(3,5), (1,2)(4,6), (0,1)(4,5)]

        A non self-dual example::

            sage: from sage.combinat.designs.incidence_structures import IncidenceStructure
            sage: IS = IncidenceStructure(range(4), [[0,1,2,3],[1,2,3]])
            sage: IS.automorphism_group().cardinality()
            6
            sage: IS.dual_design().automorphism_group().cardinality()
            1
        """
        from sage.groups.perm_gps.partn_ref.refinement_matrices import MatrixStruct
        from sage.groups.perm_gps.permgroup import PermutationGroup
        from sage.groups.perm_gps.permgroup_named import SymmetricGroup
        M1 = self.incidence_matrix().transpose()
        M2 = MatrixStruct(M1)
        M2.run()
        gens = M2.automorphism_group()[0]
        return PermutationGroup(gens, domain=range(self.v))
Ejemplo n.º 4
0
    def automorphism_group(self):
        r"""
        Return the subgroup of the automorphism group of the incidence graph
        which respects the P B partition. It is (isomorphic to) the automorphism
        group of the block design, although the degrees differ.

        EXAMPLES::

            sage: P = designs.DesarguesianProjectivePlaneDesign(2); P
            Incidence structure with 7 points and 7 blocks
            sage: G = P.automorphism_group()
            sage: G.is_isomorphic(PGL(3,2))
            True
            sage: G
            Permutation Group with generators [(2,3)(4,5), (2,4)(3,5), (1,2)(4,6), (0,1)(4,5)]

        A non self-dual example::

            sage: IS = designs.IncidenceStructure(range(4), [[0,1,2,3],[1,2,3]])
            sage: IS.automorphism_group().cardinality()
            6
            sage: IS.dual().automorphism_group().cardinality()
            1

        Examples with non-integer points::

            sage: I = designs.IncidenceStructure('abc', ('ab','ac','bc'))
            sage: I.automorphism_group()
            Permutation Group with generators [('b','c'), ('a','b')]
            sage: designs.IncidenceStructure([[(1,2),(3,4)]]).automorphism_group()
            Permutation Group with generators [((1,2),(3,4))]
        """
        from sage.groups.perm_gps.partn_ref.refinement_matrices import MatrixStruct
        from sage.groups.perm_gps.permgroup import PermutationGroup
        from sage.groups.perm_gps.permgroup_element import standardize_generator
        from sage.groups.perm_gps.permgroup_named import SymmetricGroup
        M1 = self.incidence_matrix().transpose()
        M2 = MatrixStruct(M1)
        M2.run()
        gens = M2.automorphism_group()[0]
        gens = [standardize_generator([x + 1 for x in g]) for g in gens]
        if self._point_to_index:
            gens = [[
                tuple([self._points[i - 1] for i in cycle]) for cycle in g
            ] for g in gens]
        else:
            gens = [[tuple([i - 1 for i in cycle]) for cycle in g]
                    for g in gens]
        return PermutationGroup(gens, domain=self._points)
Ejemplo n.º 5
0
    def automorphism_group(self):
        r"""
        Return the subgroup of the automorphism group of the incidence graph
        which respects the P B partition. It is (isomorphic to) the automorphism
        group of the block design, although the degrees differ.

        EXAMPLES::

            sage: P = designs.DesarguesianProjectivePlaneDesign(2); P
            Incidence structure with 7 points and 7 blocks
            sage: G = P.automorphism_group()
            sage: G.is_isomorphic(PGL(3,2))
            True
            sage: G
            Permutation Group with generators [(2,3)(4,5), (2,4)(3,5), (1,2)(4,6), (0,1)(4,5)]

        A non self-dual example::

            sage: IS = designs.IncidenceStructure(range(4), [[0,1,2,3],[1,2,3]])
            sage: IS.automorphism_group().cardinality()
            6
            sage: IS.dual().automorphism_group().cardinality()
            1

        Examples with non-integer points::

            sage: I = designs.IncidenceStructure('abc', ('ab','ac','bc'))
            sage: I.automorphism_group()
            Permutation Group with generators [('b','c'), ('a','b')]
            sage: designs.IncidenceStructure([[(1,2),(3,4)]]).automorphism_group()
            Permutation Group with generators [((1,2),(3,4))]
        """
        from sage.groups.perm_gps.partn_ref.refinement_matrices import MatrixStruct
        from sage.groups.perm_gps.permgroup import PermutationGroup
        from sage.groups.perm_gps.permgroup_element import standardize_generator
        from sage.groups.perm_gps.permgroup_named import SymmetricGroup
        M1 = self.incidence_matrix().transpose()
        M2 = MatrixStruct(M1)
        M2.run()
        gens = M2.automorphism_group()[0]
        gens = [standardize_generator([x+1 for x in g]) for g in gens]
        if self._point_to_index:
            gens = [[tuple([self._points[i-1] for i in cycle]) for cycle in g] for g in gens]
        else:
            gens = [[tuple([i-1 for i in cycle]) for cycle in g] for g in gens]
        return PermutationGroup(gens, domain=self._points)