Using the Math.Algebra.Group.PermutationGroup module the expression `elts (_A n)` will return all the permutations of A_n.
On Thursday, May 26, 2016 at 6:39:52 PM UTC-5, Blake Sims wrote:
I am a newb to Haskell and programming in general, but I was trying to write a basic program to find the elements for the alternating group for any n.
For the symmetric group I wrote something like this
symmetric n = permutations ([1..n])
What if I just want to find the even permutations? What is the quick and dirty way of doing this? I was looking at the package Data.Matrix and messing around with permutation matrices, but there has got to be a quicker and easier way of doing it. I am skimming the book learn you a Haskell, but my attention span is pretty short so if someone could direct me in the right direction I'd be much obliged.