Hello All! I had almost as much fun brushing up on statistics for this golf as I had for the golf itself...
My math is a bit rusty, so I wanted people to double- check any mistakes I may have made... Assuming that we are randomly creating solutions 1e6 times, what is the probablilty that we will come up with all permutations for up to 8 input letters (assuming that the number of input letters is evenly likely to be any value between 1 and 8)? My calculation: Let PR(x,y,f(n)) be the Product of f(n) for x<=n<=y. Probability = PR(1,8,(1-(n!-1)/n!)^1e6) = (1-(0/1)^1e6) * (1-(1/2)^1e6) * (1-(5/6)^1e6) * (1-(23/24)^1e6) * (1-(119/120)^1e6) * (1-(719/720)^1e6) * (1-(5039/5040)^1e6) * (1-(40319/40320)^1e6) And herein lies my problem. I have yet to find a calculator which is capable of handling any of the above given calculations (with the exception of the first and last two expressions. (in fact on a certain TI calculator all expressions evaluate to 1!) So I'm stuck with an approximation... Define z'n: 0.99999999998306933880719531551255 <= z'n <=1 = 1 * z'2 * z'3 * z'4 * z'5 * z'6 * z'7 * 0.99999999998306933880719531551255 Assuming all z's to be the worst, we have... Approximation = 1 * 0.99999999998306933880719531551255 * 0.99999999998306933880719531551255 * 0.99999999998306933880719531551255 * 0.99999999998306933880719531551255 * 0.99999999998306933880719531551255 * 0.99999999998306933880719531551255 * 0.99999999998306933880719531551255 = 0.99999999988148537165638680164463 So I propose that our probability is greater than 0.99999999988148537165638680164463 and less than 1. Kudos to anyone who can give a better approximation (or even a definite answer). I'd be extremely interested to see it. Now the pertinent question: Does a solution with this probability *really* violate rule #3? I would wager that it's more likely that our "perfect" computer would get struck by lightening than our output not being correct. And what if we were able to generate permutations 1e100 times? Thanks for any insight! -Riley (o0lit3) P.s. - Mtve - Sorry to message you directly. I seem to be having major problems posting to the newsgroup. Is it just me or is this universally true? If this doesn't go through, would you mind posting this message for me? P.p.s - mtve Amazing, amazing, amazing with $a{join'',sort{$_<<[EMAIL PROTECTED]/for 1..$^T;print%a