Fw: Re: Multiplying permutations
- To: mathgroup at smc.vnet.net
- Subject: [mg41855] Fw: Re: [mg41723] Multiplying permutations
- From: "Mihajlo Vanevic" <mvane at eunet.yu>
- Date: Sat, 7 Jun 2003 00:08:44 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Wolfgang, I tried to send you a private e-mail, but it didn't reach you... So, this time, I'm going to post it to the MathGroup too :) Mihajlo ************* THIS IS A FORWARD MESSAGE **************** * At 2003-06-03, 15:13:55 * Mihajlo Vanevic, mvane at EUnet.yu wrote: *************************************************************** >In[]:= >Clear[CenterDot] > >In[]:= >SetAttributes[CenterDot, {Flat, OneIdentity}] > >In[]:= >p_·q_ := q[[p]]; > >In[]:= >{3, 1, 2}·{2, 1, 3} > >Out[]= >{3, 2, 1} > >In[]:= >({3, 1, 2}·{2, 1, 3})·{3, 2, 1} > >{3, 1, 2}·({2, 1, 3}·{3, 2, 1}) > >{3, 1, 2}·{2, 1, 3}·{3, 2, 1} > > >You can enter · symbol with Esc . Esc (on Windows) > >Regards, > Mihajlo Vanevic > mvane at EUnet.yu > 2003-06-03 > >************************************************************** >* At 2003-06-03, 07:13:00 >* Dr. Wolfgang Hintze, weh at snafu.de wrote: >************************************************************** >>Is there a simple command in Mathematica to multiply two permutations, >>i.e. to carry out one after the other? >> >>I looked at the packages DiscreteMath`Permutations` and >>DiscreteMath`Combinatorica` but couldn't find it. >> >>Example >> >>p = {3,1,2} mapping: 1->3, 2->1, 3->2 >>q = {2,1,3} mapping: 1->2, 2->1, 3->3 >>p.q = mappings (p first, then q) >> [1-p->3-q->3, 2-p->1-q->2, 3-p->2-q->1] >>= {3,2,1} >> >>Any help appreciated >> >>Wolfgang >************************************************************** ***************************************************************