in reply to Re: How can one get all possible combinations of a string without changing positions & using window size?
in thread How can one get all possible combinations of a string without changing positions & using window size?
Hi hdb,
My problem is similar to the following exercise given in the English Grammar book of primary school students. Construct all possible sentences from the given table using all blocks (4) and count total numbers of such sentences.
Here goes the Table with 4 blocks:
---------------------------------------- I | play | | at home. | You | donot play | soccer | at school.| We | | | | ---------------------------------------- Result: No. of possible sentences: 3X2x1x2=12 Sentences are: I play soccer at home. I play soccer at school. I donot play soccer at home. I donot play soccer at school. You play soccer at home. You play soccer at school. You donot play soccer at home. You donot play soccer at school. We play soccer at home. We play soccer at school. We donot play soccer at home. We donot play soccer at school.
I want all possible combinations of 10-letter from the string "ATATGCGCAT" without changing positions of letters in the actual string, where say A is of 3 levels, T at 2 levels, G at 2 levels and C at 1 level. By 3 levels of A I mean that A has A1,A2 & A3. Likewise, T1,T2 for T; G1,G2 for G and C1 for C. I want to use window size in the script to break a bigger string into smaller fragments & obtain all possible combinations for each fragment & then concatenate them. I hope this will help perl monks to understand my problem in a better way. I am sorry because I could not possibly present the problem nicely in the thread entitled "How can one get all possible combinations of a string without changing positions?" yesterday.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How can one get all possible combinations of a string without changing positions & using window size?
by Kenosis (Priest) on Apr 21, 2013 at 07:01 UTC | |
by supriyoch_2008 (Monk) on Apr 23, 2013 at 16:06 UTC | |
by Kenosis (Priest) on Apr 24, 2013 at 04:26 UTC | |
|
Re^3: How can one get all possible combinations of a string without changing positions & using window size?
by ig (Vicar) on Apr 21, 2013 at 06:34 UTC | |
by supriyoch_2008 (Monk) on Apr 23, 2013 at 16:03 UTC |