[R] All possible permutations of letter A with other letters

(Ted Harding) Ted.Harding at manchester.ac.uk
Wed Jun 30 18:09:12 CEST 2010


On 30-Jun-10 15:48:39, Barry Rowlingson wrote:
> On Wed, Jun 30, 2010 at 11:57 AM, Yen Ngo <yen.ngo78 at yahoo.se> wrote:
>> Dear list,
>> I have a vector of letter strings as follow:
>>
>>> LETTERS[c(1:7,9,15,18:25)]
>> _[1] "A" "B" "C" "D" "E" "F" "G" "I" "O" "R" "S" "T" "U" "V" "W" "X"
>> "Y"
>>
>> I need to find sequences of length 11, which are made from _all
>> possible permutations with repetition (not the unique ones) of the
>> letter string A with the other strings, for example AAAAAAAAAAB,
>> AAAAAAAAAABC, AAAAAAAAACB, AABAAAAAAAB. A can be repeated 1-11 times
> in the sequence.
>>
>> Is there a way to do this in R?
>> Any help would be much appreciated.
> 
>  So the sequence starts with 'A' and then has 10 from all possible
> values of those 17 letters? Have you computed how many sequences that
> is? If so, have you comprehended how big a number that is?
> 
>  It's 17^10 - it'll take about a day at a rate of a million per
> second. And then where do you put them?
> 
> Do you still want to do this?
> Barry

I would suggest cloud computing -- and, in view of the scale (20000GB),
to use the Black Cloud (as in Fred Hoyle's novel), which was conceived
for the job.
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 30-Jun-10                                       Time: 17:08:47
------------------------------ XFMail ------------------------------



More information about the R-help mailing list