> < ^ From:

> < ^ Subject:

Dear Forum,

I'm far from being sophisticated in group theory and GAP, so please

bear with me. In GAP 4.x I can access database of groups by using

function SmallGroup, e.g. SmallGroup(32,1). What I need is to

find out the number of quadratic residues for, say, the group above.

Is it possible for arbitrary SmallGroup(n,k) as long as the group is

in the database? Going further, I would like to construct a

multiplication table for SmallGroup(32,k). Is it possible in GAP?

Thanks a lot

Igor

Dear Igor,

Dear Forum,

As for the 2nd question, I suppose, the answer is YES.

For example, one of my student prepared a program in GAP 3.4.4,

and it works in GAP 4.2 as well, for calculation of the Cayley table

of a group:

Cayley:=function(G) local s,i,l,m,j,k,max; l:=Elements(G); max:=1; for i in [1..Length(l)] do for j in [1..Length(l)] do m:=l[i]*l[j]; s:=String(m); if max<Length(String(s)) then max:=Length(String(s)); fi; od; od; s:=String(" ",max); Print(s," "); for i in [1..Length(l)] do s:=String(l[i],max); Print(s," "); od; Print("\n"); s:=String(" ",max); Print(s,"_"); for i in [1..Length(l)*max+2*(Length(l)-1)] do Print("_"); od; Print("\n"); for i in [1..Length(l)] do s:=String(l[i],max); Print(s,"|"); for j in [1..Length(l)] do m:=l[i]*l[j]; s:=String(m,max); Print(s," "); od; Print("\n"); od; end;

For example, for S_3 we have (best wiewed in fixed width font):

gap> G:=SymmetricGroup(3); Sym( [ 1 .. 3 ] ) gap> Cayley(G); () (2,3) (1,2) (1,2,3) (1,3,2) (1,3) _____________________________________________________ ()| () (2,3) (1,2) (1,2,3) (1,3,2) (1,3) (2,3)| (2,3) () (1,2,3) (1,2) (1,3) (1,3,2) (1,2)| (1,2) (1,3,2) () (1,3) (2,3) (1,2,3) (1,2,3)|(1,2,3) (1,3) (2,3) (1,3,2) () (1,2) (1,3,2)|(1,3,2) (1,2) (1,3) () (1,2,3) (2,3) (1,3)| (1,3) (1,2,3) (1,3,2) (2,3) (1,2) () gap>

But i have tried to do this for a group from library, and the function

"String" does not work:

<pc group of size 8 with 3 generators>

gap> a:=Random(G);

f1*f2*f3

gap> String(a);

Error, no method found! For debugging hints type ?Recovery from

NoMethodFound

Error no 1st choice method found for `String' on 1 arguments at

Error( no_method_found );

<function>( <arguments> ) called from read-eval-loop

Entering break read-eval-print loop, you can 'quit;' to quit to outer loop,

or you can return to continue

brk>

And this contradicts to the manual, where it is stated:

"String returns a representation of obj, which may be an object of arbitrary

type, as a string"

What does it mean ?

Sincerely yours, Alexander B. Konovalov Associate Professor, Algebra & Geometry Chair Department of Mathematics & Economy Cybernetics Zaporozhye State University, Zaporozhye, Ukraine ------------------------------------------------ Phone: (38-0612) 137510, 137415, 643712 Fax : (38-0612) 137510, 137415 P.O.Box 1317, Central Post Office, Zaporozhye, 69000, Ukraine E-mail: algebra@hotmail.zp.ua , konovalov@member.ams.org ICQ # 89015377 http://myprofile.cos.com/a_konovalov

Miles-Receive-Header: reply

> < [top]