-1

Generally we will say there is A DFA for a language if we give a string to that DFA and after processing it it will reach to DFA and DFA more or less stops at final state,so then we say there is a DFA, and if that string does not reach final state we say there is no DFA

In Contrast

When it is case for Recursively enumerable language how do you say there is a turing machine for a language if it never halts as we don't know whether it halts or not so its like its not reaching any state to be called as turing machine for that language.

cnu
  • 1
  • 1

2 Answers2

1

The definition of a $TM$ for a language is the following:

The language of a TM $M$ is defined as $L(M):=\{w\in \Sigma^* \mid M(w) \text{ halts and accepts}\}$

Now, for a fixed language $L_0$, we say that $M$ is a TM for $L_0$ if $L(M)=L_0$.

nir shahar
  • 11,753
  • 3
  • 17
  • 35
1

There is a machine for some language is a shorthand for, either:

  • some machine can accept the language, or
  • some machine can decide the language.

They are subtly different things.

When a machine decides a language, and you throw a string at it, it is guaranteed to confirm that the string is in the language, when it is, and to confirm that it is not in the language, when it is not.

When a machine accepts a language, and you throw a string at it, it is guaranteed to confirm that the string is in the language, when it is, and to not produce the verdict that it is in the language, when it is not - but in that case, it may fail to produce any verdict at all.

DFAs always produce a verdict for any string you throw at them: just run the DFA on the string, which will take one step for each character of the string, and when you're done, check whether the DFA is in an accepting state. So DFAs always decide a language, and when we say there is a DFA for a language, we always mean it decides the language.

Not so for TMs. They accept and decide languages differently: they always run until they are in a halting state, and they may never get there. The reason we need to allow this, and that we need to make the distinction between accepting and deciding a language for TMs, is that some languages are semidecidable (some machine accepts them) but not decidable (no machine decides them). So the best we can do, for such languages, is to have a machine that accepts them but does not decide them.

reinierpost
  • 6,294
  • 1
  • 24
  • 40