4

Let $L \subset \{0, 1\}^∗$ be regular language. $$L_e = \{ w | w = uxv, x \in \{0, 1\}, u\overline{x}v \in L\}$$, where $\overline{x} = 1 − x$ Prove $L_e$ is regular language. For example: If $10 \in L$, then $11, 00 \in L_e$ $.

I am thinking about it many hours but nothing works. I try use Nyhill-Nerode's theorem but it doesn't help. Please hint me.

user180834
  • 1,453

2 Answers2

6

HINT: Let $M$ be a DFA that recognizes $L$. Make two copies of $M$, say $M_1$ and $M_2$; we’ll modify them to make an NFA $N$ that recognizes $L_e$. $N$ starts in the initial state of $M_1$. Each state of $M_1$ has all of the transitions of $M$, and each also has two extra transitions, one for $0$ and one for $1$, that go into $M_2$. There are no transitions from $M_2$ back to $M_1$.

The idea is that in order to be accepted, a word must drive $N$ into $M_2$, and it can do this only by pretending – just once! – that an input of $i$ is actually $1-i$. I’ve left more of the details in the spoiler-protected block below, but see if you can come up with $N$ on your own first.

Specifically, if $q\overset{i}\longrightarrow q'$ in $M$, then $N$ has an $i$ transitions from the copy of $q$ in $M_1$ to the copy of $q'$ $M_1$ and a $1-i$ transition from the copy of $q$ in $M_1$ to the copy of $q'$ in $M_2$. $M_2$ just has the transitions of $M$. Finally, the acceptor states of $N$ are those of $M_2$, which are the same as in $M$; $M_1$ has no acceptor states.

Brian M. Scott
  • 616,228
1

Assume the existence of an automaton $M=(\Sigma^*,Q,q_0,'.',\{q_f\})$ recognizing $L$, the very important observation here is :$w$ is an element of $L_e$ if there exists some words $u$ $v$ $x=0,1$ such that $u(1-x)v$ is accepted by $M_e$, the idea is to memorize the state of all words of this form,consider the following automaton $M'=(\Sigma^*,Q',q_0',T,Q_f)$ defined by:

  • $Q'=Q\times2^Q$
  • $Q_f=\{(q,S)\in Q'\big/ q_f\in S\}$
  • $q'_0=\emptyset $

and the transition function is defined by: $T((q,S),x)=\left(q.x,\left(S.x\cup \{q.(1-x)\}\right)\right)$

If $M'(w)=(q,S)$ this means that $M(w)=q$ and the set $S$ contains the set of all final states of all words of the form $u(1-x)v$ when $uxv=w$, so if $S$ contains the final state $q_f$ then $w$ is accepted by $M'$ and this is exactly what means $w\in L_e$

Elaqqad
  • 13,725