(Grrr. Lost a response. Shorter version follows)
I think this is a great analogy for illustrating the problem. However, consider the case where the sum must equal ten. There are only three options (4/6, 5/5, 6/4) and they occur with equal probability. However, we only see 4, 5 and 6, whereas the assumption was that the inputs could be evenly distributed between 1 and 6.
Does that matter? That's a question that requires the original problem context -- as you pointed out.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re^6: Need technique for generating constrained random data sets
by xdg
in thread Need technique for generating constrained random data sets
by GrandFather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |