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

- All Categories 2.2K
- Applied Category Theory Course 355
- Applied Category Theory Seminar 4
- Exercises 149
- Discussion Groups 49
- How to Use MathJax 15
- Chat 480
- Azimuth Code Project 108
- News and Information 145
- Azimuth Blog 149
- Azimuth Forum 29
- Azimuth Project 189
- - Strategy 108
- - Conventions and Policies 21
- - Questions 43
- Azimuth Wiki 711
- - Latest Changes 701
- - - Action 14
- - - Biodiversity 8
- - - Books 2
- - - Carbon 9
- - - Computational methods 38
- - - Climate 53
- - - Earth science 23
- - - Ecology 43
- - - Energy 29
- - - Experiments 30
- - - Geoengineering 0
- - - Mathematical methods 69
- - - Meta 9
- - - Methodology 16
- - - Natural resources 7
- - - Oceans 4
- - - Organizations 34
- - - People 6
- - - Publishing 4
- - - Reports 3
- - - Software 21
- - - Statistical methods 2
- - - Sustainability 4
- - - Things to do 2
- - - Visualisation 1
- General 39

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!`