The German Wikipedia claims that comes from "leer", which means "empty" in German. That seems plausible, as German used to be one of the major languages in mathematics.
Chomsky used as the empty string (or actually as the identity element for string concatenation) in his early papers. Some people in combinatorics still use
as the empty string, with the same justification.
The German Wikipedia claims that comes from "leer", which means "empty" in German. That seems plausible, as German used to be one of the major languages in mathematics.
Chomsky used as the empty string (or actually as the identity element for string concatenation) in his early papers. Some people in combinatorics still use
as the empty string, with the same justification.
Probably the notation originates from the "Finnish school".
My copy of 'Formal Languages' by Arto Salomaa (Academic Press, ACM monograph series, 1973) uses for the empty string.
And so does his 1969 book 'Theory of Automata' (Pergamon Press).
We move back. The classic 'Finite Automata and Their Decision Problems' by M.O. Rabin and D.Scott (April 1959) have the notation (capital) for "the empty tape with no symbols" (where a tape is a finite sequence of symbols).
One of the early people to write on finite automata was Trakhtenbrot and he used a symbol much like but typeset as
(as in his book with Barzdin, 1970, my russian is lousy but I recognize
).
Videos
I know it denotes a null string but I don’t fully understand what that means.
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 as 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$.
Let $M$ be a machine with any alphabet, one state, $q_0$, that is the initial state, and no transitions. If $q_0$ is not an acceptor state, $M$ accepts $\varnothing$, and if $q_0$ is an acceptor state, $M$ accepts $\Sigma^*$, where $\Sigma$ is the alphabet.
Now let $M$ have any alphabet and two states, the initial state $q_0$ and one other state $q_1$; $q_0$ is an acceptor state, and $q_1$ is not. The transitions are simple: in state $q_0$ every input sends $M$ to $q_1$, and in $q_1$ every input also sends $M$ to $q_1$. This $M$ accepts the empty word and nothing else.
The given grammar is: $$ S \to a \mid Ab \mid aBa \\ A \to b \mid \epsilon \\ B \to b \mid A $$
Now the algorithm for the removal of null productions is as follows:
We need to find all the nullable symbols from the grammar. A nullable symbol is one that generates the null string in one or more steps.
Since $A \rightarrow \epsilon$ so the symbol $A$ is nullable.
Due to $B\rightarrow A$ we shall have $B\Rightarrow ^* \epsilon$. So $B$ as well is nullable.
These are the only two nullable symbols in the grammar.
Remove all null productions in the grammar, and use substitution for the nullable symbols to incorporate the effect which could have been obtained due to their nullable nature as follows:
For each nullable symbol on the RHS of a production, rewrite the production, by once including it, and another time by not including it. Only with the exception that if due to this rewriting of rules, a null production is introduced, then just ignore that production.
So for the given grammar, we have:
For $S$ productions:
$S \to a \mid Ab \mid b \mid aBa\mid aa$
For the $A$ productions we have:
$A\to b$
For the $B$ productions we have:
$B\to b$
Since $A$ and $B$ are unit productions, they can be removed by substituting their RHS in the productions for $S$.
So the final grammar:
$S \to a \mid bb \mid b \mid aba\mid aa$
Your simplification is wrong. The language of the first grammar includes $b$, but the one of the second grammar does not.
If you replace the definition of $A$ in the productions of $B$ you obtain $B \to b \mid \epsilon$. Then if you replace $A$ and $B$ with their definition in $S$ you have.
$$ S \to a \mid bb \mid b \mid aba \mid aa $$