Given $A$ a countable set of numbers and $\min$ the function returning the minimum of a set (if exists). Is $\min(A)$ computable? My first try is thinking $A$ as infinite list $A = [a_0, a_1, a_2,...]$ such that $a_i < a_j$ for every $i < j$ and write a simple while program $P$ such that $P(A) = a_0$. Is that correct? If so I wonder who is the equivalent μ-recursive function?
2 Answers
Your question lacks some details and without additionnal precisions, the answer is no.
For $n\in \mathbb{N}$, denote $S(n)$ the maximum number of steps that a Turing machine with $n$ states that take before halting with an empty input, on the alphabet $\Sigma = \{0, 1\}$. It is a well known fact that $S(n)$ is not computable.
Denote $E(n) = \{S(k) \mid k \geqslant n\}$. Since $S$ is an increasing function, it is clear that $\min(E(n)) = S(n)$. However, $E(n)$ is countable, therefore is a counter example to the property.
- 18,309
- 2
- 30
- 58
To make the question better defined, we must specify the initial countable set $A$ of natural numbers, so that the specification can be used as input for our computer. Thus we assume that there is a program $E$ that lists the elements of $A$ one by one, not necessarily in order. Thus $A$ is recursively enumerable.
Now assume that there is a program $P$ that computes the minimal element of a recursively enumerable set $A$ (given its program listing $E$). I claim that then we can list the elements of $A$ in their natural order. The minimal element $a_0$ of $A$ is easily found, it can be determined by $P$ applied to $E$. But now $A_1 = A - \{a_0\}$ is also recursively enumerable: its program $E_1$ use the program $E$ that enumerates $A$, except that it ignores $a_0$ in its enumeration. Again we can apply $P$ to find the minimum but now for $A_1$ and its enumerating program $E_1$. The minimum $a_1$ of $A_1$ is the second element of $A$. We store $a_0,a_1$ and repeat, observing we have a program that enumerates $A_2 = A - \{a_0,a_1\}$. Etcetera.
Hence we obtain that the recursively enumerable set $A$ can be enumerated in order. Equivalently, see elsewhere, the set $A$ is in fact recursive (meaning there is a program that decides membership in $A$). This is a contradiction, the recursive sets are a strict subset of the recursive enumerable sets.
Hence a program that computes the minimal element of a recursive enumerable (countable) set $A$ does not exist.
- 31,459
- 1
- 54
- 109