Exercises for the sixth tutorial

Nils Anders Danielsson

  1. If natural numbers are encoded as strings using the method given in Lecture 5, what list of natural numbers does 110110111011110111111011111111100 stand for?

  2. Either prove that the following function is Turing-computable, or that it is not Turing-computable:

      halts₀ ∈ TM → Bool
      halts₀ tm = if ⟦ tm ⟧ [] is defined then true else false

  3. Either prove that the following function is Turing-computable, or that it is not Turing-computable:

      is-constantTM → Bool
      is-constant tm =
        if ∃ ys ∈ List Γtm. ∀ xs ∈ List Σtm. ⟦ tm ⟧ xs = ys then true else false

  4. Either prove that the following function is Turing-computable, or that it is not Turing-computable:

      is-constant ∈ { (ftm) | f ∈ Bool → Bool, tm ∈ TM, tm implements f } → Bool
      is-constant (f, _) = if ∃ y ∈ Bool. ∀ x ∈ Bool. f x = y then true else false

    A member (ftm) of the set { (ftm) | f ∈ Bool → Bool, tm ∈ TM, tm implements f } is represented by the representation of tm: ⌜(ftm)⌝ = ⌜tm⌝.

  5. Either prove that the following function is Turing-computable, or that it is not Turing-computable:

      is-constant ∈ { (ftm) | f ∈ ℕ → Bool, tm ∈ TM, tm implements f } → Bool
      is-constant (f, _) = if ∃ b ∈ Bool. ∀ n ∈ . f n = b then true else false

  6. Is the intensional halting problem for closed χ expressions Turing-computable?

  7. Is the halting problem for Turing machines χ-decidable?

  8. State and prove a version of Rice’s theorem for Turing machines.