On Thu, Jan 29, 2004 at 04:26:41PM -0600, J. Riley Bryant wrote: > 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)?
I don't think that your analysis is valid, since sort { rand 2 } doesn't actually generate random solutions. % perl -le 'for (1..1e5) { $i = 0; $a[$i++][$_]++ for sort { rand 2 } 1..8}; print "@{$_}" for @a' 12557 12218 12578 12449 12412 12747 12445 12594 24750 25132 12493 12538 9418 9373 3133 3163 17271 17184 20183 20258 7048 6965 5566 5525 17972 18073 22636 22644 3509 3454 5968 5744 9323 9208 9654 9534 14651 14787 16318 16525 9035 9224 7244 7335 24458 24091 9370 9243 5129 5073 8608 8630 13684 13588 22744 22544 3963 3888 6604 6612 14820 14995 24456 24662 [ No, I don't understand why the distribution looks like that for the first element. ] As for the other issue, I have no problem with letting the current results stand. But perhaps the "reasonable time" genrule might do with some tweaking for future golfs? -- Juho Snellman