Radom Vis 35 Serial Number Year

0 views
Skip to first unread message

Mariam Obregon

unread,
Aug 3, 2024, 6:00:56 PM8/3/24
to befullidi

I was trying to solve a hobby problem that required generating a million random numbers. But I quickly realized, it is becoming difficult to make them unique. I picked up Algorithm Design Manual to read about random number generation.

One should look for a cryptographically secure pseudo-random number generator. Most PRNG are linear congruence generators (so next number is a linear function of previous number), so if you plot next number vs previous number you'll get a chart of parallel lines. A CSPRNG will not do that. The trade-off is that they're slow.

A deterministic device will always produce the same output when given the same starting conditions and inputs - that is what it means to be deterministic. "Truly random number" is more of a philosophical viewpoint, as what does it mean to be random is the crux of the philosophical navel gazing (folks aren't even certain if atomic decay is random or follows some pattern we just can't figure out yet). A cryptographically secure random number generator is going to take some external source of entropy to make the device non-deterministic.

The best thing you can get from a deterministic pseudo-random number generator is a stream of numbers that has a very long cycle (non-repeating is impossible unless your RNG device has unlimited storage) which, for the length of the cycle, produces a stream numbers that meets all the other properties of a random sequence (a uniform distribution of values being the most interesting one).

Another common approach is to take the current time as the seed for a deterministic RNG (srand(time(NULL)); in C); cryptographically speaking, this is worthless, since the current time is no secret, but for things like physical simulations or video games, it is good enough.

The second chapter of the book Discrete-Event Simulation: A First Course by Lawrence Leemis gives a fantastic introduction to random number generators (or more accurately, psuedo-random number generators).

Historically three types of random number generators have been advocated for computational applications: (a) 1950's-style table look-up generators like, for example, the RAND corporation table of a million random digits; (b) hardware generators like, for example, thermal "white noise" devices; and (c) algorithmic (software) generators. Of these three types, only algorithmic generators have achieved widespread acceptance. The reason for this is that only algorithmic generators have the potential to satisfy all of the following generally well-accepted random number generation criteria. A generator should be:

So you wind up starting with a "Seed value(s)" that is picked at "Random" (usually the current time stamp) then use it in an algorithm to start generating numbers. But the entire set of is based off the original Seed value!

So if you run your code again with the exact same Seed value(s), you will get the EXACT same SET of numbers! How can any reasonably person call that random? But it sure does LOOK random.

The problem with a computer is that it always knows ALL variables. The random number is simply a mathematical function of some seed value.
The best we can do is to give the computer a pseudo-random seed value, which is usually based off a variable that we can't predict (such as exact time).

Since you are generating random numbers, you should expect the generated values to be non-unique. This is a property of randomness - you can't say a sequence of truly random (or even pseudo-random) numbers is unique, because that requirement would allow the final value in the range to be predicted, as well as changing the probability of all the unchosen numbers each time a new one is selected.

Generating truly random numbers in software is indeed not possible as others have pointed out, however it is possible with hardware to build a device which can generate truly random numbers*. There are quite a few examples of this on the internet, and there are a variety of methods used, from reading the time between ticks on Geiger counter to sampling the white noise (mostly background radiation from the universe) of an untuned receiver. I myself have built a few using a few of the methods available.

*Any good physics geek will point out that given the way the universe operates none of these are hyper-technicaly truely random but there is no reasonable way to predict the results so for the sake of this discussion they are sufficiant.

There is no way you can produce a random number without a special hardware. In my freshman year, a couple of classmates and I proposed a random number generator that has basically a AM receiver and tuned to 4 different channels, get the input into a A to D converter and add them all (modulo your max number). Since the combination of analog input from any arbitrary number of stations is random and we could produce a large number of random numbers from the A2D convertor we proposed this could be a good generator. Of course, even this is not truly random in a philosophical sense, though for most practical purposes this could work.

Determinism is essentially a function. Remember from Algebra that a function is a correspondence between a domain and range such that each member of the domain corresponds to exactly one member of the range.

Note Von Neumann states, "arithmetical methods of producing [...]". This is not talking about human input, concurrency, sample wind speeds read from a precise instrument or other non-algorithmic ways of producing random input to a deterministic function.

This simply states a function or system of functions is not going to suddenly become non-deterministic. In other words, Add(2,3) will not somehow return 6 or anything other than 5 given the same inputs. That is impossible.

The context is previously defined to be "on any deterministic device". I could end the argument here. But, what if we change up the context by introducing a new element to the system? A non-deterministic element added as input makes the system a non-deterministic system. Although, by removing the non-deterministic element we are reduced back to a deterministic system. If we can somehow trace or otherwise reproduce the inputs we can reproduce a result. But this entire paragraph is tangetenial to what the author is saying. Remember the context.

250 years ago, in 1766, Sweden became the first country in the world to introduce a constitutional law to abolish censorship. To honour this anniversary, Sweden is now the first country in the world to introduce its own phone number. Call today and get connected to a random Swede, anywhere in Sweden and talk about anything you want.

Everyone who lives in Sweden is able to register as an ambassador. When you call you will be connected to a random Swede. The chances that you are connected to the same Swede twice are small - so you get a new side of Sweden every time you call.

The call will be charged as an international call.You have to check with your phone operator what your calling rate for Sweden is. It depends on your communication provider and a number of factors such as individual calling plans and time of day. Your call will start getting charged when you are connected to Sweden. If you are calling from one of the local numbers (see if your country is on the list) the call will be charged as a local call.

We at the Swedish Tourist Association know there is much more on the side of the road, a bit further into the woods and a little higher up the mountain. By guiding and inspiring everything from small to great adventures we want to encourage more people to explore and take advantage of our unique environments.

To pick a date at random, start by specifying the start and end date (day, month, and year) of the period you want to select a random date from. By default the period is one calendar year starting from today.

Continue by selecting if you want to exclude certain days of the week from the draw. Then specify what format you prefer the output to be in. Finally, simply press the "Pick a Random Date" button to make our software draw a date at random for you.

If generating a lot of random dates at once (a maximum of 100 is supported by our random date generator), it is easiest to simply select all the contents of the textbox (click in it, then press Ctrl+A on a PC), followed by Ctrl+C (on a PC) to copy, then paste as needed. Note that all generated dates will be unique, if the time period permits (otherwise you'd get an error). The produced random dates are returned unsorted (that is, in order of generation, thus in random order), but sorting them in any spreadsheet software should be a piece of cake.

By selecting a period spanning multiple years the tool can function as a random year generator. To pick a random year simply specify a range covering more than one year while making sure it includes full years to give each an equal chance. Then generate a random date as you usually would. The year extracted from such a date will have been chosen at random.

Yes, the random date picker will work with many valid dates from the past or in the future: you can specify a range between Jul 1, 500 and Aug 31, 3030. If you try to enter an invalid date you will immediately receive a validation error.

Picking a random day (or day AND time) in a given timespan is a curious task with few real-world applications. Sometimes it is done for the purpose of simulations, while others prefer to leave important events in their life to chance, e.g. a wedding day or a birthday. What you use the date generator is entirely up to you. We can only guarantee that it uses a solid random number generator to select a date between the two points in time you select.

This tool can easily be used as a random date of birth generator to produce one or more birth dates in a given time range. For example, to get a calendar date within a given birth year, simply restrict the start date and end date from Jan 1 to Dec 31 of said year. To get multiple calendar days (max 100), just select how many in the relevant input field.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages