MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: too many special linear matrices

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68830] Re: too many special linear matrices
  • From: Roger Bagula <rlbagula at sbcglobal.net>
  • Date: Sun, 20 Aug 2006 04:43:52 -0400 (EDT)
  • References: <200608160736.DAA06175@smc.vnet.net> <CE14B3F1-9562-4363-9D03-D37E82CF28FB@mimuw.edu.pl> <ec1amo$os1$1@smc.vnet.net> <200608180712.DAA02032@smc.vnet.net> <ec64qm$1bp$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Andrzej Kozlowski wrote:

>On 18 Aug 2006, at 09:12, Roger Bagula wrote:
>
>  
>
>>Andrzej Kozlowski wrote:
>>
>>    
>>
>>>The code below will produce the list of elements of SL[n,p] (as long
>>>as n and p are not too large):
>>>
>>>SL[n_, p_] := Module[{vars =
>>>   Table[Unique[
>>>    a], {n^2}], iters, mat}, iters = Map[{#, 0, p - 1} &, vars];  
>>>mat =
>>>       Partition[vars, n]; Reap[
>>>    Do[If[Det[mat,
>>>      Modulus -> p] == 1, Sow[mat], Continue[]], Evaluate[Sequence @@
>>>      iters]]][[2, 1]]]
>>>
>>>
>>>For n=2 it gives the lengths:
>>>
>>>
>>>Table[Length[SL[2,Prime[i]]],{i,1,7}]
>>>
>>>
>>>{6,24,120,336,1320,2184,4896}
>>>
>>>which agree with the formula I sent earlier:
>>>
>>>In[16]:=
>>>Table[f[2,Prime[i]],{i,1,7}]
>>>
>>>Out[16]=
>>>{6,24,120,336,1320,2184,4896}
>>>
>>>Andrzej Kozlowski
>>>
>>>
>>>
>>>
>>>      
>>>
>>Andrzej Kozlowski,
>>You give the correct anwers in this post, but
>>your code doesn't run in my 5.1 version.
>>Roger Bagula
>>
>>    
>>
>
>If really so, then it is very strange because my version is:
>
>
>$Version
>
>5.1 for Mac OS X (October 25, 2004)
>
>
>and in my case the code does run, .e.g.
>
>
>SL[2,2]
>
>
>{{{0, 1}, {1, 0}}, {{0, 1}, {1, 1}}, {{1, 0}, {0, 1}},
>   {{1, 0}, {1, 1}}, {{1, 1}, {0, 1}}, {{1, 1}, {1, 0}}}
>
>
>Length[%]
>
>6
>
>Andrzej Kozlowski
>
>  
>
Maybe if you sent me the working notebook by email?


  • Prev by Date: Problem with NMaximize
  • Next by Date: Re: Problems solving using Solve
  • Previous by thread: Re: Re: too many special linear matrices
  • Next by thread: Re: too many special linear matrices