]]>Regular language is closed under HALF. If A is a regular language, then HALF(A) = {x|xy in A and |x|=|y|}. The proof is like this: Given DFA D that recognizes A, you can guess that, given a string w in A, after running through the first half of w, you will end up in some state q in D. So you make another machine M with initial state q, and make every transition in A to be a transition with 0,1, assume alphabet {0,1}. M has the same set of accept states as A. Now you can run D and A in parallel, this can be done with subset construction. You accept x if running x on A ends up in state q, and running {0,1}* for |x| steps on M ends in an accept state. You repeat this for every state q of D and accept x if one of them both have D end up in state q and M start from q and end up in an accept state.

How can I prove the following language is regular?

Let $A$ be a regular language,

(1)\begin{align} L = \{ x| \text{$\exists y$: $|x| = |y|$ and $xy \in A$} \} \end{align}

Thanks.

]]>