From the set of natural numbers, \(\mathbb{N}\), we can generate a lot of subsets \(S \subset \mathbb{N}\). In fact, the number of subsets we can have of \(\mathbb{N}\) is so large that it’s uncountable. This study of subsets on \(\mathbb{N}\) is a complicated branch of mathematics and logic, and it serves to describe and answer questions in computer science on computability.
Note: We will be alternating some commonly used notations.
We prove this by stating a more powerful claim: there does not exist a bijection between a set and its powerset. For set \(S = \emptyset\) , it is trivial: \(|S| = 0 \neq |P(S)| = |\{\{\}\}| = 1\) . So suppose it’s non-empty, and it does have a bijection by contradiction, \(f : S \to P(S)\). Then, we look at the following set, \(B = \{s \in S : s \not\in f(s)\} \subset S\) This is obviously a well constructed set \(B\). It contains all elements $s$ such that the bijective mapping $f(s) = S \not\ni s$ , i.e. does not contain $s$ itself. There must exist a \(b \in S\) such that \(f(b) = B\) since to be bijective, \(f\) must also be surjective(i.e. \(\forall X \in P(S), \exists x \in S, f(x) = X\)). Then, let’s analyze two cases:
Both cases give us contradiction, then the bijection is absurd for any arbitrary set \(S\). Furthermore, we can take the powerset of any uncountable set and reach a higher uncountable ordinal.
This is important because although \(\mathbb{N}\) may be countable, analyzing the subsets of \(\mathbb{N}\) can prove to be much more complicated, and yields surprising results. The fact that we have countable recursive functions that we can program in C, but uncountable number of functions with arbitrary domain and range means there are some unexplored complexity in computability. We aim to analyze this uncountable set, which turns out to have some interesting results, and we will eventually arrive at theorems of Tarski, Godel, and Church.
Before we dive in, we should revisit the Halting Problem as explored by the previous blog. For a given program, we want to know whether it terminates. Intuitively, we would be able to say “yes” eventually if the program does indeed terminate, but we would never be able to say “no”, since it requires infinite time for us to wait before we answer.
This is a semirecursive relation, asking “Would the program with code \(\hat{f}\) halt on input \(x\)” a given program. To put it more formally, \(R(x) \iff f(x)\downarrow, \quad f\text{ is recursive}\)
Additionally, it is equivalent to saying, “would there exist an output from the program?”, which is: \(R(x) \iff \exists y P(x,y)\) Basically, semirecursive relations are ones that have a positive answer and may not have a decidable answer otherwise. We also denote these relations to be \(\Sigma_1^0\) relations.
Some important closure properties of semirecursive relations:
However, note that it is not closed under unbounded universal quantifiers. Intuitively, if you had to make sure for every number, some relation is true, you’d have to run your program infinitely many times, without termination. Meanwhile, for a semirecursive relation, it must give us a positive answer in finite time. Consequently, it must also not be closed under negation, i.e.
\[H(e,x) \iff (\exists y)T(e,x,y)\]is the halting relation, and \(\lnot H(e,x) \iff (\forall y)[\lnot T(e,x,y)]\).
One way to analyze the high complexity of subsets on \(\mathbb{N}\) is to see what kind of sets we can identify from algorithms. Recall the Church-Turing thesis states that algorithms and recursive partial functions are equivalent. By definition, a set \(A\) is recursive if we can say “yes, \(x \in A\)” via a recursive function and “no, \(x \not\in A\)” similarly. Then, we can just ask from 0 onwards whether an element is in the set. For example,
Q: “Is 0 in A?”, A: runs some algorithm… Yes
Q: “Is 1 in A?”, A: runs some algorithm… No
Q: “Is 2 in A?”, A: runs some algorithm… Yes
…
Then \(A = \{0,2,...\}\) for this specific example.
then the definition is defined rigorously as the following:
A set \(A \subset \mathbb{N}\) is recursively enumerable (r.e.) if \(A = \emptyset\) or \(A = \{f(0),f(1),f(2),f(3),...\}\), where \(f : \mathbb{N} \to \mathbb{N}\) is a total recursive function. Similarly, a set \(A\) is co-recursively enumerable (co-r.e.) if \(A^c\) is r.e.$$.
We will prove some properties about them below:
For sake of brevity, I’ll list out a few properties without proofs (which can be found online):
From what we learned so far, we can classify the sets into three sets:
Then we have constructed the first level of a hierarchy of sets, where the intersection of recursive enumerable sets and co-recursively enumerable is the recursive set. Here’s an illustration of what I mean:
We will explore what the sets are in \(\Sigma^0_2\) and etc. later.
In algorithms courses offered in CS, where one briefly visits the NP class of problems, the topic of NP complete problems show up. An NP complete problem is one which every other problem in NP can be reduced to. What is reduction? It means that we can use another problem in order to solve this problem. A quick example is, we can reduce the problem of Clique to a problem of Independent Set by inverting the edge set of the input graph, and if independent set returns some $K$, then we have a $K$ clique in our graph. Recall we cannot increase our input size exponentially or call the reduction exponential number of times, for it to be a reduction in that sense.
What does reductions and r.e. complete mean then? Well, basically the same, but applied to r.e. sets. Formally, a reduction from a set \(A\) to \(B\) is such that we can ask questions about membership in \(B\) to determine membership in \(A\). There is a hierarchy of “ease” of reduction by the following classifications:
An r.e. complete set, denote A, has the property that every r.e set is 1-reducible to it, formally:
\[B \text{ is r.e.} \implies B \leq_1 A\]Intuitively, we must then assume that \(A\) must be a set that is bigger than or equal to any r.e. set, otherwise the injection won’t work. Then obviously \(A\) is infinite. For example, post’s diagonal \(K = \{e \mid \phi_e(e)\downarrow\}\) is r.e. complete. Here’s a proof.
For arbitrary r.e. set \(B\), it is defined as the domain of some recursive function \(f\), then \(x \in B \iff f(x) \downarrow\). Then, we define \(g(x,y) = f(x)\), so that it is independent of \(y\). Then there exists some code for \(g\), call it \(\hat{g}\), so that \(g(x) = \{\hat{g}\}(x)\). By the \(S^m_n\) theorem, \(S^1_1(\hat{g}, x)\}(y) = f(x) \forall y\). Then since any \(y\) applies, we ask \(\{S^1_1(\hat{g}, x)\}(S^1_1(\hat{g}, x))\) in \(K\). In other words:
\[x \in B \iff f(x)\downarrow \iff g(x,y)\downarrow \iff \{S^1_1(\hat{g},x)\}(S^1_1(\hat{g},x))\downarrow \iff h(x) = S^1_1(\hat{g}, x) \in K\]The \(S^m_n\) theorem states that \(S^1_1\) is injective, then it is obvious that \(h\) is injective, then \(B \leq_1 K\). Since \(B\) is arbitrary, \(K\) must be r.e. complete.
Emil Post, one of the founders of computability theory, asked a question that could not be solved until more than 20 years later. The question asks the following: does there exist r.e. sets $A$ and $B$ that are not turing reducible to each other?
The answer is yes. However, before we show this, we must dig further to find properties of recursive enumerable sets.