在计算机上,怎么产生非伪随机数呀?
登录 | 论坛导航 -> 华新鲜事 -> 求学狮城 | 本帖共有 17 楼,分 1 页, 当前显示第 1 页 : 本帖树形列表 : 刷新 : 返回上一页
<<始页  [1]  末页>>
作者:bugzzj (等级:2 - 初出茅庐,发帖:13) 发表:2007-09-24 11:43:44  楼主  关注此帖评分:
在计算机上,怎么产生非伪随机数呀?
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:icky (等级:15 - 最接近神,发帖:7923) 发表:2007-09-24 13:43:31  2楼
you mean not "pseudo random numbers"?
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:bugzzj (等级:2 - 初出茅庐,发帖:13) 发表:2007-09-24 14:38:56  3楼
you mean not "pseudo random numbers"?
yes.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:icky (等级:15 - 最接近神,发帖:7923) 发表:2007-09-24 15:22:57  4楼 评分:
I don't know any existing algorithm generating non-pseudo random number
but what's the application that must require non-pseudo random number?
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:bugzzj (等级:2 - 初出茅庐,发帖:13) 发表:2007-09-24 15:27:14  5楼
I don't know any existing algorithm generating non-pseudo random numberbut what's the application that must require non-pseudo random number?
nothing, just for fun.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:icky (等级:15 - 最接近神,发帖:7923) 发表:2007-09-24 16:01:18  6楼 评分:
nothing, just for fun.
as every instruction is determined
so 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?
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:bugzzj (等级:2 - 初出茅庐,发帖:13) 发表:2007-09-24 17:18:09  7楼 评分:
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?
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).
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:吴永铮 (等级:8 - 融会贯通,发帖:2078) 发表:2007-09-24 19:11:00  8楼 评分:
there is hardware random number generator
In 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
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:simon (等级:10 - 炉火纯青,发帖:6859) 发表:2007-09-25 01:47:36  9楼
I don't know any existing algorithm generating non-pseudo random numberbut what's the application that must require non-pseudo random number?
I thought about this question before. One solution is to have distributed comput
ing 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.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:icky (等级:15 - 最接近神,发帖:7923) 发表:2007-09-25 09:46:00  10楼
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.
man, it's still deterministic, just that the model is very complicated.... :)
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:icky (等级:15 - 最接近神,发帖:7923) 发表:2007-09-25 09:48:22  11楼
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
how random is it?
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:香陵居士 (等级:16 - 好恐怖呀,发帖:22662) 发表:2007-09-25 11:37:52  12楼 评分:
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?
Sometimes it is not possible to describe the world completely
Like the case of particles.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:吴永铮 (等级:8 - 融会贯通,发帖:2078) 发表:2007-09-25 12:14:38  13楼 评分:
It uses temperature and electronic noise
Nowadays, 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.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:simon (等级:10 - 炉火纯青,发帖:6859) 发表:2007-09-25 14:35:15  14楼 评分:
man, it's still deterministic, just that the model is very complicated.... :)
everything is deterministic. only difference is how complicated the generator is
only god throws dies; or even he does not.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:icky (等级:15 - 最接近神,发帖:7923) 发表:2007-09-25 16:57:02  15楼
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
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:simon (等级:10 - 炉火纯青,发帖:6859) 发表:2007-09-26 00:15:13  16楼
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.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
作者:icky (等级:15 - 最接近神,发帖:7923) 发表:2007-09-26 11:07:46  17楼
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.
agreed... "to some extent"...
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表
论坛导航 -> 华新鲜事 -> 求学狮城 | 返回上一页 | 本主题共有 17 篇文章,分 1 页, 当前显示第 1 页 | 回到顶部
<<始页  [1]  末页>>

请登录后回复:帐号   密码