Browse Prior Art Database

# Algorithm to Generate Random Numbers Using APL

IP.com Disclosure Number: IPCOM000089569D
Original Publication Date: 1977-Nov-01
Included in the Prior Art Database: 2005-Mar-05
Document File: 1 page(s) / 11K

IBM

Yu, CC: AUTHOR

## Abstract

This algorithm starts from the postulate that the digits after the n/th/ digits of a/i/2/ are sequentially not correlated to the corresponding digits of (a + Delta)/i/2/ if Delta << 10/-n/. From the random digit string one can form series of random numbers. The following sequence shows how random numbers can be generated using this algorithm on APL.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 1

Algorithm to Generate Random Numbers Using APL

This algorithm starts from the postulate that the digits after the n/th/ digits of a/i/2/ are sequentially not correlated to the corresponding digits of (a + Delta)/i/2/ if Delta << 10/-n/. From the random digit string one can form series of random numbers. The following sequence shows how random numbers can be generated using this algorithm on APL.

Input N and K. Generate an array T of n elements with the first element equal to the seed and an increment of delta on each subsequent element. Take square root of T, and encode up to fifteen digits. Reverse the encoded digits and decode to form a uniformly distributed random array of n elements between 0 and 1. Multiply the latter array by K, and round off the form n random numbers. (Optional) Use the last random number to change seed. The APL program is as follows:

(Image Omitted)

1