登录 | 首页 -> 华新鲜事 -> 求学狮城 | 切换到:传统版 / sForum | 树形列表
在计算机上,怎么产生非伪随机数呀?
<<始页  [1]  末页>> 

在计算机上,怎么产生非伪随机数呀?[bugzzj (9-24 11:43, Long long ago)] [ 传统版 | sForum ][登录后回复]1楼

you mean not "pseudo random numbers"?[icky (9-24 13:43, Long long ago)] [ 传统版 | sForum ][登录后回复]2楼

(引用 icky:you mean not "pseudo random numbers"?)yes.[bugzzj (9-24 14:38, Long long ago)] [ 传统版 | sForum ][登录后回复]3楼

(引用 bugzzj:yes.)I don't know any existing algorithm generating non-pseudo random numberbut what's the application that must require non-pseudo random number?[icky (9-24 15:22, Long long ago)] [ 传统版 | sForum ][登录后回复]4楼

(引用 icky:I don't know any existing algorithm generating non-pseudo random numberbut what's the application that must require non-pseudo r...)nothing, just for fun.[bugzzj (9-24 15:27, Long long ago)] [ 传统版 | sForum ][登录后回复]5楼

(引用 bugzzj:nothing, just for fun.)as every instruction is determinedso it's difficult to invent some algorithm that generates non-pseudo random number under the current architecture.

I feel it's enough to use pseudo random number to simulate the randomness, with seed set randomly.

A more interesting question is this:

Does random really exist?

Think about tossing a coin, the result (head or tail) is determined by the initial speed, gravity, wind direction, table material etc. If the modeling of the enviornment is complete, the result will always be the same under the same parameters.

So the randomness comes from the inability of describing the world completely, is that true?
[icky (9-24 16:01, Long long ago)] [ 传统版 | sForum ][登录后回复]6楼

(引用 icky:as every instruction is determinedso it's difficult to invent some algorithm that generates non-pseudo random number under the c...)maybe"So the randomness comes from the inability of describing the world completely, is that true?"

I think you are right. However, if the "inability of describing the world completely" is certain to us, random exist, to us.
Maybe, randomness is not universal, but relative to the object concerned.


In a computer, although every instruction is determined, environment out of the world is not. eg. consider we are writing an application that throw a dice when the user click a button. We may use clock() to generate a random number.

Here the randomness is determined by time. Assuming a user (or device) can not distinguish time from 1ms. And our computer's clock() has resolution of 1/6 ms. Shall we treat it as a true random (to the player).
[bugzzj (9-24 17:18, Long long ago)] [ 传统版 | sForum ][登录后回复]7楼

there is hardware random number generatorIn linux, the interface is /dev/(u)random. Many crypto software use it. check http://en.wikipedia.org/wiki//dev/random

the following command gives 64 bytes of random data:

[atp@risci1 ~]$ dd if=/dev/urandom bs=64 count=1 | od
1+0 records in
1+0 records out
64 bytes (64 B) copied, 6.0784e-05 seconds, 1.1 MB/s
0000000 125047 155010 151240 044101 134716 055204 027564 056065
0000020 000400 167744 111504 136012 136674 175425 045721 005465
0000040 111165 146462 106526 175406 153705 053636 101666 057700
0000060 175272 161005 105256 053347 171741 072074 127474 042150
[吴永铮 (9-24 19:11, Long long ago)] [ 传统版 | sForum ][登录后回复]8楼

(引用 icky:I don't know any existing algorithm generating non-pseudo random numberbut what's the application that must require non-pseudo r...)I thought about this question before. One solution is to have distributed computing as follows -- One server stores zillions of uniform random numbers between 0 and 1, which are prepared and tested to be "random". When a client request a list of random number, it will first be allocated to a position in the data on server, then the client will generate a psudo-random sequence, and pick the "random" numbers from data according to that sequence.[simon (9-25 1:47, Long long ago)] [ 传统版 | sForum ][登录后回复]9楼

(引用 simon:I thought about this question before. One solution is to have distributed computing as follows -- One server stores zillions of ...)man, it's still deterministic, just that the model is very complicated.... :)[icky (9-25 9:46, Long long ago)] [ 传统版 | sForum ][登录后回复]10楼

(引用 吴永铮:there is hardware random number generatorIn linux, the interface is /dev/(u)random. Many crypto software use it. check http://en...)how random is it?[icky (9-25 9:48, Long long ago)] [ 传统版 | sForum ][登录后回复]11楼

(引用 icky:as every instruction is determinedso it's difficult to invent some algorithm that generates non-pseudo random number under the c...)Sometimes it is not possible to describe the world completelyLike the case of particles.[香陵居士 (9-25 11:37, Long long ago)] [ 传统版 | sForum ][登录后回复]12楼

(引用 icky:how random is it?)It uses temperature and electronic noiseNowadays, the chip is built in almost all motherboard. This link is better. http://en.wikipedia.org/wiki/Hardware_random_number_generator

I remember there are also RNG using photon or other quantum stuff. They are not very expensive (price comparable to harddisk, I think), easy to use and not very big in size. Dr Chang Ee Chien mentioned it on his crypto class.
[吴永铮 (9-25 12:14, Long long ago)] [ 传统版 | sForum ][登录后回复]13楼

(引用 icky:man, it's still deterministic, just that the model is very complicated.... :))everything is deterministic. only difference is how complicated the generator isonly god throws dies; or even he does not.[simon (9-25 14:35, Long long ago)] [ 传统版 | sForum ][登录后回复]14楼

(引用 simon:everything is deterministic. only difference is how complicated the generator isonly god throws dies; or even he does not.)yes, if everything is deterministic, how does the random come from?we dont talk about religion here[icky (9-25 16:57, Long long ago)] [ 传统版 | sForum ][登录后回复]15楼

(引用 icky:yes, if everything is deterministic, how does the random come from?we dont talk about religion here)it's just a ideal concept. like poisson. there's no real poisson.consider tossing a coin. if your model includes the force of tossing it, trajectory, air dynamics, weight of the coin, height, etc, then you can determine which side it will be. So "randomness" is an ideal concept, everything in real-life is, to some extent, psudo-random... which is deterministic.[simon (9-26 0:15, Long long ago)] [ 传统版 | sForum ][登录后回复]16楼

(引用 simon:it's just a ideal concept. like poisson. there's no real poisson.consider tossing a coin. if your model includes the force of to...)agreed... "to some extent"...[icky (9-26 11:07, Long long ago)] [ 传统版 | sForum ][登录后回复]17楼


<<始页  [1]  末页>> 
登录 | 首页 -> 华新鲜事 -> 求学狮城 | [刷新本页] | 切换到:传统版 / sForum