Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: NihilCredo on February 21, 2011, 08:27:06 AM



Title: Mr. Lucky begins to mine...
Post by: NihilCredo on February 21, 2011, 08:27:06 AM
Mr. Luck "Lucky Bastard" L. Lucky von und zu Luckerton LVCXI is a punk who feels lucky today (like every other day in his life). He generates a BitCoin address, and activates the inbuilt mining program.

Mr. Lucky possesses this shockingly unexpected trait: whenever he uses a random or pseudo-random number generator (whether he runs it himself or someone else does it for him), he always gets the best possible outcome.

How fast will Mr. Lucky accumulate BitCoins?




Title: Re: Mr. Lucky begins to mine...
Post by: genjix on February 21, 2011, 08:42:42 AM
As fast as it takes to compute 1 hash theoretically...


Title: Re: Mr. Lucky begins to mine...
Post by: theymos on February 21, 2011, 08:55:40 AM
He'll get all of them in less than an hour.


Title: Re: Mr. Lucky begins to mine...
Post by: NihilCredo on February 21, 2011, 01:39:49 PM
Thanks.


Title: Re: Mr. Lucky begins to mine...
Post by: gigitrix on February 22, 2011, 04:17:29 PM
I'm somewhat amused by this thought. That it is theoretically possible that a Mr Lucky gets 15 million bitcoins overnight  :)

Anyone want to work out the probability of this happening? I imagine it's less than 1/((googolplex)^2)  ;D


Title: Re: Mr. Lucky begins to mine...
Post by: casascius on February 22, 2011, 06:10:24 PM
I'm somewhat amused by this thought. That it is theoretically possible that a Mr Lucky gets 15 million bitcoins overnight  :)

Anyone want to work out the probability of this happening? I imagine it's less than 1/((googolplex)^2)  ;D

It's unfortunate, he dies a death by lightning.

That evening, the lottery numbers are called.  The ticket on his refrigerator makes him a posthumous millionaire.


Title: Re: Mr. Lucky begins to mine...
Post by: draaglom on February 22, 2011, 08:16:15 PM
If my calculations are correct, the odds are around (1/(1.0043516 × 10^59))^15000000 (which Wolfram tells me is 10^-(10^8.95))

In contrast, the odds of being struck by lightning are around 1/750000 - therefore* it is more likely that you will be hit by lightning 150,641,541 times.

*With a little napkin-maths license


Title: Re: Mr. Lucky begins to mine...
Post by: Hal on February 22, 2011, 10:24:02 PM
He'll get all of them in less than an hour.
What about difficulty adjustments though? Difficulty will increase by a factor of 4 every 2016 blocks. Current difficulty is > 32000 or 2^15, plus the implied 32 bits for an actual value of 2^47, ie 47 bits of zeroes at the front of the hash. We add 2 more zeroes every 2016 blocks, so after 105 such adjustments, the target will be all zeroes!

However, I peeked at the code, and even an all-zero target can be met with an all-zero hash. So theymos is right, Mr Lucky (who I think has an infinitely fast computer in his pocket) can go all the way, as fast as the net can broadcast blocks.


Title: Re: Mr. Lucky begins to mine...
Post by: Gavin Andresen on February 22, 2011, 10:36:22 PM
So theymos is right, Mr Lucky (who I think has an infinitely fast computer in his pocket) can go all the way, as fast as the net can broadcast blocks.

Rumor has it he stole an Infinite Improbability Drive.


Title: Re: Mr. Lucky begins to mine...
Post by: theGECK on February 22, 2011, 10:41:43 PM
So theymos is right, Mr Lucky (who I think has an infinitely fast computer in his pocket) can go all the way, as fast as the net can broadcast blocks.

Rumor has it he stole an Infinite Improbability Drive.

Well, that would make this whole situation highly probable, then. Every time he turned it on.


Title: Re: Mr. Lucky begins to mine...
Post by: davout on February 22, 2011, 10:45:46 PM
However, I peeked at the code, and even an all-zero target can be met with an all-zero hash. So theymos is right, Mr Lucky (who I think has an infinitely fast computer in his pocket) can go all the way, as fast as the net can broadcast blocks.
He'd get them as fast as his client can write blocks to the disk.
Difficulty adjustments would be irrelevant, so would network latency be since the network would just slowly catch up after the fact.


