6

If given any language L, how do I find the complement of said language?

I lack the basic understanding required to determine if a language is co-recognizable. I understand that a language, $L$, is co-recognizable if the complement of that language, $\overline{L}$, is recognizable.

But given a specific language, I have a hard time figuring out what the actual complement is, and can thus not figure out if that complement is recognizable. An example problem is:

Is the following language co-recognizable?
$L$ = {$<M>$ | $M$ is a turing machine, and $1010 \notin{L(M)}$}

Jakir
  • 61
  • 1
  • 2

1 Answers1

11

Remember that a language is defined as a set of strings. The complement of a language is thus the complement of that set, defined in the usual way: everything not in the set.

In practice, when talking about the complement of a language, there's usually a particular alphabet you're interested in (which you can infer from context). If all else fails, assume $\{0,1\}$.

So in this case, the complement of that language is:

The set of all binary strings $s$, such that either $s$ isn't a valid encoded Turing machine, or the machine encoded by $s$ accepts $1010$.

Hint: the problem of whether a string $s$ is a valid encoded Turing machine or not is known to be decidable. So you only need to worry about the second clause.

Draconis
  • 7,098
  • 1
  • 17
  • 27
  • Finding the complement is particularly easy (read: mechanizable) if the the language is given as a predicate subset: Rewrite $L = {|M \text{is a TM and} 1010 \notin L(M)}$ as $L = {w \in {0,1}^\ |\ w = , M \text{is a TM and} 1010 \notin L(M)} = {w \in {0,1}^\ |\ P(w)}$ with $P$ being the predicate in $w$. Now the complement simply is ${w \in {0,1}^*\ |\ \neg P(w)}$. And $\neg P(w) \equiv w \neq \lor (w = \wedge M \text{ TM} \wedge 1010 \in L(M))$. – ComFreek Jan 14 '19 at 07:59