简体   繁体   English

为什么{a ^ nb ^ n | n> = 1}是不是普通语言?

[英]Why {a^nb^n | n>=1} is not a regular language?

I was following this video, and wonder why {a n b n | 我正在观看视频,想知道为什么{a n b n | n≥1} is not a regular language? n≥1}不是普通语言吗?

在此处输入图片说明

Regular language must be recognized by finite automaton. 常规语言必须由有限自动机识别。 As n is not bounded by any constant the automaton cannot be finite. 由于n不受任何常数限制,因此自动机不能是有限的。

If you take the definition of “regular language” as “recognized by a finite automaton”, let m be the number of states of such an automaton. 如果将“常规语言”的定义定义为“由有限自动机识别”,则m为该自动机的状态数。 If the automaton is to recognize a 1 b 1 , a 2 b 2 , …, a m+1 b m+1 , the states of the automaton cannot be the same after it has read a 1 , a 2 , …, a m+1 , leading to a contradiction. 如果自动机要识别a 1 b 1 ,a 2 b 2 ,..., m + 1 b m + 1 ,则自动机的状态在读取a 1 ,a 2 ,…,a m后不能相同+1 ,导致矛盾。

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

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