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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
prob-teaching-notebooks
Commits
4b4cd44b
Commit
4b4cd44b
authored
5 years ago
by
Michael Leuschel
Browse files
Options
Downloads
Patches
Plain Diff
replace DEFINITIONS by constants
parent
dfa653d7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
info4/kapitel-3/PDA-Kellerautomaten.ipynb
+13
-11
13 additions, 11 deletions
info4/kapitel-3/PDA-Kellerautomaten.ipynb
with
13 additions
and
11 deletions
info4/kapitel-3/PDA-Kellerautomaten.ipynb
+
13
−
11
View file @
4b4cd44b
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
59
,
"execution_count":
1
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
"Loaded machine: PDA"
"Loaded machine: PDA"
]
]
},
},
"execution_count":
59
,
"execution_count":
1
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -53,16 +53,18 @@
...
@@ -53,16 +53,18 @@
" Z = {z0,z1}; // die Zustände des Automaten, z0 ist der Startzustand\n",
" Z = {z0,z1}; // die Zustände des Automaten, z0 ist der Startzustand\n",
" SYMBOLE={a,b, A, BOT, lambda} /* BOT = # = Bottom-Symbol im Keller*/\n",
" SYMBOLE={a,b, A, BOT, lambda} /* BOT = # = Bottom-Symbol im Keller*/\n",
"DEFINITIONS\n",
"DEFINITIONS\n",
" Σ == {a,b}; // das Eingabe-Alphabet\n",
" Γ == {A,BOT}; // das Kelleralphabet\n",
" \n",
" \n",
" ANIMATION_FUNCTION_DEFAULT == {(1,1,z)};\n",
" ANIMATION_FUNCTION_DEFAULT == {(1,1,z)};\n",
" ANIMATION_FUNCTION == {2}*α ∪ {3}*(γ);\n",
" ANIMATION_FUNCTION == {2}*α ∪ {3}*(γ);\n",
" ANIMATION_FUNCTION1 == {(1,0,\"z: \"),(2,0,\"α:\"),(3,0,\"γ:\")};\n",
" ANIMATION_FUNCTION1 == {(1,0,\"z: \"),(2,0,\"α:\"),(3,0,\"γ:\")};\n",
" ANIMATION_STR_JUSTIFY_LEFTx == TRUE;\n",
" ANIMATION_STR_JUSTIFY_LEFTx == TRUE;\n",
" SET_PREF_PP_SEQUENCES == TRUE\n",
" SET_PREF_PP_SEQUENCES == TRUE\n",
"CONSTANTS δ\n",
"CONSTANTS δ
, Σ, Γ
\n",
"PROPERTIES\n",
"PROPERTIES\n",
" Σ = {a,b} // das Eingabe-Alphabet\n",
" ∧\n",
" Γ = {A,BOT} // das Kelleralphabet\n",
" ∧\n",
" /* Der PDA für {a^m b^m| m>=1} ; Beispiel von Info 4 (Folie 95ff) */\n",
" /* Der PDA für {a^m b^m| m>=1} ; Beispiel von Info 4 (Folie 95ff) */\n",
" δ = { (z0,a,BOT) ↦ (z0,[A,BOT]),\n",
" δ = { (z0,a,BOT) ↦ (z0,[A,BOT]),\n",
" (z0,a,A) ↦ (z0,[A,A]),\n",
" (z0,a,A) ↦ (z0,[A,A]),\n",
...
@@ -104,7 +106,7 @@
...
@@ -104,7 +106,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
60
,
"execution_count":
2
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -113,7 +115,7 @@
...
@@ -113,7 +115,7 @@
"Machine constants set up using operation 0: $setup_constants()"
"Machine constants set up using operation 0: $setup_constants()"
]
]
},
},
"execution_count":
60
,
"execution_count":
2
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -124,7 +126,7 @@
...
@@ -124,7 +126,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
61
,
"execution_count":
3
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -133,7 +135,7 @@
...
@@ -133,7 +135,7 @@
"Machine initialised using operation 1: $initialise_machine()"
"Machine initialised using operation 1: $initialise_machine()"
]
]
},
},
"execution_count":
61
,
"execution_count":
3
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -144,7 +146,7 @@
...
@@ -144,7 +146,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
62
,
"execution_count":
4
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -178,7 +180,7 @@
...
@@ -178,7 +180,7 @@
"<Animation function visualisation>"
"<Animation function visualisation>"
]
]
},
},
"execution_count":
62
,
"execution_count":
4
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
...
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# PDA (Push Down Automata - Kellerautomaten)
# PDA (Push Down Automata - Kellerautomaten)
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
Ein __(nichtdeterministischer) Kellerautomat__
Ein __(nichtdeterministischer) Kellerautomat__
(kurz PDA für __push-down automaton__) ist ein $6$-Tupel
(kurz PDA für __push-down automaton__) ist ein $6$-Tupel
$M = (
\S
igma,
\G
amma, Z,
\d
elta , z_0,
\#
)$, wobei
$M = (
\S
igma,
\G
amma, Z,
\d
elta , z_0,
\#
)$, wobei
*
$
\S
igma$ das Eingabe-Alphabet ist,
*
$
\S
igma$ das Eingabe-Alphabet ist,
*
$
\G
amma$ das Kelleralphabet,
*
$
\G
amma$ das Kelleralphabet,
*
$Z$ eine endliche Menge von Zuständen,
*
$Z$ eine endliche Menge von Zuständen,
*
$
\d
elta : Z
\t
imes (
\S
igma
\c
up
\{\l
ambda
\}
)
\t
imes
\G
amma
*
$
\d
elta : Z
\t
imes (
\S
igma
\c
up
\{\l
ambda
\}
)
\t
imes
\G
amma
\r
ightarrow
\m
athfrak{P}_e(Z
\t
imes
\G
amma^{
\a
st})$ die
\r
ightarrow
\m
athfrak{P}_e(Z
\t
imes
\G
amma^{
\a
st})$ die
Überführungsfunktion,
Überführungsfunktion,
*
$z_0
\i
n Z$ der Startzustand,
*
$z_0
\i
n Z$ der Startzustand,
*
$
\#
\i
n
\G
amma$ das Bottom-Symbol im Keller.
*
$
\#
\i
n
\G
amma$ das Bottom-Symbol im Keller.
Anmerkung: $
\m
athfrak{P}_e(Z
\t
imes
\G
amma^{
\a
st})$ ist die Menge aller
Anmerkung: $
\m
athfrak{P}_e(Z
\t
imes
\G
amma^{
\a
st})$ ist die Menge aller
__endlichen__ Teilmengen von $Z
\t
imes
\G
amma^{
\a
st}$.
__endlichen__ Teilmengen von $Z
\t
imes
\G
amma^{
\a
st}$.
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
::load
::load
MACHINE PDA
MACHINE PDA
/* B Modell eines PDA */
/* B Modell eines PDA */
SETS
SETS
Z = {z0,z1}; // die Zustände des Automaten, z0 ist der Startzustand
Z = {z0,z1}; // die Zustände des Automaten, z0 ist der Startzustand
SYMBOLE={a,b, A, BOT, lambda} /* BOT = # = Bottom-Symbol im Keller*/
SYMBOLE={a,b, A, BOT, lambda} /* BOT = # = Bottom-Symbol im Keller*/
DEFINITIONS
DEFINITIONS
Σ == {a,b}; // das Eingabe-Alphabet
Γ == {A,BOT}; // das Kelleralphabet
ANIMATION_FUNCTION_DEFAULT == {(1,1,z)};
ANIMATION_FUNCTION_DEFAULT == {(1,1,z)};
ANIMATION_FUNCTION == {2}*α ∪ {3}*(γ);
ANIMATION_FUNCTION == {2}*α ∪ {3}*(γ);
ANIMATION_FUNCTION1 == {(1,0,"z: "),(2,0,"α:"),(3,0,"γ:")};
ANIMATION_FUNCTION1 == {(1,0,"z: "),(2,0,"α:"),(3,0,"γ:")};
ANIMATION_STR_JUSTIFY_LEFTx == TRUE;
ANIMATION_STR_JUSTIFY_LEFTx == TRUE;
SET_PREF_PP_SEQUENCES == TRUE
SET_PREF_PP_SEQUENCES == TRUE
CONSTANTS δ
CONSTANTS δ
, Σ, Γ
PROPERTIES
PROPERTIES
Σ = {a,b} // das Eingabe-Alphabet
∧
Γ = {A,BOT} // das Kelleralphabet
∧
/* Der PDA für {a^m b^m| m>=1} ; Beispiel von Info 4 (Folie 95ff) */
/* Der PDA für {a^m b^m| m>=1} ; Beispiel von Info 4 (Folie 95ff) */
δ = { (z0,a,BOT) ↦ (z0,[A,BOT]),
δ = { (z0,a,BOT) ↦ (z0,[A,BOT]),
(z0,a,A) ↦ (z0,[A,A]),
(z0,a,A) ↦ (z0,[A,A]),
(z0,b,A) ↦ (z1,[]),
(z0,b,A) ↦ (z1,[]),
(z1,lambda,BOT) ↦ (z1,[]),
(z1,lambda,BOT) ↦ (z1,[]),
(z1,b,A) ↦ (z1,[]) }
(z1,b,A) ↦ (z1,[]) }
// Anmerkung: δ ist hier als Relation anstatt als Funktion zu Mengen definiert
// Anmerkung: δ ist hier als Relation anstatt als Funktion zu Mengen definiert
// Deshalb entspricht δ[{(z,a,g)}] in der B Maschine δ(z,a,g) aus dem Skript
// Deshalb entspricht δ[{(z,a,g)}] in der B Maschine δ(z,a,g) aus dem Skript
VARIABLES
VARIABLES
z, α, γ // Konfiguration in dem sich der PDA befindet
z, α, γ // Konfiguration in dem sich der PDA befindet
INVARIANT
INVARIANT
z ∈ Z ∧ // der aktuelle Zustand
z ∈ Z ∧ // der aktuelle Zustand
α ∈ seq(Σ) ∧ // der noch zu lesende Teil des Eingabeworts
α ∈ seq(Σ) ∧ // der noch zu lesende Teil des Eingabeworts
γ ∈ seq(Γ) // aktuelle Kellerinhalt
γ ∈ seq(Γ) // aktuelle Kellerinhalt
INITIALISATION
INITIALISATION
z := z0 ||
z := z0 ||
γ := [BOT] || // Initialisierung des Stapels
γ := [BOT] || // Initialisierung des Stapels
α := [a,a,b,b] // das Eingabewort
α := [a,a,b,b] // das Eingabewort
OPERATIONS
OPERATIONS
// die Operationen Schritt und LambdaSchritt modellieren
// die Operationen Schritt und LambdaSchritt modellieren
// Schritte in der Ableitungsrelation
// Schritte in der Ableitungsrelation
Schritt(z‘,s) = PRE α ≠ ∅ ∧ γ ≠ ∅ ∧
Schritt(z‘,s) = PRE α ≠ ∅ ∧ γ ≠ ∅ ∧
z‘↦s ∈ δ[{(z,first(α),first(γ))}] THEN
z‘↦s ∈ δ[{(z,first(α),first(γ))}] THEN
z := z‘ || // in den neuen Zustand wechseln
z := z‘ || // in den neuen Zustand wechseln
α := tail(α) || // das erste Symbol auf der Eingabe löschen
α := tail(α) || // das erste Symbol auf der Eingabe löschen
γ := s^tail(γ) // s auf den Stapel packen
γ := s^tail(γ) // s auf den Stapel packen
END;
END;
LambdaSchritt(z‘,s) = PRE γ ≠ ∅ ∧
LambdaSchritt(z‘,s) = PRE γ ≠ ∅ ∧
z‘↦s ∈ δ[{(z,lambda,first(γ))}] THEN
z‘↦s ∈ δ[{(z,lambda,first(γ))}] THEN
z := z‘ || // in den neuen Zustand wechseln
z := z‘ || // in den neuen Zustand wechseln
γ := s^tail(γ) // s auf den Stapel packen
γ := s^tail(γ) // s auf den Stapel packen
END;
END;
Akzeptieren = PRE γ = ∅ ∧ α = ∅ THEN
Akzeptieren = PRE γ = ∅ ∧ α = ∅ THEN
/* Wir akzeptieren wenn Eingabe und Stapel leer sind */
/* Wir akzeptieren wenn Eingabe und Stapel leer sind */
skip END
skip END
END
END
```
```
%% Output
%% Output
Loaded machine: PDA
Loaded machine: PDA
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:constants
:constants
```
```
%% Output
%% Output
Machine constants set up using operation 0: $setup_constants()
Machine constants set up using operation 0: $setup_constants()
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:init
:init
```
```
%% Output
%% Output
Machine initialised using operation 1: $initialise_machine()
Machine initialised using operation 1: $initialise_machine()
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:10px">a</td>
<td style="padding:10px">a</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">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">BOT</td>
<td style="padding:10px">BOT</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA
Machine: PDA
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: δ
Constants: δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
Schritt(z0,[A,BOT])
Schritt(z0,[A,BOT])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Schritt
:exec Schritt
```
```
%% Output
%% Output
Executed operation: Schritt(z0,[A,BOT])
Executed operation: Schritt(z0,[A,BOT])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</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">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">A</td>
<td style="padding:10px">A</td>
<td style="padding:10px">BOT</td>
<td style="padding:10px">BOT</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
(z,α,γ)
(z,α,γ)
```
```
%% Output
%% Output
$(\mathit{z0}\mapsto [a,\mathit{b},b]\mapsto [A,BOT])$
$(\mathit{z0}\mapsto [a,\mathit{b},b]\mapsto [A,BOT])$
(z0↦[a,b,b]↦[A,BOT])
(z0↦[a,b,b]↦[A,BOT])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA
Machine: PDA
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: δ
Constants: δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
Schritt(z0,[A,A])
Schritt(z0,[A,A])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Schritt
:exec Schritt
```
```
%% Output
%% Output
Executed operation: Schritt(z0,[A,A])
Executed operation: Schritt(z0,[A,A])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">A</td>
<td style="padding:10px">A</td>
<td style="padding:10px">A</td>
<td style="padding:10px">A</td>
<td style="padding:10px">BOT</td>
<td style="padding:10px">BOT</td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA
Machine: PDA
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: δ
Constants: δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
Schritt(z1,[])
Schritt(z1,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Schritt
:exec Schritt
```
```
%% Output
%% Output
Executed operation: Schritt(z1,[])
Executed operation: Schritt(z1,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z1</td>
<td style="padding:10px">z1</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">A</td>
<td style="padding:10px">A</td>
<td style="padding:10px">BOT</td>
<td style="padding:10px">BOT</td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA
Machine: PDA
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: δ
Constants: δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
Schritt(z1,[])
Schritt(z1,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Schritt
:exec Schritt
```
```
%% Output
%% Output
Executed operation: Schritt(z1,[])
Executed operation: Schritt(z1,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z1</td>
<td style="padding:10px">z1</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">BOT</td>
<td style="padding:10px">BOT</td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA
Machine: PDA
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: δ
Constants: δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
LambdaSchritt(z1,[])
LambdaSchritt(z1,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec LambdaSchritt
:exec LambdaSchritt
```
```
%% Output
%% Output
Executed operation: LambdaSchritt(z1,[])
Executed operation: LambdaSchritt(z1,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z1</td>
<td style="padding:10px">z1</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA
Machine: PDA
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: δ
Constants: δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
Akzeptieren()
Akzeptieren()
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Akzeptieren
:exec Akzeptieren
```
```
%% Output
%% Output
Executed operation: Akzeptieren()
Executed operation: Akzeptieren()
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
Das Eingabewort
``aabb``
wurde akzeptiert.
Das Eingabewort
``aabb``
wurde akzeptiert.
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
## PDA für eine kfG
## PDA für eine kfG
Aus einer kontextfreien Grammatik kann man einen PDA konstruieren der die gleiche Sprache akzeptiert.
Aus einer kontextfreien Grammatik kann man einen PDA konstruieren der die gleiche Sprache akzeptiert.
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
::load
::load
MACHINE PDA_für_kfG
MACHINE PDA_für_kfG
/* B Modell eines PDA */
/* B Modell eines PDA */
SETS
SETS
Z = {z0}; // die Zustände des Automaten, z0 ist der Startzustand
Z = {z0}; // die Zustände des Automaten, z0 ist der Startzustand
SYMBOLE={a,b, S, C, lambda} /* BOT = # = Bottom-Symbol im Keller*/
SYMBOLE={a,b, S, C, lambda} /* BOT = # = Bottom-Symbol im Keller*/
DEFINITIONS
DEFINITIONS
Σ == {a,b}; // das Eingabe-Alphabet
Σ == {a,b}; // das Eingabe-Alphabet
BOT == S;
BOT == S;
Γ == {S,C}; // das Kelleralphabet
Γ == {S,C}; // das Kelleralphabet
ANIMATION_FUNCTION_DEFAULT == {(1,1,z)};
ANIMATION_FUNCTION_DEFAULT == {(1,1,z)};
ANIMATION_FUNCTION == {2}*α ∪ {3}*(γ);
ANIMATION_FUNCTION == {2}*α ∪ {3}*(γ);
ANIMATION_FUNCTION1 == {(1,0,"z: "),(2,0,"α:"),(3,0,"γ:")};
ANIMATION_FUNCTION1 == {(1,0,"z: "),(2,0,"α:"),(3,0,"γ:")};
ANIMATION_STR_JUSTIFY_LEFTx == TRUE;
ANIMATION_STR_JUSTIFY_LEFTx == TRUE;
SET_PREF_PP_SEQUENCES == TRUE
SET_PREF_PP_SEQUENCES == TRUE
CONSTANTS P, δ
CONSTANTS P, δ
PROPERTIES
PROPERTIES
/* Die Grammatik Regeln */
/* Die Grammatik Regeln */
P = { S ↦ [a,S,b], S ↦ [C],
P = { S ↦ [a,S,b], S ↦ [C],
C ↦ [a,b] } ∧
C ↦ [a,b] } ∧
/* Berechnung von δ aus P */
/* Berechnung von δ aus P */
δ = /* lässt sich eine Regel auf das Top-Symbol im Keller anwenden tue
δ = /* lässt sich eine Regel auf das Top-Symbol im Keller anwenden tue
dies ohne etwas zu lesen :*/
dies ohne etwas zu lesen :*/
{ lhs,rhs | ∃(A,q).( A↦q ∈ P ∧ lhs=(z0,lambda,A) ∧ rhs=(z0,q))}
{ lhs,rhs | ∃(A,q).( A↦q ∈ P ∧ lhs=(z0,lambda,A) ∧ rhs=(z0,q))}
∪
∪
/* ist das Top-Symbol im Keller ein Terminalzeichen a welches
/* ist das Top-Symbol im Keller ein Terminalzeichen a welches
auf der Eingabe steht, so wird dies aus dem Keller gePOPt */
auf der Eingabe steht, so wird dies aus dem Keller gePOPt */
{ lhs,rhs | ∃a.(a∈Σ ∧ lhs = (z0,a,a) & rhs = (z0,[]))}
{ lhs,rhs | ∃a.(a∈Σ ∧ lhs = (z0,a,a) & rhs = (z0,[]))}
VARIABLES
VARIABLES
z, α, γ // Konfiguration in dem sich der PDA befindet
z, α, γ // Konfiguration in dem sich der PDA befindet
INVARIANT
INVARIANT
z ∈ Z ∧ // der aktuelle Zustand
z ∈ Z ∧ // der aktuelle Zustand
α ∈ seq(Σ) ∧ // der noch zu lesende Teil des Eingabeworts
α ∈ seq(Σ) ∧ // der noch zu lesende Teil des Eingabeworts
γ ∈ seq(Γ) // aktuelle Kellerinhalt
γ ∈ seq(Γ) // aktuelle Kellerinhalt
INITIALISATION
INITIALISATION
z := z0 ||
z := z0 ||
γ := [BOT] || // Initialisierung des Stapels
γ := [BOT] || // Initialisierung des Stapels
α := [a,a,b,b] // das Eingabewort
α := [a,a,b,b] // das Eingabewort
OPERATIONS
OPERATIONS
// die Operationen Schritt und LambdaSchritt modellieren
// die Operationen Schritt und LambdaSchritt modellieren
// Schritte in der Ableitungsrelation
// Schritte in der Ableitungsrelation
Schritt(z‘,s) = PRE α ≠ ∅ ∧ γ ≠ ∅ ∧
Schritt(z‘,s) = PRE α ≠ ∅ ∧ γ ≠ ∅ ∧
z‘↦s ∈ δ[{(z,first(α),first(γ))}] THEN
z‘↦s ∈ δ[{(z,first(α),first(γ))}] THEN
z := z‘ || // in den neuen Zustand wechseln
z := z‘ || // in den neuen Zustand wechseln
α := tail(α) || // das erste Symbol auf der Eingabe löschen
α := tail(α) || // das erste Symbol auf der Eingabe löschen
γ := s^tail(γ) // s auf den Stapel packen
γ := s^tail(γ) // s auf den Stapel packen
END;
END;
LambdaSchritt(z‘,s) = PRE γ ≠ ∅ ∧
LambdaSchritt(z‘,s) = PRE γ ≠ ∅ ∧
z‘↦s ∈ δ[{(z,lambda,first(γ))}] THEN
z‘↦s ∈ δ[{(z,lambda,first(γ))}] THEN
z := z‘ || // in den neuen Zustand wechseln
z := z‘ || // in den neuen Zustand wechseln
γ := s^tail(γ) // s auf den Stapel packen
γ := s^tail(γ) // s auf den Stapel packen
END;
END;
Akzeptieren = PRE γ = ∅ ∧ α = ∅ THEN
Akzeptieren = PRE γ = ∅ ∧ α = ∅ THEN
/* Wir akzeptieren wenn Eingabe und Stapel leer sind */
/* Wir akzeptieren wenn Eingabe und Stapel leer sind */
skip END
skip END
END
END
```
```
%% Output
%% Output
Loaded machine: PDA_für_kfG
Loaded machine: PDA_für_kfG
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:constants
:constants
```
```
%% Output
%% Output
Machine constants set up using operation 0: $setup_constants()
Machine constants set up using operation 0: $setup_constants()
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:init
:init
```
```
%% Output
%% Output
Machine initialised using operation 1: $initialise_machine()
Machine initialised using operation 1: $initialise_machine()
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:table {z,x,X,z2,Xs| ((z,x,X)↦(z2,Xs)) : δ}
:table {z,x,X,z2,Xs| ((z,x,X)↦(z2,Xs)) : δ}
```
```
%% Output
%% Output
|z|x|X|z2|Xs|
|z|x|X|z2|Xs|
|---|---|---|---|---|
|---|---|---|---|---|
|$\mathit{z0}$|$\mathit{a}$|$\mathit{a}$|$\mathit{z0}$|$[]$|
|$\mathit{z0}$|$\mathit{a}$|$\mathit{a}$|$\mathit{z0}$|$[]$|
|$\mathit{z0}$|$\mathit{b}$|$\mathit{b}$|$\mathit{z0}$|$[]$|
|$\mathit{z0}$|$\mathit{b}$|$\mathit{b}$|$\mathit{z0}$|$[]$|
|$\mathit{z0}$|$\mathit{S}$|$\mathit{S}$|$\mathit{z0}$|$[]$|
|$\mathit{z0}$|$\mathit{S}$|$\mathit{S}$|$\mathit{z0}$|$[]$|
|$\mathit{z0}$|$\mathit{C}$|$\mathit{C}$|$\mathit{z0}$|$[]$|
|$\mathit{z0}$|$\mathit{C}$|$\mathit{C}$|$\mathit{z0}$|$[]$|
|$\mathit{z0}$|$\mathit{lambda}$|$\mathit{S}$|$\mathit{z0}$|$[C]$|
|$\mathit{z0}$|$\mathit{lambda}$|$\mathit{S}$|$\mathit{z0}$|$[C]$|
|$\mathit{z0}$|$\mathit{lambda}$|$\mathit{S}$|$\mathit{z0}$|$[a,\mathit{S},b]$|
|$\mathit{z0}$|$\mathit{lambda}$|$\mathit{S}$|$\mathit{z0}$|$[a,\mathit{S},b]$|
|$\mathit{z0}$|$\mathit{lambda}$|$\mathit{C}$|$\mathit{z0}$|$[a,b]$|
|$\mathit{z0}$|$\mathit{lambda}$|$\mathit{C}$|$\mathit{z0}$|$[a,b]$|
|$\mathit{z0}$|$\mathit{lambda}$|$\mathit{lambda}$|$\mathit{z0}$|$[]$|
|$\mathit{z0}$|$\mathit{lambda}$|$\mathit{lambda}$|$\mathit{z0}$|$[]$|
z x X z2 Xs
z x X z2 Xs
z0 a a z0 []
z0 a a z0 []
z0 b b z0 []
z0 b b z0 []
z0 S S z0 []
z0 S S z0 []
z0 C C z0 []
z0 C C z0 []
z0 lambda S z0 [C]
z0 lambda S z0 [C]
z0 lambda S z0 [a,S,b]
z0 lambda S z0 [a,S,b]
z0 lambda C z0 [a,b]
z0 lambda C z0 [a,b]
z0 lambda lambda z0 []
z0 lambda lambda z0 []
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:10px">a</td>
<td style="padding:10px">a</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">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">S</td>
<td style="padding:10px">S</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA_für_kfG
Machine: PDA_für_kfG
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: P, δ
Constants: P, δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
LambdaSchritt(z0,[C])
LambdaSchritt(z0,[C])
LambdaSchritt(z0,[a,S,b])
LambdaSchritt(z0,[a,S,b])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec LambdaSchritt s = [a,S,b]
:exec LambdaSchritt s = [a,S,b]
```
```
%% Output
%% Output
Executed operation: LambdaSchritt(z0,[a,S,b])
Executed operation: LambdaSchritt(z0,[a,S,b])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:10px">a</td>
<td style="padding:10px">a</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">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">a</td>
<td style="padding:10px">a</td>
<td style="padding:10px">S</td>
<td style="padding:10px">S</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA_für_kfG
Machine: PDA_für_kfG
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: P, δ
Constants: P, δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
Schritt(z0,[])
Schritt(z0,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Schritt
:exec Schritt
```
```
%% Output
%% Output
Executed operation: Schritt(z0,[])
Executed operation: Schritt(z0,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</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">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">S</td>
<td style="padding:10px">S</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA_für_kfG
Machine: PDA_für_kfG
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: P, δ
Constants: P, δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
LambdaSchritt(z0,[C])
LambdaSchritt(z0,[C])
LambdaSchritt(z0,[a,S,b])
LambdaSchritt(z0,[a,S,b])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec LambdaSchritt s = [C]
:exec LambdaSchritt s = [C]
```
```
%% Output
%% Output
Executed operation: LambdaSchritt(z0,[C])
Executed operation: LambdaSchritt(z0,[C])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</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">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">C</td>
<td style="padding:10px">C</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA_für_kfG
Machine: PDA_für_kfG
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: P, δ
Constants: P, δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
LambdaSchritt(z0,[a,b])
LambdaSchritt(z0,[a,b])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec LambdaSchritt s=[a,b]
:exec LambdaSchritt s=[a,b]
```
```
%% Output
%% Output
Executed operation: LambdaSchritt(z0,[a,b])
Executed operation: LambdaSchritt(z0,[a,b])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</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">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</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">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:browse
:browse
```
```
%% Output
%% Output
Machine: PDA_für_kfG
Machine: PDA_für_kfG
Sets: Z, SYMBOLE
Sets: Z, SYMBOLE
Constants: P, δ
Constants: P, δ
Variables: z, α, γ
Variables: z, α, γ
Operations:
Operations:
Schritt(z0,[])
Schritt(z0,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Schritt
:exec Schritt
```
```
%% Output
%% Output
Executed operation: Schritt(z0,[])
Executed operation: Schritt(z0,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Schritt
:exec Schritt
```
```
%% Output
%% Output
Executed operation: Schritt(z0,[])
Executed operation: Schritt(z0,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:10px">b</td>
<td style="padding:10px">b</td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Schritt
:exec Schritt
```
```
%% Output
%% Output
Executed operation: Schritt(z0,[])
Executed operation: Schritt(z0,[])
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:show
:show
```
```
%% Output
%% Output
<table style="font-family:monospace"><tbody>
<table style="font-family:monospace"><tbody>
<tr>
<tr>
<td style="padding:10px">z: </td>
<td style="padding:10px">z: </td>
<td style="padding:10px">z0</td>
<td style="padding:10px">z0</td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">α:</td>
<td style="padding:10px">α:</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
<tr>
<tr>
<td style="padding:10px">γ:</td>
<td style="padding:10px">γ:</td>
<td style="padding:0px"></td>
<td style="padding:0px"></td>
</tr>
</tr>
</tbody></table>
</tbody></table>
<Animation function visualisation>
<Animation function visualisation>
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
:exec Akzeptieren
:exec Akzeptieren
```
```
%% Output
%% Output
Executed operation: Akzeptieren()
Executed operation: Akzeptieren()
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
Das Wort
``aabb``
wird sowohl von der Grammatik generiert als auch von diesem generierten PDA akzeptiert.
Das Wort
``aabb``
wird sowohl von der Grammatik generiert als auch von diesem generierten PDA akzeptiert.
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
prob
```
prob
```
```
...
...
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