[英]How can one define a language which does not fit in the Chomsky Hierarchy?
I'm asking this question because I've stumbled across the accepted answer of Chomsky Language Types我问这个问题是因为我偶然发现了乔姆斯基语言类型的公认答案
This quote is referring to Type-0 Grammars:这句话指的是 Type-0 语法:
This means that if you have a language that is more expressive than this type (eg English) , you cannot write an algorithm that can list each an every (and only these) words of the language
这意味着如果你有一种比这种类型更具表现力的语言(例如英语) ,你就不能编写一个算法来列出该语言的每一个(并且只有这些)单词
As far as I know:我所知道的:
Hence:因此:
Therefore my problem:因此我的问题:
A language is a possibly-infinite set of finite words written with some finite alphabet.语言是用一些有限的字母表写成的一组可能无限的有限词。 Since the alphabet is finite and the length of each word is finite, the words of any language are enumerable, in the sense that there exists an enumeration.
由于字母表是有限的,每个单词的长度也是有限的,因此任何语言的单词都是可枚举的,从存在枚举的意义上说。 In other words, the size of any language is at most countably infinite.
换句话说,任何语言的大小至多是可数无限的。
However, since any subset of the Kleene closure of the alphabet is a language, the number of languages is not countably infinite.但是,由于字母表的 Kleene 闭包的任何子集都是一种语言,因此语言的数量不是无限的。 Hence, there is no enumeration of languages.
因此,没有语言的枚举。
The Chomsky hierarchy is based on a formalism which can be expressed as a finite sentence with a finite alphabet (the same alphabet as the language being described, plus a couple of extra symbols).乔姆斯基层次结构基于一种形式,可以表示为具有有限字母的有限句子(与所描述的语言相同的字母,加上几个额外的符号)。 [Note 1] So the number of possible Type 0 grammars is countably infinite, and there cannot be a correspondence between the set of grammars and the set of languages.
[注 1] 所以可能的 Type 0 文法的数量是可数无限的,文法集和语言集之间不存在对应关系。
However.然而。 The existence of languages (ie sets) for which no generative grammar exists does not necessarily mean that there is some other way of describing these languages which is "more expressive" than generative grammars.
不存在生成语法的语言(即集合)的存在并不一定意味着存在比生成语法“更具表现力”的其他方式来描述这些语言。 Any description which can be written as a finite string using a finite alphabet can only describe a countable infinity of sets.
任何可以使用有限字母表写成有限字符串的描述只能描述可数的无穷集合。 Whether or not it is the same countable infinity will depend on the formalisms, and in general there will be no algorithm which can demonstrate homomorphism.
是否相同的可数无穷大取决于形式,并且通常不会有可以证明同态的算法。 But some equivalences are known (such as the equivalence with Turing machines, which is a particularly interesting equivalence).
但是一些等价是已知的(例如与图灵机的等价,这是一个特别有趣的等价)。
So, we have an interesting little conundrum, which is (of course) related to Gödel's Incompleteness Theorems.所以,我们有一个有趣的小难题,它(当然)与哥德尔的不完备性定理有关。 That is, there are more languages than ways of describing a language, no matter what system we use to describe a language.
也就是说,无论我们使用什么系统来描述一种语言,语言都比描述语言的方式多。 So the question "How do we describe a language for which no description is available?"
所以问题是“我们如何描述一种没有可用描述的语言?” does not have a good answer (and if we answer it, by calling some set "Sue", then there will still be an uncountable infinitude of possible sets for which no name exists).
没有一个好的答案(如果我们通过调用某个集合“Sue”来回答它,那么仍然会有无数个不存在名称的可能集合)。
While all this foraging into infinitudes is interesting, it has a few issues:虽然所有这些无限的探索都很有趣,但它有一些问题:
It has very little (if anything) to do with programming, so it's questionable whether it's on topic for StackOverflow.它与编程几乎没有关系(如果有的话),因此它是否是 StackOverflow 的主题值得怀疑。
Kurt Gödel and Georg Cantor, the two mathematicians responsible for most of the concepts in this answer, both suffered from severe depression. Kurt Gödel 和 Georg Cantor 这两位数学家负责这个答案中的大部分概念,他们都患有严重的抑郁症。 Just saying.
只是说。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.