简体   繁体   English

语法与Epsilon或Lambda

[英]Grammar with Epsilon or Lambda

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 我唯一对这个语法感到困惑的是X的第二次制作

There is nothing there. 那里什么都没有。 Is that the equivalent of using Epsilon ε, or Lamda λ 这相当于使用Epsilonε或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 我假设它只是语法符号的一个区别,但我想确定,因为我正在尝试构建第一个和后续集

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 ⇒ . 无论如何写,它是空序列,应该被读作好像什么都没有,就像你的生产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. 如果你发现难以理解一个符号毫无意义的想法,那么你可能会喜欢阅读Charles Seife的零点:危险创意传记或者罗伯特卡普兰的无所不为 零自然史” ,两者都发表于象征性的一年2K,两者都探索了解无所谓概念的漫长而艰难的斗争。 ("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". 有人认为Λ/λ来自德语单词“leer”,意思是空的,而ε来自英语“空”。 There was a time when German was more common in academic discussion of mathematical logic, so the theory seems reasonable. 曾经有一段时间德语在数学逻辑的学术讨论中更为常见,因此理论似乎是合理的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM