Re: Two starting programming questions re alternating groups and EulerPhi LCM numbers
- To: mathgroup at smc.vnet.net
- Subject: [mg37926] Re: [mg37912] Two starting programming questions re alternating groups and EulerPhi LCM numbers
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Tue, 19 Nov 2002 20:58:54 -0500 (EST)
- References: <200211190851.DAA15960@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I'm sure you'll enjoy playing around with Mathematica. Just to give you a taste of what to expect, I take Program1A and Program 2: 1A: In[1]:= <<DiscreteMath`Combinatorica` In[2]:= Table[NthPermutation[2 j,{1,2,3,4,5}],{j,0,59}] 2: In[1]:= EulerPhi[10] Out[1]= 4 In[2]:= Select[Range[10],GCD[#1,10]==1&] Out[2]= {1,3,7,9} Tomas Garza Mexico City ----- Original Message ----- From: "Diana" <diana53 at earthlink.net> To: mathgroup at smc.vnet.net Subject: [mg37926] [mg37912] Two starting programming questions re alternating groups and EulerPhi LCM numbers > Mathematica junkies... > > I have ordered Mathematica Student, and am excited about starting to > program with it. > > I was wondering if someone with experience could help me with two > (easy?) programs to get started. > > Program 1: > > A. I want to first list the elements of A_5. These would be the even > permutations of S_5, such as: > > (1, 2, 3, 4, 5) > (1, 2, 4, 3 5), etc. There are 60 of these. > > B. Secondly, I want to figure out how to compute the order of each of > the elements. > > C. Last, I want to create a Cayley table of 60 x 60 elements, i.e., > (1, 2, 3, 4, 5) * (1, 2, 4, 3, 5). This would be the answer you get to > first permuting a 5-tuple by (1, 2, 3, 4, 5), and then permuting it by > (1, 2, 4, 3, 5). > > I have done all of this with an Excel spreadsheet, and am not turning > this in or getting credit for it. Just want to know how to do it. > > Program 2 > > I understand that Mathematica has the EulerPhi function in it. Does > anyone know how to get the program to list the elements which are less > than and relatively prime to any given "n"? > > Thanks, > > Diana > >
- References:
- Two starting programming questions re alternating groups and EulerPhi LCM numbers
- From: diana53@earthlink.net (Diana)
- Two starting programming questions re alternating groups and EulerPhi LCM numbers