L = {ww^rx | w,x在哪里属于{a,b}^*}是一种常规语言?

发布于 2025-01-24 11:54:12 字数 118 浏览 3 评论 0原文

我已经知道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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一个人练习一个人 2025-01-31 11:54:12

这是一个诀窍。您指定的语言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 string y = s1.s2.s3...sk where si in {a, b}, we can write y = wxw^R where w is the empty string and x = y. Basically, the trick is that we can always choose w to be the empty string, and in that case we are left with L = {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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文