Title: Re: Mr. Lucky begins to mine...
Post by: xenon481 on February 23, 2011, 01:25:53 AM
However, I peeked at the code, and even an all-zero target can be met with an all-zero hash. So theymos is right, Mr Lucky (who I think has an infinitely fast computer in his pocket) can go all the way, as fast as the net can broadcast blocks.
He'd get them as fast as his client can write blocks to the disk.
Difficulty adjustments would be irrelevant, so would network latency be since the network would just slowly catch up after the fact.

Difficulty adjustments would be relevant to the calculations of just how lucky he is, but wouldn't have any affect on how fast he would obtain all the remaining coins.


Title: Re: Mr. Lucky begins to mine...
Post by: Gavin Andresen on February 23, 2011, 01:47:08 AM
Hmmm...

Thinking a little more, Mr. Lucky will have some coding to do.  Blocks are indexed based on their hash, so when he generates that second all-zero hash he's going to have trouble with the current implementation.  Actually, he'll have trouble before then, because if the target is low enough there won't be enough unique hashes...

(and before somebody asks: YES, there is a very small chance that two blocks will be found with the same hash.  And NO, that is NOT a problem that needs to be solved, it is so improbable it is not worth worrying about).


Title: Re: Mr. Lucky begins to mine...
Post by: Stefan Thomas on February 23, 2011, 05:50:47 AM
Thinking a little more, Mr. Lucky will have some coding to do.

Technically, he wouldn't have to code anything. He could just run...

Code:
sh /dev/urandom

... and it would do all the coding for him.


Title: Re: Mr. Lucky begins to mine...
Post by: gim on February 23, 2011, 05:01:21 PM
Code:
sh /dev/urandom

... and it would do all the coding for him.
[/quote]

ahahaha!

But maybe Mr Lucky would have more fun stealing bitcoins than generating them.
Same piece of code though...



Title: Re: Mr. Lucky begins to mine...
Post by: xenon481 on February 23, 2011, 05:16:10 PM
Quote
Code:
sh /dev/urandom

... and it would do all the coding for him.

ahahaha!

But maybe Mr Lucky would have more fun stealing bitcoins than generating them.
Same piece of code though...

Very true, since he could find all the private keys that have any BTC associated with them.


Title: Re: Mr. Lucky begins to mine...
Post by: gim on February 23, 2011, 05:37:40 PM
Code:
gim $ sh /dev/urandom
/dev/urandom: /dev/urandom: cannot execute binary file

For sure, I'm not Mr Lucky.

Strange kind of lottery.
More chances to trash your computer than to win anything.


Title: Re: Mr. Lucky begins to mine...
Post by: markm on February 24, 2011, 08:19:58 PM
./dev/urandom might be faster and more efficient than sh /dev/urandom.

(Or should that be exec /dev/urandom? I have been awake too long.)

I am not entirely convinced his dying of radiation poisoning would be the best possible outcome, since obviously that would, rather, be for a glitch in his system to cause him to generate for me instead of for him(*). So actually sorry he would earn no bitcoins other than however many I decide to tip him for grabbing me all the bitcoins.

(*) Plus the hashes when decoded correctly would be some awesome insight or immortality formula or something...

-MarkM-


Title: Re: Mr. Lucky begins to mine...
Post by: DataSurfer on April 08, 2011, 12:12:23 AM
Mr. Lucky may be inclined to give away all of his bitcoin because he already wins all lotteries.  Including the fake international lotteries you get in your spam folder.  Not to mention he knows all government secrets, can read everyone's emails, and listen to everyone's skype conversations.


Title: Re: Mr. Lucky begins to mine...
Post by: wb3 on April 08, 2011, 12:19:06 AM
Quote
In contrast, the odds of being struck by lightning are around 1/750000 - therefore* it is more likely that you will be hit by lightning 150,641,541 times

Good Old Benjamin Franklin learned how to decrease those odds.  ;D



Title: Re: Mr. Lucky begins to mine...
Post by: eMansipater on April 08, 2011, 02:13:48 AM
I have just one question---what happens when Mr. Lucky fights Chuck Norris?