跳转至

Containments properties of languages

Summary

\(\text{regular languages}\in \text{context-free languages} \in \text{recursively languages} \in \text{recursively enumerable languages}(semi-decidable)\)

  • from regular languages to context-free languages:real subset \(L = \{a^nb^n|n\geq 0\}\)
  • from context-free languages to recursively languages:real subset \(L = \{a^nb^nc^n|n\geq 0\}\)

1

Proof of the containments

Countable:

A set A is countable if it is finite or \(\exists\) a bijection between A and \(\mathbb{N}\).

Lemma 1

A set A is countable if and only if there is an injection from A to \(\mathbb{N}\).

  • injection: \(f:A \rightarrow \mathbb{N}\) is an injection if \(f(a) = f(b) \Rightarrow a = b\).

  • (\(\Leftarrow\)) If bijection exists, then injection exists.

  • (\(\Rightarrow\)) 9 First, suppose there exists an injection \( f: A \to \mathbb{N} \) from \( A \) to \( \mathbb{N} \). Then, we can "sort" the elements of \( A \) according to the values of \( f \) (in increasing order). Based on this order, we can define a bijection \( g \) from \( A \) to \( \mathbb{N} \). Specifically, we map the \( k \)-th element of \( A \) (in the sorted order) to \( g(a) = k \).

Collary 1

Any subset of a countable set A is countable.

Proof:

  • \(\exists\) an injection from A to \(\mathbb{N}\).
  • Therefore, any subset of A can be mapped to a subset of \(\mathbb{N}\).

11

Lemma 2

Any language \(\Sigma^*\) is countable.

Proof:

10

  • See link -- Proposition 2.1.

Collary 2

\(\{M: \text{M is a Turing Machine}\}\) is countable.

Lemma 3

Let \(\Sigma\) be an alphabet. Let \(L\) be a language over \(\Sigma\). Then, \(L\) is countable.

  • See link

  • Another Proof: 12

From Lemma 3 and Collary2, we can conclude that some languages are not recursively enumerable.

ATM

\(A_{TM} = \{<M,w>|M \text{ is a TM and M accepts w}\}\)

Theorem1

\(A_{TM}\) is recursively enumerable.

Proof:

Theorem2

\(A_{TM}\) is not recursive.

13

Proof:

Suppose \(A_{TM}\) is recursive. Then, there exists a TM \(H\) that decides \(A_{TM}\).

H = "On input : 1. Run M on w. 2. If M accepts w, accept; if M rejects w, reject."

Consider the following TM D:

D = "On input : 1. Run H on <M,\. 2. If H accepts, reject; if H rejects, accept."

Consider what happens when we run D on \<D>.

  1. If D accepts \<D>, then H rejects <D,\.
  2. If D rejects \<D>, then H accepts <D,\.
  3. Therefore, D cannot exist.

14

\(A_d = \{<"M">|M \text{ is a TM that does not accept "M"}\}\) -- See Above.

Theorem3

\(A_d\) is not recursively enumerable.

Proof:

Suppose \(A_d\) is recursively enumerable. Then, there exists a TM \(D\) that semi-decides \(A_d\).

D = On input : 1. Accept if \(M \in A_d\). (M rejects "M") 2. Reject or Loop if \(M \notin A_d\)." (M accepts "M")

Consider what happens when we run D on \<D>.

  1. If D accepts \<D>, then \(D \in A_d\). -- D rejects "D".
  2. If D rejects or loops on \<D>, then \(D \notin A_d\).

Summary

\(A_{TM}\) is recursively enumerable but not recursive. \(A_d\) is not recursively enumerable.


最后更新: 2024年10月28日 20:54:30
创建日期: 2024年10月28日 20:54:30