more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
artist,
Please forgive me as I am incredibly tired, but I originally told you in the CB this sounded like a math problem. Unfortunately I do not believe it is a simple algebraic formula. Lets change n=123 to n=3 since you are talking about a 3 digit number. Now we have a few problems.
Problem number 1: The equation to determine the number of permutations seems to change with p.
p = 2
Second problem: There can be some ambiguity in what we are actually grouping: Can be seen as either 1 & 3 + 2 or 1 & 2 + 2 & 3. This breaks the formula for p = 2 since: is not correct as barrachois pointed out - it is actually 20 since two permutations, while different, look the same. I didn't bother going any further than this to see if the simple formulas for different values of p could be generalized. Sorry - L~R In reply to Re: Parens permutations
by Limbic~Region
|
|