Pages:
Author

Topic: Transparent mining, or What makes Nxt a 2nd generation currency - page 4. (Read 35830 times)

legendary
Activity: 2142
Merit: 1009
Newbie
And you're looking at a thread in which two different people have posted code.

Both the people made the same error.


So I only have one question; why are you pretending to have a problem understanding this?

Already answered why ur model is incorrect. Sorry, I'm not going to waste my time on every guy who does a logical error.
legendary
Activity: 1367
Merit: 1000
There are no questions to ask here.
Even if those two don't understand math? Roll Eyes
legendary
Activity: 2142
Merit: 1009
Newbie
legendary
Activity: 924
Merit: 1132

Ok. Keep ignoring. Discussion is over, we'll continue it after I get the answers.

Dude, there is no way someone capable of writing code is also capable of the kind of category error that would make them think there are relevant questions to ask. 

The entire purpose of code is to specify a process so exactly that there is no room for questions.  And you're looking at a thread in which two different people have posted code.  There is no possible question about what the code means that the code itself does not completely and unambiguously answer. 

The algorithm you described either is, or is not, accurately implemented by the code presented.  There are no questions to ask here.  You understand the algorithm because it's your algorithm in the first place.  If the code doesn't implement it correctly, then it's because there is an error in the code or because the description you gave isn't correct, and only you can explain the error or provide the correction.  There are no questions you can ask someone else to address that, because that knowledge is yours alone.  It does not belong to anyone else whom you could ask a question.  If the code does match, then the effect it demonstrates is an effect of the algorithm.  And if that's true, then only you as the developer can decide whether to do anything about it and if so what.  Again, no questions you can ask anyone else are relevant, because it's your decision not anyone else's.   

So I only have one question; why are you pretending to have a problem understanding this?

member
Activity: 80
Merit: 10
Still far from the reality.

The reality is that your algorithm is wrong.
newbie
Activity: 26
Merit: 0
Now imagine that you throw a dice with numbers from 1 to 6 and your opponent throws a semi-dice with three possible values from 1 to 3.
this analogy doesn't match forging properly, as the second dice(1-3) can't be treated uniform distribution. Instead, the p(1) = 1/6, p(2) = 1/6, p(3) = 2/3 which should also includes the implicitly removed p(4),p(5),p(6) in your analogy.
in this way, the ratio should be 2 rather than 3.

edit: if 100k divided into 100*1k, 100*p(1k gen Block) will be slightly lower than p(100k gen Block) as generation mutual exclusion
newbie
Activity: 107
Merit: 0
I am new with NXT.. can someone explain me in few words, why i should start dealing with "next generation coins". I saw videos, but still i need to hear it from more experienced users.

Thanks in advance
newbie
Activity: 41
Merit: 0
Alice rolls 1000-face die. Bob rolls 1000-face die.
Alice wins if she gets 1 or 2 (her balance is 100k), Bob wins if he gets 1 (his balance is 50k).

How many times Alice will win if she rolls the die 1000 times?
How many times Bob will win if he rolls the die 1000 times?

Could anyone answer the questions above?

Here are some simulation results:
Code:
    seed = 0x000004d2 =     1234
RAND_MAX = 0x7fffffff = 2147483647
   RETRY = 0x7ffffd78 = 2147483000
In 1000000 total trials of 1000 throws each, Alice won (2 chances in 1000 per throw) as follows:
Alice won 0 times in 135332 of the trials.
Alice won 1 times in 270858 of the trials.
Alice won 2 times in 271239 of the trials.
Alice won 3 times in 180359 of the trials.
Alice won 4 times in 90048 of the trials.
Alice won 5 times in 35744 of the trials.
Alice won 6 times in 11955 of the trials.
Alice won 7 times in 3388 of the trials.
Alice won 8 times in 858 of the trials.
Alice won 9 times in 179 of the trials.
Alice won 10 times in 35 of the trials.
Alice won 11 times in 4 of the trials.
Alice won 12 times in 1 of the trials.
In 1000000 total trials of 1000 throws each, Bob won (1 chance in 1000 per throw) as follows:
Bob won 0 times in 368738 of the trials.
Bob won 1 times in 368080 of the trials.
Bob won 2 times in 183462 of the trials.
Bob won 3 times in 60983 of the trials.
Bob won 4 times in 15109 of the trials.
Bob won 5 times in 3063 of the trials.
Bob won 6 times in 484 of the trials.
Bob won 7 times in 76 of the trials.
Bob won 8 times in 5 of the trials.
In 1000000 total trials of 1000 throws each, They both won (2 chances in 1000000 per throw) as follows:
Both won 0 times in 998026 of the trials.
Both won 1 times in 1973 of the trials.
Both won 2 times in 1 of the trials.
Number of random numbers drawn = 0x0077359654
              estimated period = 0x07fffffff0
Another try with different random numbers
Code:
    seed = 0x00003039 =    12345
RAND_MAX = 0x7fffffff = 2147483647
   RETRY = 0x7ffffd78 = 2147483000
