Perm; Random; Randseed - HP 39g Master Manual

Graphing calculator
Hide thumbs Also See for 39g:
Table of Contents

Advertisement

PERM(n,r)
This function gives the value of
n
!
=
formula
n
P
r
(
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:
3
4
P
3

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.

RANDSEED

The
command
It is important to realize that these are not truly random numbers. Inside the
calculator is a mathematical procedure (an algorithm) which uses a 'seed'
number to produce them. Unfortunately, taken straight out of the box, two
hp 39g+'s will produce exactly the same sequence of "random" numbers!
This can be a problem in that, for example, a class set of calculators doing a
simulation of dice would 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.
P using the
n
r
.
)!
)
×
×
6
P
P
3!
4
6
281

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

40g39g+

Table of Contents