-
4 Comments
Show
1 older comment
Matthew M.
on 28 Aug 2012
^Agreed.
Dyuman Joshi
on 10 Aug 2024
Making a sophisticated test suite for such case(s) seems to be an interesting challenge!
Christian Schröder
on 12 Aug 2024
@Dyuman Monte Carlo would probably work: call the function 1e4 times, check how often the two rolls are the same, and test whether the result is (statistically) significantly different from the expected value. Setting a very high significance level to avoid false positives would allow valid solutions to pass with a very high probability while catching ones such as this.
Suggested Problems
-
Calculate the Levenshtein distance between two strings
1453 Solvers
-
Remove element(s) from cell array
1746 Solvers
-
7331 Solvers
-
5255 Solvers
-
7502 Solvers
More from this Author56
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!