[英]Regex and grammar free context conversion
It's not a regular language.它不是一种常规语言。
Consider the subset of the language with exactly one b
.考虑恰好有一个
b
的语言子集。 (In other words, the intersection of the language with a*ba*
.) If the language were regular, that subset would also be regular, since it would be the intersection of two regular languages. (换句话说,语言与
a*ba*
的交集。)如果语言是正则的,则该子集也将是正则的,因为它将是两种常规语言的交集。
But it's not regular, since it consists of strings in which the number of a
s following the b
is at least as large as the number of a
s preceding the b
, and that is not a regular language ("regular languages can't count").但它不是规则的,因为它由字符串组成,其中
b
之后的a
s 的数量至少与b
之前的a
s 的数量一样大,并且这不是常规语言(“常规语言不能计数”)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.