Problem 44288. Throwing Dice - Will You Be Eaten By The Dragon?
Solution Stats
Problem Comments
-
4 Comments
Hello, Erin. It's a really interesting problem. According to Solution 1539769, I think it would be worthwhile for you to include some (small) tolerances within the assert statements in your Test Suite, to allow for rounding due to computations in 'double precision'. —DIV
I agree with David.
The solution to this problem was stupidly easier than I first thought. Expected value of your own throws is all that really matters here.
The test suite has been updated with additional test cases and a check against a tolerance instead of using isequal()
Solution Comments
-
1 Comment
I used my brute-force solution (7421995) to generate enough data to deduce the pattern. Some day I might be able to derive the formula from scratch...
Problem Recent Solvers66
Suggested Problems
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
1255 Solvers
-
Back to basics 9 - Indexed References
427 Solvers
-
Find the largest value in the 3D matrix
1371 Solvers
-
421 Solvers
-
619 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!