Quote:
|
This is all to make sure that each Number 1-4 after 100 times the application is ran has the same amount of F's and N's.
|
Then using a random number generator is *NOT* your answer. A truly random system will *TEND* to get the sane number of occurrences, per value, in 100 iterations. But because the values are truly random, it's very unlikely that you will get *exactly* the same counts. More likely, you'd see something like (94, 102, 97, 107) or similar for the distribution. That's what random *means*.
It *FEELS* to me like what you really want, insted, is a random *ORDERING* of the numbers from 1 to 4 and then a random *ORDERING* of the array (F,F,N,N) and you match up those two random orderings.
But even this won't *guarantee* that you will get the same number of (for example) 1N's as you do 1F's as you do 2N's as you do 2F's, etc. If *THAT* is what you need, then you should instead pre-generate all possible combinations and then simply pick *combinations* randomly.
************
You can store the number of "runs" in a session variable (if the runs are done by one person) or an application variable (if the runs are done via multiple people with multiple browsers). Or, if the runs are done by one person/one browser, just store the run number as a hidden form field.