ELI5: Explain Like I'm 5

Randomized algorithms as zero-sum games

Okay kiddo, have you ever played a game where you win by making the other person lose? That's called a zero-sum game. Now imagine we have a computer program that wants to win this game, but we don't know what the other person will do. So we decide to play random moves - sometimes we do one thing, sometimes we do another thing - and hope we win more often than we lose.

Now let's say we play this game a lot of times, and we keep track of which moves we did and what the other person did, and we use all this information to make our next move. We're trying to come up with a strategy that will help us win as often as possible, no matter what the other person does. This is called a randomized algorithm.

Randomized algorithms are often used in computer science to solve problems we don't know how to solve efficiently. By playing this game and keeping track of our moves and the other person's moves, we can guess what the best move is and keep improving our strategy.

So in summary, randomized algorithms are like playing a game where we don't know what the other person will do, so we make random moves and keep track of everything to come up with the best strategy. It's like a big game of rock-paper-scissors where we're always trying to outsmart the other person.