Minsky's Theorem

COS2601 - Theoretical Computer Science II · Turing Theory

Minsky's Theorem

Minsky's Theorem describes the relationship between Post Machines (PMs) and Turing Machines (TMs). It shows that any language that can be accepted by a PM can also be accepted by a TM, and vice versa. This equivalence is crucial in theoretical computer science.

Simulating a Post Machine on a Turing Machine

A Turing Machine can simulate a Post Machine. When the TAPE of a TM is filled with A's, the TAPE HEAD reads the cell it points to. If it finds an A, it moves right, thinking it is in the non-A section of the TAPE. The TM continues this process, reading cells and moving right while following the program's instructions. If the STORE is empty, the program is not over. The TM can still ADD something and continue its operation.

Every state of the PM can be converted into a TM state or a sequence of states with the same function. The TM will HALT on all words that the PM sends to ACCEPT. It will crash on words that the PM sends to REJECT or on which the PM crashes. Additionally, it will loop forever on inputs where the PM loops forever.

Remember: A Turing Machine simulates a Post Machine by converting each PM state into a TM state.

Example of PM to TM Conversion

Consider a PM that accepts the language { a^n b^n }. The PM has the following states:

START
ACCEPT
ADD a
ADD b

This PM can be converted into a TM. The initial input string is placed on the TM TAPE starting in cell i, with a Li (blank) in cell i-1. The simulation follows the algorithm to produce a TM that operates similarly to the PM.

Tracing the Execution of the TM

Let us trace the processing of the input string aabb:

START
Aaabb --> Ag_abb --> Aag_bb --> Aaall.b
--> Aaabll. --> AaabM --> Aaabfl.#
--> Aag_bb# --> Ag_abb# --> Aaabb# --> Ag_abb#
--> AAg_bb# --> AAabb# --> AAqbb# --> AAA!l.b#
--> AAM!l.# --> AAMbJi. --> AAAbb#A --> AAMbJi.a
--> AAMQ#a --> AAA!l.b#a --> AAAbb#a --> AA/:::,.Qb#a
--> AAAAQ#a --> AAAAb#a --> AAAAfl.#a --> AAAAA'/ta
--> AAAAA#ab --> AAAAA'/tab --> AAAAAAg_b --> AAAAAAall.
--> AAAAAAaM --> AAAAAAafl.# --> AAAAAAqb# --> AAAAA/:!ab#
--> AAAAAAg_b# --> AAAAAAAQ# --> AAAAAAAb# --> AAAAAAA!l.#
--> AAAAAAAA! --> AAAAAAAA# --> AAAAAAAA! --> AAAAAAAAAA
--> AAAAAAAAA# --> AAAAAAAAA'/t --> AAAAAAAAAA/:! HALT

This execution chain shows that the TM accepts the language { a^n b^n }. The algorithm guarantees the existence of a TM that accepts the same language, although it may not be the most efficient one.

Simulating a Turing Machine on a Post Machine

Conversely, any language that can be accepted by a TM can also be accepted by a PM. This is proven by constructing a PM from a TM. The PM must use a STORE alphabet larger than usual, including any character from the TM TAPE alphabet.

The characters to the left of the TAPE HEAD on the TM are placed to the right of a special symbol (#) on the PM STORE. The characters to the right of the TAPE HEAD are placed to the left of the #. This correspondence is essential for the simulation to work correctly.

Tip: Use the symbol # to represent the TAPE HEAD position in the PM STORE.

Handling Edge Cases

When simulating left moves, if the TAPE HEAD is at the start of the TAPE, the TM may crash. To handle this in the PM, we must check if the first character in the STORE is #. If it is, we replace the # with a special character (e.g., a) to continue processing. Similarly, for right moves, if the TM tries to move beyond the non-A's, we should also ensure that the # is handled correctly.

Final Remarks

Through these simulations, we conclude that both PMs and TMs have equivalent computational power. We can express this equivalence as:

Remember: PM = TM

Check your understanding

  1. Explain how a TM simulates a PM.
  2. What happens when a TM moves left at the beginning of the tape?
  3. Describe the correspondence between the TM TAPE and PM STORE.
  4. What is the significance of the # symbol in the PM simulation?