Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology...
-
Upload
solomon-barker -
Category
Documents
-
view
218 -
download
0
description
Transcript of Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology...
![Page 1: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/1.jpg)
Theory of computing, part 4
![Page 2: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/2.jpg)
1 Introduction2 Theoretical background
Biochemistry/molecular biology3 Theoretical background computer science4 History of the field5 Splicing systems6 P systems7 Hairpins
8 Detection techniques
9 Micro technology introduction
10 Microchips and fluidics11 Self assembly12 Regulatory networks13 Molecular motors14 DNA nanowires15 Protein computers16 DNA computing - summery17 Presentation of essay and discussion
Course outline
![Page 3: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/3.jpg)
Turing machines
![Page 4: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/4.jpg)
*aRegular Languages
Context-Free Languages
nnba Rww
nnn cba ww
**ba
The language hierarchy
![Page 5: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/5.jpg)
*aRegular Languages
Context-Free Languages
nnba Rww
nnn cba ww
**ba
Languages accepted byTuring Machines
The language hierarchy
![Page 6: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/6.jpg)
............Tape
Read-Write head
Control Unit
A Turing machine
![Page 7: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/7.jpg)
............
Read-Write head
No boundaries -- infinite length
The head moves Left or Right
The tape
![Page 8: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/8.jpg)
............
Read-Write head
The head at each time step:1. Reads a symbol2. Writes a symbol3. Moves Left or Right
The tape
![Page 9: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/9.jpg)
............
Time 0
............
Time 1
1. Reads
2. Writes
a a cb
a b k c
ak
3. Moves Left
Example
![Page 10: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/10.jpg)
............Time 1
a b k c
............Time 2
a k cf
bf
Example
1. Reads
2. Writes
3. Moves Left
![Page 11: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/11.jpg)
............
Blank symbol
head
a b ca
Head starts at the leftmost position of the input string
Input string
The input string
![Page 12: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/12.jpg)
1q 2qLba ,
Read WriteMove Left
1q 2qRba ,
Move Right
States and transitions
![Page 13: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/13.jpg)
1q 2qRba ,
............ a b caTime 1
1qcurrent state
Example
![Page 14: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/14.jpg)
............ a b caTime 1
1q 2qRba ,
............ a b cbTime 2
1q
2q
Example
![Page 15: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/15.jpg)
............ a b caTime 1
1q 2qLba ,
............ a b cbTime 2
1q
2q
Example
![Page 16: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/16.jpg)
............ a b caTime 1
1q 2qRg,
............ ga b cbTime 2
1q
2q
Example
![Page 17: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/17.jpg)
1q
2qRba ,
Allowed Not Allowed
3qLdb ,
1q
2qRba ,
3qLda ,
Turing Machines are deterministic
Determinism
![Page 18: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/18.jpg)
1q
2qRba ,
3qLdb ,
............ a b ca
1q
No transitionfor input symbol c
Allowed:
Example: partial transition function
![Page 19: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/19.jpg)
The machine halts if there are no possible transitions to follow
Halting
![Page 20: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/20.jpg)
............ a b ca
1q
1q
2qRba ,
3qLdb ,
No possible transition HALT
Example
![Page 21: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/21.jpg)
1q 2q Allowed
1q 2q Not Allowed
Final states have no outgoing transitions
In a final state the machine halts
Final states
![Page 22: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/22.jpg)
Accept InputIf machine halts in a final state
Reject Input
If machine halts in a non-final state or If machine enters an infinite loop
Acceptance
![Page 23: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/23.jpg)
A Turing machine that accepts language a*
0q
Raa ,
L,1q
Turing machine example
![Page 24: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/24.jpg)
aaTime 0
0q
a
0q
Raa ,
L,1q
Turing machine example
![Page 25: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/25.jpg)
aaTime 1
0q
a
0q
Raa ,
L,1q
Turing machine example
![Page 26: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/26.jpg)
aaTime 2
0q
a
0q
Raa ,
L,1q
Turing machine example
![Page 27: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/27.jpg)
aaTime 3
0q
a
0q
Raa ,
L,1q
Turing machine example
![Page 28: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/28.jpg)
aaTime 4
1q
a
0q
Raa ,
L,1q
Halt & Accept
Turing machine example
![Page 29: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/29.jpg)
0q
Raa ,
L,1q
baTime 0
0q
a
Rejection example
![Page 30: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/30.jpg)
0q
Raa ,
L,1q
baTime 1
0q
a
No possible Transition
Halt & Reject
Rejection example
![Page 31: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/31.jpg)
0q
Raa ,
L,1q
Lbb ,
Another Turing machine for language a*
and is this one correct???
Infinite loop example
![Page 32: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/32.jpg)
baTime 0
0q
a
0q
Raa ,
L,1q
Lbb ,
Infinite loop example
![Page 33: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/33.jpg)
baTime 1
0q
a
0q
Raa ,
L,1q
Lbb ,
Infinite loop example
![Page 34: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/34.jpg)
baTime 2
0q
a
0q
Raa ,
L,1q
Lbb ,
Infinite loop example
![Page 35: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/35.jpg)
baTime 2
0q
a
baTime 3
0q
a
baTime 4
0q
a
baTime 5
0q
a
... Infinite Loop
Infinite loop example
![Page 36: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/36.jpg)
Because of the infinite loop:
The final state cannot be reached
The machine never halts
The input is not accepted
Infinite loop example
![Page 37: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/37.jpg)
Turing machine for the language }{ nnba
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
Another Turing machine example
![Page 38: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/38.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
ba
0q
a bTime 0
Another Turing machine example
![Page 39: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/39.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
bx
1q
a b Time 1
Another Turing machine example
![Page 40: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/40.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
bx
1q
a b Time 2
Another Turing machine example
![Page 41: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/41.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx
2q
a b Time 3
Another Turing machine example
![Page 42: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/42.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx
2q
a b Time 4
Another Turing machine example
![Page 43: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/43.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx
0q
a b Time 5
Another Turing machine example
![Page 44: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/44.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx
1q
x b Time 6
Another Turing machine example
![Page 45: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/45.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx
1q
x b Time 7
Another Turing machine example
![Page 46: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/46.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx x y
2q
Time 8
Another Turing machine example
![Page 47: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/47.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx x y
2q
Time 9
Another Turing machine example
![Page 48: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/48.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx
0q
x y Time 10
Another Turing machine example
![Page 49: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/49.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx
3q
x y Time 11
Another Turing machine example
![Page 50: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/50.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx
3q
x y Time 12
Another Turing machine example
![Page 51: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/51.jpg)
0q 1q 2q3qRxa ,
Raa ,Ryy ,
Lyb ,
Laa ,Lyy ,
Rxx ,
Ryy ,
Ryy ,4q
L,
yx
4q
x y
Halt & Accept
Time 13
Another Turing machine example
![Page 52: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/52.jpg)
If we modify the machine for the language
}{ nnba
we can easily construct a machine for the language
}{ nnn cba
Observation
![Page 53: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/53.jpg)
Formal definitions
![Page 54: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/54.jpg)
1q 2qRba ,
),,(),( 21 Rbqaq
Transition function
![Page 55: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/55.jpg)
1q 2qLdc ,
),,(),( 21 Ldqcq
Transition function
![Page 56: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/56.jpg)
),,,,,,( 0 FqQM
States
Input alphabet Tape alphabet
Transition function
Initial state blank
Final states
Turing machine
![Page 57: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/57.jpg)
ba
1q
a
Instantaneous description:
c
baqca 1
Configuration
![Page 58: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/58.jpg)
yx
2q
a bTime 4
yx
0q
a bTime 5
A Move: aybqxxaybq 02
Configuration
![Page 59: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/59.jpg)
yx
2q
a bTime 4
yx
0q
a bTime 5
bqxxyybqxxaybqxxaybq 1102
yx
1q
x bTime 6
yx
1q
x bTime 7
Configuration
![Page 60: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/60.jpg)
bqxxyybqxxaybqxxaybq 1102
bqxxyxaybq 12Equivalent notation:
Configuration
![Page 61: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/61.jpg)
wq0
ba
0q
a b
wInput string
Initial configuration
![Page 62: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/62.jpg)
For any Turing Machine M
}:{)( 210 xqxwqwML f
Initial state Final state
The accepted language
![Page 63: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/63.jpg)
Deterministic
Infinite tape in both directions
Tape is the input/output file
The machine we described is the standard
Standard Turing machine
![Page 64: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/64.jpg)
Computing functions
![Page 65: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/65.jpg)
A function )(wf
Domain: Result Region:
has:
D
Dw
S
Swf )()(wf
Functions
![Page 66: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/66.jpg)
A function may have many parameters
yxyxf ),(
Example:
Addition function
Functions
![Page 67: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/67.jpg)
Unary:
Binary:
Decimal:
11111
101
5
We prefer unary representation:
easier to manipulate with Turing machines
Integer domain
![Page 68: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/68.jpg)
A function is computable ifthere is a Turing Machine such that:
fM
Initial configuration Final configuration
Dw Domain
0q
w
fq
)(wf
final stateinitial state
For all
Functions definition
![Page 69: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/69.jpg)
)(0 wfqwq f
Initial Configuration
FinalConfiguration
Functions definition
A function is computable ifthere is a Turing Machine such that:
fM
Dw DomainFor all
![Page 70: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/70.jpg)
The function yxyxf ),( is computable
Turing Machine:
Input string: yx0 unary
Output string: 0xy unary
yx, are integers
Example
![Page 71: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/71.jpg)
0
0q
1 1 1 1
x y
1Start
initial state
The 0 is the delimiter that separates the two numbers
Example
![Page 72: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/72.jpg)
0
0q
1 1 1 1
x y
1
0
fq
1 1
yx
11
Start
Finish
final state
initial state
Example
![Page 73: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/73.jpg)
0
fq
1 1
yx
11Finish
The 0 helps when we use the result for other operations
Example
final state
![Page 74: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/74.jpg)
0q
Turing machine for function
1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
yxyxf ),(
Turing machine example
![Page 75: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/75.jpg)
Execution Example:
11x
11y 0
0q
1 1 1 1
Time 0
x y
Final Result
0
4q
1 1 1 1yx
(2)
(2)
Turing machine example
![Page 76: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/76.jpg)
0
0q
1 1
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
1 1Time 0
Turing machine example
![Page 77: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/77.jpg)
0q
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
01 11 1Time 1
Turing machine example
![Page 78: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/78.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
0
0q
1 1 1 1Time 2
Turing machine example
![Page 79: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/79.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
1q
1 11 11Time 3
Turing machine example
![Page 80: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/80.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
1q
1 1 1 11Time 4
Turing machine example
![Page 81: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/81.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
1q
1 11 11Time 5
Turing machine example
![Page 82: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/82.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
2q
1 1 1 11Time 6
Turing machine example
![Page 83: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/83.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
3q
1 11 01Time 7
Turing machine example
![Page 84: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/84.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
3q
1 1 1 01Time 8
Turing machine example
![Page 85: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/85.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
3q
1 11 01Time 9
Turing machine example
![Page 86: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/86.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
3q
1 1 1 01Time 10
Turing machine example
![Page 87: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/87.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
3q
1 11 01Time 11
Turing machine example
![Page 88: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/88.jpg)
0q 1q 2q 3qL, L,01
L,11
R,
R,10
R,11
4q
R,11
4q
1 1 1 01
HALT & accept
Time 12
Turing machine example
![Page 89: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/89.jpg)
The function xxf 2)( is computable
Turing Machine:
Input string: x unary
Output string: xx unary
x is integer
Another example
![Page 90: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/90.jpg)
0q
1 1
x
1
1
fq
1 1
x2
11
Another example
Start
Finish
final state
initial state
![Page 91: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/91.jpg)
Turing Machine Pseudocode for xxf 2)( Replace every 1 with $
Repeat:
Find rightmost $, replace it with 1
Go to right end, insert 1
Until no more $ remain
Pseudocode
![Page 92: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/92.jpg)
0q 1q 2q
3q
R,1$
L,1
L,
R$,1 L,11 R,11
R,
Turing Machine for xxf 2)(
Example
![Page 93: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/93.jpg)
0q 1q 2q
3q
R,1$
L,1
L,
R$,1 L,11 R,11
R,
0q
1 1
3q
1 11 1
Start Finish
Example
![Page 94: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/94.jpg)
The function
),( yxf
is computable
0
1 yx
yx
if
if
Another example
![Page 95: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/95.jpg)
Turing Machine for
Input: yx0
Output: 1 0or
),( yxf0
1 yx
yx
if
if
Another example
![Page 96: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/96.jpg)
Match a 1 from with a 1 from x yRepeat
Until all of or is matchedx y
If a 1 from is not matched erase tape, write 1 else erase tape, write 0
x)( yx
)( yx
Pseudocode
![Page 97: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/97.jpg)
Combining Turing machines
![Page 98: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/98.jpg)
Block Diagram
Turing Machineinput output
Combining Turing machines
![Page 99: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/99.jpg)
),( yxf0
yx yx
yx
if
if
Comparer
Adder
Eraser
yx,
yx,
yx
yx
yx
0
Example
![Page 100: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/100.jpg)
Turing’s thesis
![Page 101: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/101.jpg)
Do Turing machines have the same power with a digital computer?
Intuitive answer: Yes
There is no formal answer!!!
Question:
Turing’s thesis
![Page 102: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/102.jpg)
Any computation carried out by mechanical means can be performed by a Turing Machine
(1930)
Turing’s thesis
![Page 103: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/103.jpg)
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
![Page 104: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/104.jpg)
An algorithm for functionis a Turing Machine which computes
)(wf
Definition of an algorithm
)(wf
![Page 105: Theory of computing, part 4. 1Introduction 2Theoretical background Biochemistry/molecular biology 3Theoretical background computer science 4History of.](https://reader036.fdocuments.us/reader036/viewer/2022062504/5a4d1b197f8b9ab0599929dd/html5/thumbnails/105.jpg)
When we say:
There exists an algorithm
We mean:
There exists a Turing Machinethat executes the algorithm
Algorithms are Turing machines