What is non-determinism?

A non-deterministic machine is like a toy that can choose what to do next without being told, it just picks something fun.

Imagine you have a special kind of vending machine: when you press a button, instead of giving you one candy, it gives you any candy it wants. You don’t know which one you’ll get, but you’re always happy because there’s always something tasty inside. That’s like non-determinism, the machine doesn’t follow just one path; it can go any way it likes.

How It's Like a Playground

Think of a playground with two slides: one red and one blue. A deterministic kid always picks the red slide. But a non-deterministic kid might pick either one, they don’t decide ahead of time which slide to take. The choice is made when they get to the top, not before.

So, in simple terms:

  • A deterministic machine does exactly what it's told.
  • A non-deterministic machine can do any of several things, and that makes solving problems faster and more fun!

Take the quiz →

Examples

  1. A dice roll, you don’t know what number will come up, but it’s one of the six possible results.
  2. A traffic light changing randomly, sometimes it turns green, other times red, without a pattern.
  3. Choosing between two flavors of ice cream when you’re unsure which one you want.

Ask a question

See also

Discussion

Recent activity