HP 40gs HP 39gs_40gs_Mastering The Graphing Calculator_English_E_F2224-90010.p - Page 206
PERM(<n>, <r>), RANDOM, RANDSEED(<number>), A similar command of, will produce simulated rolls
UPC - 882780045217
View all HP 40gs manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 206 highlights
PERM(,) This function gives the value of nPr using the formula n Pr = n! . (n − r)! Eg. How many ways can 3 Math, 4 English, and 6 German books be arranged on a shelf if all the books from a subject must be together? ( ) Ans: 3P3 × 4P4 × 6P6 × 3! = 622080 RANDOM This function supplies a random 12 digit number between zero and one. If you want a series of random numbers, just keep pressing ENTER after the first one. Eg. Produce a set of random integers between 5 and 15 inclusive. Use the expression INT(RANDOM*11)+5 The RANDOM*11 produces a range from 0 to 10.999999. This is then dropped down to the integer below by the INT function, giving a range of integers 0,1,2,3,...,10. The final adding of 5 gives the correct range. A similar command of INT(RANDOM*6)+1) will produce simulated rolls of a normal die. RANDSEED() It is important to realize that the values produced by the RANDOM command are not truly random numbers. Inside the calculator is a mathematical procedure (an algorithm) which uses a 'seed' number to produce them. Unfortunately, when taken straight out of the box, two calculators will produce exactly the same sequence of "random" numbers! This can be a problem. For example, a class set of calculators doing a simulation of dice might all produce the same numbers. The simple solution is to seed the random number algorithm with different values for each machine. This is done using the function RANDSEED(...) and, providing each person uses a different number, it should only be necessary to do it once (unless the calculator is reset). The simplest method is to use RANDSEED(Time) since the value of Time will be different on each calculator. Since the same seed will produce the same sequence of numbers, this can be convenient for teachers in test situations. 206