1

So I have a set of grammar

S -> X Y
X -> a X
X -> 
Y -> b
Z -> a Z
Z -> a

My only confusing with this grammar is that 2nd Production for X

There is nothing there. Is that the equivalent of using Epsilon ε, or Lamda λ

I am assuming it is merely a difference in notation for the grammars but wanted to be sure as I am trying to build the first and follow sets

billybob2
  • 681
  • 1
  • 8
  • 17

1 Answers1

4

Both ε and λ (and sometimes Λ) are used by different writers to represent the empty string. In modern writing, ε is much more common but you'll often find λ in older textbooks, and Λ in even older ones.

The point of using these symbols is to make the empty sequence visible. However it is written, it is the empty sequence and should be read as though it were nothing, as in your production X ⇒ .


If you find it difficult getting your head around the idea that a symbol means nothing, then you might enjoy reading Charles Seife's Zero: The Biography of a Dangerous Idea or Robert Kaplan's The Nothing that Is: A Natural History of Zero, both published in the emblematic year 2K and both of which explore the long and difficult struggle to understand the concept of nothing. ("No one goes out to buy zero fish" -- Alfred North Whitehead).


It has been suggested that Λ/λ comes from the German word "leer", meaning empty, while ε comes from English "empty". There was a time when German was more common in academic discussion of mathematical logic, so the theory seems reasonable.

rici
  • 234,347
  • 28
  • 237
  • 341