L = {ww^rx | w,x在哪里属于{a,b}^*}是一种常规语言?
我已经知道l = {wxw^r | w,x属于{a,b}^*}是常规的,因为事实证明它是以相同的符号开始和结束的模式如何说l = {ww^rx | w,x属于{a,b}*}是使用DFA设计的常规语言。 请帮助我理解这一点!
I have understood that L={wxw^r|w,x belongs to {a,b}^* } is regular because it turns out to be the pattern of starting and ending with same symbol but I am not getting the proper explanation that how to say L={ww^rx|w,x belongs to {a,b}*} is regular language using DFA design.
Please help me in understanding this!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个诀窍。您指定的语言l是正则表达式
(a + b)*
的语言,即A和B的任何字符串。诀窍是对于任何字符串y = s1.s2.s3 ... sk
其中si in {a,b}
,我们可以写y = wxw ^r
其中w
是空字符串,x = y
。基本上,诀窍是我们可以始终选择w
作为空字符串,在这种情况下,我们将留下l = {x | x in {a,b}^*}
,显然是常规的。另一种思考的方式是:您能找到不在L中的A和B的字符串吗?即使您将W是空字符串,它也不在L中吗?This is a trick question. The language L as you have specified is the language of the regular expression
(a + b)*
, that is, any string of a's and b's. The trick is that for any stringy = s1.s2.s3...sk
wheresi in {a, b}
, we can writey = wxw^R
wherew
is the empty string andx = y
. Basically, the trick is that we can always choosew
to be the empty string, and in that case we are left withL = {x | x in {a, b}^*}
, clearly regular. Another way of thinking about it is this: can you find any string of a's and b's that is not in L? Is it not in L even if you take w to be the empty string?