MAGMA NilpotencyClass being miscalculated -


we devised function in class test if nilpotency class of group or not sum of of p-sylows. original first 1 below, without n:=nilpotencyclass(g) line. got strange result, see below. teacher got different strange result: 3 1. group g wasn't abelian, have found non-abelian class 1 nilpotent group, absurd. tried isolating function, because classmate of mine had function working. solved problem. curious mystery, tried isolate problem, , found came straight out of function. tried calculating returned nilpotencyclass @ start of function , worked. if don't, outside function still nilpotencyclass(g)=32767! have following code:

testnilpotencyclass := function(g)     n:=nilpotencyclass(g);     if not isnilpotent(g)         return 0;     end if;     n := #g;     somma := 0;     pn in factorisation(n)         p := pn[1];         p := sylowsubgroup(g,p);         c := nilpotencyclass(p);         somma +:= c;     end for;     return somma, n; end function;  testnilpotencyclassb := function(g)     if not isnilpotent(g)         return 0;     end if;     nilpotencyclass(g);     n := #g;     somma := 0;     pn in factorisation(n)         p := pn[1];         p := sylowsubgroup(g,p);         c := nilpotencyclass(p);         somma +:= c;     end for;     return somma, nilpotencyclass(g); end function;  testnilpotencyclassc := function(g)     if (not isnilpotent(g))         return 0;     end if;     nilpotencyclass(g);     n := #g;     somma := 0;     pn in factorisation(n)         p := pn[1];         p := sylowsubgroup(g,p);         c := nilpotencyclass(p);         somma +:= c;     end for;     return somma, nilpotencyclass(g); end function;  testnilpotencyclassd := function(g)     if (not (isnilpotent(g)))         return 0;     end if;     nilpotencyclass(g);     n := #g;     somma := 0;     pn in factorisation(n)         p := pn[1];         p := sylowsubgroup(g,p);         c := nilpotencyclass(p);         somma +:= c;     end for;     return somma, nilpotencyclass(g); end function;  g:=smallgroups(40)[11]; testnilpotencyclass(g); testnilpotencyclassb(g); testnilpotencyclassc(g); testnilpotencyclassd(g); 

loading on magma yields following result:

3 2 32767 3 32767 32767 3 32767 32767 3 32767 

where 32767 coming from? notice how 2^(15)-1. why miscalculation being produced?

update: tried copy-pasting code magma , result same. furthermore, after quitting , reopening, tried copy-pasting first function, computing nilpotencyclass, using function, , here's result:

host-001:~ michelegorini$ magma magma v2.20-4 (student)   fri dec 19 2014 17:29:45    [seed = 1006321001] type ? help.  type <ctrl>-d quit. testnilpotencyclass := function(g)     n:=nilpotencyclass(g);     if not isnilpotent(g)         return 0;     end if;     n := #g;     somma := 0;     pn in factorisation(n)         p := pn[1];         p := sylowsubgroup(g,p);         c := nilpotencyclass(p);         somma +:= c;     end for;     return somma, n; end function;> testnilpotencyclass := function(g) function>     n:=nilpotencyclass(g); function>     if not isnilpotent(g) function|if>         return 0; function|if>     end if; function>     n := #g; function>     somma := 0; function>     pn in factorisation(n) function|for>         p := pn[1]; function|for>         p := sylowsubgroup(g,p); function|for>         c := nilpotencyclass(p); function|for>         somma +:= c; function|for>     end for; function>     return somma, n; function> end function; > g:=smallgroups(40)[11]; > testnilpotencyclass(g); 3 2 > nilpotencyclass(g); 32767 > testnilpotencyclass(g); 3 32767 > testnilpotencyclass(smallgroups(40)[11]); 3 2 > nilpotencyclass(smallgroups(40)[11]);     2 

this bug in magma; once nilpotence established pc group, return value of nilpotencyclass() garbage. first call gives correct value, later calls fail.

this has been fixed next patch release (some time in may). in meantime, workaround use (for instance)

> npclass := func<g | #lowercentralseries(g) - 1>; > npclass(g); 2 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -