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.