Thanks for all who helped me with this issue. I used a "Sortex(<list>)" method, 
and now it seems everything is working fine.

I am wondering if only outputs with transposes are also possible with "Sortex" 
method..

For instance,
<<Permutation Notation>> 
[1,3,2,4]
[2,4,1,3]
...........

The output of a "Sortex" method
<<Cycle Notation>>
(2,3)
(1, 2, 4, 3)
.......

The (desired) output of  only transposes
<<Transopose Notation>>
(2,3)
(1,3)(1,4)(1,2)

Many thanks
Don


 

________________________________
From: Joe Bohanon <jbohan...@gmail.com>
To: Don King <symmetryho...@yahoo.ca>
Cc: fo...@gap-system.org
Sent: Monday, February 2, 2009 11:28:39 PM
Subject: Re: [GAP Forum] File input

Sortex(<list>) will convert the list into the elements of S_n you want.

If you want to input a txt file, I would first open the file in a word 
processor and turn it into a big list.  For instance, add "list:=[" to the 
beginning, do a find-and-replace finding ] and replacing with ],.  Then go to 
the end of the file, remove the extraneous comma and add "]:"

Then in GAP you do Read("file.txt"); (or put in the correct path if 
necessary).  Then List(list,Sortex) will give you what you want.  If you want a 
list without the commas, you can do, for instance:
list2:=List(list,Sortex);
for m in list2 do Print(m,"\n"); od;

Joe


On Mon, Feb 2, 2009 at 9:09 PM, Don King <symmetryho...@yahoo.ca> wrote:

Hello,

I am wondering if a file input is supported to convert a list of permutations 
into a list of cycles.

For instance,

I have an "a.txt" that includes

[1,3,2,4]
[2,4,1,3]
............

The output I'd like to get is  cycle formatted, such as
(2,3)
(1, 2, 4, 3)
....

If the file input is not supported, what commands can be used to 
convert multiple permutations into cycles?

Thanks in advance.

Best regards,
Don 



     __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites.. Download it now at
http://ca.toolbar.yahoo.com.
_______________________________________________
Forum mailing list
Forum@mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum


      __________________________________________________________________
Reclaim your name @ymail.com or @rocketmail.com. Get your new email address 
now! Go to http://ca.promos.yahoo.com/jacko/
_______________________________________________
Forum mailing list
Forum@mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to