# Show that the collection of Turing-recognizable languages is closed under homomorphism [duplicate]

This question already has an answer here:

I have seen this question here, Closure of Turing-recognizable languages under homomorphism But actually this question answers the question of "What is the relation between homomorphism and concatenation?", so I still have a problem of how to show that the collection of Turing-recognizable languages is closed under homomorphism. Could anyone help me in doing so please?

In my opinion closure under homomorphism is very similar to closure under Kleene Star, but I am convinced that I have to put marks on any number of tape cells because my language $f(L)$ may contain many strings, am I right?

Many thanks!

## marked as duplicate by D.W.♦Mar 11 '18 at 18:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• What did you try? Where did you get stuck? We're happy to help you understand the concepts but just solving exercises for you is unlikely to achieve that. You might find this page helpful in improving your question. – D.W. Mar 10 '18 at 20:57
• @D.W. I know that I have to build a Turing machine that recognizes $f(L)$ but I do not know what will be the relation of $f(w_1)$ and $w_1$ in my constructed machine..... could you give me a hint in doing so? – Idonotknow Mar 11 '18 at 2:08
• What about decoding the input to multiple possible $w$s then running the Turing machine corresponding to $L$ on these $w$s? – xskxzr Mar 11 '18 at 8:55
• you mean like the proof of closure under Kleene star as I asked in my question?@xskxzr – Idonotknow Mar 11 '18 at 10:33
• @D.W. That question asks two questions, one (in the title) is "is the class of Turing-recognizable languages closed under homomorphism", and the other is "is my proof correct". This is my opinion. – xskxzr Mar 11 '18 at 15:55

## 1 Answer

The proof is posted by Anwar Saiah on this post. I quote it here (with its formatting improved).

Given a language $L$ that is Turing recognizable and a TM $M$ that recognizes it and a homomorphism $f$, we build a NTM $M'$ that recognizes $f(L)$.

$M'$ looks like this:

On input $w$ :

• Non-deterministicly feed words from $\Sigma^∗$ to $f$ until you obtain $w$.

• Run $M$ on $f^{−1}(w)$, if $M$ accepts accept, otherwise reject.

This works because $M'$ is a non-deterministic Turing machine. A NTM accepts $w$ if there is at least one branch accepting $w$, so if there is any word $x$ such that $f(x)=w$ and $M(x)$ accepts, this will find it and accept.

• @D.W. I disagree with chi. I left a comment on his answer to show my point. – xskxzr Mar 11 '18 at 17:31
• why we run M on $f^{-1}$ and not $f$? – Idonotknow Mar 11 '18 at 17:56
• That makes sense. Thanks for the explanation! I have posted what I think is a clearer version of this proof on the other page. – D.W. Mar 11 '18 at 18:02