In 1000000 total trials of 1000 throws each, Alice won (2 chances in 1000 per throw) as follows:
Alice won 0 times in 135982 of the trials.
Alice won 1 times in 270421 of the trials.
Alice won 2 times in 270428 of the trials.
Alice won 3 times in 180820 of the trials.
Alice won 4 times in 90182 of the trials.
Alice won 5 times in 35843 of the trials.
Alice won 6 times in 11828 of the trials.
Alice won 7 times in 3425 of the trials.
Alice won 8 times in 839 of the trials.
Alice won 9 times in 195 of the trials.
Alice won 10 times in 32 of the trials.
Alice won 11 times in 4 of the trials.
Alice won 12 times in 1 of the trials.
In 1000000 total trials of 1000 throws each, Bob won (1 chances in 1000 per throw) as follows:
Bob won 0 times in 368609 of the trials.
Bob won 1 times in 368350 of the trials.
Bob won 2 times in 183326 of the trials.
Bob won 3 times in 61018 of the trials.
Bob won 4 times in 15096 of the trials.
Bob won 5 times in 3052 of the trials.
Bob won 6 times in 467 of the trials.
Bob won 7 times in 71 of the trials.
Bob won 8 times in 11 of the trials.
In 1000000 total trials of 1000 throws each, They both won (2 chances in 1000000 per throw) as follows:
Both won 0 times in 998103 of the trials.
Both won 1 times in 1892 of the trials.
Both won 2 times in 5 of the trials.
Number of random numbers drawn = 0x007735962c
              estimated period = 0x07fffffff0
Both win when Bob rolls 1 and Alice rolls 1 or 2, which is twice in the 1000000 possible rolls of two 1000 face dice.
Throwing 2 dice 1000 times each (1 trial), we should never see both win.
Throwing 2 dice 1000 x 1000000 times (1000000 trials), we should see both win about 2000 times, which we do.
legendary
Activity: 2142
Merit: 1009
Newbie
Not THAT bad, but still!

Still far from the reality.
member
Activity: 80
Merit: 10
I don't blame u, coz there is no a good explanation how forging works, but I'm quite tired to explain why people r wrong with their models. In ur case u r wrong coz u analyze an impossible situation when there r only 2 forging accounts in the system. Models doesn't work in extremum conditions.

At leeeast a sensible argument!

Let's see!

Code:
from random import random
from operator import itemgetter

NBLOCKS = 100000
N = 100
W = [100000] + [1000] * N
z = [0.] * len(W)
wins = [0] * len(W)

for x in xrange(NBLOCKS):
for i in xrange(len(W)):
z[i] = random()/W[i]

[position, value] = min(enumerate(z), key=itemgetter(1))
wins[position] += 1

print float(wins[0])/sum(wins[1:]), float(wins[0])/(sum(wins[1:])/N)

1.72101439417 172.340599455

(instead of 1 and 100)

Not THAT bad, but still!
legendary
Activity: 2142
Merit: 1009
Newbie
Your premise means that if Alice gets 1 and Bob gets 1, both win. Is that really what you want it to be?

Yes, if both get 1 then both win but one of the blocks will be orphaned.

Which one and why?

Depends on network topology. Blockchain can't have more than 1 block at a particular height.
legendary
Activity: 1162
Merit: 1005
Your premise means that if Alice gets 1 and Bob gets 1, both win. Is that really what you want it to be?

Yes, if both get 1 then both win but one of the blocks will be orphaned.

Which one and why?
legendary
Activity: 2142
Merit: 1009
Newbie
Your premise means that if Alice gets 1 and Bob gets 1, both win. Is that really what you want it to be?

Yes, if both get 1 then both win but one of the blocks will be orphaned.
legendary
Activity: 2142
Merit: 1009
Newbie
So you agree that in the case of only 2 forgers, their analysis is ok?

No.
hero member
Activity: 687
Merit: 500
Quote
We'll come to it step by step. The 1st step requires u to answer the questions.

btw, this is childish. I'm ready to answer any of your questions related to my original post. This question is not until you explain how.

I don't blame u, coz there is no a good explanation how forging works, but I'm quite tired to explain why people r wrong with their models. In ur case u r wrong coz u analyze an impossible situation when there r only 2 forging accounts in the system. Models doesn't work in extremum conditions.

So you agree that in the case of only 2 forgers, their analysis is ok?
hero member
Activity: 687
Merit: 500
Alice rolls 1000-face die. Bob rolls 1000-face die.
Alice wins if she gets 1 or 2 (her balance is 100k), Bob wins if he gets 1 (his balance is 50k).

How many times Alice will win if she rolls the die 1000 times?
How many times Bob will win if he rolls the die 1000 times?

Could anyone answer the questions above?

Your premise means that if Alice gets 1 and Bob gets 1, both win. Is that really what you want it to be?
legendary
Activity: 2142
Merit: 1009
Newbie
Quote
We'll come to it step by step. The 1st step requires u to answer the questions.

btw, this is childish. I'm ready to answer any of your questions related to my original post. This question is not until you explain how.

I don't blame u, coz there is no a good explanation how forging works, but I'm quite tired to explain why people r wrong with their models. In ur case u r wrong coz u analyze an impossible situation when there r only 2 forging accounts in the system. Models doesn't work in extremum conditions.
legendary
Activity: 1367
Merit: 1000
Jettico, you are wrong.  Tongue
member
Activity: 80
Merit: 10
Quote
We'll come to it step by step. The 1st step requires u to answer the questions.

btw, this is childish. I'm ready to answer any of your questions related to my original post. This question is not until you explain how.
legendary
Activity: 2142
Merit: 1009
Newbie
No, I'm ignoring your attempt to substitute notions (we both remember that you've done it before).

Start a new thread and I shall answer it there.

Ok. Keep ignoring. Discussion is over, we'll continue it after I get the answers.
Pages:
Jump to: