Turing Machines
Date: 2021-03-03
title: 'Turing Machines' date: '2021-03-03'
Turing Machine
A Turing Machine (TM) is a 7-tuple:
is the set of states is the input alphabet not including blank symbol # is the tape alphabet, where is the start state is the accept state is the reject state
Note:
- TM can both write and read from the tape
- The read-write head can move to both left and right
- The tape is infinite
- States for rejecting and accepting take effect immediately
- Input
is written on the first entry on the left side of the tape, and all the rest boxes contains blank symbol # - It is assumed (in this class) that we know when we are pointing at the first tape square
- TM is deterministic if not stated
- Notation: write
for the configuration where the current state is , current tape content is and head location is - Start configuration:
TM
is the start configuration of - each
yields with a transition function is the accept configuration
Def: A language is Turing-recognizable if some TM
Variants of Turing Machine
Multi-tape Turing Machine with
Nondeterministic Turing Machine
Transition function:
Proof:
Simulate any NTM
- Tape 1: input string that is not altered
- Tape 2: copy of
's tape on some branch - Tape 3: keep track of
's location and 's nondeterministic computation tree 231 meaning go to second child, then third child in the next level, and the first child next.
Let
Idea: For each NTM, construct a 3-tape deterministic TM.
Theorem: A language is Turing recognizable
Def: A NTM is a decider if and only if halts and answers accept or reject on all branches of computation.
Theorem:
(
Universal Turing Machine
A Universal TM to run any DFA:
- On input <
>, first check that is in the right form and . Otherwise reject. - While the symbol on the input tape (head) is not blank, if DFA is in
and reading , go to where and move right. - When symbol is blank, if DFA is in an accept state,
accepts. Otherwise halts and rejects.
Theorem:
Theorem:
Run TM