HP 39gs_40gs_Mastering The Graphing Calculator_English_E_F2224-90010

PERM(<n>,<r>)
This function gives the value of
n
P
using
r
n
n!
the formula
P
= .
r
(
nr
)!
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?
3 6
×
4
4
×
Ans:
(
PPP
)
×3! = 622080
3 6
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(<number>)
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