Computer Physics Communications Program LibraryPrograms in Physics & Physical Chemistry |

[Licence| Download | New Version Template] acie_v1_0.gz(1 Kbytes) | ||
---|---|---|

Manuscript Title: Sequential random integer generator. | ||

Authors: C.T.K. Kuo, T.W. Cadman, R.J. Arsenault | ||

Program title: SRNG | ||

Catalogue identifier: ACIE_v1_0Distribution format: gz | ||

Journal reference: Comput. Phys. Commun. 12(1976)163 | ||

Programming language: Fortran. | ||

Computer: UNIVAC 1108. | ||

Operating system: UNIVAC 1108 EXEC. | ||

RAM: 17K words | ||

Word size: 36 | ||

Keywords: General purpose, Random, Integer, Generator, Solid solution Strengthening, Statistical methods. | ||

Classification: 4.13. | ||

Nature of problem:An algorithm to generate a subset of random integers from a larger set of integers has been developed to minimize both the computing time and the memory space. The algorithm deals with the whole array at the same time, generates a subset of random integers for a given percentage of the range, and the generated subset of random integers is obtained as sequentially increasing numbers. Such random integers are used to specify thepositions of randomly dispersed impurity atoms or solute atoms in many computer simulation experiments. A specific case is that of solid solution strengthening. | ||

Solution method:In order to produce a large subset of sequentially increasing, non- repeating random integers from a larger set of integers, each integer of the larger set is represented by a bit of a computer word. On the UNIVAC 1108, 35 bits can be used to represent 35 integers of the larger set, the remaining sign bit is used to indicate a particular word location. Two groups of random numbers are generated, which are uniformly distributed in the interval 0 to 1. Group 1 is used to choose the computer word, and Group 2 is used to choose the bit within the computer word. | ||

Restrictions:The number of integers from which the random subset can be chosen is limited by the size of the computational cell. The cell is limited by the computer storage capacity. | ||

Unusual features:Two unusual features of this program are the use of one's compliment representation of minus zero and bit manipulation capability in the UNIVAC 1108 computer. | ||

Running time:To select a sequential subset of 2.8 X 10**4 non-repeating random integers from a larger set of 2.8 X 10**6 integers requires approx 15 m of UNIVAC 1108 memory time. However, changing the total number of integers does not result in a linear change in the computer time. The time required to select a subset of 2.8 X 10**3 sequential non-repeating random integers from a larger set of 2.8 X 10**5 integers is approximately 3 s. |

Disclaimer | ScienceDirect | CPC Journal | CPC | QUB |