enumerate small finite magmas up to isomorphism - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Magma : Magma/Enumerate

Magma[Enumerate] - enumerate small finite magmas up to isomorphism

Calling Sequence

Enumerate( n )

Enumerate( n, options )

Parameters

n

-

an integer greater than 1

options

-

optional property specifications

Description

• 

The Enumerate command enumerates small (finite) magmas, optionally subject to certain constraints, described below. By default, it simply counts the number of such structures, up to isomorphism.

  

When called with no options or optional arguments, the Enumerate command simply counts the number of isomorphism classes of magmas of order n.

Examples

withMagma:

Count the number of two-element magmas, up to isomorphism

Enumerate2

10

(1)

Count the number of commutative and associative four-element magmas, up to isomorphism

Enumerate4,'commutative','associative'

58

(2)

Build a list of the three-element commutative and associative magmas.

L:=Enumerate3,'associative','commutative','output'='list'

L:=111111111,111111112,111111113,111112123,111121113,111122122,111122123,111123132,113113331,113123331,122211211,123231312

(3)

andmapIsAssociative,L

true

(4)

andmapIsCommutative,L

true

(5)

Count, and print compactly, the groups of order 4.

Enumerate4,'group','process'=m,n→lprintconvertm,'listlist'

[[1, 2, 3, 4], [2, 1, 4, 3], [3, 4, 1, 2], [4, 3, 2, 1]]
[[1, 2, 3, 4], [2, 1, 4, 3], [3, 4, 2, 1], [4, 3, 1, 2]]

2

(6)

Count the Moufang loops of order 6.

L:=Enumerate6,leftbol,rightbol,loop

L:=2

(7)

Count connected quandles of order 5.

isconnected := proc( m, n )
   local i, gens;

   try
     gens := map( convert, {seq}( convert( m[ .., i ], 'list' ), i = 1 .. n ), 'disjcyc' )
   catch "not a permutation":
     return true
   end try;
   evalb( nops( group:-orbit( permgroup( n, gens ), 1 ) ) = n )
end proc:

Enumerate5,'quandle','test'=isconnected

3

(8)

Determine which groups of order 9 have the property that each member of the group is a square.  The passed procedures must ignore currently undefined entries (represented by zeros) in the table and return false just in the case that a duplicate diagonal entry is found.  Otherwise, true is returned to indicate to the enumeration engine that it should continue trying to complete the Cayley table.

Enumerate( 9, 'group', 'test' = proc( m, n )
 local i, L := remove( type, [seq]( m[ i, i ], i = 1 .. n ), 0 );
 evalb( nops( L ) = nops( {op}( L ) ) ) end proc );

2

(9)

Count the loops of order 6 such that every square commutes with every member of the loop.  This illustrates the use of a procedure with the option autocompile.

sqcomm := proc( m :: Array( datatype = integer[4], order = C_order ), n :: posint )
  option autocompile;
  local i, j, z;

  for i from 1 to n do
    z := m[ i, i ];
    if z <> 0 then # ignore undefined entries
      for j from 1 to n do
        if m[ z, j ] <> 0 and m[ j, z ] <> 0 then # ignore undefined entries
          if m[ z, j ] <> m[ j, z ] then
            return false
          end if
        end if
      end do
    end if
  end do;
  true
end proc:

L:=Enumerate6&comma;&apos;loop&apos;&comma;&apos;test&apos;&equals;&apos;sqcomm&apos;&comma;&apos;output&apos;&equals;&apos;list&apos;&colon;

nopsL

15

(10)

How many of these are not commutative?

nopsremoveIsCommutative&comma;L

7

(11)

See Also

AreIsomorphic, autocompile, IsAssociative, IsCommutative, orbit, permgroup


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam