Ideas for Testing Randomized Algorithms
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
This post walks through testing a small randomized algorithm, AWRS (a rejection-sampling method for properly weighted conditional samples from Lipkin et al., 2025), using four Python variants that differ by a line or two, only some of which are correct.