我已经看到wxw ^ r是常规的,如本文所述 Why L={wxw^R| w, x belongs to {a,b}^+ } is a regular language
如果我在这里应用相同的逻辑,除了最后两个之外,w会吃掉所有东西 符号可以是0或1
ex: W = 101
x=1010
w^r=101
then string is 1010101101
now x will be 10101011
so we can construct a regular expression (0+1)*(0+1)(0+1)
so it should be regular
is my explanation correct or the language will not be regular because where
我看到写的问题是语言不规则而没有 解释
答案 0 :(得分:0)
Consider this one {W X W^r | W,X belongs to (0,1)^+}
Then suppose W= 101
W^r = 101
X=11
then the String will be 101 11 101
W X W^r
then if x consumes all other than last and first character then string will
look like this 1 011110 1
W X W^r
then also the String follows the pattern W X W^r note that .
But in your example X W W^r
假设x = 11 w = 101 w ^ r = 101
then the string will be 11 101 101
X W W^r
if now X consume all the character Except last two chars then the string will look like this
111011 0 1
X W W^r
note that W & W^r aren't same or in some cases they may be same but
according to language X W W^r last two symbols or last two strings of equal
length should be reversal but they aren't so the language is not regular.......
Pardon me for my bad representation because m new to this site....