0
$\begingroup$

I'm very new to this area of math, so forgive me if this question doesn't make sense.

I am searching for a set X ⊆ N (the naturals) that follows certain decidability rules, and am attempting to work from the halting set as it seemed to be a good starting point: K = {(i, x) | program i halts when run on input x}. However, I'm struggling to understand intuitively if the halting set itself is even a subset of the naturals. Is it? And from an intuitive perspective why/why not? Thanks

$\endgroup$
4
  • $\begingroup$ What kind of thing is $(i,x)$? Is it an element of $\mathbb{N}$? $\endgroup$
    – aschepler
    Commented Nov 14, 2023 at 3:03
  • $\begingroup$ I took this definition from en.wikipedia.org/wiki/Halting_problem. Presumably x is any natural number, and i is one of any programs, of which there are countably many $\endgroup$
    – figbar
    Commented Nov 14, 2023 at 3:09
  • $\begingroup$ So I guess that would mean there are countably many tuples (i,x)? $\endgroup$
    – figbar
    Commented Nov 14, 2023 at 3:14
  • 1
    $\begingroup$ This is a perfectly good question. Why is there a downvote? $\endgroup$
    – Trebor
    Commented Nov 14, 2023 at 6:34

1 Answer 1

4
$\begingroup$

In Turing Computability: Theory and Applications, Robert Soare defines $\langle x,y \rangle := \frac{1}{2} (x^2 + 2xy + y^2 + 3x + y)$. According to this definition, each $\langle x, y \rangle$ is a natural number, which implies that $K$ is a set of natural numbers.

One can check that the function $f(x,y) = \frac{1}{2}(x^2 + 2xy + y^2 + 3x + y)$, which is called the Cantor pairing function, is a bijection between pairs of natural numbers and natural numbers. Because this function is a bijection (in particular, because it is an effective bijection), we do not lose any information by treating ordered pairs as numbers defined in this way.

In computability theory, it is standard to define finitary objects, such as finite sets, finite tuples, functions with finite domains, etc., as numbers coded in this way. A coding like this is called a Gödel numbering, and it is useful because:

  • Once we have described what it means for an algorithm (i.e., a Turing machine) to act on natural numbers, we have described what it means for an algorithm to act on any other finitary objects.
  • Gödel codings are used in the proof of Gödel's Incompleteness Theorems, since they can enumerate all the formulas in a certain language.
$\endgroup$
1
  • $\begingroup$ Written less mysteriously the Cantor pairing function is $\binom{x+y+1}2+x$. $\endgroup$
    – user14111
    Commented Nov 14, 2023 at 6:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .