World's most popular travel blog for travel bloggers.

[Solved]: Is $L_{half} = \{w : \text{for some } z \in L, x \in \Sigma^*, z = wx \wedge |w| = |x| \} $ regular?

, , No Comments
Problem Detail: 

Suppose we have some regular language $L$, then can we say that $$L_{half} = \{w : \text{for some } z \in L, x \in \Sigma^*, z = wx \wedge |w| = |x| \} $$ is also regular?

I have a 'feeling' that it is, but I can't sketch a proof for it.

Asked By : Subhayan

Answered By : Shaull

Yes, the language is regular: Consider a DFA A such that $L(A)=L$ Now, assume that you know, somehow, that when given a word $w$, the run of $A$ will end up in state $q$.

All you need to check now is that there is a run of $A$ on some word of length $|w|$ that gets from $q$ to an accepting state. This can be done by using the product automaton $A\times A$, where the first component acts exactly like $A$, and the second acts like $A$, but starts from state $q$ and ignores the input - that is, for each letter it nondeterministically goes anywhere that $A$ can go. Then, a run is accepting if the first component ends up in $q$, and the second component ends in an accepting state.

Finally, you can drop the assumption by taking $|Q|$ copies of this construction, where each copy "guesses" in which state $A$ will end up in. You end up with a nondeterministic construction of size $|Q|^3$

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/14192

0 comments:

Post a Comment

Let us know your responses and feedback