Fixes #311. * tests/python/ipnbdoctest.py: Adjust to process the new format, with a lot of inspiration from Vcsn's copy of this file. * tests/python/_altscc.ipynb, tests/python/_aux.ipynb, tests/python/acc_cond.ipynb, tests/python/accparse.ipynb, tests/python/alternation.ipynb, tests/python/atva16-fig2a.ipynb, tests/python/atva16-fig2b.ipynb, tests/python/automata-io.ipynb, tests/python/automata.ipynb, tests/python/decompose.ipynb, tests/python/formulas.ipynb, tests/python/gen.ipynb, tests/python/highlighting.ipynb, tests/python/ltsmin-dve.ipynb, tests/python/ltsmin-pml.ipynb, tests/python/parity.ipynb, tests/python/piperead.ipynb, tests/python/product.ipynb, tests/python/randaut.ipynb, tests/python/randltl.ipynb, tests/python/stutter-inv.ipynb, tests/python/testingaut.ipynb, tests/python/word.ipynb: Upgrade to the new format. * NEWS: Mention the change.
1971 lines
141 KiB
Text
1971 lines
141 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 1,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"from IPython.display import display\n",
|
|
"import spot\n",
|
|
"spot.setup()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Definitions and examples"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"In Spot a **Parity acceptance** is defined by an **kind**, a **style** and a **numsets** (number of acceptance sets):\n",
|
|
"+ The **numsets** is the number of acceptance sets used by the parity acceptance.\n",
|
|
"+ The **kind** can be either **max** or **min**. The parity kind is well defined only if the **numsets** is strictly greater than 1.\n",
|
|
" - **max** odd 4: *Inf(3) | (Fin(2) & (Inf(1) | Fin(0)))*\n",
|
|
" - **min** odd 4: *Fin(0) & (Inf(1) | (Fin(2) & Inf(3)))*\n",
|
|
"+ The **style** can be either **odd** or **even**. The parity style is well defined only if the **numsets** is non-null.\n",
|
|
" - max **odd** 4: *Inf(3) | (Fin(2) & (Inf(1) | Fin(0)))*\n",
|
|
" - min **even** 4: *Fin(3) & (Inf(2) | (Fin(1) & Inf(0)))*\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"**Some parity acceptance examples:**\n",
|
|
"<div align=\"center\">\n",
|
|
"**numsets = 1:** \n",
|
|
"</div>\n",
|
|
"\n",
|
|
"| | **max** | **min** |\n",
|
|
"|:---------:|:--------------:|:--------------:|\n",
|
|
"| **odd** | Fin(1) | Fin(1) | \n",
|
|
"| **even** | Inf(0) | Inf(0) |\n",
|
|
"\n",
|
|
"<br>\n",
|
|
"<div align=\"center\">\n",
|
|
"**numsets = 2:** \n",
|
|
"</div>\n",
|
|
"\n",
|
|
"| | **max** | **min** |\n",
|
|
"|:---------:|:--------------------:|:--------------------:|\n",
|
|
"| **odd** | Inf(1) | Fin(0) | Fin(1) & Inf(0) | \n",
|
|
"| **even** | Fin(0) & Inf(1) | Inf(0) | Fin(1) |\n",
|
|
"\n",
|
|
"\n",
|
|
"<br>\n",
|
|
"<div align=\"center\">\n",
|
|
"**numsets = 3:** \n",
|
|
"</div>\n",
|
|
" \n",
|
|
"| | **max** | **min** |\n",
|
|
"|:---------:|:-------------------------------:|:-------------------------------:|\n",
|
|
"| **odd** | Fin(2) & (Inf(1) | Fin(0)) | Inf(2) | (Fin(1) & Inf(0)) | \n",
|
|
"| **even** | Fin(0) & (Inf(1) | Fin(2)) | Inf(0) | (Fin(1) & Inf(2)) |\n",
|
|
"\n",
|
|
"<br>\n",
|
|
"<div align=\"center\">\n",
|
|
"**numsets = 4:** \n",
|
|
"</div>\n",
|
|
"\n",
|
|
"| | **max** | **min** |\n",
|
|
"|:---------:|:-----------------------------------------------:|:-----------------------------------------------:|\n",
|
|
"| **odd** | Inf(3) | (Fin(2) & (Inf(1) | Fin(0))) | Fin(3) & (Inf(2) | (Fin(1) & Inf(0))) | \n",
|
|
"| **even** | Fin(0) & (Inf(1) | (Fin(2) & Inf(3))) | Inf(0) | (Fin(1) & (Inf(2) | Fin(3))) |\n",
|
|
"\n",
|
|
"<br>\n",
|
|
"According to the given examples, we can remark that:\n",
|
|
"+ Given a parity **max**: Acceptance sets with greater indexes are more significant\n",
|
|
"+ Given a parity **min**: Acceptance sets with lower indexes are more significant"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Change parity"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## To toggle **style**\n",
|
|
"### A new acceptance set is introduced and all the existing sets' indexes are increased by 1.\n",
|
|
"#### Parity max odd 5 -> Parity max even\n",
|
|
"If the acceptance is a parity **max**, all the transitions that do not belong to any acceptance set will belong to the new set."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 2,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.15\" width=\"494pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 215.149)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-215.149 490,-215.149 490,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"94\" y=\"-196.949\">Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"119\" y=\"-196.949\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"135\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182\" y=\"-196.949\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"198\" y=\"-196.949\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"241\" y=\"-196.949\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"257\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"304\" y=\"-196.949\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"320\" y=\"-196.949\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-196.949\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-196.949\">))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"185.5\" y=\"-182.949\">[parity max odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4492\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-27.1492C2.79388,-27.1492 17.1543,-27.1492 30.6317,-27.1492\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-27.1492 30.9419,-30.2993 34.4419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 34.4419,-27.1493 30.9418,-23.9993 37.9419,-27.1492 37.9419,-27.1492\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4492\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M72.5604,-34.6279C95.3209,-45.567 137.805,-65.9857 163.828,-78.493\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"170.384,-81.6441 162.711,-81.4508 167.23,-80.1279 164.075,-78.6117 164.075,-78.6117 164.075,-78.6117 167.23,-80.1279 165.44,-75.7726 170.384,-81.6441 170.384,-81.6441\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4492\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.0952,-28.1082C138.565,-31.7248 367.127,-44.5466 442.609,-48.781\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"449.832,-49.1861 442.666,-51.939 446.337,-48.9901 442.843,-48.794 442.843,-48.794 442.843,-48.794 446.337,-48.9901 443.019,-45.6489 449.832,-49.1861 449.832,-49.1861\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9492\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9492\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.149\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.449\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>2->1</title>\n",
|
|
"<path d=\"M195.118,-105.753C200.868,-116.863 210.129,-130.605 223,-137.149 249.274,-150.508 283.828,-142.138 306.104,-133.952\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"312.879,-131.329 307.489,-136.794 309.615,-132.593 306.351,-133.856 306.351,-133.856 306.351,-133.856 309.615,-132.593 305.214,-130.919 312.879,-131.329 312.879,-131.329\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-147.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->0</title>\n",
|
|
"<path d=\"M450.444,-44.332C418.416,-33.4213 345.525,-10.2561 282,-2.14924 255.989,1.17024 249.149,-0.19123 223,-2.14924 172.148,-5.95702 113.261,-16.2385 81.0794,-22.3655\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.8722,-23.7535 80.1502,-19.3365 77.3091,-23.0916 80.7459,-22.4297 80.7459,-22.4297 80.7459,-22.4297 77.3091,-23.0916 81.3417,-25.5228 73.8722,-23.7535 73.8722,-23.7535\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9492\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.94924\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\"><title>3->2</title>\n",
|
|
"<path d=\"M449.836,-52.5486C402.007,-59.2343 267.128,-78.0883 211.966,-85.7992\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.033,-86.7683 211.529,-82.6795 208.499,-86.2837 211.965,-85.7992 211.965,-85.7992 211.965,-85.7992 208.499,-86.2837 212.401,-88.9188 205.033,-86.7683 205.033,-86.7683\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->2</title>\n",
|
|
"<path d=\"M312.354,-117.517C303.504,-114.068 292.273,-109.991 282,-107.149 258.672,-100.697 231.458,-95.7597 212.333,-92.7023\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.172,-91.585 212.574,-89.5519 208.63,-92.1246 212.088,-92.6643 212.088,-92.6643 212.088,-92.6643 208.63,-92.1246 211.603,-95.7766 205.172,-91.585 205.172,-91.585\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.949\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>1->3</title>\n",
|
|
"<path d=\"M347.405,-120.535C368.489,-115.478 405.04,-104.865 432,-87.1492 439.129,-82.4649 445.855,-76.0569 451.469,-69.8895\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"456.293,-64.3495 454.072,-71.6973 453.995,-66.9892 451.696,-69.6288 451.696,-69.6288 451.696,-69.6288 453.995,-66.9892 449.321,-67.5604 456.293,-64.3495 456.293,-64.3495\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.949\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->1</title>\n",
|
|
"<path d=\"M317.576,-137.816C312.807,-148.805 316.781,-160.149 329.5,-160.149 339.437,-160.149 344.036,-153.226 343.299,-144.956\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"341.424,-137.816 346.248,-143.787 342.313,-141.201 343.202,-144.587 343.202,-144.587 343.202,-144.587 342.313,-141.201 340.155,-145.387 341.424,-137.816 341.424,-137.816\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd5 = tuple(spot.automata(\"randaut -A 'parity max odd 5' -Q4 2|\"))[0]\n",
|
|
"display(aut_max_odd5.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The new indexes of the acceptance sets:\n",
|
|
"+ 4 -> 5\n",
|
|
"+ 3 -> 4\n",
|
|
"+ 2 -> 3\n",
|
|
"+ 1 -> 2\n",
|
|
"+ 0 -> 1\n",
|
|
"+ ∅ -> 0"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"#### Result of Parity max odd 5 -> Parity max even 6"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"249pt\" viewBox=\"0.00 0.00 494.00 249.15\" width=\"494pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 245.149)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-245.149 490,-245.149 490,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"61.5\" y=\"-226.949\">Fin(</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"86.5\" y=\"-226.949\">❺</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"102.5\" y=\"-226.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"149.5\" y=\"-226.949\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"165.5\" y=\"-226.949\">) | (Fin(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"208.5\" y=\"-226.949\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"224.5\" y=\"-226.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"271.5\" y=\"-226.949\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"287.5\" y=\"-226.949\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"330.5\" y=\"-226.949\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"346.5\" y=\"-226.949\">) & Inf(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"389.5\" y=\"-226.949\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"405.5\" y=\"-226.949\">)))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182.5\" y=\"-212.949\">[parity max even 6]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4492\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-27.1492C2.79388,-27.1492 17.1543,-27.1492 30.6317,-27.1492\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-27.1492 30.9419,-30.2993 34.4419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 34.4419,-27.1493 30.9418,-23.9993 37.9419,-27.1492 37.9419,-27.1492\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4492\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M72.5604,-34.6279C95.3209,-45.567 137.805,-65.9857 163.828,-78.493\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"170.384,-81.6441 162.711,-81.4508 167.23,-80.1279 164.075,-78.6117 164.075,-78.6117 164.075,-78.6117 167.23,-80.1279 165.44,-75.7726 170.384,-81.6441 170.384,-81.6441\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-88.9492\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"113.5\" y=\"-73.9492\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4492\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.0952,-28.1082C138.565,-31.7248 367.127,-44.5466 442.609,-48.781\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"449.832,-49.1861 442.666,-51.939 446.337,-48.9901 442.843,-48.794 442.843,-48.794 442.843,-48.794 446.337,-48.9901 443.019,-45.6489 449.832,-49.1861 449.832,-49.1861\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9492\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9492\">❺</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-139.149\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-135.449\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>2->1</title>\n",
|
|
"<path d=\"M195.157,-105.678C200.925,-116.753 210.192,-130.484 223,-137.149 248.404,-150.37 282.123,-148.19 304.528,-144.488\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"311.665,-143.195 305.339,-147.543 308.221,-143.819 304.777,-144.443 304.777,-144.443 304.777,-144.443 308.221,-143.819 304.215,-141.344 311.665,-143.195 311.665,-143.195\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-165.949\">p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-150.949\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->0</title>\n",
|
|
"<path d=\"M450.444,-44.332C418.416,-33.4213 345.525,-10.2561 282,-2.14924 255.989,1.17024 249.149,-0.19123 223,-2.14924 172.148,-5.95702 113.261,-16.2385 81.0794,-22.3655\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.8722,-23.7535 80.1502,-19.3365 77.3091,-23.0916 80.7459,-22.4297 80.7459,-22.4297 80.7459,-22.4297 77.3091,-23.0916 81.3417,-25.5228 73.8722,-23.7535 73.8722,-23.7535\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9492\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.94924\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\"><title>3->2</title>\n",
|
|
"<path d=\"M449.836,-52.5486C402.007,-59.2343 267.128,-78.0883 211.966,-85.7992\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.033,-86.7683 211.529,-82.6795 208.499,-86.2837 211.965,-85.7992 211.965,-85.7992 211.965,-85.7992 208.499,-86.2837 212.401,-88.9188 205.033,-86.7683 205.033,-86.7683\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-90.9492\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"321.5\" y=\"-75.9492\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->2</title>\n",
|
|
"<path d=\"M315.138,-127.724C306.288,-120.744 294.116,-112.214 282,-107.149 259.435,-97.7157 231.742,-93.1795 212.278,-91.0277\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.249,-90.3145 212.532,-87.8873 208.731,-90.6678 212.214,-91.0212 212.214,-91.0212 212.214,-91.0212 208.731,-90.6678 211.895,-94.1551 205.249,-90.3145 205.249,-90.3145\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.949\">❺</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>1->3</title>\n",
|
|
"<path d=\"M346.586,-132.922C367.451,-124.411 404.435,-107.815 432,-87.1492 438.825,-82.0325 445.476,-75.518 451.116,-69.3858\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"455.986,-63.9127 453.686,-71.236 453.659,-66.5273 451.333,-69.142 451.333,-69.142 451.333,-69.142 453.659,-66.5273 448.979,-67.0479 455.986,-63.9127 455.986,-63.9127\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-136.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-121.949\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->1</title>\n",
|
|
"<path d=\"M317.576,-152.816C312.807,-163.805 316.781,-175.149 329.5,-175.149 339.437,-175.149 344.036,-168.226 343.299,-159.956\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"341.424,-152.816 346.248,-158.787 342.313,-156.201 343.202,-159.587 343.202,-159.587 343.202,-159.587 342.313,-156.201 340.155,-160.387 341.424,-152.816 341.424,-152.816\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-193.949\">p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"321.5\" y=\"-178.949\">⓿</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd5_to_even = spot.change_parity(aut_max_odd5, spot.parity_kind_any, spot.parity_style_even)\n",
|
|
"display(aut_max_odd5_to_even.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"#### Parity min odd 5 -> Parity min even\n",
|
|
"If the acceptance is a parity **min**, the new acceptance set will not be used."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 4,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.15\" width=\"494pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 215.149)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-215.149 490,-215.149 490,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"94\" y=\"-196.949\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"119\" y=\"-196.949\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"135\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182\" y=\"-196.949\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"198\" y=\"-196.949\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"241\" y=\"-196.949\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"257\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"304\" y=\"-196.949\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"320\" y=\"-196.949\">) | Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-196.949\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-196.949\">))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"186\" y=\"-182.949\">[parity min odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4492\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-27.1492C2.79388,-27.1492 17.1543,-27.1492 30.6317,-27.1492\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-27.1492 30.9419,-30.2993 34.4419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 34.4419,-27.1493 30.9418,-23.9993 37.9419,-27.1492 37.9419,-27.1492\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4492\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M72.5604,-34.6279C95.3209,-45.567 137.805,-65.9857 163.828,-78.493\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"170.384,-81.6441 162.711,-81.4508 167.23,-80.1279 164.075,-78.6117 164.075,-78.6117 164.075,-78.6117 167.23,-80.1279 165.44,-75.7726 170.384,-81.6441 170.384,-81.6441\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4492\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.0952,-28.1082C138.565,-31.7248 367.127,-44.5466 442.609,-48.781\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"449.832,-49.1861 442.666,-51.939 446.337,-48.9901 442.843,-48.794 442.843,-48.794 442.843,-48.794 446.337,-48.9901 443.019,-45.6489 449.832,-49.1861 449.832,-49.1861\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9492\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9492\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.149\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.449\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>2->1</title>\n",
|
|
"<path d=\"M195.118,-105.753C200.868,-116.863 210.129,-130.605 223,-137.149 249.274,-150.508 283.828,-142.138 306.104,-133.952\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"312.879,-131.329 307.489,-136.794 309.615,-132.593 306.351,-133.856 306.351,-133.856 306.351,-133.856 309.615,-132.593 305.214,-130.919 312.879,-131.329 312.879,-131.329\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-147.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->0</title>\n",
|
|
"<path d=\"M450.444,-44.332C418.416,-33.4213 345.525,-10.2561 282,-2.14924 255.989,1.17024 249.149,-0.19123 223,-2.14924 172.148,-5.95702 113.261,-16.2385 81.0794,-22.3655\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.8722,-23.7535 80.1502,-19.3365 77.3091,-23.0916 80.7459,-22.4297 80.7459,-22.4297 80.7459,-22.4297 77.3091,-23.0916 81.3417,-25.5228 73.8722,-23.7535 73.8722,-23.7535\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9492\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.94924\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\"><title>3->2</title>\n",
|
|
"<path d=\"M449.836,-52.5486C402.007,-59.2343 267.128,-78.0883 211.966,-85.7992\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.033,-86.7683 211.529,-82.6795 208.499,-86.2837 211.965,-85.7992 211.965,-85.7992 211.965,-85.7992 208.499,-86.2837 212.401,-88.9188 205.033,-86.7683 205.033,-86.7683\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->2</title>\n",
|
|
"<path d=\"M312.354,-117.517C303.504,-114.068 292.273,-109.991 282,-107.149 258.672,-100.697 231.458,-95.7597 212.333,-92.7023\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.172,-91.585 212.574,-89.5519 208.63,-92.1246 212.088,-92.6643 212.088,-92.6643 212.088,-92.6643 208.63,-92.1246 211.603,-95.7766 205.172,-91.585 205.172,-91.585\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.949\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>1->3</title>\n",
|
|
"<path d=\"M347.405,-120.535C368.489,-115.478 405.04,-104.865 432,-87.1492 439.129,-82.4649 445.855,-76.0569 451.469,-69.8895\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"456.293,-64.3495 454.072,-71.6973 453.995,-66.9892 451.696,-69.6288 451.696,-69.6288 451.696,-69.6288 453.995,-66.9892 449.321,-67.5604 456.293,-64.3495 456.293,-64.3495\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.949\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->1</title>\n",
|
|
"<path d=\"M317.576,-137.816C312.807,-148.805 316.781,-160.149 329.5,-160.149 339.437,-160.149 344.036,-153.226 343.299,-144.956\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"341.424,-137.816 346.248,-143.787 342.313,-141.201 343.202,-144.587 343.202,-144.587 343.202,-144.587 342.313,-141.201 340.155,-145.387 341.424,-137.816 341.424,-137.816\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_min_odd5 = tuple(spot.automata(\"randaut -A 'parity min odd 5' -Q4 2|\"))[0]\n",
|
|
"display(aut_min_odd5.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The new indexes of the acceptance sets:\n",
|
|
"+ 4 -> 5\n",
|
|
"+ 3 -> 4\n",
|
|
"+ 2 -> 3\n",
|
|
"+ 1 -> 2\n",
|
|
"+ 0 -> 1\n",
|
|
"+ ∅ -> ∅"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"#### Result of Parity min odd 5 -> Parity min even 6"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.15\" width=\"494pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 215.149)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-215.149 490,-215.149 490,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"64.5\" y=\"-196.949\">Inf(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"86.5\" y=\"-196.949\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"102.5\" y=\"-196.949\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"145.5\" y=\"-196.949\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"161.5\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"208.5\" y=\"-196.949\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"224.5\" y=\"-196.949\">) | (Fin(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-196.949\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"283.5\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"330.5\" y=\"-196.949\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"346.5\" y=\"-196.949\">) | Fin(</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"386.5\" y=\"-196.949\">❺</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"402.5\" y=\"-196.949\">)))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"183\" y=\"-182.949\">[parity min even 6]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4492\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-27.1492C2.79388,-27.1492 17.1543,-27.1492 30.6317,-27.1492\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-27.1492 30.9419,-30.2993 34.4419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 34.4419,-27.1493 30.9418,-23.9993 37.9419,-27.1492 37.9419,-27.1492\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4492\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M72.5604,-34.6279C95.3209,-45.567 137.805,-65.9857 163.828,-78.493\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"170.384,-81.6441 162.711,-81.4508 167.23,-80.1279 164.075,-78.6117 164.075,-78.6117 164.075,-78.6117 167.23,-80.1279 165.44,-75.7726 170.384,-81.6441 170.384,-81.6441\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4492\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.0952,-28.1082C138.565,-31.7248 367.127,-44.5466 442.609,-48.781\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"449.832,-49.1861 442.666,-51.939 446.337,-48.9901 442.843,-48.794 442.843,-48.794 442.843,-48.794 446.337,-48.9901 443.019,-45.6489 449.832,-49.1861 449.832,-49.1861\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9492\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9492\">❺</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.149\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.449\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>2->1</title>\n",
|
|
"<path d=\"M195.118,-105.753C200.868,-116.863 210.129,-130.605 223,-137.149 249.274,-150.508 283.828,-142.138 306.104,-133.952\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"312.879,-131.329 307.489,-136.794 309.615,-132.593 306.351,-133.856 306.351,-133.856 306.351,-133.856 309.615,-132.593 305.214,-130.919 312.879,-131.329 312.879,-131.329\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-147.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->0</title>\n",
|
|
"<path d=\"M450.444,-44.332C418.416,-33.4213 345.525,-10.2561 282,-2.14924 255.989,1.17024 249.149,-0.19123 223,-2.14924 172.148,-5.95702 113.261,-16.2385 81.0794,-22.3655\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.8722,-23.7535 80.1502,-19.3365 77.3091,-23.0916 80.7459,-22.4297 80.7459,-22.4297 80.7459,-22.4297 77.3091,-23.0916 81.3417,-25.5228 73.8722,-23.7535 73.8722,-23.7535\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9492\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.94924\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\"><title>3->2</title>\n",
|
|
"<path d=\"M449.836,-52.5486C402.007,-59.2343 267.128,-78.0883 211.966,-85.7992\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.033,-86.7683 211.529,-82.6795 208.499,-86.2837 211.965,-85.7992 211.965,-85.7992 211.965,-85.7992 208.499,-86.2837 212.401,-88.9188 205.033,-86.7683 205.033,-86.7683\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->2</title>\n",
|
|
"<path d=\"M312.354,-117.517C303.504,-114.068 292.273,-109.991 282,-107.149 258.672,-100.697 231.458,-95.7597 212.333,-92.7023\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.172,-91.585 212.574,-89.5519 208.63,-92.1246 212.088,-92.6643 212.088,-92.6643 212.088,-92.6643 208.63,-92.1246 211.603,-95.7766 205.172,-91.585 205.172,-91.585\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.949\">❺</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>1->3</title>\n",
|
|
"<path d=\"M347.405,-120.535C368.489,-115.478 405.04,-104.865 432,-87.1492 439.129,-82.4649 445.855,-76.0569 451.469,-69.8895\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"456.293,-64.3495 454.072,-71.6973 453.995,-66.9892 451.696,-69.6288 451.696,-69.6288 451.696,-69.6288 453.995,-66.9892 449.321,-67.5604 456.293,-64.3495 456.293,-64.3495\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.949\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->1</title>\n",
|
|
"<path d=\"M317.576,-137.816C312.807,-148.805 316.781,-160.149 329.5,-160.149 339.437,-160.149 344.036,-153.226 343.299,-144.956\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"341.424,-137.816 346.248,-143.787 342.313,-141.201 343.202,-144.587 343.202,-144.587 343.202,-144.587 342.313,-141.201 340.155,-145.387 341.424,-137.816 341.424,-137.816\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_min_odd5_to_even = spot.change_parity(aut_min_odd5, spot.parity_kind_any, spot.parity_style_even)\n",
|
|
"display(aut_min_odd5_to_even.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"### To toggle **kind**\n",
|
|
"#### The indexes of the acceptance sets are reversed\n",
|
|
"#### Parity max odd 5 ----> Parity min:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 6,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.15\" width=\"494pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 215.149)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-215.149 490,-215.149 490,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"94\" y=\"-196.949\">Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"119\" y=\"-196.949\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"135\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182\" y=\"-196.949\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"198\" y=\"-196.949\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"241\" y=\"-196.949\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"257\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"304\" y=\"-196.949\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"320\" y=\"-196.949\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-196.949\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-196.949\">))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"185.5\" y=\"-182.949\">[parity max odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4492\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-27.1492C2.79388,-27.1492 17.1543,-27.1492 30.6317,-27.1492\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-27.1492 30.9419,-30.2993 34.4419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 34.4419,-27.1493 30.9418,-23.9993 37.9419,-27.1492 37.9419,-27.1492\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4492\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M72.5604,-34.6279C95.3209,-45.567 137.805,-65.9857 163.828,-78.493\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"170.384,-81.6441 162.711,-81.4508 167.23,-80.1279 164.075,-78.6117 164.075,-78.6117 164.075,-78.6117 167.23,-80.1279 165.44,-75.7726 170.384,-81.6441 170.384,-81.6441\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4492\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.0952,-28.1082C138.565,-31.7248 367.127,-44.5466 442.609,-48.781\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"449.832,-49.1861 442.666,-51.939 446.337,-48.9901 442.843,-48.794 442.843,-48.794 442.843,-48.794 446.337,-48.9901 443.019,-45.6489 449.832,-49.1861 449.832,-49.1861\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9492\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9492\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.149\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.449\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>2->1</title>\n",
|
|
"<path d=\"M195.118,-105.753C200.868,-116.863 210.129,-130.605 223,-137.149 249.274,-150.508 283.828,-142.138 306.104,-133.952\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"312.879,-131.329 307.489,-136.794 309.615,-132.593 306.351,-133.856 306.351,-133.856 306.351,-133.856 309.615,-132.593 305.214,-130.919 312.879,-131.329 312.879,-131.329\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-147.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->0</title>\n",
|
|
"<path d=\"M450.444,-44.332C418.416,-33.4213 345.525,-10.2561 282,-2.14924 255.989,1.17024 249.149,-0.19123 223,-2.14924 172.148,-5.95702 113.261,-16.2385 81.0794,-22.3655\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.8722,-23.7535 80.1502,-19.3365 77.3091,-23.0916 80.7459,-22.4297 80.7459,-22.4297 80.7459,-22.4297 77.3091,-23.0916 81.3417,-25.5228 73.8722,-23.7535 73.8722,-23.7535\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9492\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.94924\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\"><title>3->2</title>\n",
|
|
"<path d=\"M449.836,-52.5486C402.007,-59.2343 267.128,-78.0883 211.966,-85.7992\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.033,-86.7683 211.529,-82.6795 208.499,-86.2837 211.965,-85.7992 211.965,-85.7992 211.965,-85.7992 208.499,-86.2837 212.401,-88.9188 205.033,-86.7683 205.033,-86.7683\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->2</title>\n",
|
|
"<path d=\"M312.354,-117.517C303.504,-114.068 292.273,-109.991 282,-107.149 258.672,-100.697 231.458,-95.7597 212.333,-92.7023\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.172,-91.585 212.574,-89.5519 208.63,-92.1246 212.088,-92.6643 212.088,-92.6643 212.088,-92.6643 208.63,-92.1246 211.603,-95.7766 205.172,-91.585 205.172,-91.585\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.949\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>1->3</title>\n",
|
|
"<path d=\"M347.405,-120.535C368.489,-115.478 405.04,-104.865 432,-87.1492 439.129,-82.4649 445.855,-76.0569 451.469,-69.8895\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"456.293,-64.3495 454.072,-71.6973 453.995,-66.9892 451.696,-69.6288 451.696,-69.6288 451.696,-69.6288 453.995,-66.9892 449.321,-67.5604 456.293,-64.3495 456.293,-64.3495\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.949\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->1</title>\n",
|
|
"<path d=\"M317.576,-137.816C312.807,-148.805 316.781,-160.149 329.5,-160.149 339.437,-160.149 344.036,-153.226 343.299,-144.956\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"341.424,-137.816 346.248,-143.787 342.313,-141.201 343.202,-144.587 343.202,-144.587 343.202,-144.587 342.313,-141.201 340.155,-145.387 341.424,-137.816 341.424,-137.816\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd5 = tuple(spot.automata(\"randaut -A 'parity max odd 5' -Q4 2|\"))[0]\n",
|
|
"display(aut_max_odd5.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The new indexes of the acceptance sets:\n",
|
|
"+ 4 -> 0\n",
|
|
"+ 3 -> 1\n",
|
|
"+ 2 -> 2\n",
|
|
"+ 1 -> 3\n",
|
|
"+ 0 -> 4\n",
|
|
"+ ∅ -> ∅"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"#### Result of Parity max odd 5 ----> Parity min odd 5:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.15\" width=\"494pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 215.149)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-215.149 490,-215.149 490,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"94\" y=\"-196.949\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"119\" y=\"-196.949\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"135\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182\" y=\"-196.949\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"198\" y=\"-196.949\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"241\" y=\"-196.949\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"257\" y=\"-196.949\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"304\" y=\"-196.949\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"320\" y=\"-196.949\">) | Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-196.949\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-196.949\">))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"186\" y=\"-182.949\">[parity min odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4492\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-27.1492C2.79388,-27.1492 17.1543,-27.1492 30.6317,-27.1492\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-27.1492 30.9419,-30.2993 34.4419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 30.9419,-27.1493 34.4419,-27.1493 30.9418,-23.9993 37.9419,-27.1492 37.9419,-27.1492\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4492\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M72.5604,-34.6279C95.3209,-45.567 137.805,-65.9857 163.828,-78.493\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"170.384,-81.6441 162.711,-81.4508 167.23,-80.1279 164.075,-78.6117 164.075,-78.6117 164.075,-78.6117 167.23,-80.1279 165.44,-75.7726 170.384,-81.6441 170.384,-81.6441\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1492\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4492\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.0952,-28.1082C138.565,-31.7248 367.127,-44.5466 442.609,-48.781\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"449.832,-49.1861 442.666,-51.939 446.337,-48.9901 442.843,-48.794 442.843,-48.794 442.843,-48.794 446.337,-48.9901 443.019,-45.6489 449.832,-49.1861 449.832,-49.1861\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9492\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9492\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.149\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.449\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>2->1</title>\n",
|
|
"<path d=\"M195.118,-105.753C200.868,-116.863 210.129,-130.605 223,-137.149 249.274,-150.508 283.828,-142.138 306.104,-133.952\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"312.879,-131.329 307.489,-136.794 309.615,-132.593 306.351,-133.856 306.351,-133.856 306.351,-133.856 309.615,-132.593 305.214,-130.919 312.879,-131.329 312.879,-131.329\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-147.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->0</title>\n",
|
|
"<path d=\"M450.444,-44.332C418.416,-33.4213 345.525,-10.2561 282,-2.14924 255.989,1.17024 249.149,-0.19123 223,-2.14924 172.148,-5.95702 113.261,-16.2385 81.0794,-22.3655\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.8722,-23.7535 80.1502,-19.3365 77.3091,-23.0916 80.7459,-22.4297 80.7459,-22.4297 80.7459,-22.4297 77.3091,-23.0916 81.3417,-25.5228 73.8722,-23.7535 73.8722,-23.7535\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9492\">p0 & !p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.94924\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\"><title>3->2</title>\n",
|
|
"<path d=\"M449.836,-52.5486C402.007,-59.2343 267.128,-78.0883 211.966,-85.7992\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.033,-86.7683 211.529,-82.6795 208.499,-86.2837 211.965,-85.7992 211.965,-85.7992 211.965,-85.7992 208.499,-86.2837 212.401,-88.9188 205.033,-86.7683 205.033,-86.7683\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9492\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->2</title>\n",
|
|
"<path d=\"M312.354,-117.517C303.504,-114.068 292.273,-109.991 282,-107.149 258.672,-100.697 231.458,-95.7597 212.333,-92.7023\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"205.172,-91.585 212.574,-89.5519 208.63,-92.1246 212.088,-92.6643 212.088,-92.6643 212.088,-92.6643 208.63,-92.1246 211.603,-95.7766 205.172,-91.585 205.172,-91.585\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.949\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>1->3</title>\n",
|
|
"<path d=\"M347.405,-120.535C368.489,-115.478 405.04,-104.865 432,-87.1492 439.129,-82.4649 445.855,-76.0569 451.469,-69.8895\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"456.293,-64.3495 454.072,-71.6973 453.995,-66.9892 451.696,-69.6288 451.696,-69.6288 451.696,-69.6288 453.995,-66.9892 449.321,-67.5604 456.293,-64.3495 456.293,-64.3495\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.949\">!p0 & p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.949\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->1</title>\n",
|
|
"<path d=\"M317.576,-137.816C312.807,-148.805 316.781,-160.149 329.5,-160.149 339.437,-160.149 344.036,-153.226 343.299,-144.956\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"341.424,-137.816 346.248,-143.787 342.313,-141.201 343.202,-144.587 343.202,-144.587 343.202,-144.587 342.313,-141.201 340.155,-145.387 341.424,-137.816 341.424,-137.816\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.949\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd5_to_min = spot.change_parity(aut_max_odd5, spot.parity_kind_min, spot.parity_style_any)\n",
|
|
"display(aut_max_odd5_to_min.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"#### Parity max odd 4 ----> Parity min odd:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 8,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"173pt\" viewBox=\"0.00 0.00 498.00 172.97\" width=\"498pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 168.967)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-168.967 494,-168.967 494,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"131\" y=\"-150.767\">Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"153\" y=\"-150.767\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-150.767\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"212\" y=\"-150.767\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"228\" y=\"-150.767\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275\" y=\"-150.767\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"291\" y=\"-150.767\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"331\" y=\"-150.767\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"347\" y=\"-150.767\">)))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"187.5\" y=\"-136.767\">[parity max odd 4]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-34.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-31.2672\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-34.9672C2.79388,-34.9672 17.1543,-34.9672 30.6317,-34.9672\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-34.9672 30.9419,-38.1173 34.4419,-34.9673 30.9419,-34.9673 30.9419,-34.9673 30.9419,-34.9673 34.4419,-34.9673 30.9418,-31.8173 37.9419,-34.9672 37.9419,-34.9672\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-54.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-51.2672\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M69.4499,-47.0403C88.8327,-64.9003 128.25,-97.5832 169,-109.967 223.827,-126.629 288.046,-91.0362 319.928,-69.6185\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"325.861,-65.5436 321.874,-72.1033 322.976,-67.5252 320.091,-69.5068 320.091,-69.5068 320.091,-69.5068 322.976,-67.5252 318.307,-66.9102 325.861,-65.5436 325.861,-65.5436\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-117.767\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-34.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-31.2672\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.2281,-34.9672C98.9818,-34.9672 144.734,-34.9672 173,-34.9672\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"180.131,-34.9672 173.131,-38.1173 176.631,-34.9673 173.131,-34.9673 173.131,-34.9673 173.131,-34.9673 176.631,-34.9673 173.131,-31.8173 180.131,-34.9672 180.131,-34.9672\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-38.7672\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-21.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-18.2672\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>2->1</title>\n",
|
|
"<path d=\"M358.945,-53.1953C378.006,-50.9067 409.731,-46.204 436,-37.9672 440.351,-36.6029 444.87,-34.8289 449.158,-32.9605\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"455.648,-29.9922 450.592,-35.7682 452.465,-31.4479 449.282,-32.9036 449.282,-32.9036 449.282,-32.9036 452.465,-31.4479 447.972,-30.0389 455.648,-29.9922 455.648,-29.9922\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-53.7672\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>3->2</title>\n",
|
|
"<path d=\"M216.448,-37.3797C241.237,-40.9085 287.508,-47.4951 315.852,-51.5298\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"322.992,-52.5462 315.618,-54.6782 319.527,-52.0529 316.062,-51.5596 316.062,-51.5596 316.062,-51.5596 319.527,-52.0529 316.506,-48.4411 322.992,-52.5462 322.992,-52.5462\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-52.7672\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->3</title>\n",
|
|
"<path d=\"M186.254,-48.6342C181.355,-59.6235 185.438,-70.9672 198.5,-70.9672 208.705,-70.9672 213.429,-64.0436 212.672,-55.7744\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"210.746,-48.6342 215.61,-54.5727 211.657,-52.0135 212.569,-55.3928 212.569,-55.3928 212.569,-55.3928 211.657,-52.0135 209.527,-56.213 210.746,-48.6342 210.746,-48.6342\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-89.7672\">p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-74.7672\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->0</title>\n",
|
|
"<path d=\"M454.855,-15.8181C449.005,-13.8784 442.289,-11.9787 436,-10.9672 324.273,7.00199 222.337,-1.62898 169,-7.96725 137.816,-11.673 102.754,-20.9893 80.3007,-27.6402\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.4747,-29.6954 79.2693,-24.6609 76.8261,-28.6863 80.1775,-27.6772 80.1775,-27.6772 80.1775,-27.6772 76.8261,-28.6863 81.0856,-30.6934 73.4747,-29.6954 73.4747,-29.6954\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-19.7672\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259.5\" y=\"-5.76725\">⓿</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275.5\" y=\"-5.76725\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->2</title>\n",
|
|
"<path d=\"M454.009,-18.6202C434.631,-15.5892 402.355,-12.9681 377,-22.9672 369.877,-25.7764 363.31,-30.7676 357.836,-35.9848\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"352.745,-41.2049 355.377,-33.9942 355.189,-38.6992 357.632,-36.1934 357.632,-36.1934 357.632,-36.1934 355.189,-38.6992 359.887,-38.3927 352.745,-41.2049 352.745,-41.2049\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-26.7672\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd4 = tuple(spot.automata(\"randaut -A 'parity max odd 4' -Q4 2|\"))[0]\n",
|
|
"display(aut_max_odd4.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The new indexes of the acceptance sets:\n",
|
|
"+ 3 -> 0\n",
|
|
"+ 2 -> 1\n",
|
|
"+ 1 -> 2\n",
|
|
"+ 0 -> 3\n",
|
|
"+ ∅ -> ∅"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"#### Result of Parity max odd 4 ----> Parity min even 4:\n",
|
|
"\n",
|
|
"If the **numsets** is even and the **kind** is toggled, then the **style** will be toggled too."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 9,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"176pt\" viewBox=\"0.00 0.00 498.00 176.05\" width=\"498pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 172.046)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-172.046 494,-172.046 494,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"131\" y=\"-153.846\">Inf(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"153\" y=\"-153.846\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-153.846\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"212\" y=\"-153.846\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"228\" y=\"-153.846\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275\" y=\"-153.846\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"291\" y=\"-153.846\">) | Fin(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"331\" y=\"-153.846\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"347\" y=\"-153.846\">)))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"185\" y=\"-139.846\">[parity min even 4]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-38.0457\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-34.3457\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-38.0457C2.79388,-38.0457 17.1543,-38.0457 30.6317,-38.0457\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-38.0457 30.9419,-41.1958 34.4419,-38.0458 30.9419,-38.0458 30.9419,-38.0458 30.9419,-38.0458 34.4419,-38.0458 30.9418,-34.8958 37.9419,-38.0457 37.9419,-38.0457\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-58.0457\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-54.3457\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M69.4499,-50.1188C88.8327,-67.9788 128.25,-100.662 169,-113.046 223.827,-129.708 288.046,-94.1147 319.928,-72.6969\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"325.861,-68.6221 321.874,-75.1818 322.976,-70.6036 320.091,-72.5852 320.091,-72.5852 320.091,-72.5852 322.976,-70.6036 318.307,-69.9887 325.861,-68.6221 325.861,-68.6221\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-120.846\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-38.0457\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-34.3457\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.2281,-38.0457C98.9818,-38.0457 144.734,-38.0457 173,-38.0457\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"180.131,-38.0457 173.131,-41.1958 176.631,-38.0458 173.131,-38.0458 173.131,-38.0458 173.131,-38.0458 176.631,-38.0458 173.131,-34.8958 180.131,-38.0457 180.131,-38.0457\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-41.8457\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-25.0457\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-21.3457\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>2->1</title>\n",
|
|
"<path d=\"M358.945,-56.2738C378.006,-53.9852 409.731,-49.2824 436,-41.0457 440.351,-39.6814 444.87,-37.9073 449.158,-36.039\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"455.648,-33.0706 450.592,-38.8467 452.465,-34.5263 449.282,-35.982 449.282,-35.982 449.282,-35.982 452.465,-34.5263 447.972,-33.1174 455.648,-33.0706 455.648,-33.0706\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-56.8457\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>3->2</title>\n",
|
|
"<path d=\"M216.448,-40.4582C241.237,-43.9869 287.508,-50.5736 315.852,-54.6082\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"322.992,-55.6247 315.618,-57.7567 319.527,-55.1314 316.062,-54.6381 316.062,-54.6381 316.062,-54.6381 319.527,-55.1314 316.506,-51.5195 322.992,-55.6247 322.992,-55.6247\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-55.8457\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->3</title>\n",
|
|
"<path d=\"M186.254,-51.7127C181.355,-62.702 185.438,-74.0457 198.5,-74.0457 208.705,-74.0457 213.429,-67.122 212.672,-58.8528\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"210.746,-51.7127 215.61,-57.6511 211.657,-55.092 212.569,-58.4713 212.569,-58.4713 212.569,-58.4713 211.657,-55.092 209.527,-59.2915 210.746,-51.7127 210.746,-51.7127\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-92.8457\">p0 & !p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-77.8457\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->0</title>\n",
|
|
"<path d=\"M454.85,-18.9262C449,-16.9893 442.284,-15.0838 436,-14.0457 318.912,5.29505 286.845,2.95823 169,-11.0457 137.816,-14.7515 102.754,-24.0677 80.3007,-30.7186\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.4747,-32.7738 79.2693,-27.7394 76.8261,-31.7647 80.1775,-30.7557 80.1775,-30.7557 80.1775,-30.7557 76.8261,-31.7647 81.0856,-33.7719 73.4747,-32.7738 73.4747,-32.7738\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-21.8457\">!p0 & p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-6.84571\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->2</title>\n",
|
|
"<path d=\"M454.009,-21.6986C434.631,-18.6676 402.355,-16.0466 377,-26.0457 369.877,-28.8548 363.31,-33.8461 357.836,-39.0633\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"352.745,-44.2834 355.377,-37.0726 355.189,-41.7776 357.632,-39.2719 357.632,-39.2719 357.632,-39.2719 355.189,-41.7776 359.887,-41.4712 352.745,-44.2834 352.745,-44.2834\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-29.8457\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd4_to_min = spot.change_parity(aut_max_odd4, spot.parity_kind_min, spot.parity_style_any)\n",
|
|
"display(aut_max_odd4_to_min.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"To keep the same **style** a new acceptance set is introduced, thus the **style** is toggled once again.\n",
|
|
"<br>\n",
|
|
"The new indexes of the acceptance sets are:\n",
|
|
"\n",
|
|
"+ 3 -> 0 -> 1\n",
|
|
"+ 2 -> 1 -> 2\n",
|
|
"+ 1 -> 2 -> 3\n",
|
|
"+ 0 -> 3 -> 4\n",
|
|
"+ ∅ -> ∅ -> 0 (as the resulting automaton is a parity min)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"#### Result of Parity max odd 4 ----> Parity min even 5:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 10,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"176pt\" viewBox=\"0.00 0.00 498.00 176.05\" width=\"498pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 172.046)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-172.046 494,-172.046 494,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"96\" y=\"-153.846\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"121\" y=\"-153.846\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"137\" y=\"-153.846\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"184\" y=\"-153.846\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"200\" y=\"-153.846\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"243\" y=\"-153.846\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259\" y=\"-153.846\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"306\" y=\"-153.846\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"322\" y=\"-153.846\">) | Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"362\" y=\"-153.846\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"378\" y=\"-153.846\">))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"188\" y=\"-139.846\">[parity min odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-38.0457\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-34.3457\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-38.0457C2.79388,-38.0457 17.1543,-38.0457 30.6317,-38.0457\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-38.0457 30.9419,-41.1958 34.4419,-38.0458 30.9419,-38.0458 30.9419,-38.0458 30.9419,-38.0458 34.4419,-38.0458 30.9418,-34.8958 37.9419,-38.0457 37.9419,-38.0457\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-58.0457\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-54.3457\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M69.4499,-50.1188C88.8327,-67.9788 128.25,-100.662 169,-113.046 223.827,-129.708 288.046,-94.1147 319.928,-72.6969\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"325.861,-68.6221 321.874,-75.1818 322.976,-70.6036 320.091,-72.5852 320.091,-72.5852 320.091,-72.5852 322.976,-70.6036 318.307,-69.9887 325.861,-68.6221 325.861,-68.6221\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-120.846\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-38.0457\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-34.3457\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.2281,-38.0457C98.9818,-38.0457 144.734,-38.0457 173,-38.0457\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"180.131,-38.0457 173.131,-41.1958 176.631,-38.0458 173.131,-38.0458 173.131,-38.0458 173.131,-38.0458 176.631,-38.0458 173.131,-34.8958 180.131,-38.0457 180.131,-38.0457\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-41.8457\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-25.0457\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-21.3457\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>2->1</title>\n",
|
|
"<path d=\"M358.945,-56.2738C378.006,-53.9852 409.731,-49.2824 436,-41.0457 440.351,-39.6814 444.87,-37.9073 449.158,-36.039\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"455.648,-33.0706 450.592,-38.8467 452.465,-34.5263 449.282,-35.982 449.282,-35.982 449.282,-35.982 452.465,-34.5263 447.972,-33.1174 455.648,-33.0706 455.648,-33.0706\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-56.8457\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>3->2</title>\n",
|
|
"<path d=\"M216.448,-40.4582C241.237,-43.9869 287.508,-50.5736 315.852,-54.6082\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"322.992,-55.6247 315.618,-57.7567 319.527,-55.1314 316.062,-54.6381 316.062,-54.6381 316.062,-54.6381 319.527,-55.1314 316.506,-51.5195 322.992,-55.6247 322.992,-55.6247\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-55.8457\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->3</title>\n",
|
|
"<path d=\"M186.254,-51.7127C181.355,-62.702 185.438,-74.0457 198.5,-74.0457 208.705,-74.0457 213.429,-67.122 212.672,-58.8528\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"210.746,-51.7127 215.61,-57.6511 211.657,-55.092 212.569,-58.4713 212.569,-58.4713 212.569,-58.4713 211.657,-55.092 209.527,-59.2915 210.746,-51.7127 210.746,-51.7127\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-92.8457\">p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-77.8457\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->0</title>\n",
|
|
"<path d=\"M454.85,-18.9262C449,-16.9893 442.284,-15.0838 436,-14.0457 318.912,5.29505 286.845,2.95823 169,-11.0457 137.816,-14.7515 102.754,-24.0677 80.3007,-30.7186\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.4747,-32.7738 79.2693,-27.7394 76.8261,-31.7647 80.1775,-30.7557 80.1775,-30.7557 80.1775,-30.7557 76.8261,-31.7647 81.0856,-33.7719 73.4747,-32.7738 73.4747,-32.7738\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-21.8457\">!p0 & p1</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-6.84571\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->2</title>\n",
|
|
"<path d=\"M454.009,-21.6986C434.631,-18.6676 402.355,-16.0466 377,-26.0457 369.877,-28.8548 363.31,-33.8461 357.836,-39.0633\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"352.745,-44.2834 355.377,-37.0726 355.189,-41.7776 357.632,-39.2719 357.632,-39.2719 357.632,-39.2719 355.189,-41.7776 359.887,-41.4712 352.745,-44.2834 352.745,-44.2834\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-29.8457\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd4_to_min_bis = spot.change_parity(aut_max_odd4, spot.parity_kind_min, spot.parity_style_same)\n",
|
|
"display(aut_max_odd4_to_min_bis.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Colorize parity\n",
|
|
"An automaton with a parity acceptance is not necessarily a parity automaton. It must be colored to be qualified like this.\n",
|
|
"## Parity max\n",
|
|
"Transitions with multiple acceptance sets are purified by keeping only the set with the greatest index.\n",
|
|
"<br>\n",
|
|
"If there is a transition that do not belong to any acceptance set, a new acceptance set is introduced at the least significant place.\n",
|
|
"<br>\n",
|
|
"The least significant place of a parity max acceptance is where the indexes are the lowest, so all the existing acceptance sets' indexes will be shifted.\n",
|
|
"#### Colorize parity max odd 4"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 11,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"173pt\" viewBox=\"0.00 0.00 498.00 172.97\" width=\"498pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 168.967)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-168.967 494,-168.967 494,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"131\" y=\"-150.767\">Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"153\" y=\"-150.767\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-150.767\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"212\" y=\"-150.767\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"228\" y=\"-150.767\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275\" y=\"-150.767\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"291\" y=\"-150.767\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"331\" y=\"-150.767\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"347\" y=\"-150.767\">)))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"187.5\" y=\"-136.767\">[parity max odd 4]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-34.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-31.2672\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-34.9672C2.79388,-34.9672 17.1543,-34.9672 30.6317,-34.9672\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-34.9672 30.9419,-38.1173 34.4419,-34.9673 30.9419,-34.9673 30.9419,-34.9673 30.9419,-34.9673 34.4419,-34.9673 30.9418,-31.8173 37.9419,-34.9672 37.9419,-34.9672\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-54.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-51.2672\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M69.4499,-47.0403C88.8327,-64.9003 128.25,-97.5832 169,-109.967 223.827,-126.629 288.046,-91.0362 319.928,-69.6185\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"325.861,-65.5436 321.874,-72.1033 322.976,-67.5252 320.091,-69.5068 320.091,-69.5068 320.091,-69.5068 322.976,-67.5252 318.307,-66.9102 325.861,-65.5436 325.861,-65.5436\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-117.767\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-34.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-31.2672\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.2281,-34.9672C98.9818,-34.9672 144.734,-34.9672 173,-34.9672\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"180.131,-34.9672 173.131,-38.1173 176.631,-34.9673 173.131,-34.9673 173.131,-34.9673 173.131,-34.9673 176.631,-34.9673 173.131,-31.8173 180.131,-34.9672 180.131,-34.9672\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-38.7672\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-21.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-18.2672\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>2->1</title>\n",
|
|
"<path d=\"M358.945,-53.1953C378.006,-50.9067 409.731,-46.204 436,-37.9672 440.351,-36.6029 444.87,-34.8289 449.158,-32.9605\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"455.648,-29.9922 450.592,-35.7682 452.465,-31.4479 449.282,-32.9036 449.282,-32.9036 449.282,-32.9036 452.465,-31.4479 447.972,-30.0389 455.648,-29.9922 455.648,-29.9922\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-53.7672\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>3->2</title>\n",
|
|
"<path d=\"M216.448,-37.3797C241.237,-40.9085 287.508,-47.4951 315.852,-51.5298\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"322.992,-52.5462 315.618,-54.6782 319.527,-52.0529 316.062,-51.5596 316.062,-51.5596 316.062,-51.5596 319.527,-52.0529 316.506,-48.4411 322.992,-52.5462 322.992,-52.5462\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-52.7672\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->3</title>\n",
|
|
"<path d=\"M186.254,-48.6342C181.355,-59.6235 185.438,-70.9672 198.5,-70.9672 208.705,-70.9672 213.429,-64.0436 212.672,-55.7744\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"210.746,-48.6342 215.61,-54.5727 211.657,-52.0135 212.569,-55.3928 212.569,-55.3928 212.569,-55.3928 211.657,-52.0135 209.527,-56.213 210.746,-48.6342 210.746,-48.6342\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-89.7672\">p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-74.7672\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->0</title>\n",
|
|
"<path d=\"M454.855,-15.8181C449.005,-13.8784 442.289,-11.9787 436,-10.9672 324.273,7.00199 222.337,-1.62898 169,-7.96725 137.816,-11.673 102.754,-20.9893 80.3007,-27.6402\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.4747,-29.6954 79.2693,-24.6609 76.8261,-28.6863 80.1775,-27.6772 80.1775,-27.6772 80.1775,-27.6772 76.8261,-28.6863 81.0856,-30.6934 73.4747,-29.6954 73.4747,-29.6954\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-19.7672\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259.5\" y=\"-5.76725\">⓿</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275.5\" y=\"-5.76725\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->2</title>\n",
|
|
"<path d=\"M454.009,-18.6202C434.631,-15.5892 402.355,-12.9681 377,-22.9672 369.877,-25.7764 363.31,-30.7676 357.836,-35.9848\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"352.745,-41.2049 355.377,-33.9942 355.189,-38.6992 357.632,-36.1934 357.632,-36.1934 357.632,-36.1934 355.189,-38.6992 359.887,-38.3927 352.745,-41.2049 352.745,-41.2049\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-26.7672\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd4 = tuple(spot.automata(\"randaut -A 'parity max odd 4' -Q4 2|\"))[0]\n",
|
|
"display(aut_max_odd4.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The new acceptance sets are:\n",
|
|
"+ ∅ -> 0\n",
|
|
"+ 0 -> 1\n",
|
|
"+ 1 -> 2\n",
|
|
"+ 2 -> 3\n",
|
|
"+ 3 -> 4\n",
|
|
"\n",
|
|
"#### The result of colorizing the given parity max odd 4 is"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 12,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"192pt\" viewBox=\"0.00 0.00 498.00 192.17\" width=\"498pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 188.174)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-188.174 494,-188.174 494,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"98\" y=\"-169.974\">Inf(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"120\" y=\"-169.974\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"136\" y=\"-169.974\">) | (Fin(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"179\" y=\"-169.974\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"195\" y=\"-169.974\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"242\" y=\"-169.974\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"258\" y=\"-169.974\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"301\" y=\"-169.974\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"317\" y=\"-169.974\">) & Inf(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-169.974\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-169.974\">))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"184.5\" y=\"-155.974\">[parity max even 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-36.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-32.4739\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-36.1739C2.79388,-36.1739 17.1543,-36.1739 30.6317,-36.1739\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-36.1739 30.9419,-39.324 34.4419,-36.174 30.9419,-36.174 30.9419,-36.174 30.9419,-36.174 34.4419,-36.174 30.9418,-33.024 37.9419,-36.1739 37.9419,-36.1739\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-67.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-63.4739\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M68.8658,-49.3629C75.3091,-56.077 83.6495,-64.0842 92,-70.1739 123.326,-93.0188 131.383,-101.783 169,-111.174 228.214,-125.956 249.552,-117.676 305,-92.1739 310.438,-89.6728 315.902,-86.287 320.842,-82.8157\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"326.779,-78.4332 323.018,-85.1249 323.963,-80.5119 321.147,-82.5906 321.147,-82.5906 321.147,-82.5906 323.963,-80.5119 319.276,-80.0563 326.779,-78.4332 326.779,-78.4332\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-136.974\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-121.974\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-36.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-32.4739\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.2281,-36.1739C98.9818,-36.1739 144.734,-36.1739 173,-36.1739\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"180.131,-36.1739 173.131,-39.324 176.631,-36.174 173.131,-36.174 173.131,-36.174 173.131,-36.174 176.631,-36.174 173.131,-33.024 180.131,-36.1739 180.131,-36.1739\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-54.9739\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"113.5\" y=\"-39.9739\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-23.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-19.4739\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>2->1</title>\n",
|
|
"<path d=\"M359.121,-67.7218C378.619,-67.7008 411.005,-65.6719 436,-54.1739 442.747,-51.07 449.143,-46.2246 454.576,-41.2792\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"459.665,-36.3612 456.82,-43.4907 457.148,-38.7933 454.631,-41.2254 454.631,-41.2254 454.631,-41.2254 457.148,-38.7933 452.443,-38.9602 459.665,-36.3612 459.665,-36.3612\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-84.9739\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-69.9739\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>3->2</title>\n",
|
|
"<path d=\"M216.169,-39.8518C240.991,-45.3286 287.787,-55.6537 316.204,-61.9235\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"323.353,-63.5009 315.838,-65.0686 319.935,-62.7467 316.517,-61.9926 316.517,-61.9926 316.517,-61.9926 319.935,-62.7467 317.196,-58.9166 323.353,-63.5009 323.353,-63.5009\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-76.9739\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-61.9739\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->3</title>\n",
|
|
"<path d=\"M186.254,-49.8409C181.355,-60.8302 185.438,-72.1739 198.5,-72.1739 208.705,-72.1739 213.429,-65.2502 212.672,-56.981\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"210.746,-49.8409 215.61,-55.7793 211.657,-53.2202 212.569,-56.5995 212.569,-56.5995 212.569,-56.5995 211.657,-53.2202 209.527,-57.4197 210.746,-49.8409 210.746,-49.8409\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-90.9739\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-75.9739\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->0</title>\n",
|
|
"<path d=\"M455.252,-16.574C449.326,-14.4123 442.458,-12.2821 436,-11.1739 323.418,8.1465 222.082,-2.86597 169,-9.17391 137.816,-12.8797 102.754,-22.1959 80.3007,-28.8468\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.4747,-30.902 79.2693,-25.8676 76.8261,-29.8929 80.1775,-28.8838 80.1775,-28.8838 80.1775,-28.8838 76.8261,-29.8929 81.0856,-31.9001 73.4747,-30.902 73.4747,-30.902\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-20.9739\">!p0 & p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-5.97391\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->2</title>\n",
|
|
"<path d=\"M454.418,-19.2927C434.853,-15.5987 401.846,-12.1988 377,-24.1739 367.603,-28.7031 359.889,-37.1039 354.118,-45.2865\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"350.088,-51.4335 351.292,-43.8524 352.007,-48.5065 353.926,-45.5795 353.926,-45.5795 353.926,-45.5795 352.007,-48.5065 356.56,-47.3067 350.088,-51.4335 350.088,-51.4335\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-42.9739\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-27.9739\">⓿</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd4_colored = spot.colorize_parity(aut_max_odd4, False)\n",
|
|
"display(aut_max_odd4_colored.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"You can notice that the **style** has been toggled.\n",
|
|
"<br>\n",
|
|
"To prevent colorize_parity from this we can add one extra acceptance set in the acceptance condition.\n",
|
|
"\n",
|
|
"The new acceptance sets are now:\n",
|
|
"+ ∅ -> 1\n",
|
|
"+ 0 -> 2\n",
|
|
"+ 1 -> 3\n",
|
|
"+ 2 -> 4\n",
|
|
"+ 3 -> 5\n",
|
|
"#### The result of colorizing the given parity max odd 4 without changing the style is"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"192pt\" viewBox=\"0.00 0.00 498.00 192.17\" width=\"498pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 188.174)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-188.174 494,-188.174 494,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"66.5\" y=\"-169.974\">Inf(</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"88.5\" y=\"-169.974\">❺</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"104.5\" y=\"-169.974\">) | (Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"147.5\" y=\"-169.974\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"163.5\" y=\"-169.974\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"210.5\" y=\"-169.974\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-169.974\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"269.5\" y=\"-169.974\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"285.5\" y=\"-169.974\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"332.5\" y=\"-169.974\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"348.5\" y=\"-169.974\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"388.5\" y=\"-169.974\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"404.5\" y=\"-169.974\">)))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"187.5\" y=\"-155.974\">[parity max odd 6]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-36.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-32.4739\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-36.1739C2.79388,-36.1739 17.1543,-36.1739 30.6317,-36.1739\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-36.1739 30.9419,-39.324 34.4419,-36.174 30.9419,-36.174 30.9419,-36.174 30.9419,-36.174 34.4419,-36.174 30.9418,-33.024 37.9419,-36.1739 37.9419,-36.1739\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-67.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-63.4739\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M68.8658,-49.3629C75.3091,-56.077 83.6495,-64.0842 92,-70.1739 123.326,-93.0188 131.383,-101.783 169,-111.174 228.214,-125.956 249.552,-117.676 305,-92.1739 310.438,-89.6728 315.902,-86.287 320.842,-82.8157\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"326.779,-78.4332 323.018,-85.1249 323.963,-80.5119 321.147,-82.5906 321.147,-82.5906 321.147,-82.5906 323.963,-80.5119 319.276,-80.0563 326.779,-78.4332 326.779,-78.4332\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-136.974\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-121.974\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-36.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-32.4739\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.2281,-36.1739C98.9818,-36.1739 144.734,-36.1739 173,-36.1739\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"180.131,-36.1739 173.131,-39.324 176.631,-36.174 173.131,-36.174 173.131,-36.174 173.131,-36.174 176.631,-36.174 173.131,-33.024 180.131,-36.1739 180.131,-36.1739\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-54.9739\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"113.5\" y=\"-39.9739\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-23.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-19.4739\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>2->1</title>\n",
|
|
"<path d=\"M359.121,-67.7218C378.619,-67.7008 411.005,-65.6719 436,-54.1739 442.747,-51.07 449.143,-46.2246 454.576,-41.2792\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"459.665,-36.3612 456.82,-43.4907 457.148,-38.7933 454.631,-41.2254 454.631,-41.2254 454.631,-41.2254 457.148,-38.7933 452.443,-38.9602 459.665,-36.3612 459.665,-36.3612\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-84.9739\">!p0 & p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-69.9739\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>3->2</title>\n",
|
|
"<path d=\"M216.169,-39.8518C240.991,-45.3286 287.787,-55.6537 316.204,-61.9235\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"323.353,-63.5009 315.838,-65.0686 319.935,-62.7467 316.517,-61.9926 316.517,-61.9926 316.517,-61.9926 319.935,-62.7467 317.196,-58.9166 323.353,-63.5009 323.353,-63.5009\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-76.9739\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-61.9739\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->3</title>\n",
|
|
"<path d=\"M186.254,-49.8409C181.355,-60.8302 185.438,-72.1739 198.5,-72.1739 208.705,-72.1739 213.429,-65.2502 212.672,-56.981\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"210.746,-49.8409 215.61,-55.7793 211.657,-53.2202 212.569,-56.5995 212.569,-56.5995 212.569,-56.5995 211.657,-53.2202 209.527,-57.4197 210.746,-49.8409 210.746,-49.8409\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-90.9739\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-75.9739\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->0</title>\n",
|
|
"<path d=\"M455.252,-16.574C449.326,-14.4123 442.458,-12.2821 436,-11.1739 323.418,8.1465 222.082,-2.86597 169,-9.17391 137.816,-12.8797 102.754,-22.1959 80.3007,-28.8468\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.4747,-30.902 79.2693,-25.8676 76.8261,-29.8929 80.1775,-28.8838 80.1775,-28.8838 80.1775,-28.8838 76.8261,-29.8929 81.0856,-31.9001 73.4747,-30.902 73.4747,-30.902\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-20.9739\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-5.97391\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->2</title>\n",
|
|
"<path d=\"M454.418,-19.2927C434.853,-15.5987 401.846,-12.1988 377,-24.1739 367.603,-28.7031 359.889,-37.1039 354.118,-45.2865\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"350.088,-51.4335 351.292,-43.8524 352.007,-48.5065 353.926,-45.5795 353.926,-45.5795 353.926,-45.5795 352.007,-48.5065 356.56,-47.3067 350.088,-51.4335 350.088,-51.4335\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-42.9739\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-27.9739\">❶</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_max_odd4_colored_bis = spot.colorize_parity(aut_max_odd4, True)\n",
|
|
"display(aut_max_odd4_colored_bis.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Parity min\n",
|
|
"Transitions with multiple acceptance sets are purified by keeping only the set with the lowest index.\n",
|
|
"<br>\n",
|
|
"If there is a transition that do not belong to any acceptance set, a new acceptance set is introduced at the least significant place.\n",
|
|
"<br>\n",
|
|
"The least significant place of a parity min acceptance is where the indexes are the greatest.\n",
|
|
"#### Colorize parity min odd 4"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 14,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"173pt\" viewBox=\"0.00 0.00 498.00 172.97\" width=\"498pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 168.967)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-168.967 494,-168.967 494,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"128\" y=\"-150.767\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"153\" y=\"-150.767\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-150.767\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"216\" y=\"-150.767\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"232\" y=\"-150.767\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275\" y=\"-150.767\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"291\" y=\"-150.767\">) & Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"334\" y=\"-150.767\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"350\" y=\"-150.767\">)))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"188\" y=\"-136.767\">[parity min odd 4]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-34.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-31.2672\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-34.9672C2.79388,-34.9672 17.1543,-34.9672 30.6317,-34.9672\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-34.9672 30.9419,-38.1173 34.4419,-34.9673 30.9419,-34.9673 30.9419,-34.9673 30.9419,-34.9673 34.4419,-34.9673 30.9418,-31.8173 37.9419,-34.9672 37.9419,-34.9672\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-54.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-51.2672\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M69.4499,-47.0403C88.8327,-64.9003 128.25,-97.5832 169,-109.967 223.827,-126.629 288.046,-91.0362 319.928,-69.6185\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"325.861,-65.5436 321.874,-72.1033 322.976,-67.5252 320.091,-69.5068 320.091,-69.5068 320.091,-69.5068 322.976,-67.5252 318.307,-66.9102 325.861,-65.5436 325.861,-65.5436\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-117.767\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-34.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-31.2672\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.2281,-34.9672C98.9818,-34.9672 144.734,-34.9672 173,-34.9672\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"180.131,-34.9672 173.131,-38.1173 176.631,-34.9673 173.131,-34.9673 173.131,-34.9673 173.131,-34.9673 176.631,-34.9673 173.131,-31.8173 180.131,-34.9672 180.131,-34.9672\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-38.7672\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-21.9672\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-18.2672\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>2->1</title>\n",
|
|
"<path d=\"M358.945,-53.1953C378.006,-50.9067 409.731,-46.204 436,-37.9672 440.351,-36.6029 444.87,-34.8289 449.158,-32.9605\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"455.648,-29.9922 450.592,-35.7682 452.465,-31.4479 449.282,-32.9036 449.282,-32.9036 449.282,-32.9036 452.465,-31.4479 447.972,-30.0389 455.648,-29.9922 455.648,-29.9922\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-53.7672\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>3->2</title>\n",
|
|
"<path d=\"M216.448,-37.3797C241.237,-40.9085 287.508,-47.4951 315.852,-51.5298\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"322.992,-52.5462 315.618,-54.6782 319.527,-52.0529 316.062,-51.5596 316.062,-51.5596 316.062,-51.5596 319.527,-52.0529 316.506,-48.4411 322.992,-52.5462 322.992,-52.5462\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-52.7672\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->3</title>\n",
|
|
"<path d=\"M186.254,-48.6342C181.355,-59.6235 185.438,-70.9672 198.5,-70.9672 208.705,-70.9672 213.429,-64.0436 212.672,-55.7744\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"210.746,-48.6342 215.61,-54.5727 211.657,-52.0135 212.569,-55.3928 212.569,-55.3928 212.569,-55.3928 211.657,-52.0135 209.527,-56.213 210.746,-48.6342 210.746,-48.6342\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-89.7672\">p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-74.7672\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->0</title>\n",
|
|
"<path d=\"M454.855,-15.8181C449.005,-13.8784 442.289,-11.9787 436,-10.9672 324.273,7.00199 222.337,-1.62898 169,-7.96725 137.816,-11.673 102.754,-20.9893 80.3007,-27.6402\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.4747,-29.6954 79.2693,-24.6609 76.8261,-28.6863 80.1775,-27.6772 80.1775,-27.6772 80.1775,-27.6772 76.8261,-28.6863 81.0856,-30.6934 73.4747,-29.6954 73.4747,-29.6954\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-19.7672\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259.5\" y=\"-5.76725\">⓿</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275.5\" y=\"-5.76725\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->2</title>\n",
|
|
"<path d=\"M454.009,-18.6202C434.631,-15.5892 402.355,-12.9681 377,-22.9672 369.877,-25.7764 363.31,-30.7676 357.836,-35.9848\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"352.745,-41.2049 355.377,-33.9942 355.189,-38.6992 357.632,-36.1934 357.632,-36.1934 357.632,-36.1934 355.189,-38.6992 359.887,-38.3927 352.745,-41.2049 352.745,-41.2049\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-26.7672\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_min_odd4 = tuple(spot.automata(\"randaut -A 'parity min odd 4' -Q4 2|\"))[0]\n",
|
|
"display(aut_min_odd4.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The new acceptance sets are:\n",
|
|
"+ ∅ -> 4\n",
|
|
"+ 0 -> 0\n",
|
|
"+ 1 -> 1\n",
|
|
"+ 2 -> 2\n",
|
|
"+ 3 -> 3\n",
|
|
"\n",
|
|
"#### The result of colorizing the given parity max odd 4 is"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 15,
|
|
"metadata": {
|
|
"collapsed": false
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"192pt\" viewBox=\"0.00 0.00 498.00 192.17\" width=\"498pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 188.174)\">\n",
|
|
"<title>G</title>\n",
|
|
"<polygon fill=\"white\" points=\"-4,4 -4,-188.174 494,-188.174 494,4 -4,4\" stroke=\"none\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"96\" y=\"-169.974\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"121\" y=\"-169.974\">⓿</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"137\" y=\"-169.974\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"184\" y=\"-169.974\">❶</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"200\" y=\"-169.974\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"243\" y=\"-169.974\">❷</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259\" y=\"-169.974\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"306\" y=\"-169.974\">❸</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"322\" y=\"-169.974\">) | Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"362\" y=\"-169.974\">❹</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"378\" y=\"-169.974\">))))</text>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"188\" y=\"-155.974\">[parity min odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\"><title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-36.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-32.4739\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\"><title>I->0</title>\n",
|
|
"<path d=\"M1.15491,-36.1739C2.79388,-36.1739 17.1543,-36.1739 30.6317,-36.1739\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"37.9419,-36.1739 30.9419,-39.324 34.4419,-36.174 30.9419,-36.174 30.9419,-36.174 30.9419,-36.174 34.4419,-36.174 30.9418,-33.024 37.9419,-36.1739 37.9419,-36.1739\" stroke=\"black\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\"><title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-67.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-63.4739\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\"><title>0->2</title>\n",
|
|
"<path d=\"M68.8658,-49.3629C75.3091,-56.077 83.6495,-64.0842 92,-70.1739 123.326,-93.0188 131.383,-101.783 169,-111.174 228.214,-125.956 249.552,-117.676 305,-92.1739 310.438,-89.6728 315.902,-86.287 320.842,-82.8157\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"326.779,-78.4332 323.018,-85.1249 323.963,-80.5119 321.147,-82.5906 321.147,-82.5906 321.147,-82.5906 323.963,-80.5119 319.276,-80.0563 326.779,-78.4332 326.779,-78.4332\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-136.974\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-121.974\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\"><title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-36.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-32.4739\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\"><title>0->3</title>\n",
|
|
"<path d=\"M74.2281,-36.1739C98.9818,-36.1739 144.734,-36.1739 173,-36.1739\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"180.131,-36.1739 173.131,-39.324 176.631,-36.174 173.131,-36.174 173.131,-36.174 173.131,-36.174 176.631,-36.174 173.131,-33.024 180.131,-36.1739 180.131,-36.1739\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-54.9739\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"113.5\" y=\"-39.9739\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\"><title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-23.1739\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-19.4739\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\"><title>2->1</title>\n",
|
|
"<path d=\"M359.121,-67.7218C378.619,-67.7008 411.005,-65.6719 436,-54.1739 442.747,-51.07 449.143,-46.2246 454.576,-41.2792\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"459.665,-36.3612 456.82,-43.4907 457.148,-38.7933 454.631,-41.2254 454.631,-41.2254 454.631,-41.2254 457.148,-38.7933 452.443,-38.9602 459.665,-36.3612 459.665,-36.3612\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-84.9739\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-69.9739\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\"><title>3->2</title>\n",
|
|
"<path d=\"M216.169,-39.8518C240.991,-45.3286 287.787,-55.6537 316.204,-61.9235\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"323.353,-63.5009 315.838,-65.0686 319.935,-62.7467 316.517,-61.9926 316.517,-61.9926 316.517,-61.9926 319.935,-62.7467 317.196,-58.9166 323.353,-63.5009 323.353,-63.5009\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-76.9739\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-61.9739\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\"><title>3->3</title>\n",
|
|
"<path d=\"M186.254,-49.8409C181.355,-60.8302 185.438,-72.1739 198.5,-72.1739 208.705,-72.1739 213.429,-65.2502 212.672,-56.981\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"210.746,-49.8409 215.61,-55.7793 211.657,-53.2202 212.569,-56.5995 212.569,-56.5995 212.569,-56.5995 211.657,-53.2202 209.527,-57.4197 210.746,-49.8409 210.746,-49.8409\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-90.9739\">p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-75.9739\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\"><title>1->0</title>\n",
|
|
"<path d=\"M455.252,-16.574C449.326,-14.4123 442.458,-12.2821 436,-11.1739 323.418,8.1465 222.082,-2.86597 169,-9.17391 137.816,-12.8797 102.754,-22.1959 80.3007,-28.8468\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"73.4747,-30.902 79.2693,-25.8676 76.8261,-29.8929 80.1775,-28.8838 80.1775,-28.8838 80.1775,-28.8838 76.8261,-29.8929 81.0856,-31.9001 73.4747,-30.902 73.4747,-30.902\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-20.9739\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-5.97391\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\"><title>1->2</title>\n",
|
|
"<path d=\"M454.418,-19.2927C434.853,-15.5987 401.846,-12.1988 377,-24.1739 367.603,-28.7031 359.889,-37.1039 354.118,-45.2865\" fill=\"none\" stroke=\"black\"/>\n",
|
|
"<polygon fill=\"black\" points=\"350.088,-51.4335 351.292,-43.8524 352.007,-48.5065 353.926,-45.5795 353.926,-45.5795 353.926,-45.5795 352.007,-48.5065 356.56,-47.3067 350.088,-51.4335 350.088,-51.4335\" stroke=\"black\"/>\n",
|
|
"<text font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-42.9739\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-27.9739\">❹</text>\n",
|
|
"</g>\n",
|
|
"</g>\n",
|
|
"</svg>"
|
|
],
|
|
"text/plain": [
|
|
"<IPython.core.display.SVG object>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"aut_min_odd4_colored_bis = spot.colorize_parity(aut_min_odd4, True)\n",
|
|
"display(aut_min_odd4_colored_bis.show(\".a\"))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"Remark: colorizing a parity min won't change the **style** of the acceptance."
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.5.4"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|