0

Let $L = L((00 + 1)^∗)$ and $h : \{a, b\}^* \to \{0, 1\}^*$ be defined by $h(a) = 01$ and $h(b) = 10$. What is $h^{−1}(L)$?

In this context "$+$" means "$\cup$". So the language $L$ is all the words above $\Sigma = \{ 00,1 \}$. Right?

Now, I think I don't understand something fundamental here because take for example $w = 00001 \in L$. What is $h^{-1}(w)?$

J.-E. Pin
  • 40,163
Elimination
  • 3,150
  • 19
  • 42
  • 2
    As usual, $h^{-1}$ is defined only for sets, not for elements, for just the reason you said. $h^{-1}(S)$ means exactly ${ w \mid h(w) \in S}$. You can ask what is $h^{-1}({\mathtt{00001}})$, and the answer is $\emptyset$ because there is no $w$ such that $h(w) \in {\mathtt {00001}}$. – MJD Apr 26 '15 at 09:38

1 Answers1

2

By definition, $h^{-1}(w)$ is the set: $$\{v \in \{a,b\}^* \mid h(v) = w\}$$ Depending on your definitions, this can be an abuse of notation, because $h^{-1}$ might not be a mapping. However, it is convenient to omit the inner braces in the formally more correct $h^{-1}(\{w\})$.

As to the set itself: Because there is no possibility for $h$ to yield three consecutive zeroes, it follows that $h^{-1}(w)$ is empty.

Similarly, there is no possibility for an image of $h$ to have three consecutive ones.

With this information, can you identify the words, if indeed there exist any, that can occur as an image of $h$?

This is the key to the solution; it amounts to describing the set: $$\operatorname{im} h \cap L$$ and subsequently to find its preimage under $h$.

Lord_Farin
  • 17,743