Talk:Percolation/Bond percolation: Difference between revisions

 
(5 intermediate revisions by 3 users not shown)
Line 14:
The D entry is annotated with "It does not accomplish the given task." Could someone (like Paddy) explain better what's wrong in it? Is it perhaps because the probability goes in the other way (from 1 to 0)? If this is the problem then it's easy to change, but I thin it doesn't change the meaning of the task at all. -[[User:Bearophile|bearophile]] ([[User talk:Bearophile|talk]]) 21:07, 5 March 2014 (UTC)
: I added the error note, but somehow the reason part of the template doesn't show. It's this: at p=.5, the result should be somewhere around .5 too, but the D code gives 0.14. Given that it's the average of 10000 runs, it's impossible that that was a random fluctuation, so there's got be a bug in the code. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 03:39, 6 March 2014 (UTC)
:: Thank you Ledrug, I'll try to fix that. -[[User:Bearophile|bearophile]] ([[User talk:Bearophile|talk]])
:: The D entry is a translation of the Python entry, with some refinements. It seems the Python entry gives the same wrong results: http://ideone.com/ik57yE And is the C entry having the same problems?
::: You lost me. All entries other than D gives about 0.5 at p = 0.5, including the ideone output. Given 1000 tries, that's about 500 successes on average, so random fluctuation sigma is sqrt(500) ~ 23. At 3 sigma, i.e. 99.7% confidence, a correct solution should show between roughly 430 to 570 pass rate. D shows 142 out of 1000, that's 15 sigmas away, which you need lottery-winning kind of luck to get.
::: It doesn't matter how the D code comes about; it shows result different from everyone else's and which is extremely statistically implausible, so the natural conclusion, at near 100% confidence even, is there's a bug. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 22:33, 9 March 2014 (UTC)
 
:::Hi Bearophile, you do state in the D entry that you make performance optimisations over the Python. Maybe the problem is there? --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 23:09, 9 March 2014 (UTC)
:::: Rewritten D entry.-[[User:Bearophile|bearophile]] ([[User talk:Bearophile|talk]])