Theory of computing, part 4
1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of the field 5Splicing systems 6P systems 7Hairpins 8Detection techniques 9Micro technology introduction 10Microchips and fluidics 11Self assembly 12Regulatory networks 13Molecular motors 14DNA nanowires 15Protein computers 16DNA computing - summery 17Presentation of essay and discussion Course outline
Turing machines
Regular Languages Context-Free Languages The language hierarchy
Regular Languages Context-Free Languages Languages accepted by Turing Machines The language hierarchy
Tape Read-Write head Control Unit A Turing machine
Read-Write head No boundaries -- infinite length The head moves Left or Right The tape
Read-Write head The head at each time step: 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right The tape
Time Time 1 1. Reads 2. Writes 3. Moves Left Example
Time Time 2 Example 1. Reads 2. Writes 3. Moves Left
Blank symbol head Head starts at the leftmost position of the input string Input string The input string
Read Write Move Left Move Right States and transitions
Time 1 current state Example
Time Time 2 Example
Time Time 2 Example
Time Time 2 Example
Allowed Not Allowed Turing Machines are deterministic Determinism
No transition for input symbol Allowed: Example: partial transition function
The machine halts if there are no possible transitions to follow Halting
No possible transitionHALT Example
Allowed Not Allowed Final states have no outgoing transitions In a final state the machine halts Final states
Accept Input If machine halts in a final state Reject Input If machine halts in a non-final state or If machine enters an infinite loop Acceptance
A Turing machine that accepts language a * Turing machine example
Time 0 Turing machine example
Time 1 Turing machine example
Time 2 Turing machine example
Time 3 Turing machine example
Time 4 Halt & Accept Turing machine example
Time 0 Rejection example
Time 1 No possible Transition Halt & Reject Rejection example
Another Turing machine for language a * and is this one correct??? Infinite loop example
Time 0 Infinite loop example
Time 1 Infinite loop example
Time 2 Infinite loop example
Time 2 Time 3 Time 4 Time 5... Infinite Loop Infinite loop example
Because of the infinite loop: The final state cannot be reached The machine never halts The input is not accepted Infinite loop example
Turing machine for the language Another Turing machine example
Time 0 Another Turing machine example
Time 1 Another Turing machine example
Time 2 Another Turing machine example
Time 3 Another Turing machine example
Time 4 Another Turing machine example
Time 5 Another Turing machine example
Time 6 Another Turing machine example
Time 7 Another Turing machine example
Time 8 Another Turing machine example
Time 9 Another Turing machine example
Time 10 Another Turing machine example
Time 11 Another Turing machine example
Time 12 Another Turing machine example
Halt & Accept Time 13 Another Turing machine example
If we modify the machine for the language we can easily construct a machine for the language Observation
Formal definitions
Transition function
States Input alphabetTape alphabet Transition function Initial stateblank Final states Turing machine
Instantaneous description: Configuration
Time 4Time 5 A Move: Configuration
Time 4Time 5 Time 6Time 7 Configuration
Equivalent notation: Configuration
Input string Initial configuration
For any Turing Machine Initial state Final state The accepted language
Deterministic Infinite tape in both directions Tape is the input/output file The machine we described is the standard Standard Turing machine
Computing functions
A function Domain:Result Region: has: Functions
A function may have many parameters Example: Addition function Functions
Unary: Binary: Decimal: We prefer unary representation: easier to manipulate with Turing machines Integer domain
A function is computable if there is a Turing Machine such that: Initial configurationFinal configuration Domain final stateinitial state For all Functions definition
Initial Configuration Final Configuration Functions definition A function is computable if there is a Turing Machine such that: DomainFor all
The functionis computable Turing Machine: Input string:unary Output string:unary are integers Example
Start initial state The 0 is the delimiter that separates the two numbers Example
Start Finish final state initial state Example
Finish The 0 helps when we use the result for other operations Example final state
Turing machine for function Turing machine example
Execution Example: Time 0 Final Result (2) Turing machine example
Time 0 Turing machine example
Time 1 Turing machine example
Time 2 Turing machine example
Time 3 Turing machine example
Time 4 Turing machine example
Time 5 Turing machine example
Time 6 Turing machine example
Time 7 Turing machine example
Time 8 Turing machine example
Time 9 Turing machine example
Time 10 Turing machine example
Time 11 Turing machine example
HALT & accept Time 12 Turing machine example
The functionis computable Turing Machine: Input string:unary Output string:unary is integer Another example
Start Finish final state initial state
Turing Machine Pseudocode for Replace every 1 with $ Repeat: Find rightmost $, replace it with 1 Go to right end, insert 1 Until no more $ remain Pseudocode
Turing Machine for Example
Start Finish Example
The function is computable if Another example
Turing Machine for Input: Output: or if Another example
Match a 1 from with a 1 from Repeat Until all of or is matched If a 1 from is not matched erase tape, write 1 else erase tape, write 0 Pseudocode
Combining Turing machines
Block Diagram Turing Machineinputoutput Combining Turing machines
if Comparer Adder Eraser Example
Turing’s thesis
Do Turing machines have the same power with a digital computer? Intuitive answer: Yes There is no formal answer!!! Question: Turing’s thesis
Any computation carried out by mechanical means can be performed by a Turing Machine (1930) Turing’s thesis
A computation is mechanical if and only if it can be performed by a Turing Machine There is no known model of computation more powerful than Turing Machines Computer science law
An algorithm for function is a Turing Machine which computes Definition of an algorithm
When we say: There exists an algorithm We mean: There exists a Turing Machine that executes the algorithm Algorithms are Turing machines