Theory of computing, part 4
Course outline 1 Introduction 2 Theoretical background Biochemistry/molecular biology 3 Theoretical background computer science 4 History of the field 5 Splicing systems 6 P systems 7 Hairpins 8 Detection techniques 9 Micro technology introduction 10 Microchips and fluidics 11 Self assembly 12 Regulatory networks 13 Molecular motors 14 DNA nanowires 15 Protein computers 16 DNA computing - summery 17 Presentation of essay and discussion
Turing machines
The language hierarchy Context-Free Languages Regular Languages
The language hierarchy Languages accepted by Turing Machines Context-Free Languages Regular Languages
A Turing machine Tape ...... ...... Read-Write head Control Unit
...... ...... The tape No boundaries -- infinite length Read-Write head 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
Example Time 0 ...... ...... Time 1 ...... ...... 1. Reads 2. Writes 3. Moves left
...... ...... ...... ...... Example Time 1 Time 2 1. Reads 2. Writes 3. Moves right
The input string Input string Blank symbol ...... ...... head Head starts at the leftmost position of the input string
States and transitions Write Read Move Left Move Right
Example Time 1 ...... ...... current state
Example Time 1 ...... ...... Time 2 ...... ......
Example Time 1 ...... ...... Time 2 ...... ......
Example Time 1 ...... ...... Time 2 ...... ......
Determinism Turing Machines are deterministic Allowed Not Allowed
...... ...... Example: partial transition function Allowed: No transition for input symbol
Halting The machine halts if there are no possible transitions to follow
Example ...... ...... No possible transition HALT
Final states Allowed Not Allowed Final states have no outgoing transitions In a final state the machine halts
Acceptance If machine halts in a final state Accept Input in a non-final state or If machine enters an infinite loop Reject Input
Turing machine example 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
Rejection example Time 0
Rejection example Time 1 No possible Transition Halt & Reject
Infinite loop 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
Another Turing machine 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 Time 13 Halt & Accept
Observation If we modify the machine for the language we can easily construct a machine for the language
Formal definitions
Transition function
Transition function
Turing machine Input alphabet Tape alphabet States Final states Transition function Initial state blank
Configuration Instantaneous description:
Configuration Time 4 Time 5 A Move:
Configuration Time 4 Time 5 Time 6 Time 7
Configuration Equivalent notation:
Initial configuration Input string
The accepted language For any Turing Machine Initial state Final state
Standard Turing machine The machine we described is the standard Deterministic Infinite tape in both directions Tape is the input/output file
Computing functions
Functions A function has: Domain: Result Region:
Functions A function may have many parameters Example: Addition function
Integer domain Decimal: 5 Binary: 101 Unary: 11111 We prefer unary representation: easier to manipulate with Turing machines
Functions definition A function is computable if there is a Turing Machine such that: Initial configuration Final configuration initial state final state For all Domain
Functions definition A function is computable if there is a Turing Machine such that: Initial Configuration Final Configuration For all Domain
Example The function is computable are integers Turing Machine: Input string: unary Output string: unary
Example Start initial state The 0 is the delimiter that separates the two numbers
Example Start initial state Finish final state
Example The 0 helps when we use the result for other operations Finish final state
Turing machine example Turing machine for function
Turing machine example Time 0 Execution Example: (2) (2) Final Result
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 Time 12 HALT & accept
Another example The function is computable is integer Turing Machine: Input string: unary Output string: unary
Another example Start initial state Finish final state
Pseudocode 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
Example Turing Machine for
Example Start Finish
Another example The function if if is computable
Another example if Turing Machine for if Input: Output: or
Pseudocode Repeat Match a 1 from with a 1 from Until all of or is matched If a 1 from is not matched erase tape, write 1 else erase tape, write 0
Combining Turing machines
Combining Turing machines Block Diagram input Turing Machine output
Example if if Adder Comparer Eraser
Turing’s thesis
Turing’s thesis Question: Do Turing machines have the same power with a digital computer? Intuitive answer: Yes There is no formal answer!!!
Turing’s thesis Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Computer science law 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
Definition of an algorithm An algorithm for function is a Turing Machine which computes
Algorithms are Turing machines When we say: There exists an algorithm We mean: There exists a Turing Machine that executes the algorithm
Molecular application
Literature A nanoscale programmable computing machine with input, output, software and hardware made of biomolecules Nature 414, 430-434 (2001) Ehud Shapiro, Dept of Computer Science & Applied Math Weizmann Institute, Israel
Finite automaton, an example An even number of b’s b S0, a S0 S0, b S1 S1, a S1 S1, b S0 a a S0 S1 b Two-states, two-symbols automaton
Automaton 1 b a b S0 S0, a S0 S0, b S1 S1, a S1 S1, b S0 An even number of b’s S0, a S0 S0, b S1 S1, a S1 S1, b S0 S0 b a b
Automaton 1 S0, b S1 b a b S0 S0, a S0 S0, b S1 S1, a S1 An even number of b’s S0, b S1 S0, a S0 S0, b S1 S1, a S1 S1, b S0 S0 b a b
Automaton 1 a b S1 S0, a S0 S0, b S1 S1, a S1 S1, b S0 An even number of b’s S0, a S0 S0, b S1 S1, a S1 S1, b S0 S1 a b
Automaton 1 S1, a S1 a b S1 S0, a S0 S0, b S1 S1, a S1 An even number of b’s S1, a S1 S0, a S0 S0, b S1 S1, a S1 S1, b S0 S1 a b
Automaton 1 b S1 S0, a S0 S0, b S1 S1, a S1 S1, b S0 An even number of b’s S0, a S0 S0, b S1 S1, a S1 S1, b S0 S1 b
Automaton 1 S1, b S0 b S1 S0, a S0 S0, b S1 S1, a S1 An even number of b’s S1, b S0 S0, a S0 S0, b S1 S1, a S1 S1, b S0 S1 b
Automaton 1 S0 S0, a S0 S0, b S1 S1, a S1 S1, b S0 An even number of b’s S0, a S0 S0, b S1 S1, a S1 S1, b S0 S0 The output
Rationale for the molecular design
Rationale for the molecular design CTGGCT GACCGA CGCAGC GCGTCG a b
CTGGCT GACCGA CGCAGC GCGTCG GGCT CAGC a b Rationale for the molecular design CTGGCT GACCGA CGCAGC GCGTCG a b S0, a S0, b GGCT CAGC
CTGGCT GACCGA CGCAGC GCGTCG GGCT CAGC CTGGCT GA CGCAGC CG a b Rationale for the molecular design CTGGCT GACCGA CGCAGC GCGTCG a b S0, a S0, b GGCT CAGC S1, a S1, b CTGGCT GA CGCAGC CG
CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG Rationale for the molecular design Transitions S0, b CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG a b t
CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG Rationale for the molecular design Transitions S0, b CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG a b t S0, b S1
CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG Rationale for the molecular design Transitions S1, a CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG b t S0, b S1
CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG Rationale for the molecular design Transitions S1, a CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG b t S1, a S1
CGCAGCTGTCGC CGACAGCG Rationale for the molecular design S1, b t Transitions S1, b CGCAGCTGTCGC CGACAGCG t S1, a S1
CGCAGCTGTCGC CGACAGCG Rationale for the molecular design S1, b t Transitions S1, b CGCAGCTGTCGC CGACAGCG t S1, b S0
Rationale for the molecular design Transitions S0, t TCGC S1, b S0
Rationale for the molecular design Transitions S0, t TCGC Output: S0
CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG Rationale for the molecular design Transition procedure: a concept S0, b CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG a b t
CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG Rationale for the molecular design Transition procedure: a concept S0, b CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG a b t GTCG 4 nt 8 nt S0, b -> S1
CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG Rationale for the molecular design Transition procedure: a concept GTCG 4 nt 8 nt CAGCCTGGCTCGCAGCTGTCGC GACCGAGCGTCGACAGCG b t S0, b -> S1
CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG Rationale for the molecular design Transition procedure: a concept S1, a CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG b t S0, b -> S1
CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG Rationale for the molecular design Transition procedure: a concept S1, a CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG b t S1, a -> S1
CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG GACC Rationale for the molecular design Transition procedure: a concept S1, a CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG b t GACC 6 nt 10 nt S1, a -> S1
CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG GACC Rationale for the molecular design Transition procedure: a concept GACC 6 nt 10 nt CTGGCTCGCAGCTGTCGC GAGCGTCGACAGCG t S1, a -> S1
CGCAGCTGTCGC CGACAGCG Rationale for the molecular design S1, b t Transition procedure: a concept S1, b CGCAGCTGTCGC CGACAGCG t S1, a -> S1
CGCAGCTGTCGC CGACAGCG GCGT Rationale for the molecular design S1, b t Transition procedure: a concept S1, b CGCAGCTGTCGC CGACAGCG t GCGT 8 nt 12 nt S1, b -> S0
CGCAGCTGTCGC CGACAGCG GCGT Rationale for the molecular design Transition procedure: a concept GCGT 8 nt 12 nt CGCAGCTGTCGC CGACAGCG S1, b -> S0
TCGC Rationale for the molecular design S0, t Output: S0 Transition procedure: a concept S0, t TCGC Output: S0
TCGC AGCG Rationale for the molecular design S0, t Output: S0 In situ detection S0, t Detection molecule for S0 output TCGC AGCG Output: S0
TCGC AGCG Rationale for the molecular design Output: S0 In situ detection TCGC Reporter molecule for S0 output AGCG Output: S0
Inside the transition molecule GTCG 4 nt 8 nt S0,b -> S1
GGATGACGAC CCTACTGCTG GTCG FokI Inside the transition molecule 4 nt GGATGACGAC CCTACTGCTG GTCG 8 nt S0,b -> S1
GGATGACGAC CCTACTGCTG GTCG FokI Inside the transition molecule 9 nt 4 nt GGATGACGAC CCTACTGCTG GTCG 8 nt 13 nt S0,b -> S1
GGATGACGAC CCTACTGCTG GTCG FokI Inside the transition molecule 9 nt GGATGACGAC CCTACTGCTG GTCG 13 nt S0,b -> S1
Inside the transition molecule
Inside the transition molecule GACC 6 nt 10 nt S1,a -> S1
GGATGACG CCTACTGC GACC FokI Inside the transition molecule 9 nt 6 nt GGATGACG CCTACTGC GACC 10 nt 13 nt S1,a -> S1
GGATGACG CCTACTGC GACC FokI Inside the transition molecule 9 nt GGATGACG CCTACTGC GACC 13 nt S1,a -> S1
Inside the transition molecule 8 nt GCGT 12 nt S1,b -> S0
GGATGG CCTACC GCGT FokI Inside the transition molecule S1,b -> S0 9 nt 8 nt GGATGG CCTACC GCGT 12 nt 13 nt S1,b -> S0
GGATGG CCTACC GCGT FokI Inside the transition molecule S1,b -> S0 9 nt GGATGG CCTACC GCGT 13 nt S1,b -> S0
GGATGACGAC CCTACTGCTG GTCG GGATGACG CCTACTGC GACC GGATGG CCTACC GCGT Inside the transition molecule GGATGACGAC CCTACTGCTG S0 -> S1 GTCG S0 -> S0 GGATGACG CCTACTGC GACC S1 -> S1 GGATGG CCTACC S1 -> S0 GCGT
Transition rules
Automata programmes used
Transition molecules
Input and detection molecules
Experiments on programmes A1-A6
Computation over 6-letter long input
Parallel computation
Identification of the components
Inspection of the intermediates
Estimate of system fidelity
Summary 1012 automata run independently and in parallel on potentially distinct inputs in 120 ml at room temperature at combined rate of 109 transitions per second with accuracy greater than 99.8% per transition, consuming less than 10-10 Watt. 12/9/2018