Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
prob-teaching-notebooks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
prob-teaching-notebooks
Commits
18af9653
Commit
18af9653
authored
4 years ago
by
Michael Leuschel
Browse files
Options
Downloads
Patches
Plain Diff
add Notebook for Turing machine for addition
parent
bb7681bb
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
info4/kapitel-5/TuringMaschine.ipynb
+20
-20
20 additions, 20 deletions
info4/kapitel-5/TuringMaschine.ipynb
info4/kapitel-7/TuringMaschineBerechenbarkeit.ipynb
+1389
-0
1389 additions, 0 deletions
info4/kapitel-7/TuringMaschineBerechenbarkeit.ipynb
with
1409 additions
and
20 deletions
info4/kapitel-5/TuringMaschine.ipynb
+
20
−
20
View file @
18af9653
...
...
@@ -47,34 +47,34 @@
" δ : (States * Alphabet) <-> (States * Alphabet * Direction) &\n",
"\n",
" δ = { /* Neuer Zyklus */\n",
" (z0,a)
|->
(z1,X,R),\n",
" (z0,X)
|->
(z0,X,R),\n",
" (z0,a)
↦
(z1,X,R),\n",
" (z0,X)
↦
(z0,X,R),\n",
" \n",
" /* ein a getilgt (X), nächstes b suchen */\n",
" (z1,a)
|->
(z1,a,R),\n",
" (z1,b)
|->
(z2,X,R),\n",
" (z1,X)
|->
(z1,X,R),\n",
" (z1,a)
↦
(z1,a,R),\n",
" (z1,b)
↦
(z2,X,R),\n",
" (z1,X)
↦
(z1,X,R),\n",
" \n",
" /* ein a,b getilgt (X), nächstes c suchen */\n",
" (z2,b)
|->
(z2,b,R),\n",
" (z2,c)
|->
(z3,X,R),\n",
" (z2,X)
|->
(z2,X,R),\n",
" (z2,b)
↦
(z2,b,R),\n",
" (z2,c)
↦
(z3,X,R),\n",
" (z2,X)
↦
(z2,X,R),\n",
" \n",
" /* ein a,b,c getilgt (X), rechten Rand suchen */\n",
" (z3,c)
|->
(z3,c,R),\n",
" (z3,Blank)
|->
(z4,Blank,L),\n",
" (z3,c)
↦
(z3,c,R),\n",
" (z3,Blank)
↦
(z4,Blank,L),\n",
" \n",
" /* Zurücklaufen und testen ob alle a,b,c getilgt */\n",
" (z4,X)
|->
(z4,X,L),\n",
" (z4,Blank)
|->
(z6,Blank,R), /* Erfolg ! */\n",
" (z4,c)
|->
(z5,c,L), \n",
" (z4,X)
↦
(z4,X,L),\n",
" (z4,Blank)
↦
(z6,Blank,R), /* Erfolg ! */\n",
" (z4,c)
↦
(z5,c,L), \n",
" \n",
" /* Test nicht erfolgreich; zum linken Rand zurücklaufen und neuer Zyklus */\n",
" (z5,X)
|->
(z5,X,L),\n",
" (z5,Blank)
|->
(z0,Blank,R),\n",
" (z5,a)
|->
(z5,a,L),\n",
" (z5,b)
|->
(z5,b,L),\n",
" (z5,c)
|->
(z5,c,L)\n",
" (z5,X)
↦
(z5,X,L),\n",
" (z5,Blank)
↦
(z0,Blank,R),\n",
" (z5,a)
↦
(z5,a,L),\n",
" (z5,b)
↦
(z5,b,L),\n",
" (z5,c)
↦
(z5,c,L)\n",
" } &\n",
" Final = {z6}\n",
"VARIABLES Left,cur,Right\n",
...
...
@@ -86,9 +86,9 @@
" Accept = PRE cur : Final THEN skip END;\n",
" GoTo(z,S,znew,NewSymbol,Dir) =\n",
" PRE z=cur & S=CurSymbol &\n",
" (z, S)
|->
(znew,NewSymbol,Dir) : δ THEN\n",
" (z, S)
↦
(znew,NewSymbol,Dir) : δ THEN\n",
" ANY tail_Right \n",
" WHERE (Right=[]
=>
tail_Right=[]) & (Right/=[]
=>
tail_Right = tail(Right)) THEN\n",
" WHERE (Right=[]
⇒
tail_Right=[]) & (Right/=[]
⇒
tail_Right = tail(Right)) THEN\n",
" cur := znew ||\n",
" IF Dir = N THEN\n",
" Right := NewSymbol -> tail_Right\n",
...
...
%% Cell type:markdown id: tags:
## Turing Maschine
%% Cell type:code id: tags:
```
prob
::load
MACHINE TuringMachine_2
/* B Modell einer 1-band Turing Maschine */
/* by Michael Leuschel, 2012 */
/* Akzeptiert die Sprache a^n b^n c^n (siehe Folien 14ff von folien-kapitel-5 */
SETS
Alphabet={a,b,c,X,Blank};
States = {z0,z1,z2,z3,z4,z5,z6};
Direction = {L,R,N}
DEFINITIONS
Σ == {a,b,c};
Γ == Σ \/ {X};
CurSymbol == (Right<-Blank)(1);
ANIMATION_FUNCTION_DEFAULT == {(1,0,cur)};
/* ANIMATION_FUNCTION__xx == {(1,1,Left), (1,3,Right)}; */
ANIMATION_FUNCTION1 == {1} *( (%i.(i:-size(Left)..-1|i+size(Left)+1) ; Left) \/ Right)
CONSTANTS Final, δ
PROPERTIES
Final <: States &
δ : (States * Alphabet) <-> (States * Alphabet * Direction) &
δ = { /* Neuer Zyklus */
(z0,a)
|->
(z1,X,R),
(z0,X)
|->
(z0,X,R),
(z0,a)
↦
(z1,X,R),
(z0,X)
↦
(z0,X,R),
/* ein a getilgt (X), nächstes b suchen */
(z1,a)
|->
(z1,a,R),
(z1,b)
|->
(z2,X,R),
(z1,X)
|->
(z1,X,R),
(z1,a)
↦
(z1,a,R),
(z1,b)
↦
(z2,X,R),
(z1,X)
↦
(z1,X,R),
/* ein a,b getilgt (X), nächstes c suchen */
(z2,b)
|->
(z2,b,R),
(z2,c)
|->
(z3,X,R),
(z2,X)
|->
(z2,X,R),
(z2,b)
↦
(z2,b,R),
(z2,c)
↦
(z3,X,R),
(z2,X)
↦
(z2,X,R),
/* ein a,b,c getilgt (X), rechten Rand suchen */
(z3,c)
|->
(z3,c,R),
(z3,Blank)
|->
(z4,Blank,L),
(z3,c)
↦
(z3,c,R),
(z3,Blank)
↦
(z4,Blank,L),
/* Zurücklaufen und testen ob alle a,b,c getilgt */
(z4,X)
|->
(z4,X,L),
(z4,Blank)
|->
(z6,Blank,R), /* Erfolg ! */
(z4,c)
|->
(z5,c,L),
(z4,X)
↦
(z4,X,L),
(z4,Blank)
↦
(z6,Blank,R), /* Erfolg ! */
(z4,c)
↦
(z5,c,L),
/* Test nicht erfolgreich; zum linken Rand zurücklaufen und neuer Zyklus */
(z5,X)
|->
(z5,X,L),
(z5,Blank)
|->
(z0,Blank,R),
(z5,a)
|->
(z5,a,L),
(z5,b)
|->
(z5,b,L),
(z5,c)
|->
(z5,c,L)
(z5,X)
↦
(z5,X,L),
(z5,Blank)
↦
(z0,Blank,R),
(z5,a)
↦
(z5,a,L),
(z5,b)
↦
(z5,b,L),
(z5,c)
↦
(z5,c,L)
} &
Final = {z6}
VARIABLES Left,cur,Right
INVARIANT
cur : States &
Left : seq(Alphabet) & Right : seq(Alphabet)
INITIALISATION Left,cur,Right := [],z0,[a,a,b,b,c,c]
OPERATIONS
Accept = PRE cur : Final THEN skip END;
GoTo(z,S,znew,NewSymbol,Dir) =
PRE z=cur & S=CurSymbol &
(z, S)
|->
(znew,NewSymbol,Dir) : δ THEN
(z, S)
↦
(znew,NewSymbol,Dir) : δ THEN
ANY tail_Right
WHERE (Right=[]
=>
tail_Right=[]) & (Right/=[]
=>
tail_Right = tail(Right)) THEN
WHERE (Right=[]
⇒
tail_Right=[]) & (Right/=[]
⇒
tail_Right = tail(Right)) THEN
cur := znew ||
IF Dir = N THEN
Right := NewSymbol -> tail_Right
ELSIF Dir = R THEN
Left,Right := Left <- NewSymbol, tail_Right
ELSIF Left=[] THEN
Left,Right := [], Blank -> (NewSymbol -> tail_Right)
ELSE
Left,Right := front(Left), last(Left) -> (NewSymbol -> tail_Right)
END
END
END
END
```
%% Output
Loaded machine: TuringMachine_2
%% Cell type:code id: tags:
```
prob
:constants
```
%% Output
Machine constants set up using operation 0: $setup_constants()
%% Cell type:code id: tags:
```
prob
:init
```
%% Output
Machine initialised using operation 1: $initialise_machine()
%% Cell type:code id: tags:
```
prob
δ
```
%% Output
$\{(\mathit{z0}\mapsto \mathit{a}\mapsto(\mathit{z1}\mapsto \mathit{X}\mapsto \mathit{R})),(\mathit{z0}\mapsto \mathit{X}\mapsto(\mathit{z0}\mapsto \mathit{X}\mapsto \mathit{R})),(\mathit{z1}\mapsto \mathit{a}\mapsto(\mathit{z1}\mapsto \mathit{a}\mapsto \mathit{R})),(\mathit{z1}\mapsto \mathit{b}\mapsto(\mathit{z2}\mapsto \mathit{X}\mapsto \mathit{R})),(\mathit{z1}\mapsto \mathit{X}\mapsto(\mathit{z1}\mapsto \mathit{X}\mapsto \mathit{R})),(\mathit{z2}\mapsto \mathit{b}\mapsto(\mathit{z2}\mapsto \mathit{b}\mapsto \mathit{R})),(\mathit{z2}\mapsto \mathit{c}\mapsto(\mathit{z3}\mapsto \mathit{X}\mapsto \mathit{R})),(\mathit{z2}\mapsto \mathit{X}\mapsto(\mathit{z2}\mapsto \mathit{X}\mapsto \mathit{R})),(\mathit{z3}\mapsto \mathit{c}\mapsto(\mathit{z3}\mapsto \mathit{c}\mapsto \mathit{R})),(\mathit{z3}\mapsto \mathit{Blank}\mapsto(\mathit{z4}\mapsto \mathit{Blank}\mapsto \mathit{L})),(\mathit{z4}\mapsto \mathit{c}\mapsto(\mathit{z5}\mapsto \mathit{c}\mapsto \mathit{L})),(\mathit{z4}\mapsto \mathit{X}\mapsto(\mathit{z4}\mapsto \mathit{X}\mapsto \mathit{L})),(\mathit{z4}\mapsto \mathit{Blank}\mapsto(\mathit{z6}\mapsto \mathit{Blank}\mapsto \mathit{R})),(\mathit{z5}\mapsto \mathit{a}\mapsto(\mathit{z5}\mapsto \mathit{a}\mapsto \mathit{L})),(\mathit{z5}\mapsto \mathit{b}\mapsto(\mathit{z5}\mapsto \mathit{b}\mapsto \mathit{L})),(\mathit{z5}\mapsto \mathit{c}\mapsto(\mathit{z5}\mapsto \mathit{c}\mapsto \mathit{L})),(\mathit{z5}\mapsto \mathit{X}\mapsto(\mathit{z5}\mapsto \mathit{X}\mapsto \mathit{L})),(\mathit{z5}\mapsto \mathit{Blank}\mapsto(\mathit{z0}\mapsto \mathit{Blank}\mapsto \mathit{R}))\}$
{(z0↦a↦(z1↦X↦R)),(z0↦X↦(z0↦X↦R)),(z1↦a↦(z1↦a↦R)),(z1↦b↦(z2↦X↦R)),(z1↦X↦(z1↦X↦R)),(z2↦b↦(z2↦b↦R)),(z2↦c↦(z3↦X↦R)),(z2↦X↦(z2↦X↦R)),(z3↦c↦(z3↦c↦R)),(z3↦Blank↦(z4↦Blank↦L)),(z4↦c↦(z5↦c↦L)),(z4↦X↦(z4↦X↦L)),(z4↦Blank↦(z6↦Blank↦R)),(z5↦a↦(z5↦a↦L)),(z5↦b↦(z5↦b↦L)),(z5↦c↦(z5↦c↦L)),(z5↦X↦(z5↦X↦L)),(z5↦Blank↦(z0↦Blank↦R))}
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">z0</td>
<td style="padding:10px">a</td>
<td style="padding:10px">a</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:10px">c</td>
<td style="padding:10px">c</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:browse
```
%% Output
Machine: TuringMachine_2
Sets: Alphabet, States, Direction
Constants: Final, δ
Variables: Left, cur, Right
Operations:
GoTo(z0,a,z1,X,R)
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z0,a,z1,X,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">z1</td>
<td style="padding:10px">a</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:10px">c</td>
<td style="padding:10px">c</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z1,a,z1,a,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">z1</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:10px">c</td>
<td style="padding:10px">c</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z1,b,z2,X,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z2</td>
<td style="padding:10px">b</td>
<td style="padding:10px">c</td>
<td style="padding:10px">c</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z2,b,z2,b,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">z2</td>
<td style="padding:10px">c</td>
<td style="padding:10px">c</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z2,c,z3,X,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z3</td>
<td style="padding:10px">c</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z3,c,z3,c,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">z3</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z3,Blank,z4,Blank,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z4</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z4,c,z5,c,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">z5</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z5,X,z5,X,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z5</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z5,b,z5,b,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">z5</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z5,X,z5,X,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">X</td>
<td style="padding:10px">z5</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z5,a,z5,a,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">z5</td>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z5,X,z5,X,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">z5</td>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z5,Blank,z0,Blank,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">z0</td>
<td style="padding:10px">X</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z0,X,z0,X,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z0</td>
<td style="padding:10px">a</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z0,a,z1,X,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z1</td>
<td style="padding:10px">X</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z1,X,z1,X,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z1</td>
<td style="padding:10px">b</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z1,b,z2,X,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z2</td>
<td style="padding:10px">X</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z2,X,z2,X,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z2</td>
<td style="padding:10px">c</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z2,c,z3,X,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z3</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z3,Blank,z4,Blank,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z4</td>
<td style="padding:10px">X</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z4,X,z4,X,L)
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z4,X,z4,X,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z4</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z4,X,z4,X,L)
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z4,X,z4,X,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">z4</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z4,X,z4,X,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">z4</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z4,X,z4,X,L)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">z4</td>
<td style="padding:10px">Blank</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:exec GoTo
```
%% Output
Executed operation: GoTo(z4,Blank,z6,Blank,R)
%% Cell type:code id: tags:
```
prob
:show
```
%% Output
<table style="font-family:monospace"><tbody>
<tr>
<td style="padding:10px">Blank</td>
<td style="padding:10px">z6</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">X</td>
<td style="padding:10px">Blank</td>
</tr>
</tbody></table>
<Animation function visualisation>
%% Cell type:code id: tags:
```
prob
:browse
```
%% Output
Machine: TuringMachine_2
Sets: Alphabet, States, Direction
Constants: Final, δ
Variables: Left, cur, Right
Operations:
Accept()
%% Cell type:code id: tags:
```
prob
:exec Accept
```
%% Output
Executed operation: Accept()
%% Cell type:code id: tags:
```
prob
```
...
...
This diff is collapsed.
Click to expand it.
info4/kapitel-7/TuringMaschineBerechenbarkeit.ipynb
0 → 100644
+
1389
−
0
View file @
18af9653
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment