查找不属于语言的字符串 [英] find string that do not belong to language
本文介绍了查找不属于语言的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
那是很快的问题。我只是想确定我对问题的答案是否正确。问题是:
That's very quick question. I just want to be sure I am correct with the answer to the question. The question is:
查找不属于语言的字母{a,b}的字符串b *(a | ba)* b *
Find strings over the alphabet {a,b} that do not belong to the language b*(a|ba)*b*
我认为的字符串可能是:
The strings that I faund could be:
aaaaaabba
aaaaaabba
bbaaaaaababba
bbaaaaaababba
这是正确的吗?
推荐答案
我对你的措辞感到有些困惑。在我看来,你的表达式会匹配a或b的任意组合,因此在我看来,使用 [ab] * 会更容易阅读。
I'm a little confused by your wording. It looks to me like your expression would match any combination of a or b, so using [ab]* would be easier to read in my opinion.
这篇关于查找不属于语言的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文