简体   繁体   English

寻找常规语言的补充

[英]Finding a complement of a regular language

Could you help me please to find a complement of a language, which ends with abab - (a|b)*abab (over an alphabet {a,b}) 您能帮我找一种以abab - (a|b)*abab (over an alphabet {a,b})结尾的语言的补语abab - (a|b)*abab (over an alphabet {a,b})

I guess, the complement must contain all string, that don't end with abab. 我猜想,补语必须包含所有不以abab结尾的字符串。 One can try to do it with Rij-Algorithm after building a DFA for complement of (a|b)*abab , but pleaseee, help me to understand how it works without Automaton and Rij (because that Automaton has 5 states). 建立(a|b)*abab的DFA的DFA之后,可以尝试使用Rij-Algorithm进行此操作,但是,请帮助我了解在没有Automaton和Rij的情况下它是如何工作的(因为Automaton具有5个州)。

Ok, the words are not allowed to end with abab . 好的,这些单词不允许以abab结尾。 There are 2 4 ways for four letters of a 's and b 's at the end. 最后有2个4种方式将ab的四个字母。 Okay, abab must be erased so there are 15 combinations. 好的,必须擦除abab因此有15种组合。 Does it mean, that the complement-language is (a|b)* .(union of all those combinations of a 's and b 's without abab )? 这是否意味着,该补的语言是(a|b)* (所有这些组合的工会a的和b的无abab )? But does (a|b) still stay the same at the beginning? 但是(a|b)在开始时是否仍然保持不变?

Help me please to understand this. 请帮助我理解这一点。

Maybe I quiet don't understand you, but isn't it much simplier. 也许我很安静,不了解你,但不是很简单。 I'e (a|b)*(a|bb|aab|bbab) or event (a|b)*(a|(b|(a|bb)a)b) ? 我是(a|b)*(a|bb|aab|bbab)还是事件(a|b)*(a|(b|(a|bb)a)b)

PS Don't forget that there is words shorter than abab and all of them should be included too. PS:别忘了有短于abab单词,所有单词也应包括在内。 Ie (a|b){0,3} (where {0,3} denotes amount of repeats [0; 3]) (a|b){0,3} (其中{0,3}表示重复次数[0; 3])

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

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