[GAP Forum] Replacing in GAP

Alastair Donaldson ally at dcs.gla.ac.uk
Mon Mar 19 11:59:31 GMT 2007


I think the following solves your problem:

Suppose your original cycle is defined over a_1, a_2, .... a_n.

Let b_1, b_2, .... , b_n be your new components, so that either a_i = b_i, or b_i is a fresh natural number (and all the b_i are distinct)

Define 

replacement := (a_1,b_1)(a_2,b_2)....(a_n,b_n);

Then the cycle you are looking for is

cycle^replacement;

(i.e. the conjugate of "cycle" by "replacement".)

Please let me know if I've got this right!

-Alastair

-----Original Message-----
From: forum-bounces at gap-system.org on behalf of AHMET ARIKAN
Sent: Mon 19/03/2007 11:21 AM
To: forum at gap-system.org
Subject: [GAP Forum] Replacing in GAP
 
Dear All, one of my colleagues asked me the following question which seems 
easy but useful:

Let  y=(a_1,a_2,...,a_k) be a cycle of length k where a_i is a natural 
number for each i. Is there a way in GAP to replace some determined 
components with some other natural numbers (for example replace a_{i_1},..., 
a_{i_t} with some different natural numbers). Of course it can be done 
manually, but it is not helpful for him.

With best wishes,

Ahmet Arikan


_______________________________________________
Forum mailing list
Forum at mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum



More information about the Forum mailing list