दो शब्दों को देखते हुए डब्ल्यू 1 , डब्ल्यू 2 , यदि भाषा डिसाइडेबल है एल के बराबर संख्या वाले शब्दों के w 1 और डब्ल्यू 2 नियमित है?w1w2Lw1w2
पहले कुछ परिभाषाएँ:
उन्हें अधिक संक्षिप्त बनाया जा सकता है, और यदि प्रमाणों में उनका उपयोग किया जाना है, तो सूचनाओं में सुधार किया जा सकता है। यह केवल एक पहला मसौदा है।
डब्ल्यू 1 और डब्ल्यू 2 शब्दों को देखते हुए , हम कहते हैं कि: w1w2
डब्ल्यू 1 हमेशा होता हैके साथ डब्ल्यू 2 , विख्यात डब्ल्यू 1 ◃ डब्ल्यू 2 , iff w1 w2w1◃w2
- किसी भी स्ट्रिंग के लिए रों ऐसी है कि
रों = एक्स डब्ल्यू 2 y के साथ | x | ,ss=xw2y| Y | ≥ | डब्ल्यू 1 | + | डब्ल्यू 2 | और | x | 0 , | x | 1 | , | y | 0 , | y | 1 | ≥ 1 है एक और अपघटन रों = एक्स ' डब्ल्यू 1 y ' । नोट: वह स्थिति जो x और y है∣x∣,∣y∣ ≥∣w1∣+∣w2∣|x|0,|x|1|,|y|0,|y|1|≥1s=x′w1y′
xyप्रत्येक में कम से कम एक 0 होते हैं और एक 1 एक रोग मामले (@sdcvvc से पाया जाता है) के लिए आवश्यक है: डब्ल्यू 1 = 1 मैं 0 , डब्ल्यू 2 = v 1 मैं + j और y ∈ 1 * , और उसके सममित वेरिएंट।w1=1i0w2=v1i+jy∈1∗
- वहाँ एक स्ट्रिंग है रों = एक्स डब्ल्यू 2 y के साथ | x | ,s=xw2y∣y∣ ≥∣w1∣+∣w2∣∣x∣,∣y∣ ≥∣w1∣+∣w2∣ such that there is at most one decomposition s=x′w1y′s=x′w1y′
w1w1 always cooccurs with w2w2, noted w1◃▹w2w1◃▹w2, iff each always occur with the other,
w1w1 and w2w2 occur independently, noted w1▹◃w2w1▹◃w2, iff neither one always occur with
the other,
w1w1 always occurs mm times or more than w2w2, noted w1◃mw2w1◃mw2, iff for any string ss such that
s=xw2ys=xw2y with ∣x∣, ∣y∣| ≥∣w1∣+∣w2∣∣x∣, ∣y∣| ≥∣w1∣+∣w2∣ there are mm other decompositions s=xiw1yis=xiw1yi for
i∈[1,m]i∈[1,m] such that i≠ji≠j implies xi≠xjxi≠xj.
These definitions are constructed so that we can ignore what happens at
the ends of the string where w1w1 and w2w2 are supposed to occur.
Boundary effects at the end of the string have to be analyzed
separately, but they represent a finite number of cases (actually I think I forgot one or two such boundary sub-cases in my first analysis below, but it does not really matter).
The definitions are compatible with overlap of occurrences.
There are 4 main cases to consider (ignoring the symetry between w1w1 and w2w2):
w1◃▹w2w1◃▹w2
Both words come necessarily together, except possibly at the ends of the string. This concerns only pairs of the form 1i01i0 and 01i01i, or 0i10i1 and 10i10i. This is easily recognized by a finite automaton that only checks for lone occurences at both ends of the string to be recognized, to make sure there is a lone occurrence at both ends or at neither end. There is also the degenerate case when w1=w2w1=w2: then the language L is obviously regular.
w1◃w2w1◃w2, but not w2◃w1w2◃w1
One of the 2 words cannot occur without the other, but the converse is not true (except possibly at the ends of the string). This happens when:
w1w1 is a substring of w2w2:then a finite automaton can just check that w1w1 does not occur outside an instance of w2w2.
w1=1i0w1=1i0 and w2=v1jw2=v1j for some word v∈{0,1}∗v∈{0,1}∗, v≠01iv≠01i: then a finite automaton check as in the previous case that w1w1 does not occur separated from w2w2. However, the automaton allows counting one extra instance of w1w1 that will allow acceptance if w2w2 is a suffix of the string. There are three other symetrical cases (1-0 symmetry and left-right symetry).
w1◃2w2w1◃2w2
One of the 2 words occurs twice in the other. That can be recognized by an a finite automation that checks that the smaller word never occurs in the string. The is also a slightly more complex variant that combines the two variations of case 2. In this case the automaton checks that the smaller string 1i01i0 never occurs, except possibly as part of vv in the larger one v1jv1j coming as a suffix of the string (and 3 other cases by symetry).
w1▹◃w2w1▹◃w2
The 2 words can occur independently of each other. We build
a generalized-sequential-machine (gsm) GG that output aa when it recognizes an occurrence of w1w1 and
bb when recognizing an occurrence of w2w2, and forgets everything
else. The language LL is regular only if the language G(L)G(L) is
regular. But G(L)={w∈{a,b}∗∣ ∣w∣a=∣w∣b}G(L)={w∈{a,b}∗∣ ∣w∣a=∣w∣b} which is clearly context-free and not regular. Hence LL is not regular.
Actually we have L=G−1(G(L))L=G−1(G(L)). Since regular languages and context-free languages are closed under gsm mapping and inverse gsm mapping, we know also that LL is context free.
One way to organize a formal proof could be the following. First build
a PDA that recognizes the language. Actually it can be done with a
1-counter machine, but it is easier to have two stack symbols to avoid duplicating the finite control. Then, for the cases where it should be a FA, show
that the counter can be bounded by a constant that depends only on the
two words. For the other cases show that the counter can reach any
arbitrary value. Of course, the PDA should be organized so that the
proofs are easy enough to carry.
Representing the FA as a 2-stack-symbols PDA is probably the simplest representation for it. In the non-regular case, the finite control part of the PDA is the same as that of the GSM in the proof sketch above. Instead of outputting aa's and bb's like the GSM, the PDA counts the difference in number with the stack.