Re: [ADVANCED-DOTNET] Random number generation.

2004-11-12 Thread Christopher Reed
Larry, Not necessarily; though the ability to dervie an actual prediction equation is more complicated than running a test that shows that the sequence has a tendency to having a priori dependencies. You might have a sequence of values where, for example, the 21st value is dependent on the first

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-12 Thread Larry O'Brien
>>Predictability >>...the algorithm to >>predict the pattern of numbers generated by an algorithm, other than the >>correctly seeded algorithm itself, should be at least as complicated as >>the algorithm... At the risk of hair-splitting, doesn't the predicting algorithm have to be at least slightl

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-12 Thread Dave Jefferies
There appear to be two type of random number generators being discussed. The first uses physical effects that are believed to be 'truly' random. The example of this is the noise generated by a CCD or ERNIE, the random number genertor used for the UK Premium Bond lottery savings scheme. This may be

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Matthew Wills
IL PROTECTED] | | cc: | | Subject: Re: [ADVANCED-DOTNET] Random numbe

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Sebastian Good
ECTED] Subject: Re: [ADVANCED-DOTNET] Random number generation. Chad, I ran the program and it does give me 997, 995, 953 repeated values on 3 successive runs. I have a similar check written down as part of my test suite and the statistics of repetition does seem to be high. But why not recalculat

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
>[mailto:[EMAIL PROTECTED] On Behalf Of Chad M. Gross >Sent: Thursday, November 11, 2004 9:26 PM >To: [EMAIL PROTECTED] >Subject: Re: [ADVANCED-DOTNET] Random number generation. > > >First off I want to mention that it was a long day today and that "299" >comment

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Sebastian Good
if you want to. Sebastian Good Palladium Consulting Inc. -Original Message- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Chad M. Gross Sent: Thursday, November 11, 2004 9:26 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Random number gene

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Chad M. Gross
First off I want to mention that it was a long day today and that "299" comment I made was something I remembered from a while back. It was really the limitation of the Console window for displaying my dups :-). Anyway, here is a little code snippet to show how the Random class duplicates in .NET:

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread J. Merrill
If you've been testing using seed X and have hit a bug / issue / bit of unfinished code based on the sequence of (pseudo-random) values returned by your generator, you want to be able to modify the code and re-run with the same seed, knowing that you'll get to that same point in your code. Once

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Reed, Thanks a lot for sharing your thoughts ! Some of the things you said about the seed selection seemed weird the first time but then after some thought, makes sense. So now, are you saying that i use the same seed for my final calculations once i find the results of the test runs to be satisf

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Daniel Croft
What is this, the Heisenberg uncertainty principal list or what? Fundamentally a computer cannot generate a random number where there's deliberate programming involved IMO. It's a contradiction in terms. Dan -Original Message- From: Vijay M [mailto:[EMAIL PROTECTED] Sent: Thursday, Novem

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Andrew, You miss the point. The world is purely random by all means but once you try to detect it, the error of measurement is definite and produces a standard variance in the resulting data. Hence anything measured, simply cannot be random. My 2 cents on the subject. If you feel like thinking mor

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread James
-Original Message- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Kristoffer Sheather Sent: Wednesday, November 10, 2004 9:11 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Random number generation. Is a random number calculated by

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Christopher Reed
Based on my own experiences with random number generators, the two main items you need to look at are the initial seed and the period of the generator. A RNG is usually designed to recreate the same sequence over and over given the same seed value. The key is that the sequence of numbers do not r

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Larry O'Brien
>>I would not use the .NET Random for sure. You indicated you want values >>honest out to 30 Million, the .NET framework Random is not going to give >>it to you. The SSCLI source seems to be Knuth's Ran3 algorithm. According to http://www.shadlen.org/ichbin/random/generators.htm, that algorithm h

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Steve Johnson
On Thu, 11 Nov 2004 15:05:08 -0500, Chad M. Gross <[EMAIL PROTECTED]> wrote: > As for the RNGCryptoServiceProvider sample someone sent off to you, that > may work for you but you need to make a change to the code to use a byte > [8] and an Int64 to get more randomness and minimize repetition. Good

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Fabian, I found out that the Mersenne Twister algorithm seems to be widely used to create pseudo-random numbers of high volume in lots of places. Been reading on it from the morning and seems promising ! There is also a port of the algorithm written by Trevor Misfeldt in C#. http://www.c-sharpcor

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Chad M. Gross
I would not use the .NET Random for sure. You indicated you want values honest out to 30 Million, the .NET framework Random is not going to give it to you. My guess when you say "true to 30 Million", you mean random numbers generated from a non-repeatable number sequence that has a period of at l

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Larry, The first thing i did before posting the message here was to check out the source code in SSCLI on how the Random class has been implemented. But even after that, i still wasn't sure on how good it might perform for very huge numbers that i am dealing with. It is one thing to work well for

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
varnd.com/ > > >:) > >--- >Dominick Baier - DevelopMentor >http://www.leastprivilege.com > >-Original Message- >From: Unmoderated discussion of advanced .NET topics. >[mailto:[EMAIL PROTECTED] On Behalf Of Jason Bunting >Sent: Donnerstag, 11. November 2004 06:04 >To:

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Vijay M
Steve, Half-million random numbers is good news ! I havent really tried this class yet for any of my purposes but i guess it might be useful. Will let you know by end of day on how this works out. Thanks. >On Wed, 10 Nov 2004 21:34:10 -0700, Steve Johnson <[EMAIL PROTECTED]> wrote: >> The follow

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Christopher Frazier
Excellent discussion, everyone! Incidentally, I've been looking for a Monte Carlo example/kickstart for a while, and recently found Math.NET[0] which made it to version 2.0 last month. I haven't had a chance to dig in to the code, but it has several pseudo-random generators based on Numerical Recip

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-11 Thread Andrew Marshall
A perfect random generator can never exist, ever ! Unfortunate but true ! But what i am looking for is a good pseudo random number generator in .NET ! That's not strictly true, certain quantum phenomena are thought to be truly random ( although there is some argument that that's just because we don

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-10 Thread Fabian Schmied
All right. All the ramble apart, the question is whether .NET can be used to create a successful Monte carlo code ?! If yes, then which class, System.Random or the System.Security.Cryptography.RandomNumberGenerator, do i use to get better results ? Unfortunately, I don't have any papers on the qual

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-10 Thread Larry O'Brien
Vijay, The Rotor source code uses an algorithm from Numerical Recipes in C 2nd Ed. (http://www.dotnet247.com/247reference/System/Random/__rotor) That might give you a starting point for analysis. I think it's at least a pretty good pseudo-RNG for moderate-length runs. Cheers, Larry http://www.kn

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-10 Thread Dominick Baier
] Subject: Re: [ADVANCED-DOTNET] Random number generation. > A perfect random generator can never exist, ever ! Unfortunate but true ! It is said that radioactive decay is truly random, and thus some random-number generators have been created using this assumption. Ja

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-10 Thread Jason Bunting
> A perfect random generator can never exist, ever ! Unfortunate but true ! It is said that radioactive decay is truly random, and thus some random-number generators have been created using this assumption. Jason === This list is hosted by DevelopMentorĀ® http://w

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-10 Thread Steve Johnson
On Wed, 10 Nov 2004 21:34:10 -0700, Steve Johnson <[EMAIL PROTECTED]> wrote: > The following code produces about a half-million random 32-bit > integers/sec. on my Pentium M 1.7Ghz based Latitude D800: > > byte[] buf = new byte[4]; > > RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-10 Thread Steve Johnson
On Wed, 10 Nov 2004 22:42:02 -0500, Vijay M <[EMAIL PROTECTED]> wrote: > RNGCryptoServiceProvider class in > System.Security.Cryptography.RandomNumberGenerator is to create random > bytes, more useful for creating random keys to encrypt data, i think. It is > a derived class of the RandomNumberGene

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-10 Thread Vijay M
Sheather, A perfect random generator can never exist, ever ! Unfortunate but true ! But what i am looking for is a good pseudo random number generator in .NET ! The work that i am doing needs a random generator which keeps its word for say 30 million iterations. It is very important that i get th

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-10 Thread Kristoffer Sheather
PROTECTED] Subject: Re: [ADVANCED-DOTNET] Random number generation. Is a random number calculated by known parameters ever truly random?.. :) -Original Message- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Vijay M Sent: Thursday, 11 November 2004

Re: [ADVANCED-DOTNET] Random number generation.

2004-11-10 Thread Kristoffer Sheather
Is a random number calculated by known parameters ever truly random?.. :) -Original Message- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Vijay M Sent: Thursday, 11 November 2004 12:07 To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Random n