[Math] How to prove a language is decidable

formal-languages

I would like to see some proofs to show if a particular string in machine $M$ which DFA is decidable or not. I am trying to find some results on this but those are not appropriate. Any examples or proofs would be of great help.

The scenario I am trying to prove is

If I have a language that contains $2$ words ($w_1$ and $w_2$), when I send these words to a machine $M$ which is $DFA$, then $M$ should accept/reject the language based on these conditions
"$w_1$ is a substring of $w_2$, $w_1$ should not be empty and $w_1$ is not equal to $w_2$"

Best Answer

To show that a language is decidable, we need to create a Turing machine which will halt on any input string from the language's alphabet. Since $M$ is a dfa, we already have the Turing Machine and just need to show that the dfa halts on every input. To do this, pick a generic string, say $w$, and show that the machine $M$ will either accept or reject this string.

Related Question