MathGroup Archive 2009

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

Search the Archive

Re: Permutations...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95853] Re: Permutations...
  • From: Steven Siew <stevensiew2 at gmail.com>
  • Date: Wed, 28 Jan 2009 06:43:14 -0500 (EST)
  • References: <glk869$oc9$1@smc.vnet.net>

ans=Permutations[Range[4]];

> How can I get the 6 Translations and the 18 Rotations separately?

trans=Select[ans,First[#] == 1 &]
{{1,2,3,4},{1,2,4,3},{1,3,2,4},{1,3,4,2},{1,4,2,3},{1,4,3,2}}

rotations=Complement[ans,trans]
{{2,1,3,4},{2,1,4,3},{2,3,1,4},{2,3,4,1},{2,4,1,3},{2,4,3,1},{3,1,2,4},
{3,1,4,2},{3,2,1,4},{3,2,4,1},{3,4,1,2},{3,4,2,1},{4,1,2,3},{4,1,3,2},
{4,2,1,3},{4,2,3,1},{4,3,1,2},{4,3,2,1}}

On Jan 26, 10:52 pm, bruno... at libero.it wrote:
> Given 4 elements  (1 2 3 4)  we have 6 translatios:
> 1 2 3 4
> 1 3 2 4
> 1 4 2 3
> 2 1 3 4
> 3 1 2 4
> 4 3 2 1
>
> Each translation can generate 4 rotations:
> 1 2 3 4   1 3 2 4   1 4 2 3
> 2 3 4 1   3 2 4 1   4 2 3 1
> 3 4 1 2   4 1 3 2   3 1 4 2
> 4 1 2 3   4 1 3 2   3 1 4 2
> etc.
>
> Then:
> Translations = (4-1)! = 6
> Rotations = 4 per translation
> Permutations = Trans * Rot = 4! = 24
>
> With Mathematica:
> Permutations[Range[4]]  prints all 24 Permutations
> How can I get the 6 Translations and the 18 Rotations separately?
>
> Bruno



  • Prev by Date: Re: opacity "bleeds" in V7 graphics? [compared to V6]
  • Next by Date: Re: accessing data in a large file
  • Previous by thread: Re: Permutations...
  • Next by thread: Re: Permutations...