 |
|  |
 |
|
Ari Rahikkala
|
 |
Unreported loss of streaming in atomic read operation
Oct 1999 time: 07:23
|
|
Heh... Straybow's post made me think about one problem with the method of checking if a random pick from a discrete uniform distribution [0,RAND_MAX] (which should be what rand() returns) is smaller than RAND_MAX divided by two rounded down. If RAND_MAX is odd, this causes a slight bias. Well, my guess is that on most systems RAND_MAX is either one and a bunch of zeroes, or just a bunch of ones. In the former case, RAND_MAX is even, in the latter case it's odd.
That's not the interesting (or well thought-out) part. It just made me think further about bits:
For the actual bits returned by rand(), if we trust the function to be random enough, it should be true for each bit that there's a 50% chance it's 1 and a 50% chance it's 0. Thus, assuming we're using 32-bit integers, we can check if a PB gets through an ODP shield by rolling a random number, shifting it (either direction works) by 32-[number of ODPs] places with zero as the extension bit, and checking if the result is true. If there are more than 32 ODPs, just do the rolls and checks for truth but no shifts [number of ODPs]/32 times (rounded down, of course) first.
It's a very pointless bit-banging optimisation, but at least it doesn't waste as much entropy as the method of rolling a new 32-bit random number for each boolean check does .
|
|
|  |
 |
|
SynthetGod8
|
|
Do you think that a quantum computer would be able to break any standard encryption technique employed by our computers today? At the same time, would it be able to use encryption methods that are unbreakable even by a quantum computer?
|
|
|  |
 |
|
Natalinasmpf
|
|
quote: Do you think that a quantum computer would be able to break any standard encryption technique employed by our computers today? |
Most probably.
quote: would it be able to use encryption methods that are unbreakable even by a quantum computer? |
Probably not for this one.
Anyway, what is the concluding result of this thread? I now assume after all the formulas, its possible, to have so many ODP's, that eventually PB success will be reduced to zero?
|
|
|  |
 |
|
goomeister
|
|
quote: Originally posted by Natalinasmpf
Anyway, what is the concluding result of this thread? I now assume after all the formulas, its possible, to have so many ODP's, that eventually PB success will be reduced to zero? |
Of course. It works the other way around, too. The real issue is not the number of PBs or the number of ODPs, but how the number of PBs compares to the number of ODPs.
|
|
|  |
 |
|
athkatla
|
|
England, UK
Sep 2004 time: 05:23
|
|
And I thought this was just a simple turn based game!
|
|
|  |
All times are GMT. The time now is 05:23. Apolyton Time is 00:23. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|