Secret Santa draw
Draw who gives a gift to whom, with rules to keep couples or housemates from drawing each other.
A clear answer. Here’s how.
Every person gives to exactly one other person and receives from exactly one, which is a derangement of the list. With no rules the tool shuffles the receivers and accepts a shuffle in which nobody draws themselves, so every valid draw is equally likely. Rules remove allowed pairs; if plain shuffles keep failing, a randomised bipartite matching finds a valid draw whenever one exists and says so when none does. Randomness comes from the browser’s cryptographic generator, and nothing is stored or sent. The result is displayed to everyone looking at the screen.