HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Determine if this language is regular

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
thisregulardeterminelanguage

Problem

Let $L = \{xyx \mid \text{ for some }x,y \in \{0,1\}^+\}$. Is this language regular?

So I was trying to construct a DFA, but I don't how to do this with this language.

Solution

Recall that the Myhill-Nerode indistinguishability relation $\sim_L$ is defined on the set $\{0,1\}^{*}$ of all inputs as $u \sim_L v$ iff for all $w$, $uw \in L \Leftrightarrow vw \in L$. The Myhill-Nerode Theorem states that $\sim_L$ has finitely many blocks iff $L$ is regular.

Let $\alpha_i = 1^i0^i1$ for each $i\ge 1$. I claim that $[\alpha_i]_{\sim_L} = [\alpha_j]_{\sim_L} \Rightarrow i = j$. Hence $\{[\alpha_i] \mid i=1,2,\dots\}$ forms an infinite subset of the blocks of $\sim_L$. Therefore $\sim_L$ must have infinitely many distinct blocks, so $L$ cannot be regular.

To prove the claim, suppose that $[\alpha_i]_{\sim_L} = [\alpha_j]_{\sim_L}$ for some $i,j \ge 1$. Then $\alpha_i \sim_L \alpha_j$, so for any suffix $w$, $1^i0^i1w \in L \Leftrightarrow 1^j0^j1w \in L$. In particular this must hold for $w=1^j0^j$, and since $1^j0^j11^j0^j \in L$, it must hold that $1^i0^i11^j0^j \in L$. Hence $i=j$.

(Finding an infinite subset that worked required an odd number of cups of tea. But using Myhill-Nerode means not having to remember the various pumping lemmas.)

Edit 2015-10-28: was answering the question about $\{xyx\mid x\in\{0,1\}^{+},y\in\{0,1\}^{*}\}$, now fixed.

Context

StackExchange Computer Science Q#14159, answer score: 5

Revisions (0)

No revisions yet.