We will play a game. There is a machine with buttons and a green lamp. Your job is to press the right sequence of buttons that make the green lamp light up.
For example, perhaps the machine has only one button, labeled a
. When you press it, the lamp lights up! Then you press the button again and the lamp turns off. Then you press a third time and the lamp turns on again. You find that pressing the button always turns the lamp on if it was off, and off if it was on. To light up the lamp and win the game all you need to do is press the button an odd number of times. We say that the machine accepts the language a(aa)*
, which is a regular expression that represents the set of all strings of a
s of odd length—all the possible winning sequences of button presses.
Now imagine an even simpler machine: the green lamp is already lit! And there is a sign over the button that says DON'T PRESS THE BUTTON. Indeed, if you do press the button the lamp goes off and no amount of pressing makes it turn on again. Don't you wish you had followed the sign's advice? This machine accepts only the string $\epsilon$, which is the string of zero button presses. The regular expression $\epsilon$ represents the set that contains this one string and nothing else.
Now imagine the simplest machine of all: the green lamp never lights up no matter what buttons you press. Here you can't win the game. The set of strings accepted by the machine is empty, which we write $\varnothing$.