Dice with Infinity Sides

Back to General discussions forum

gardengnome     2023-10-09 20:27:52
User avatar

In the first example 3.03 2778 5570.06 5627.46, the expected answer is 0.652.

I've simulated this 10 million times and get 0.647 (this doesn't give anything away as larger examples cannot be simulated this way in any meaningful time). I also get 0.647 via a completly different method.

Can I please check that 0.652 is indeed the correct answer?

Rodion (admin)     2023-10-09 20:30:48
User avatar

Thanks for raising the question! Asked the same from Artyom, as my simulation results are more consistent with yours :) Probably we'll figure out if there is some discrepancy (it seems to be more with lesser N - i.e. checker supposedly uses assymptotic formula) and if necessary will make appropriate corrections I think. Sorry for inconvenience, but hopefully we'll be able to improve it together!

CSFPython     2023-10-09 21:27:32

I've calculated the three values for the example. I get 0.646915973241, 0.122064092167 and 0.757535551769. My first answer seems remarkably close to the simulation so I suspect that there is something wrong with the example. The method I used to solve the problem requires degree level statistics. If this is the only way to solve the problem it does seem a little out of place in Code Abbey.

gardengnome     2023-10-09 21:46:45
User avatar

I get very similar 0.646916 0.122064 0.757535 for the examples. Personally I think the problem is fine and interesting - researching topics is often part of the challenge, and many programming puzzles, including here on CodeAbbey, require advanced math in some way.

Also, the more diversiy in contributors and contributions the better - welcome and thank you ecolog_veteran.

CSFPython     2023-10-09 22:13:28

I don't have an issue with the problem. I just wonder how many people who use the site will have any idea of how to approach it. In all the problems on the site I think that there is only one where I needed to use some significant mathematics. That was Easter Eggs Advanced. If problems requiring advanced maths are to become more common then it might be an idea to give some indication of this in the problem description. I have assumed that the mathematics tag for a problem meant senior school level mathematics (at best) rather than anything beyond that.

Rodion (admin)     2023-10-10 04:05:32
User avatar

Hi Clive and thanks for the insight!

On ideas to approach the problem, I felt, when adding it, there are at least two - either one knows whimsical stats calculations or, thanks to 3-digits precision expected, it is an opportunity to carefully create simulation experiment.

My main fault probably is that I haven't tested either way beforehand! Sorry for that!

It looks already 3 persons knows "how to approach" the first way (there were failed submissions by JesseDai), so probably it may enjoy some audience even here. We remember here are easier problems requiring using/knowing some formula (e.g. even "Bicycle Race", "Triangle Area" and somewhat unexpectedly "Star Medals" and even "Josephus") and I never knew whether problems of such kind are good for programming-related collection. So perhaps let this one also exist, but I'll try not abuse the topic of "degree" problems in future according to your hint :)

Meanwhile, let's do this - I'll share the formulas suggested by Artyom to you and Mathias by email, so it is easier to discuss suitable amendments.

gardengnome     2023-10-10 05:29:44
User avatar

Reply in your inbox.

Rodion (admin)     2023-10-10 05:53:06
User avatar

Danke!

Mathias suggested there is a small typo in sigma calculation and I just have updated checker according to suggestion.

In few more minutes I'll retry matching results with simulation and if all ok, will also update the example in the problem statement.

UPD: Just got email from Artyom, he also approves and thanks for this fix!

CSFPython     2023-10-13 10:42:22

Artyom,

There are now 5 solutions to your problem. I was clearly mistaken to think that an advanced maths problem would not appeal to users of this site. In any case, I echo Mathias' thoughts. It is very encouraging to see new people providing problems for the site. Thank you for your contribution.

ecolog_veteran     2023-10-13 15:31:57
User avatar

I am glad to hear these warming words! Hopefully, it was interesting to solve this task :)

Please login and solve 5 problems to be able to post at forum