「アンチパリンドローム」である言語の例を見つける


15

LET Σ={0,1}。言語LΣすべての文字列の場合は、「抗回文」性質を持っていると言われているwそれは、回文であるwL。また、すべての文字列のためuない回文のいずれかuLまたはReverse(u)L、両方ではない(!)(排他的論理和)。

anti-palindromeプロパティは理解していますが、このプロパティを持つ言語は見つかりませんでした。私は見つけることができる最も近いものがあるΣLが、それは排他的または一部を持っていません...であること、例えば、両方の0110であるL

誰かが私にこの特性を持つ言語の例を教えてもらえますか?おそらく、これが言語にどのような制限を課すのか見当がつかないため、単一の例よりもさらに多くの可能性があります。(それは非正規である必要がありますか?コンテキストフリー?またはさえありませんか?など)R


「このプロパティを持つ言語は見つかりませんでした。」-あなたはただそこにあると仮定して、プロパティを与えることで1を定義したいずれかの条件を満たしている言語。
ラファエル

7
私は同意しない、彼が定義したのは言語のクラスだった。それは言語の明確な定義を構成するものではありません。
シュリーシュ

回答:


12

1つの例はL={x  |  binary(x)<binary(xR),x[0,1]}

そしてさらに別の例L={x  |  binary(x)>binary(xR),x[0,1]}

つまり、場合、そのうちの1つだけを選択するルールを作成します。パリンドロームを拒否するようにルールを選択する必要があります(f x < f x R、パリンドロームの場合はf x = f x R)が必要です。また、アルファベットを変更することもできます。簡単な答えを得るためのバイナリアルファベット。xxRf(x)<f(xR)f(x)=f(xR)

上記の L L は規則的ではありません。そして、すべてのアンチパリンドローム言語は非正規であり、非RE言語と同じくらい悪いことがあります。決定できない言語の例: L = { x | その結果、 B 、I 、N 、RのY X < B I N RのY XはRであれば、両方の X及び X R停止または両方 X及び X R停止、そうでなければならLLL={x  |  binary(x)<binary(xR)xxR xxR 停止 }x}

Klaus Draeger explained in the comment below that anti-palindromic language given at the beginning of the answer is context-free: L={x0y1xR | x,y{0,1}}


I see, so it is true that every anti-palindrome language is non-regular. But can it be said that it must be in R? because even expanding this idea every order/function we will use can be computed with a TM in R..right?
Marik S.

@Marik There are well-defined but uncomputable functions. For example mapping from numbers representing M,w in Halting problem to [0,1].
Shreesh

Yes, but will such functions be able to define a total order on Σ?
Marik S.

1
Yes. For example L={x|xxR,binary(x)<binary(xR) if both x and xR or Halt, otherwise x or xR whichever is in Halt}. Halt is all (M,w)such that M halts on w.
Shreesh

1
And if you take diagonalization language then it becomes non-RE.
Shreesh

10

About generating a few examples:

Building on the answer of @shreesh, we can prove that every anti-palindrome language must be of the form

L={x | x<xR}()
for some strict total ordering <.

Indeed, given any anti-palindrome L, we can define an associated < as follows. We start by taking any enumeration x0,x1, of {0,1}, where each word occurs exactly once. Then, we alter the enumeration: for each pair of non-palindromes x,xR, we swap their position so to make the one that belongs to L to appear before the other. The new enumeration induces a total ordering < satisfying ().

That every L defined as () is non-palindrome is trivial, so () is a complete characterization of non-palindrome languages.

Addressing the original question, we now know that we can obtain several examples of anti-palindrome languages L by crafting orderings <. We also know that by doing that we are not restricting ourselves to a subclass of languages, losing generality.


About the question "can these languages be regular?":

To prove that any anti-palindrome L is non regular, assume by contradiction it is regular.

  1. Since regularity is preserved by reversal, LR is also regular.
  2. Since regularity is preserved by union, LLR, which is the set of all the non-palindromes, is also regular.
  3. Since regularity is preserved by complement, the set of all palindromes is regular.

From the last statement, we can derive a contradiction by pumping. (See e.g. here for a solution)


1
Or more simply, you can observe that in order for a DFA to accept the language of palindromes, it needs to consider the first half of the string while parsing the second half -- but a DFA has a finite number of states and cannot store an arbitrarily long string. It's the same reasoning that shows the language of balanced parentheses is non-regular (paren-depth can be arbitrarily large).
Kevin

I see, but if any L that has this property if from the form L={x|x<xR} does it indicate that every language is also Context Free? Or if not CFL, then must it be in R? since every order < can be calculated in R with a TM.
Marik S.

@MarikS. The grammar of rici below proves that L can be context-free. I'm pretty sure that some L is non-recursive, since there are uncountably many such languages -- in my proof above we can make countably infinite choices about which to put first between x and xR, and each combination gives a distinct L. So the cardinality of such languages is the same of {0,1}N, which is uncountable.
chi

9

For what it's worth, here is a simple context-free grammar for one anti-palindromic language:

S0S01S10X1XϵX0X1

(In fact, this is the anti-palindromic language proposed by @shreesh, using lexicographic comparison for the less-than operator.)


8
Which leads to an even more explicit description: L={x0y1xR | x,y{0,1}}.
Klaus Draeger
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.