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
f9cb0a49
Commit
f9cb0a49
authored
5 years ago
by
Michael Leuschel
Browse files
Options
Downloads
Patches
Plain Diff
add new example (Minimalautomat)
parent
7d324e49
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
info4/kapitel-2/Minimalautomat.ipynb
+1436
-0
1436 additions, 0 deletions
info4/kapitel-2/Minimalautomat.ipynb
with
1436 additions
and
0 deletions
info4/kapitel-2/Minimalautomat.ipynb
0 → 100644
+
1436
−
0
View file @
f9cb0a49
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Algorithmus Minimalautomat\n",
"\n",
"\n",
"Hier ist der Beispiel DFA aus den Folien zur Illustration der Konstruktion des Minimalautomaten.\n"
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Loaded machine: DFA"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"::load\n",
"MACHINE DFA\n",
"SETS\n",
" Z = {z0,z1,z2,z3,z4}\n",
"ABSTRACT_CONSTANTS δs, L\n",
"CONSTANTS Σ, F, δ\n",
"PROPERTIES\n",
" F ⊆ Z ∧ δ ∈ (Z×Σ) → Z ∧\n",
"\n",
" /* Definition der erweiterten Überführungsfunktion */\n",
" δs ∈ (Z×seq(Σ)) → Z ∧\n",
" δs = λ(z,s).(z∈Z ∧ s∈seq(Σ) | \n",
" IF s=[] THEN z\n",
" ELSE δs(δ(z,first(s)),tail(s)) END)\n",
" ∧\n",
" /* Die vom Automaten akzeptierte Sprache L */\n",
" L = {ω|ω∈seq(Σ) ∧ δs(z0,ω) ∈ F}\n",
" ∧\n",
" /* Der Automat von Folie 10: */\n",
" Σ = {0,1} ∧\n",
" F = {z2} ∧\n",
" δ = { (z0,0)↦z1, (z0,1)↦z2,\n",
" (z1,0)↦z3, (z1,1)↦z3,\n",
" (z2,0)↦z4, (z2,1)↦z4,\n",
" (z3,0)↦z3, (z3,1)↦z3,\n",
" (z4,0)↦z4, (z4,1)↦z4 }\n",
"DEFINITIONS\n",
" SET_PREF_DOT_HORIZONTAL_LAYOUT==TRUE;\n",
" SET_PREF_DOT_LIMIT_PAGE_SIZE==FALSE;\n",
" CUSTOM_GRAPH_NODES1 == rec(shape:\"doublecircle\",nodes:F);\n",
" CUSTOM_GRAPH_NODES2 == rec(shape:\"circle\",nodes:Z\\F);\n",
" CUSTOM_GRAPH_NODES3 == rec(shape:\"none\",color:\"white\",style:\"none\",nodes:{\"\"});\n",
" CUSTOM_GRAPH_EDGES1 == rec(color:\"red\",label:\"0\",edges:{a,b|(a,0)|->b:δ});\n",
" CUSTOM_GRAPH_EDGES2 == rec(color:\"green\",label:\"1\",edges:{a,b|(a,1)|->b:δ});\n",
" CUSTOM_GRAPH_EDGES3 == rec(color:\"black\",label:\"\",edges:{\"\" |-> z0})\n",
"END"
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Machine constants set up using operation 0: $setup_constants()"
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":constants"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Der Automat sieht grafisch so aus:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
" -->\n",
"<!-- Title: prob_graph Pages: 1 -->\n",
"<svg width=\"300pt\" height=\"227pt\"\n",
" viewBox=\"0.00 0.00 300.00 227.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 223)\">\n",
"<title>prob_graph</title>\n",
"<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-223 297,-223 297,5 -4,5\"/>\n",
"<!-- 0 -->\n",
"<g id=\"node1\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"192\" cy=\"-110\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"192\" cy=\"-110\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"192\" y=\"-106.4\" font-family=\"Times,serif\" font-size=\"12.00\">z2</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node5\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"274\" cy=\"-137\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"274\" y=\"-133.4\" font-family=\"Times,serif\" font-size=\"12.00\">z4</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M213.187,-116.813C223.465,-120.282 236.077,-124.538 247.065,-128.247\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"245.993,-131.579 256.588,-131.461 248.232,-124.947 245.993,-131.579\"/>\n",
"<text text-anchor=\"middle\" x=\"235\" y=\"-128.6\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge16\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M213.245,-103.477C221.184,-101.96 230.234,-101.557 238,-104.6 244.274,-107.058 250.095,-111.227 255.119,-115.771\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"252.782,-118.386 262.305,-123.028 257.756,-113.46 252.782,-118.386\"/>\n",
"<text text-anchor=\"middle\" x=\"235\" y=\"-107.6\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"110\" cy=\"-75\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"110\" y=\"-71.4\" font-family=\"Times,serif\" font-size=\"12.00\">z0</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M126.805,-81.9149C136.938,-86.3478 150.388,-92.2323 162.359,-97.4694\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"160.985,-100.689 171.55,-101.49 163.791,-94.2757 160.985,-100.689\"/>\n",
"<text text-anchor=\"middle\" x=\"149\" y=\"-95.6\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"192\" cy=\"-52\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"192\" y=\"-48.4\" font-family=\"Times,serif\" font-size=\"12.00\">z1</text>\n",
"</g>\n",
"<!-- 1->2 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>1->2</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M127.576,-70.2344C138.303,-67.1505 152.499,-63.069 164.741,-59.5495\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"165.802,-62.8864 174.445,-56.7595 163.867,-56.1589 165.802,-62.8864\"/>\n",
"<text text-anchor=\"middle\" x=\"149\" y=\"-68.6\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node4\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"274\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"274\" y=\"-14.4\" font-family=\"Times,serif\" font-size=\"12.00\">z3</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M208.805,-45.2827C219.982,-40.5328 235.194,-34.0674 248.006,-28.6227\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"249.393,-31.836 257.227,-24.7034 246.655,-25.3937 249.393,-31.836\"/>\n",
"<text text-anchor=\"middle\" x=\"235\" y=\"-38.6\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge14\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M203.183,-37.8085C210.198,-29.316 220.337,-19.2887 232,-14.6 236.444,-12.8134 241.374,-12.1962 246.229,-12.2583\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"246.224,-15.7752 256.523,-13.2889 246.921,-8.80998 246.224,-15.7752\"/>\n",
"<text text-anchor=\"middle\" x=\"235\" y=\"-18.6\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M270.584,-35.7817C270.004,-45.3149 271.143,-54 274,-54 275.741,-54 276.844,-50.7749 277.309,-46.0981\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"280.812,-45.8174 277.416,-35.7817 273.812,-45.745 280.812,-45.8174\"/>\n",
"<text text-anchor=\"middle\" x=\"274\" y=\"-57.6\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge18\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M268.441,-35.1418C265.17,-52.585 267.023,-72 274,-72 279.614,-72 281.91,-59.4283 280.889,-45.4287\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"284.313,-44.6105 279.559,-35.1418 277.37,-45.508 284.313,-44.6105\"/>\n",
"<text text-anchor=\"middle\" x=\"274\" y=\"-75.6\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M270.584,-154.782C270.004,-164.315 271.143,-173 274,-173 275.741,-173 276.844,-169.775 277.309,-165.098\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"280.812,-164.817 277.416,-154.782 273.812,-164.745 280.812,-164.817\"/>\n",
"<text text-anchor=\"middle\" x=\"274\" y=\"-176.6\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge20\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M268.441,-154.142C265.17,-171.585 267.023,-191 274,-191 279.614,-191 281.91,-178.428 280.889,-164.429\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"284.313,-163.61 279.559,-154.142 277.37,-164.508 284.313,-163.61\"/>\n",
"<text text-anchor=\"middle\" x=\"274\" y=\"-194.6\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node6\" class=\"node\"><title>5</title>\n",
"</g>\n",
"<!-- 5->1 -->\n",
"<g id=\"edge22\" class=\"edge\"><title>5->1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M54.0748,-75C62.8864,-75 72.746,-75 81.6534,-75\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"81.9117,-78.5001 91.9117,-75 81.9117,-71.5001 81.9117,-78.5001\"/>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<Dot visualization: custom_graph []>"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":dot custom_graph"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In der folgenden B Maschine sind (bis auf die Entfernung der nicht erreichbaren Zustände) die Schritte des Algorithmus umgesetzt worden.\n"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Loaded machine: MinimalDFA"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"::load\n",
"MACHINE MinimalDFA\n",
"SETS\n",
" Z = {z0,z1,z2,z3,z4}\n",
"ABSTRACT_CONSTANTS δs, L\n",
"CONSTANTS Σ, F, δ\n",
"PROPERTIES\n",
" F ⊆ Z ∧ δ ∈ (Z×Σ) → Z ∧\n",
"\n",
" /* Definition der erweiterten Überführungsfunktion */\n",
" δs ∈ (Z×seq(Σ)) → Z ∧\n",
" δs = λ(z,s).(z∈Z ∧ s∈seq(Σ) |\n",
" IF s=[] THEN z\n",
" ELSE δs(δ(z,first(s)),tail(s)) END)\n",
" ∧\n",
" /* Die vom Automaten akzeptierte Sprache L */\n",
" L = {ω|ω∈seq(Σ) ∧ δs(z0,ω) ∈ F}\n",
" ∧\n",
" /* Der Automat von Folie 10: */\n",
" Σ = {0,1} ∧\n",
" F = {z2} ∧\n",
" δ = { (z0,0)↦z1, (z0,1)↦z2,\n",
" (z1,0)↦z3, (z1,1)↦z3,\n",
" (z2,0)↦z4, (z2,1)↦z4,\n",
" (z3,0)↦z3, (z3,1)↦z3,\n",
" (z4,0)↦z4, (z4,1)↦z4 }\n",
"VARIABLES\n",
" markiert, fusioniert\n",
"INVARIANT markiert : Z <-> Z &\n",
" fusioniert : Z <-> Z\n",
"INITIALISATION markiert := {za,zb| za∈F ⇔ zb∉F} || fusioniert := {}\n",
"OPERATIONS\n",
" Markiere(za,zb,a) = SELECT (za,zb) ∉ markiert ∧\n",
" a∈Σ ∧\n",
" (δ(za,a),δ(zb,a)) ∈ markiert THEN\n",
" markiert := markiert \\/ {(za,zb),(zb,za)}\n",
" END;\n",
" Fertig = SELECT !(za,zb,a).((za,zb) ∉ markiert ∧ a∈Σ\n",
" =>\n",
" (δ(za,a),δ(zb,a)) ∉ markiert) THEN\n",
" fusioniert := {za,zb|(za,zb) ∉ markiert ∧ za ≠ zb} ||\n",
" markiert := {}\n",
" END\n",
"DEFINITIONS\n",
" SET_PREF_DOT_HORIZONTAL_LAYOUT==TRUE;\n",
" SET_PREF_DOT_LIMIT_PAGE_SIZE==FALSE;\n",
" CUSTOM_GRAPH_NODES1 == rec(shape:\"doublecircle\",nodes:F);\n",
" CUSTOM_GRAPH_NODES2 == rec(shape:\"circle\",nodes:Z\\F);\n",
" CUSTOM_GRAPH_NODES3 == rec(shape:\"none\",color:\"white\",style:\"none\",nodes:{\"\"});\n",
" CUSTOM_GRAPH_EDGES1 == rec(color:\"red\",label:\"0\",edges:{a,b|(a,0)|->b∈δ});\n",
" CUSTOM_GRAPH_EDGES2 == rec(color:\"green\",label:\"1\",edges:{a,b|(a,1)|->b∈δ});\n",
" CUSTOM_GRAPH_EDGES3 == rec(color:\"black\",label:\"\",edges:{\"\" |-> z0});\n",
" CUSTOM_GRAPH_EDGES4 == rec(color:\"gray\",label:\"×\",style:\"dotted\",edges:markiert);\n",
" CUSTOM_GRAPH_EDGES5 == rec(color:\"purple\",label:\"↔\",style:\"bold\",edges:fusioniert)\n",
"END"
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Machine constants set up using operation 0: $setup_constants()"
]
},
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":constants"
]
},
{
"cell_type": "code",
"execution_count": 64,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Machine initialised using operation 1: $initialise_machine()"
]
},
"execution_count": 64,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":init"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Markiere alle Paare $\\{z, z'\\}$ mit \n",
"\n",
"* $z \\in F \\Longleftrightarrow z' \\not\\in F$.\n",
"\n",
"Dies wird in der B Maschine in der INITIALISATION Klausel gemacht. Im Graphen unten sind die markierten Paare mit $\\times$ gekennzeichnet."
]
},
{
"cell_type": "code",
"execution_count": 66,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Preference changed: DOT_ENGINE = circo\n"
]
},
"execution_count": 66,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":pref DOT_ENGINE=circo"
]
},
{
"cell_type": "code",
"execution_count": 67,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
" -->\n",
"<!-- Title: prob_graph Pages: 1 -->\n",
"<svg width=\"300pt\" height=\"282pt\"\n",
" viewBox=\"0.00 0.00 299.70 281.70\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 277.696)\">\n",
"<title>prob_graph</title>\n",
"<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-277.696 296.696,-277.696 296.696,5 -4,5\"/>\n",
"<!-- 0 -->\n",
"<g id=\"node1\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"91.8479\" cy=\"-165.696\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"91.8479\" cy=\"-165.696\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"91.8479\" y=\"-162.096\" font-family=\"Times,serif\" font-size=\"12.00\">z2</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"165.696\" cy=\"-91.8479\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"165.696\" y=\"-88.2479\" font-family=\"Times,serif\" font-size=\"12.00\">z0</text>\n",
"</g>\n",
"<!-- 0->1 -->\n",
"<g id=\"edge26\" class=\"edge\"><title>0->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M113.391,-159.459C127.623,-149.801 145.137,-132.716 156.229,-117.908\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"159.203,-119.76 161.945,-109.526 153.419,-115.817 159.203,-119.76\"/>\n",
"<text text-anchor=\"middle\" x=\"140.81\" y=\"-141.083\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"91.8479\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"91.8479\" y=\"-14.4\" font-family=\"Times,serif\" font-size=\"12.00\">z1</text>\n",
"</g>\n",
"<!-- 0->2 -->\n",
"<g id=\"edge28\" class=\"edge\"><title>0->2</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M96.776,-144.22C99.0278,-118.254 99.1922,-74.493 97.2693,-45.9285\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"100.744,-45.4708 96.4302,-35.7938 93.7674,-46.0485 100.744,-45.4708\"/>\n",
"<text text-anchor=\"middle\" x=\"101.023\" y=\"-91.474\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node4\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"18\" cy=\"-91.8479\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"18\" y=\"-88.2479\" font-family=\"Times,serif\" font-size=\"12.00\">z3</text>\n",
"</g>\n",
"<!-- 0->3 -->\n",
"<g id=\"edge30\" class=\"edge\"><title>0->3</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M80.5012,-146.44C70.1421,-134.128 54.7116,-118.492 41.7223,-107.045\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"43.9121,-104.313 34.0172,-100.526 39.3906,-109.657 43.9121,-104.313\"/>\n",
"<text text-anchor=\"middle\" x=\"55.1117\" y=\"-129.142\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node5\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"91.8479\" cy=\"-255.696\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"91.8479\" y=\"-252.096\" font-family=\"Times,serif\" font-size=\"12.00\">z4</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge32\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M76.0474,-181.373C70.7461,-196.08 70.1819,-218.189 74.3549,-234.472\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"71.1559,-235.925 77.7791,-244.194 77.7583,-233.6 71.1559,-235.925\"/>\n",
"<text text-anchor=\"middle\" x=\"71.2012\" y=\"-204.322\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M107.648,-181.373C112.95,-196.08 113.514,-218.189 109.341,-234.472\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"105.937,-233.6 105.917,-244.194 112.54,-235.925 105.937,-233.6\"/>\n",
"<text text-anchor=\"middle\" x=\"112.495\" y=\"-204.322\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge16\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M97.6878,-187.025C98.7392,-199.411 98.8796,-215.144 98.109,-228.424\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"94.6167,-228.187 97.2956,-238.438 101.594,-228.754 94.6167,-228.187\"/>\n",
"<text text-anchor=\"middle\" x=\"101.898\" y=\"-204.124\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M147.791,-95.7364C134.084,-104.1 116.174,-120.885 104.03,-136.125\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"101.066,-134.246 97.9389,-144.369 106.696,-138.405 101.066,-134.246\"/>\n",
"<text text-anchor=\"middle\" x=\"130.91\" y=\"-118.331\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge22\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M152.832,-104.711C142.429,-115.115 127.512,-130.031 115.036,-142.508\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"112.241,-140.353 107.645,-149.899 117.191,-145.303 112.241,-140.353\"/>\n",
"<text text-anchor=\"middle\" x=\"139.934\" y=\"-126.01\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 1->2 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>1->2</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M152.832,-78.9846C141.64,-67.7922 125.224,-51.3757 112.242,-38.3942\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"114.607,-35.8094 105.061,-31.2132 109.657,-40.7592 114.607,-35.8094\"/>\n",
"<text text-anchor=\"middle\" x=\"138.537\" y=\"-49.0894\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 2->0 -->\n",
"<g id=\"edge24\" class=\"edge\"><title>2->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M87.2934,-35.5226C84.8008,-59.7197 84.4306,-103.78 86.1828,-133.877\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"82.6937,-134.157 86.891,-143.885 89.6763,-133.663 82.6937,-134.157\"/>\n",
"<text text-anchor=\"middle\" x=\"90.7381\" y=\"-81.1\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M76.0003,-26.5413C63.3147,-36.7317 45.8122,-53.8239 33.2846,-68.0261\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"30.3427,-66.0846 26.5575,-75.9802 35.6875,-70.605 30.3427,-66.0846\"/>\n",
"<text text-anchor=\"middle\" x=\"48.6425\" y=\"-37.6837\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge14\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M83.3066,-33.8476C73.1162,-46.5332 56.024,-64.0357 41.8218,-76.5633\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"39.2429,-74.1604 33.8677,-83.2904 43.7633,-79.5051 39.2429,-74.1604\"/>\n",
"<text text-anchor=\"middle\" x=\"68.5642\" y=\"-57.6054\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 3->0 -->\n",
"<g id=\"edge34\" class=\"edge\"><title>3->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M26.5413,-107.696C35.9995,-119.47 51.4032,-135.393 64.9234,-147.637\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"62.777,-150.41 72.6071,-154.362 67.3871,-145.142 62.777,-150.41\"/>\n",
"<text text-anchor=\"middle\" x=\"51.7324\" y=\"-118.066\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M35.7817,-95.0836C45.3149,-95.6335 54,-94.5549 54,-91.8479 54,-90.1983 50.7749,-89.1534 46.0981,-88.7132\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"45.8156,-85.2104 35.7817,-88.6121 45.7469,-92.21 45.8156,-85.2104\"/>\n",
"<text text-anchor=\"middle\" x=\"57\" y=\"-88.2479\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge18\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M32.9273,-102.022C50.8975,-109.71 72,-106.318 72,-91.8479 72,-79.9777 57.7998,-75.5626 42.7772,-78.6026\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"41.4324,-75.3556 32.9273,-81.6735 43.5159,-82.0384 41.4324,-75.3556\"/>\n",
"<text text-anchor=\"middle\" x=\"75\" y=\"-88.2479\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 4->0 -->\n",
"<g id=\"edge36\" class=\"edge\"><title>4->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M86.3899,-238.343C85.1301,-226.701 84.7916,-211.03 85.3743,-197.222\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"88.8748,-197.322 85.9995,-187.124 81.8882,-196.889 88.8748,-197.322\"/>\n",
"<text text-anchor=\"middle\" x=\"89.8821\" y=\"-214.182\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M109.63,-258.932C119.163,-259.481 127.848,-258.403 127.848,-255.696 127.848,-254.046 124.623,-253.001 119.946,-252.561\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"119.663,-249.058 109.63,-252.46 119.595,-256.058 119.663,-249.058\"/>\n",
"<text text-anchor=\"middle\" x=\"130.848\" y=\"-252.096\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge20\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M106.775,-265.87C124.745,-273.558 145.848,-270.166 145.848,-255.696 145.848,-243.826 131.648,-239.411 116.625,-242.451\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"115.28,-239.204 106.775,-245.521 117.364,-245.886 115.28,-239.204\"/>\n",
"<text text-anchor=\"middle\" x=\"148.848\" y=\"-252.096\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node6\" class=\"node\"><title>5</title>\n",
"</g>\n",
"<!-- 5->1 -->\n",
"<g id=\"edge38\" class=\"edge\"><title>5->1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M237.644,-91.8479C224.182,-91.8479 207.91,-91.8479 194.248,-91.8479\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"193.955,-88.348 183.955,-91.8479 193.955,-95.348 193.955,-88.348\"/>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<Dot visualization: custom_graph []>"
]
},
"execution_count": 67,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":dot custom_graph"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Sei $\\{z, z'\\}$ ein unmarkiertes Paar. Prüfe für jedes\n",
" $a \\in \\Sigma$, ob $\\{\\delta(z,a), \\delta(z',a)\\}$ bereits markiert\n",
" ist. Ist mindestens ein Test erfolgreich, so markiere auch\n",
" $\\{z,z'\\}$.\n",
" \n",
" Dies ist hier der Fall:"
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Executed operation: Markiere(z1,z0,1)"
]
},
"execution_count": 68,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":exec Markiere"
]
},
{
"cell_type": "code",
"execution_count": 69,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
" -->\n",
"<!-- Title: prob_graph Pages: 1 -->\n",
"<svg width=\"300pt\" height=\"282pt\"\n",
" viewBox=\"0.00 0.00 299.70 281.70\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 277.696)\">\n",
"<title>prob_graph</title>\n",
"<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-277.696 296.696,-277.696 296.696,5 -4,5\"/>\n",
"<!-- 0 -->\n",
"<g id=\"node1\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"91.8479\" cy=\"-165.696\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"91.8479\" cy=\"-165.696\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"91.8479\" y=\"-162.096\" font-family=\"Times,serif\" font-size=\"12.00\">z2</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"165.696\" cy=\"-91.8479\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"165.696\" y=\"-88.2479\" font-family=\"Times,serif\" font-size=\"12.00\">z0</text>\n",
"</g>\n",
"<!-- 0->1 -->\n",
"<g id=\"edge30\" class=\"edge\"><title>0->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M113.391,-159.459C127.623,-149.801 145.137,-132.716 156.229,-117.908\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"159.203,-119.76 161.945,-109.526 153.419,-115.817 159.203,-119.76\"/>\n",
"<text text-anchor=\"middle\" x=\"140.81\" y=\"-141.083\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"91.8479\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"91.8479\" y=\"-14.4\" font-family=\"Times,serif\" font-size=\"12.00\">z1</text>\n",
"</g>\n",
"<!-- 0->2 -->\n",
"<g id=\"edge32\" class=\"edge\"><title>0->2</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M96.776,-144.22C99.0278,-118.254 99.1922,-74.493 97.2693,-45.9285\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"100.744,-45.4708 96.4302,-35.7938 93.7674,-46.0485 100.744,-45.4708\"/>\n",
"<text text-anchor=\"middle\" x=\"101.023\" y=\"-91.474\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node4\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"18\" cy=\"-91.8479\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"18\" y=\"-88.2479\" font-family=\"Times,serif\" font-size=\"12.00\">z3</text>\n",
"</g>\n",
"<!-- 0->3 -->\n",
"<g id=\"edge34\" class=\"edge\"><title>0->3</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M80.5012,-146.44C70.1421,-134.128 54.7116,-118.492 41.7223,-107.045\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"43.9121,-104.313 34.0172,-100.526 39.3906,-109.657 43.9121,-104.313\"/>\n",
"<text text-anchor=\"middle\" x=\"55.1117\" y=\"-129.142\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node5\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"91.8479\" cy=\"-255.696\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"91.8479\" y=\"-252.096\" font-family=\"Times,serif\" font-size=\"12.00\">z4</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge36\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M76.0474,-181.373C70.7461,-196.08 70.1819,-218.189 74.3549,-234.472\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"71.1559,-235.925 77.7791,-244.194 77.7583,-233.6 71.1559,-235.925\"/>\n",
"<text text-anchor=\"middle\" x=\"71.2012\" y=\"-204.322\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M107.648,-181.373C112.95,-196.08 113.514,-218.189 109.341,-234.472\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"105.937,-233.6 105.917,-244.194 112.54,-235.925 105.937,-233.6\"/>\n",
"<text text-anchor=\"middle\" x=\"112.495\" y=\"-204.322\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge16\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M97.6878,-187.025C98.7392,-199.411 98.8796,-215.144 98.109,-228.424\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"94.6167,-228.187 97.2956,-238.438 101.594,-228.754 94.6167,-228.187\"/>\n",
"<text text-anchor=\"middle\" x=\"101.898\" y=\"-204.124\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M147.791,-95.7364C134.084,-104.1 116.174,-120.885 104.03,-136.125\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"101.066,-134.246 97.9389,-144.369 106.696,-138.405 101.066,-134.246\"/>\n",
"<text text-anchor=\"middle\" x=\"130.91\" y=\"-118.331\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge24\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M152.832,-104.711C142.429,-115.115 127.512,-130.031 115.036,-142.508\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"112.241,-140.353 107.645,-149.899 117.191,-145.303 112.241,-140.353\"/>\n",
"<text text-anchor=\"middle\" x=\"139.934\" y=\"-126.01\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 1->2 -->\n",
"<g id=\"edge22\" class=\"edge\"><title>1->2</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M161.807,-73.9434C152.828,-59.2266 134.141,-39.6666 118.082,-27.5971\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"119.741,-24.4914 109.509,-21.7408 115.792,-30.2716 119.741,-24.4914\"/>\n",
"<text text-anchor=\"middle\" x=\"133.945\" y=\"-53.1703\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 1->2 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>1->2</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M147.791,-87.9594C133.074,-78.9796 113.515,-60.2935 101.445,-44.2345\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"104.119,-41.9445 95.5887,-35.6614 98.3393,-45.893 104.119,-41.9445\"/>\n",
"<text text-anchor=\"middle\" x=\"119.618\" y=\"-68.4969\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 2->0 -->\n",
"<g id=\"edge28\" class=\"edge\"><title>2->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M87.2934,-35.5226C84.8008,-59.7197 84.4306,-103.78 86.1828,-133.877\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"82.6937,-134.157 86.891,-143.885 89.6763,-133.663 82.6937,-134.157\"/>\n",
"<text text-anchor=\"middle\" x=\"90.7381\" y=\"-81.1\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2->1 -->\n",
"<g id=\"edge26\" class=\"edge\"><title>2->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M104.711,-30.8633C115.904,-42.0557 132.32,-58.4722 145.302,-71.4537\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"142.937,-74.0385 152.483,-78.6347 147.886,-69.0887 142.937,-74.0385\"/>\n",
"<text text-anchor=\"middle\" x=\"131.006\" y=\"-41.5585\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M76.0003,-26.5413C63.3147,-36.7317 45.8122,-53.8239 33.2846,-68.0261\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"30.3427,-66.0846 26.5575,-75.9802 35.6875,-70.605 30.3427,-66.0846\"/>\n",
"<text text-anchor=\"middle\" x=\"48.6425\" y=\"-37.6837\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge14\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M83.3066,-33.8476C73.1162,-46.5332 56.024,-64.0357 41.8218,-76.5633\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"39.2429,-74.1604 33.8677,-83.2904 43.7633,-79.5051 39.2429,-74.1604\"/>\n",
"<text text-anchor=\"middle\" x=\"68.5642\" y=\"-57.6054\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 3->0 -->\n",
"<g id=\"edge38\" class=\"edge\"><title>3->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M26.5413,-107.696C35.9995,-119.47 51.4032,-135.393 64.9234,-147.637\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"62.777,-150.41 72.6071,-154.362 67.3871,-145.142 62.777,-150.41\"/>\n",
"<text text-anchor=\"middle\" x=\"51.7324\" y=\"-118.066\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M35.7817,-95.0836C45.3149,-95.6335 54,-94.5549 54,-91.8479 54,-90.1983 50.7749,-89.1534 46.0981,-88.7132\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"45.8156,-85.2104 35.7817,-88.6121 45.7469,-92.21 45.8156,-85.2104\"/>\n",
"<text text-anchor=\"middle\" x=\"57\" y=\"-88.2479\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge18\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M32.9273,-102.022C50.8975,-109.71 72,-106.318 72,-91.8479 72,-79.9777 57.7998,-75.5626 42.7772,-78.6026\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"41.4324,-75.3556 32.9273,-81.6735 43.5159,-82.0384 41.4324,-75.3556\"/>\n",
"<text text-anchor=\"middle\" x=\"75\" y=\"-88.2479\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 4->0 -->\n",
"<g id=\"edge40\" class=\"edge\"><title>4->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M86.3899,-238.343C85.1301,-226.701 84.7916,-211.03 85.3743,-197.222\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"88.8748,-197.322 85.9995,-187.124 81.8882,-196.889 88.8748,-197.322\"/>\n",
"<text text-anchor=\"middle\" x=\"89.8821\" y=\"-214.182\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M109.63,-258.932C119.163,-259.481 127.848,-258.403 127.848,-255.696 127.848,-254.046 124.623,-253.001 119.946,-252.561\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"119.663,-249.058 109.63,-252.46 119.595,-256.058 119.663,-249.058\"/>\n",
"<text text-anchor=\"middle\" x=\"130.848\" y=\"-252.096\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge20\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M106.775,-265.87C124.745,-273.558 145.848,-270.166 145.848,-255.696 145.848,-243.826 131.648,-239.411 116.625,-242.451\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"115.28,-239.204 106.775,-245.521 117.364,-245.886 115.28,-239.204\"/>\n",
"<text text-anchor=\"middle\" x=\"148.848\" y=\"-252.096\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node6\" class=\"node\"><title>5</title>\n",
"</g>\n",
"<!-- 5->1 -->\n",
"<g id=\"edge42\" class=\"edge\"><title>5->1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M237.644,-91.8479C224.182,-91.8479 207.91,-91.8479 194.248,-91.8479\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"193.955,-88.348 183.955,-91.8479 193.955,-95.348 193.955,-88.348\"/>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<Dot visualization: custom_graph []>"
]
},
"execution_count": 69,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":dot custom_graph"
]
},
{
"cell_type": "code",
"execution_count": 70,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Executed operation: Markiere(z3,z0,1)"
]
},
"execution_count": 70,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":exec Markiere"
]
},
{
"cell_type": "code",
"execution_count": 71,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
" -->\n",
"<!-- Title: prob_graph Pages: 1 -->\n",
"<svg width=\"300pt\" height=\"282pt\"\n",
" viewBox=\"0.00 0.00 299.70 281.70\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 277.696)\">\n",
"<title>prob_graph</title>\n",
"<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-277.696 296.696,-277.696 296.696,5 -4,5\"/>\n",
"<!-- 0 -->\n",
"<g id=\"node1\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"91.8479\" cy=\"-108\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"91.8479\" cy=\"-108\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"91.8479\" y=\"-104.4\" font-family=\"Times,serif\" font-size=\"12.00\">z2</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"165.696\" cy=\"-181.848\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"165.696\" y=\"-178.248\" font-family=\"Times,serif\" font-size=\"12.00\">z0</text>\n",
"</g>\n",
"<!-- 0->1 -->\n",
"<g id=\"edge32\" class=\"edge\"><title>0->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M98.0852,-129.543C107.743,-143.775 124.828,-161.289 139.635,-172.381\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"137.784,-175.355 148.017,-178.097 141.727,-169.571 137.784,-175.355\"/>\n",
"<text text-anchor=\"middle\" x=\"124.86\" y=\"-141.362\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"91.8479\" cy=\"-255.696\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"91.8479\" y=\"-252.096\" font-family=\"Times,serif\" font-size=\"12.00\">z1</text>\n",
"</g>\n",
"<!-- 0->2 -->\n",
"<g id=\"edge34\" class=\"edge\"><title>0->2</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M86.9198,-129.476C84.668,-155.441 84.5035,-199.203 86.4264,-227.767\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"82.9523,-228.225 87.2656,-237.902 89.9284,-227.647 82.9523,-228.225\"/>\n",
"<text text-anchor=\"middle\" x=\"90.6731\" y=\"-175.022\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node4\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"18\" cy=\"-181.848\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"18\" y=\"-178.248\" font-family=\"Times,serif\" font-size=\"12.00\">z3</text>\n",
"</g>\n",
"<!-- 0->3 -->\n",
"<g id=\"edge36\" class=\"edge\"><title>0->3</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M72.5919,-119.347C60.2801,-129.706 44.6442,-145.136 33.1969,-158.126\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"30.465,-155.936 26.6777,-165.831 35.8089,-160.457 30.465,-155.936\"/>\n",
"<text text-anchor=\"middle\" x=\"58.8944\" y=\"-141.136\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node5\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"91.8479\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"91.8479\" y=\"-14.4\" font-family=\"Times,serif\" font-size=\"12.00\">z4</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge38\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M107.648,-92.3232C112.95,-77.6158 113.514,-55.5065 109.341,-39.2238\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"112.54,-37.7708 105.917,-29.5014 105.937,-40.0962 112.54,-37.7708\"/>\n",
"<text text-anchor=\"middle\" x=\"112.495\" y=\"-62.1735\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M76.0474,-92.3232C70.7461,-77.6158 70.1819,-55.5065 74.3549,-39.2238\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"77.7583,-40.0962 77.7791,-29.5014 71.1559,-37.7708 77.7583,-40.0962\"/>\n",
"<text text-anchor=\"middle\" x=\"79.2012\" y=\"-62.1735\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge16\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M86.008,-86.6713C84.9566,-74.2844 84.8162,-58.5523 85.5868,-45.2721\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"89.079,-45.5086 86.4002,-35.2581 82.102,-44.9419 89.079,-45.5086\"/>\n",
"<text text-anchor=\"middle\" x=\"81.7974\" y=\"-62.3717\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M161.807,-163.943C153.443,-150.236 136.658,-132.326 121.419,-120.182\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"123.298,-117.218 113.175,-114.091 119.138,-122.848 123.298,-117.218\"/>\n",
"<text text-anchor=\"middle\" x=\"135.613\" y=\"-143.463\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge24\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M152.832,-168.985C142.429,-158.581 127.512,-143.664 115.036,-131.188\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"117.191,-128.393 107.645,-123.797 112.241,-133.343 117.191,-128.393\"/>\n",
"<text text-anchor=\"middle\" x=\"127.934\" y=\"-152.486\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 1->2 -->\n",
"<g id=\"edge22\" class=\"edge\"><title>1->2</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M147.791,-185.736C133.074,-194.716 113.515,-213.402 101.445,-229.461\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"98.3393,-227.803 95.5887,-238.034 104.119,-231.751 98.3393,-227.803\"/>\n",
"<text text-anchor=\"middle\" x=\"118.618\" y=\"-197.999\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 1->2 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>1->2</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M161.807,-199.752C152.828,-214.469 134.141,-234.029 118.082,-246.099\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"115.792,-243.424 109.509,-251.955 119.741,-249.204 115.792,-243.424\"/>\n",
"<text text-anchor=\"middle\" x=\"145.945\" y=\"-224.326\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 1->3 -->\n",
"<g id=\"edge26\" class=\"edge\"><title>1->3</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M148.173,-177.293C122.857,-174.686 75.797,-174.401 45.7346,-176.44\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"45.1732,-172.974 35.4998,-177.296 45.7568,-179.95 45.1732,-172.974\"/>\n",
"<text text-anchor=\"middle\" x=\"96.9539\" y=\"-181.266\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2->0 -->\n",
"<g id=\"edge30\" class=\"edge\"><title>2->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M96.4024,-238.173C98.8949,-213.976 99.2651,-169.916 97.513,-139.818\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"101.002,-139.538 96.8048,-129.81 94.0195,-140.033 101.002,-139.538\"/>\n",
"<text text-anchor=\"middle\" x=\"100.958\" y=\"-185.396\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2->1 -->\n",
"<g id=\"edge28\" class=\"edge\"><title>2->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M104.711,-242.832C115.904,-231.64 132.32,-215.224 145.302,-202.242\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"147.886,-204.607 152.483,-195.061 142.937,-199.657 147.886,-204.607\"/>\n",
"<text text-anchor=\"middle\" x=\"119.006\" y=\"-212.937\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M83.3066,-239.848C73.1162,-227.163 56.024,-209.66 41.8218,-197.133\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"43.7633,-194.191 33.8677,-190.405 39.2429,-199.535 43.7633,-194.191\"/>\n",
"<text text-anchor=\"middle\" x=\"68.5642\" y=\"-208.89\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge14\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M76.0003,-247.154C63.3147,-236.964 45.8122,-219.872 33.2846,-205.67\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"35.6875,-203.091 26.5575,-197.716 30.3427,-207.611 35.6875,-203.091\"/>\n",
"<text text-anchor=\"middle\" x=\"48.6425\" y=\"-228.812\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 3->0 -->\n",
"<g id=\"edge42\" class=\"edge\"><title>3->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M33.8476,-173.307C45.6217,-163.848 61.5452,-148.445 73.7893,-134.924\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"76.5619,-137.071 80.514,-127.241 71.2943,-132.461 76.5619,-137.071\"/>\n",
"<text text-anchor=\"middle\" x=\"59.8184\" y=\"-156.516\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3->1 -->\n",
"<g id=\"edge40\" class=\"edge\"><title>3->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M35.5226,-186.402C60.839,-189.01 107.899,-189.295 137.961,-187.256\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"138.523,-190.722 148.196,-186.4 137.939,-183.746 138.523,-190.722\"/>\n",
"<text text-anchor=\"middle\" x=\"86.7419\" y=\"-191.229\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M35.7817,-185.084C45.3149,-185.634 54,-184.555 54,-181.848 54,-180.198 50.7749,-179.153 46.0981,-178.713\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"45.8156,-175.21 35.7817,-178.612 45.7469,-182.21 45.8156,-175.21\"/>\n",
"<text text-anchor=\"middle\" x=\"57\" y=\"-178.248\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge18\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M32.9273,-192.022C50.8975,-199.71 72,-196.318 72,-181.848 72,-169.978 57.7998,-165.563 42.7772,-168.603\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"41.4324,-165.356 32.9273,-171.673 43.5159,-172.038 41.4324,-165.356\"/>\n",
"<text text-anchor=\"middle\" x=\"75\" y=\"-178.248\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 4->0 -->\n",
"<g id=\"edge44\" class=\"edge\"><title>4->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M97.3059,-35.3529C98.5657,-46.9944 98.9042,-62.6662 98.3214,-76.4737\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"94.821,-76.3742 97.6963,-86.5714 101.808,-76.8068 94.821,-76.3742\"/>\n",
"<text text-anchor=\"middle\" x=\"101.814\" y=\"-52.3133\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M109.63,-21.2357C119.163,-21.7856 127.848,-20.707 127.848,-18 127.848,-16.3504 124.623,-15.3055 119.946,-14.8653\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"119.663,-11.3625 109.63,-14.7643 119.595,-18.3621 119.663,-11.3625\"/>\n",
"<text text-anchor=\"middle\" x=\"130.848\" y=\"-14.4\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge20\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M106.775,-28.1744C124.745,-35.8618 145.848,-32.4703 145.848,-18 145.848,-6.12982 131.648,-1.71473 116.625,-4.75472\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"115.28,-1.50775 106.775,-7.82556 117.364,-8.19051 115.28,-1.50775\"/>\n",
"<text text-anchor=\"middle\" x=\"148.848\" y=\"-14.4\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node6\" class=\"node\"><title>5</title>\n",
"</g>\n",
"<!-- 5->1 -->\n",
"<g id=\"edge46\" class=\"edge\"><title>5->1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M237.644,-181.848C224.182,-181.848 207.91,-181.848 194.248,-181.848\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"193.955,-178.348 183.955,-181.848 193.955,-185.348 193.955,-178.348\"/>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<Dot visualization: custom_graph []>"
]
},
"execution_count": 71,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":dot custom_graph"
]
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Executed operation: Markiere(z4,z0,1)"
]
},
"execution_count": 72,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":exec Markiere"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
" -->\n",
"<!-- Title: prob_graph Pages: 1 -->\n",
"<svg width=\"323pt\" height=\"220pt\"\n",
" viewBox=\"0.00 0.00 322.99 219.58\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 215.584)\">\n",
"<title>prob_graph</title>\n",
"<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-215.584 319.99,-215.584 319.99,5 -4,5\"/>\n",
"<!-- 0 -->\n",
"<g id=\"node1\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"22\" cy=\"-160.05\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"22\" cy=\"-160.05\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"22\" y=\"-156.45\" font-family=\"Times,serif\" font-size=\"12.00\">z2</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"188.99\" cy=\"-105.792\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"188.99\" y=\"-102.192\" font-family=\"Times,serif\" font-size=\"12.00\">z0</text>\n",
"</g>\n",
"<!-- 0->1 -->\n",
"<g id=\"edge34\" class=\"edge\"><title>0->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M43.9333,-162.374C75.9638,-157.927 134.987,-139.094 167.029,-123.412\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"168.828,-126.42 176.048,-118.665 165.568,-120.226 168.828,-126.42\"/>\n",
"<text text-anchor=\"middle\" x=\"107.481\" y=\"-147.293\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"22\" cy=\"-51.5335\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"22\" y=\"-47.9335\" font-family=\"Times,serif\" font-size=\"12.00\">z1</text>\n",
"</g>\n",
"<!-- 0->2 -->\n",
"<g id=\"edge36\" class=\"edge\"><title>0->2</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M27.5037,-138.611C28.9932,-121.572 29.1476,-97.6156 27.9669,-79.1425\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"31.4394,-78.6663 27.1175,-68.9931 24.4638,-79.2502 31.4394,-78.6663\"/>\n",
"<text text-anchor=\"middle\" x=\"31.7353\" y=\"-105.277\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node4\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"125.206\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"125.206\" y=\"-14.4\" font-family=\"Times,serif\" font-size=\"12.00\">z3</text>\n",
"</g>\n",
"<!-- 0->3 -->\n",
"<g id=\"edge38\" class=\"edge\"><title>0->3</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M38.388,-145.344C59.1854,-121.269 94.15,-73.4213 112.857,-43.6777\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"115.886,-45.4338 118.107,-35.0745 109.91,-41.7874 115.886,-45.4338\"/>\n",
"<text text-anchor=\"middle\" x=\"69.6226\" y=\"-85.911\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node5\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"125.206\" cy=\"-193.584\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"125.206\" y=\"-189.984\" font-family=\"Times,serif\" font-size=\"12.00\">z4</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge40\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M33.0308,-179.436C48.9047,-191.313 77.9754,-201.311 99.3457,-202.64\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"99.4527,-206.139 109.417,-202.538 99.3821,-199.139 99.4527,-206.139\"/>\n",
"<text text-anchor=\"middle\" x=\"63.1882\" y=\"-195.438\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M42.3186,-150.851C62.0514,-150.574 91.2691,-159.489 109.359,-170.9\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"107.573,-173.932 117.696,-177.059 111.732,-168.302 107.573,-173.932\"/>\n",
"<text text-anchor=\"middle\" x=\"77.8389\" y=\"-149.275\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge16\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M44.0908,-161.441C60.7564,-165.29 83.5876,-172.546 100.792,-179.377\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"99.6068,-182.676 110.182,-183.322 102.318,-176.222 99.6068,-182.676\"/>\n",
"<text text-anchor=\"middle\" x=\"74.4413\" y=\"-158.809\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M171.037,-102.975C141.361,-106.16 82.233,-124.555 48.0042,-140.501\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"46.0558,-137.56 38.6479,-145.135 49.1625,-143.833 46.0558,-137.56\"/>\n",
"<text text-anchor=\"middle\" x=\"111.521\" y=\"-126.138\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge24\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M171.748,-111.394C143.686,-120.512 87.7559,-138.685 52.7572,-150.057\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"51.4806,-146.791 43.0516,-153.21 53.6437,-153.449 51.4806,-146.791\"/>\n",
"<text text-anchor=\"middle\" x=\"114.253\" y=\"-135.125\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 1->2 -->\n",
"<g id=\"edge22\" class=\"edge\"><title>1->2</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M176.122,-92.9607C149.146,-77.4643 86.5698,-56.5297 49.9421,-50.1554\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"50.3096,-46.6723 39.9131,-48.7126 49.3127,-53.601 50.3096,-46.6723\"/>\n",
"<text text-anchor=\"middle\" x=\"111.032\" y=\"-75.9581\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 1->2 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>1->2</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M171.037,-108.609C140.105,-105.29 77.1747,-85.4447 43.7956,-69.0724\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"45.3117,-65.9151 34.8339,-64.3447 42.0455,-72.1064 45.3117,-65.9151\"/>\n",
"<text text-anchor=\"middle\" x=\"109.416\" y=\"-77.2405\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 1->3 -->\n",
"<g id=\"edge26\" class=\"edge\"><title>1->3</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M182.88,-88.6802C174.326,-73.7751 159.093,-52.3209 146.336,-36.9199\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"148.744,-34.3528 139.562,-29.0666 143.444,-38.9249 148.744,-34.3528\"/>\n",
"<text text-anchor=\"middle\" x=\"158.608\" y=\"-63.2001\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 1->4 -->\n",
"<g id=\"edge28\" class=\"edge\"><title>1->4</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M174.604,-116.891C163.072,-129.632 147.375,-150.749 136.67,-167.641\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"133.484,-166.144 131.294,-176.51 139.47,-169.772 133.484,-166.144\"/>\n",
"<text text-anchor=\"middle\" x=\"161.637\" y=\"-143.666\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2->0 -->\n",
"<g id=\"edge32\" class=\"edge\"><title>2->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M16.8852,-68.9686C15.1641,-84.9428 14.8016,-108.98 15.7978,-128.35\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"12.3209,-128.81 16.491,-138.55 19.3048,-128.336 12.3209,-128.81\"/>\n",
"<text text-anchor=\"middle\" x=\"20.3415\" y=\"-95.0592\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2->1 -->\n",
"<g id=\"edge30\" class=\"edge\"><title>2->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M39.2419,-57.1358C68.2412,-66.5582 127,-85.6499 161.666,-96.9138\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"161,-100.377 171.592,-100.139 163.163,-93.7199 161,-100.377\"/>\n",
"<text text-anchor=\"middle\" x=\"102.454\" y=\"-65.4248\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M40.1623,-51.0103C57.0591,-47.4648 82.3253,-39.5503 100.94,-32.1477\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"102.383,-35.3377 110.244,-28.2344 99.6692,-28.8851 102.383,-35.3377\"/>\n",
"<text text-anchor=\"middle\" x=\"68.551\" y=\"-29.979\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge14\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M37.0012,-41.2813C52.7549,-34.218 77.8478,-25.7698 97.2582,-20.8174\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"98.1482,-24.2037 107.086,-18.5143 96.551,-17.3884 98.1482,-24.2037\"/>\n",
"<text text-anchor=\"middle\" x=\"65.1297\" y=\"-19.4494\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 3->0 -->\n",
"<g id=\"edge44\" class=\"edge\"><title>3->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M111.065,-30.1351C91.308,-52.4503 56.1834,-100.211 36.3416,-131.231\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"33.2651,-129.55 30.942,-139.887 39.2043,-133.255 33.2651,-129.55\"/>\n",
"<text text-anchor=\"middle\" x=\"67.7032\" y=\"-72.0829\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3->1 -->\n",
"<g id=\"edge42\" class=\"edge\"><title>3->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M131.316,-35.1117C139.869,-50.0168 155.103,-71.471 167.859,-86.872\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"165.451,-89.4391 174.633,-94.7253 170.752,-84.867 165.451,-89.4391\"/>\n",
"<text text-anchor=\"middle\" x=\"143.587\" y=\"-61.3918\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M142.987,-21.2357C152.521,-21.7856 161.206,-20.707 161.206,-18 161.206,-16.3504 157.98,-15.3055 153.304,-14.8653\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"153.021,-11.3625 142.987,-14.7643 152.952,-18.3621 153.021,-11.3625\"/>\n",
"<text text-anchor=\"middle\" x=\"164.206\" y=\"-14.4\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge18\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M140.133,-28.1744C158.103,-35.8618 179.206,-32.4703 179.206,-18 179.206,-6.12982 165.005,-1.71473 149.983,-4.75472\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"148.638,-1.50775 140.133,-7.82556 150.721,-8.19051 148.638,-1.50775\"/>\n",
"<text text-anchor=\"middle\" x=\"182.206\" y=\"-14.4\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 4->0 -->\n",
"<g id=\"edge48\" class=\"edge\"><title>4->0</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M107.043,-193.061C91.3191,-189.761 68.3467,-182.678 50.2324,-175.745\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"51.3295,-172.414 40.7455,-171.934 48.7199,-178.909 51.3295,-172.414\"/>\n",
"<text text-anchor=\"middle\" x=\"80.6378\" y=\"-172.803\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 4->1 -->\n",
"<g id=\"edge46\" class=\"edge\"><title>4->1</title>\n",
"<path fill=\"none\" stroke=\"gray\" stroke-dasharray=\"1,5\" d=\"M139.592,-182.485C151.124,-169.744 166.821,-148.627 177.526,-131.735\"/>\n",
"<polygon fill=\"gray\" stroke=\"gray\" points=\"180.712,-133.232 182.902,-122.866 174.725,-129.604 180.712,-133.232\"/>\n",
"<text text-anchor=\"middle\" x=\"152.559\" y=\"-148.51\" font-family=\"Times,serif\" font-size=\"12.00\">×</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M142.987,-196.82C152.521,-197.369 161.206,-196.291 161.206,-193.584 161.206,-191.934 157.98,-190.889 153.304,-190.449\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"153.021,-186.946 142.987,-190.348 152.952,-193.946 153.021,-186.946\"/>\n",
"<text text-anchor=\"middle\" x=\"164.206\" y=\"-189.984\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge20\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M140.133,-203.758C158.103,-211.446 179.206,-208.054 179.206,-193.584 179.206,-181.714 165.005,-177.299 149.983,-180.339\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"148.638,-177.092 140.133,-183.409 150.721,-183.774 148.638,-177.092\"/>\n",
"<text text-anchor=\"middle\" x=\"182.206\" y=\"-189.984\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node6\" class=\"node\"><title>5</title>\n",
"</g>\n",
"<!-- 5->1 -->\n",
"<g id=\"edge50\" class=\"edge\"><title>5->1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M260.938,-105.792C247.476,-105.792 231.204,-105.792 217.542,-105.792\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"217.249,-102.292 207.249,-105.792 217.249,-109.292 217.249,-102.292\"/>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<Dot visualization: custom_graph []>"
]
},
"execution_count": 73,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":dot custom_graph"
]
},
{
"cell_type": "code",
"execution_count": 74,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Executed operation: Fertig()"
]
},
"execution_count": 74,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":exec Fertig"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
" -->\n",
"<!-- Title: prob_graph Pages: 1 -->\n",
"<svg width=\"319pt\" height=\"224pt\"\n",
" viewBox=\"0.00 0.00 318.99 223.58\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 219.584)\">\n",
"<title>prob_graph</title>\n",
"<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-219.584 315.99,-219.584 315.99,5 -4,5\"/>\n",
"<!-- 0 -->\n",
"<g id=\"node1\" class=\"node\"><title>0</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"121.206\" cy=\"-22\" rx=\"18\" ry=\"18\"/>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"121.206\" cy=\"-22\" rx=\"22\" ry=\"22\"/>\n",
"<text text-anchor=\"middle\" x=\"121.206\" y=\"-18.4\" font-family=\"Times,serif\" font-size=\"12.00\">z2</text>\n",
"</g>\n",
"<!-- 4 -->\n",
"<g id=\"node5\" class=\"node\"><title>4</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"18\" cy=\"-55.5335\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"18\" y=\"-51.9335\" font-family=\"Times,serif\" font-size=\"12.00\">z4</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge6\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M99.1147,-23.3908C82.4492,-27.2396 59.6179,-34.4956 42.4138,-41.327\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"40.8879,-38.1717 33.0237,-45.2712 43.5988,-44.6255 40.8879,-38.1717\"/>\n",
"<text text-anchor=\"middle\" x=\"68.7643\" y=\"-20.7589\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 0->4 -->\n",
"<g id=\"edge16\" class=\"edge\"><title>0->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M102.516,-33.8595C86.7712,-40.5415 64.0354,-48.0911 46.1015,-52.6767\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"45.1214,-49.3116 36.1864,-55.0052 46.7218,-56.1262 45.1214,-49.3116\"/>\n",
"<text text-anchor=\"middle\" x=\"76.3089\" y=\"-47.6681\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 1 -->\n",
"<g id=\"node2\" class=\"node\"><title>1</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"184.99\" cy=\"-109.792\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"184.99\" y=\"-106.192\" font-family=\"Times,serif\" font-size=\"12.00\">z0</text>\n",
"</g>\n",
"<!-- 1->0 -->\n",
"<g id=\"edge2\" class=\"edge\"><title>1->0</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M174.17,-94.8992C164.959,-82.2219 151.504,-63.7027 140.461,-48.5027\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"142.997,-46.039 134.288,-40.006 137.334,-50.1535 142.997,-46.039\"/>\n",
"<text text-anchor=\"middle\" x=\"163.315\" y=\"-64.101\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 2 -->\n",
"<g id=\"node3\" class=\"node\"><title>2</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"121.206\" cy=\"-197.584\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"121.206\" y=\"-193.984\" font-family=\"Times,serif\" font-size=\"12.00\">z1</text>\n",
"</g>\n",
"<!-- 1->2 -->\n",
"<g id=\"edge12\" class=\"edge\"><title>1->2</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M174.17,-124.685C164.213,-138.389 149.297,-158.919 137.829,-174.703\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"134.912,-172.764 131.866,-182.911 140.575,-176.878 134.912,-172.764\"/>\n",
"<text text-anchor=\"middle\" x=\"162\" y=\"-150.094\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 3 -->\n",
"<g id=\"node4\" class=\"node\"><title>3</title>\n",
"<ellipse fill=\"lightgrey\" stroke=\"black\" cx=\"18\" cy=\"-164.05\" rx=\"18\" ry=\"18\"/>\n",
"<text text-anchor=\"middle\" x=\"18\" y=\"-160.45\" font-family=\"Times,serif\" font-size=\"12.00\">z3</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge4\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M113.533,-180.915C98.7595,-167.905 66.9673,-156.469 43.9955,-155.003\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"43.8171,-151.504 33.8476,-155.09 43.8773,-158.504 43.8171,-151.504\"/>\n",
"<text text-anchor=\"middle\" x=\"81.7641\" y=\"-156.359\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge22\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"purple\" stroke-width=\"2\" d=\"M105.2,-206.559C85.6013,-208.401 53.1591,-198.966 33.7129,-186.65\"/>\n",
"<polygon fill=\"purple\" stroke=\"purple\" points=\"35.6752,-183.748 25.5543,-180.614 31.5122,-189.375 35.6752,-183.748\"/>\n",
"<text text-anchor=\"middle\" x=\"71.4567\" y=\"-184.004\" font-family=\"Times,serif\" font-size=\"12.00\">↔</text>\n",
"</g>\n",
"<!-- 2->3 -->\n",
"<g id=\"edge14\" class=\"edge\"><title>2->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M103.043,-197.061C86.1465,-193.515 60.8802,-185.601 42.266,-178.198\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"43.5363,-174.935 32.9615,-174.285 40.8224,-181.388 43.5363,-174.935\"/>\n",
"<text text-anchor=\"middle\" x=\"70.6546\" y=\"-192.029\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 2->4 -->\n",
"<g id=\"edge24\" class=\"edge\"><title>2->4</title>\n",
"<path fill=\"none\" stroke=\"purple\" stroke-width=\"2\" d=\"M114.201,-180.668C98.6921,-154.238 62.1972,-103.528 38.7681,-75.408\"/>\n",
"<polygon fill=\"purple\" stroke=\"purple\" points=\"41.1195,-72.7731 31.9542,-67.4581 35.8046,-77.3286 41.1195,-72.7731\"/>\n",
"<text text-anchor=\"middle\" x=\"83.4844\" y=\"-119.438\" font-family=\"Times,serif\" font-size=\"12.00\">↔</text>\n",
"</g>\n",
"<!-- 3->2 -->\n",
"<g id=\"edge26\" class=\"edge\"><title>3->2</title>\n",
"<path fill=\"none\" stroke=\"purple\" stroke-width=\"2\" d=\"M36.1623,-164.574C53.0591,-168.119 78.3253,-176.033 96.9396,-183.436\"/>\n",
"<polygon fill=\"purple\" stroke=\"purple\" points=\"95.6692,-186.699 106.244,-187.349 98.3831,-180.246 95.6692,-186.699\"/>\n",
"<text text-anchor=\"middle\" x=\"68.551\" y=\"-161.405\" font-family=\"Times,serif\" font-size=\"12.00\">↔</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge8\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M35.7817,-167.286C45.3149,-167.836 54,-166.757 54,-164.05 54,-162.401 50.7749,-161.356 46.0981,-160.916\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"45.8156,-157.413 35.7817,-160.815 45.7469,-164.412 45.8156,-157.413\"/>\n",
"<text text-anchor=\"middle\" x=\"57\" y=\"-160.45\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 3->3 -->\n",
"<g id=\"edge18\" class=\"edge\"><title>3->3</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M32.9273,-174.225C50.8975,-181.912 72,-178.521 72,-164.05 72,-152.18 57.7998,-147.765 42.7772,-150.805\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"41.4324,-147.558 32.9273,-153.876 43.5159,-154.241 41.4324,-147.558\"/>\n",
"<text text-anchor=\"middle\" x=\"75\" y=\"-160.45\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 3->4 -->\n",
"<g id=\"edge28\" class=\"edge\"><title>3->4</title>\n",
"<path fill=\"none\" stroke=\"purple\" stroke-width=\"2\" d=\"M23.1148,-146.615C24.9642,-129.45 25.2449,-102.974 23.9567,-82.9837\"/>\n",
"<polygon fill=\"purple\" stroke=\"purple\" points=\"27.4366,-82.5966 23.1102,-72.9253 20.4613,-83.1837 27.4366,-82.5966\"/>\n",
"<text text-anchor=\"middle\" x=\"28.5358\" y=\"-111.199\" font-family=\"Times,serif\" font-size=\"12.00\">↔</text>\n",
"</g>\n",
"<!-- 4->2 -->\n",
"<g id=\"edge30\" class=\"edge\"><title>4->2</title>\n",
"<path fill=\"none\" stroke=\"purple\" stroke-width=\"2\" d=\"M25.0049,-72.4489C40.5135,-98.8791 77.0084,-149.589 100.437,-177.709\"/>\n",
"<polygon fill=\"purple\" stroke=\"purple\" points=\"98.0861,-180.344 107.251,-185.659 103.401,-175.789 98.0861,-180.344\"/>\n",
"<text text-anchor=\"middle\" x=\"55.7212\" y=\"-126.479\" font-family=\"Times,serif\" font-size=\"12.00\">↔</text>\n",
"</g>\n",
"<!-- 4->3 -->\n",
"<g id=\"edge32\" class=\"edge\"><title>4->3</title>\n",
"<path fill=\"none\" stroke=\"purple\" stroke-width=\"2\" d=\"M12.8852,-72.9686C11.0358,-90.134 10.7551,-116.609 12.0433,-136.6\"/>\n",
"<polygon fill=\"purple\" stroke=\"purple\" points=\"8.56341,-136.987 12.8898,-146.658 15.5387,-136.4 8.56341,-136.987\"/>\n",
"<text text-anchor=\"middle\" x=\"7.46424\" y=\"-101.184\" font-family=\"Times,serif\" font-size=\"12.00\">↔</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge10\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"green\" d=\"M35.7817,-58.7693C45.3149,-59.3191 54,-58.2406 54,-55.5335 54,-53.8839 50.7749,-52.839 46.0981,-52.3988\"/>\n",
"<polygon fill=\"green\" stroke=\"green\" points=\"45.8156,-48.896 35.7817,-52.2978 45.7469,-55.8957 45.8156,-48.896\"/>\n",
"<text text-anchor=\"middle\" x=\"57\" y=\"-51.9335\" font-family=\"Times,serif\" font-size=\"12.00\">1</text>\n",
"</g>\n",
"<!-- 4->4 -->\n",
"<g id=\"edge20\" class=\"edge\"><title>4->4</title>\n",
"<path fill=\"none\" stroke=\"red\" d=\"M32.9273,-65.708C50.8975,-73.3953 72,-70.0038 72,-55.5335 72,-43.6633 57.7998,-39.2483 42.7772,-42.2882\"/>\n",
"<polygon fill=\"red\" stroke=\"red\" points=\"41.4324,-39.0413 32.9273,-45.3591 43.5159,-45.724 41.4324,-39.0413\"/>\n",
"<text text-anchor=\"middle\" x=\"75\" y=\"-51.9335\" font-family=\"Times,serif\" font-size=\"12.00\">0</text>\n",
"</g>\n",
"<!-- 5 -->\n",
"<g id=\"node6\" class=\"node\"><title>5</title>\n",
"</g>\n",
"<!-- 5->1 -->\n",
"<g id=\"edge34\" class=\"edge\"><title>5->1</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M256.938,-109.792C243.476,-109.792 227.204,-109.792 213.542,-109.792\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"213.249,-106.292 203.249,-109.792 213.249,-113.292 213.249,-106.292\"/>\n",
"</g>\n",
"</g>\n",
"</svg>"
],
"text/plain": [
"<Dot visualization: custom_graph []>"
]
},
"execution_count": 75,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
":dot custom_graph"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "ProB 2",
"language": "prob",
"name": "prob2"
},
"language_info": {
"codemirror_mode": "prob2_jupyter_repl",
"file_extension": ".prob",
"mimetype": "text/x-prob2-jupyter-repl",
"name": "prob"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
%% Cell type:markdown id: tags:
## Algorithmus Minimalautomat
Hier ist der Beispiel DFA aus den Folien zur Illustration der Konstruktion des Minimalautomaten.
%% Cell type:code id: tags:
```
prob
::load
MACHINE DFA
SETS
Z = {z0,z1,z2,z3,z4}
ABSTRACT_CONSTANTS δs, L
CONSTANTS Σ, F, δ
PROPERTIES
F ⊆ Z ∧ δ ∈ (Z×Σ) → Z ∧
/* Definition der erweiterten Überführungsfunktion */
δs ∈ (Z×seq(Σ)) → Z ∧
δs = λ(z,s).(z∈Z ∧ s∈seq(Σ) |
IF s=[] THEN z
ELSE δs(δ(z,first(s)),tail(s)) END)
∧
/* Die vom Automaten akzeptierte Sprache L */
L = {ω|ω∈seq(Σ) ∧ δs(z0,ω) ∈ F}
∧
/* Der Automat von Folie 10: */
Σ = {0,1} ∧
F = {z2} ∧
δ = { (z0,0)↦z1, (z0,1)↦z2,
(z1,0)↦z3, (z1,1)↦z3,
(z2,0)↦z4, (z2,1)↦z4,
(z3,0)↦z3, (z3,1)↦z3,
(z4,0)↦z4, (z4,1)↦z4 }
DEFINITIONS
SET_PREF_DOT_HORIZONTAL_LAYOUT==TRUE;
SET_PREF_DOT_LIMIT_PAGE_SIZE==FALSE;
CUSTOM_GRAPH_NODES1 == rec(shape:"doublecircle",nodes:F);
CUSTOM_GRAPH_NODES2 == rec(shape:"circle",nodes:Z\F);
CUSTOM_GRAPH_NODES3 == rec(shape:"none",color:"white",style:"none",nodes:{""});
CUSTOM_GRAPH_EDGES1 == rec(color:"red",label:"0",edges:{a,b|(a,0)|->b:δ});
CUSTOM_GRAPH_EDGES2 == rec(color:"green",label:"1",edges:{a,b|(a,1)|->b:δ});
CUSTOM_GRAPH_EDGES3 == rec(color:"black",label:"",edges:{"" |-> z0})
END
```
%% Output
Loaded machine: DFA
%% Cell type:code id: tags:
```
prob
:constants
```
%% Output
Machine constants set up using operation 0: $setup_constants()
%% Cell type:markdown id: tags:
Der Automat sieht grafisch so aus:
%% Cell type:code id: tags:
```
prob
:dot custom_graph
```
%% Output
<Dot visualization: custom_graph []>
%% Cell type:markdown id: tags:
In der folgenden B Maschine sind (bis auf die Entfernung der nicht erreichbaren Zustände) die Schritte des Algorithmus umgesetzt worden.
%% Cell type:code id: tags:
```
prob
::load
MACHINE MinimalDFA
SETS
Z = {z0,z1,z2,z3,z4}
ABSTRACT_CONSTANTS δs, L
CONSTANTS Σ, F, δ
PROPERTIES
F ⊆ Z ∧ δ ∈ (Z×Σ) → Z ∧
/* Definition der erweiterten Überführungsfunktion */
δs ∈ (Z×seq(Σ)) → Z ∧
δs = λ(z,s).(z∈Z ∧ s∈seq(Σ) |
IF s=[] THEN z
ELSE δs(δ(z,first(s)),tail(s)) END)
∧
/* Die vom Automaten akzeptierte Sprache L */
L = {ω|ω∈seq(Σ) ∧ δs(z0,ω) ∈ F}
∧
/* Der Automat von Folie 10: */
Σ = {0,1} ∧
F = {z2} ∧
δ = { (z0,0)↦z1, (z0,1)↦z2,
(z1,0)↦z3, (z1,1)↦z3,
(z2,0)↦z4, (z2,1)↦z4,
(z3,0)↦z3, (z3,1)↦z3,
(z4,0)↦z4, (z4,1)↦z4 }
VARIABLES
markiert, fusioniert
INVARIANT markiert : Z <-> Z &
fusioniert : Z <-> Z
INITIALISATION markiert := {za,zb| za∈F ⇔ zb∉F} || fusioniert := {}
OPERATIONS
Markiere(za,zb,a) = SELECT (za,zb) ∉ markiert ∧
a∈Σ ∧
(δ(za,a),δ(zb,a)) ∈ markiert THEN
markiert := markiert \/ {(za,zb),(zb,za)}
END;
Fertig = SELECT !(za,zb,a).((za,zb) ∉ markiert ∧ a∈Σ
=>
(δ(za,a),δ(zb,a)) ∉ markiert) THEN
fusioniert := {za,zb|(za,zb) ∉ markiert ∧ za ≠ zb} ||
markiert := {}
END
DEFINITIONS
SET_PREF_DOT_HORIZONTAL_LAYOUT==TRUE;
SET_PREF_DOT_LIMIT_PAGE_SIZE==FALSE;
CUSTOM_GRAPH_NODES1 == rec(shape:"doublecircle",nodes:F);
CUSTOM_GRAPH_NODES2 == rec(shape:"circle",nodes:Z\F);
CUSTOM_GRAPH_NODES3 == rec(shape:"none",color:"white",style:"none",nodes:{""});
CUSTOM_GRAPH_EDGES1 == rec(color:"red",label:"0",edges:{a,b|(a,0)|->b∈δ});
CUSTOM_GRAPH_EDGES2 == rec(color:"green",label:"1",edges:{a,b|(a,1)|->b∈δ});
CUSTOM_GRAPH_EDGES3 == rec(color:"black",label:"",edges:{"" |-> z0});
CUSTOM_GRAPH_EDGES4 == rec(color:"gray",label:"×",style:"dotted",edges:markiert);
CUSTOM_GRAPH_EDGES5 == rec(color:"purple",label:"↔",style:"bold",edges:fusioniert)
END
```
%% Output
Loaded machine: MinimalDFA
%% 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:markdown id: tags:
Markiere alle Paare $
\{
z, z'
\}
$ mit
*
$z
\i
n F
\L
ongleftrightarrow z'
\n
ot
\i
n F$.
Dies wird in der B Maschine in der INITIALISATION Klausel gemacht. Im Graphen unten sind die markierten Paare mit $
\t
imes$ gekennzeichnet.
%% Cell type:code id: tags:
```
prob
:pref DOT_ENGINE=circo
```
%% Output
Preference changed: DOT_ENGINE = circo
%% Cell type:code id: tags:
```
prob
:dot custom_graph
```
%% Output
<Dot visualization: custom_graph []>
%% Cell type:markdown id: tags:
Sei $
\{
z, z'
\}
$ ein unmarkiertes Paar. Prüfe für jedes
$a
\i
n
\S
igma$, ob $
\{\d
elta(z,a),
\d
elta(z',a)
\}
$ bereits markiert
ist. Ist mindestens ein Test erfolgreich, so markiere auch
$
\{
z,z'
\}
$.
Dies ist hier der Fall:
%% Cell type:code id: tags:
```
prob
:exec Markiere
```
%% Output
Executed operation: Markiere(z1,z0,1)
%% Cell type:code id: tags:
```
prob
:dot custom_graph
```
%% Output
<Dot visualization: custom_graph []>
%% Cell type:code id: tags:
```
prob
:exec Markiere
```
%% Output
Executed operation: Markiere(z3,z0,1)
%% Cell type:code id: tags:
```
prob
:dot custom_graph
```
%% Output
<Dot visualization: custom_graph []>
%% Cell type:code id: tags:
```
prob
:exec Markiere
```
%% Output
Executed operation: Markiere(z4,z0,1)
%% Cell type:code id: tags:
```
prob
:dot custom_graph
```
%% Output
<Dot visualization: custom_graph []>
%% Cell type:code id: tags:
```
prob
:exec Fertig
```
%% Output
Executed operation: Fertig()
%% Cell type:code id: tags:
```
prob
:dot custom_graph
```
%% Output
<Dot visualization: custom_graph []>
%% Cell type:code id: tags:
```
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