It looks like you're new here. If you want to get involved, click one of these buttons!

- All Categories 2.3K
- Chat 498
- Study Groups 14
- Petri Nets 6
- Epidemiology 3
- Leaf Modeling 1
- Review Sections 9
- MIT 2020: Programming with Categories 52
- MIT 2020: Lectures 21
- MIT 2020: Exercises 25
- MIT 2019: Applied Category Theory 339
- MIT 2019: Lectures 79
- MIT 2019: Exercises 149
- MIT 2019: Chat 50
- UCR ACT Seminar 4
- General 65
- Azimuth Code Project 110
- Statistical methods 2
- Drafts 4
- Math Syntax Demos 15
- Wiki - Latest Changes 3
- Strategy 113
- Azimuth Project 1.1K
- - Spam 1
- News and Information 147
- Azimuth Blog 149
- - Conventions and Policies 21
- - Questions 43
- Azimuth Wiki 707

Options

Created page Random number generator.

On that page I posted an implementation of the ran algorithm from numerical recipes, in Java, which is quite different from the C++ implementation in the book.

Now here is the question: The C++ code itself is not open source, but sold under a commercial, single user license. The algorithm used is described in the book. The Java implementation is, as I said before, different from the C++ code in many respects, but the algorithm itself is the same, of course.

Does anyone have any idea if this violates the copyright of the authors? In Europe the answer would be no, I guess, but then the Europeans have a different attitude towards software patents and copyright.

## Comments

Previously you've talked about correlations between values output by the PRNG. You probably know this, but in case two other big issues are:

The period must be much, much longer than the number of "numbers requested" $N$ during a run if you want to do multiple runs with a different seed to "validate" that a result isn't atypically influenced by the particular random sequence. Basically you need it to be long enough so that if you select "number of runs" $R$ random seeds then the probability of any of the $R$ blocks of length $N$ overlap anywhere is negligible.

No matter how much internal state you've got, the number of distinct starting points is limited by the number of different seeds your initialisation routine can create. This is particularly important if you're trying to generate "reproducible" random numbers using a deterministic initialisation procedure.

`Previously you've talked about correlations between values output by the PRNG. You probably know this, but in case two other big issues are: 1. The period must be much, much longer than the number of "numbers requested" $N$ during a run if you want to do multiple runs with a different seed to "validate" that a result isn't atypically influenced by the particular random sequence. Basically you need it to be long enough so that if you select "number of runs" $R$ random seeds then the probability of any of the $R$ blocks of length $N$ overlap anywhere is negligible. 2. No matter how much internal state you've got, the number of distinct starting points is limited by the number of different seeds your initialisation routine can create. This is particularly important if you're trying to generate "reproducible" random numbers using a deterministic initialisation procedure.`

Yes, I know, but thanks nevertheless - any help is welcome! I'll include your remark.

I started with the remark about correlations, because there seem to be quite a few web pages that don't mention it, or even get it wrong.

`<blockquote> <p> You probably know this, but in case two other big issues are:... </p> </blockquote> Yes, I know, but thanks nevertheless - any help is welcome! I'll include your remark. I started with the remark about correlations, because there seem to be quite a few web pages that don't mention it, or even get it wrong.`

Great stuff, guys!

`Great stuff, guys!`