Introduction to decision aid
In particular occasions, there is simply no "best" decision to take. There may be a clear need to make a choice between several actions, but none of them is objectively the best one. "Any" of the actions would be acceptable, with no reason to choose one more than the other.
A teacher may need to decide in which order his students will present the result of their work to the other students. He may wish to be "fair", and decide "at random" who will start instead of using another method, as the alphabetical order of the students names, which would not be "fair" for all students.
A company that wishes to give a part of its profits to charities might be interested in using some kind of random method in order to determine to which charity the gift will be made.
Random methods have therefore their place in a computer library devoted to decision aid. As for all methods, random methods have to be used properly and in the right circumstances: it would of course not be acceptable for a doctor to use them to choose the medication for his patients...
Generating random sequences of numbers that are "truly" random is quite a difficult task for a computer. Many studies have been made on the subject, and DECIDE includes a function DECIDE__Random that allows the user to generate random numbers using several efficient methods.
"...random numbers should not be generated with a method chosen at random" (KNUTH 1998).
An easy way to make a choice using random numbers generators is to number all actions from 0 to n, and to generate a random number r. The remaining of the division of r by n (r modulo n) will give the number of the action to choose.