1

I read Sipser's "Introduction to the Theory of Computation" a while ago. I am confused that in the book it is stated that a Turing machine can be defined by its "description" such as "With input $A$, we construct blablabla and output xyz on the tape...", while the formal definition is the 7-tuple $(Q, \Sigma, \Gamma, \delta, q_0, q_{accept}, q_{reject})$ where those symbols are states, transition function etc.

There were some theorems proved by this description way of definition of Turing machine, such as the recursion theorem and the countableness of the set of all possible Turing machines.

But as far as I remember there was no explanation on why could we define a Turing machine by writing down English sentences as instructions. What if:

  1. We define a Turing machine by a paragraph of instructions in English, but it is impossible for any Turing machine to follow the instructions, or
  2. There is a Turing machine such that what it does cannot be represented as these instructions in english? (I can't come up with one though)

The above may sounds nuts, but it is not trivial to me that it does not require some proofs. Please correct me if I missed something in the book or being stupid, or there are other books/ resources I can refer to. Many thanks!


Update:
I just realized that scenario #2 is not possible: As the number of states of a TM is finite, in the "worst case" the description can be just tediously listing out every transition (i.e. "if we see an 'A' on tape we move to state 1; if we are in state 1 and we see an 'B' on tape we move to state 2 and print 'X' on tape...")

2 Answers2

4

Formally, a Turing machine is defined by a 7-tuple, as specified by the mathematical definition. See https://en.wikipedia.org/wiki/Turing_machine#Formal_definition.

Informally, if I give an English description of such a 7-tuple, and my description is unambiguous and clearly identifies a single such Turing machine (not 2, not 0, but exactly 1), then this is just as good as writing the 7-tuple itself -- it is just a more concise and understandable way to encode or write down the 7-tuple.

Analogy: An integer is defined formally in a particular way, and we are used to specifying an integer by writing a sequence of digits, e.g., 1729. However, we could also specify an integer by writing an English description, e.g., "the second taxicab number". If the English description does specify an integer, and is consistent with only a single integer, then this is just as precise and permissible as writing 1729.

You do have to check that there exists at least one Turing machine that is consistent with the English description; and that the description is unambiguous (there do not exist two different Turing machines that are both consistent with the English description).


For some purposes, it suffices to show that there exists at least one Turing machine to do something. For example, to prove that a function is computable, it suffices to demonstrate that there exists at least one Turing machine to compute it. In that case, it is sufficient to give an English description of a Turing machine that identifies at least one Turing machine. It doesn't need to uniquely specify a single Turing machine. The description might be consistent with multiple Turing machines, and that is OK, as long as it's clear that there exists at least one way to write down a 7-tuple that is consistent with the English description. The English description gives you the main ideas about how to do that, while sparing you the tedious details.

D.W.
  • 167,959
  • 22
  • 232
  • 500
1

Just as we can compile (high-level) programming languages to machine code, we can also compile programming languages to Turing machines. That was generally accepted as feasible, just very tedious and not that insightful to do for real, until recently when it was actually done in the paper Verified Programming of Turing Machines in Coq (2020). It turns out formalizing mathematics in proof assistants is one good motivation to do things for real.

Keep in mind that "high-level" is relative; to be higher-level than Turing machines is a low bar. To give you an idea of that programming language, here's the implementation of addition from the paper (Definition 6.16, with intermediate definitions inlined here and simplified a bit; link to the source code):

(* This is a comment *)
(* Inputs: m on tape 0, n on tape 1.
   Output: m + n on tape 2. *)
Definition Add :=
  LiftTapes (CopyValue _) [|Fin1; Fin2|];; (* copy n from tape 1 to tape 2 *)
  LiftTapes (CopyValue _) [|Fin0; Fin3|];; (* copy m from tape 0 to tape 3 *)
  While                                    (* Main loop *)
      (If (LiftTapes CaseNat [|Fin1|])     (* CaseNat returns false if the natural number on tape 3 equals 0, otherwise CaseNat decrements that number in-place and returns true. *)
         (Return (LiftTapes Constr_S [|Fin3|]) None)   (* If true branch: Constr_S increments tape 2, then returning None means to continue the While loop. *)
         (Return Nop (Some tt))).                      (* If false branch: Nop does nothing, then returning (Some tt) means to break out of the While loop. *)
Li-yao Xia
  • 1,128
  • 5
  • 6