Reported by František Blahoudek. * tests/python/parity.ipynb: Fix examples and improve some text.
2091 lines
148 KiB
Text
2091 lines
148 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 5,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from IPython.display import display\n",
|
|
"import spot\n",
|
|
"spot.setup()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Definitions and examples for parity acceptance"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"In Spot a **parity acceptance** is defined by a **kind**, a **style** and a **numsets**:\n",
|
|
"+ The **kind** can be either **max** or **min**.\n",
|
|
"+ The **style** can be either **odd** or **even**.\n",
|
|
"+ The **numsets** is the number of acceptance sets used by the parity acceptance.\n",
|
|
" \n",
|
|
"Here are some examples:"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 21,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"parity min odd 1 = Fin(0)\n",
|
|
"parity min odd 2 = Fin(0) & Inf(1)\n",
|
|
"parity min odd 3 = Fin(0) & (Inf(1) | Fin(2))\n",
|
|
"parity min odd 4 = Fin(0) & (Inf(1) | (Fin(2) & Inf(3)))\n",
|
|
"parity min even 1 = Inf(0)\n",
|
|
"parity min even 2 = Inf(0) | Fin(1)\n",
|
|
"parity min even 3 = Inf(0) | (Fin(1) & Inf(2))\n",
|
|
"parity min even 4 = Inf(0) | (Fin(1) & (Inf(2) | Fin(3)))\n",
|
|
"parity max odd 1 = Fin(0)\n",
|
|
"parity max odd 2 = Inf(1) | Fin(0)\n",
|
|
"parity max odd 3 = Fin(2) & (Inf(1) | Fin(0))\n",
|
|
"parity max odd 4 = Inf(3) | (Fin(2) & (Inf(1) | Fin(0)))\n",
|
|
"parity max even 1 = Inf(0)\n",
|
|
"parity max even 2 = Fin(1) & Inf(0)\n",
|
|
"parity max even 3 = Inf(2) | (Fin(1) & Inf(0))\n",
|
|
"parity max even 4 = Fin(3) & (Inf(2) | (Fin(1) & Inf(0)))\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"for kind in ['min', 'max']:\n",
|
|
" for style in ['odd', 'even']:\n",
|
|
" for sets in range(1, 5):\n",
|
|
" name = 'parity {} {} {}'.format(kind, style, sets)\n",
|
|
" print('{:17} = {}'.format(name, spot.acc_code(name)))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Change parity\n",
|
|
"\n",
|
|
"This section describes the `change_parity()` method, that allows switching between different kinds and styles."
|
|
]
|
|
},
|
|
{
|
|
"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": 22,
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.14\" 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.1379)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-215.1379 490,-215.1379 490,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"94\" y=\"-196.9379\">Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"119\" y=\"-196.9379\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"135\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182\" y=\"-196.9379\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"198\" y=\"-196.9379\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"241\" y=\"-196.9379\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"257\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"304\" y=\"-196.9379\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"320\" y=\"-196.9379\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-196.9379\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-196.9379\">))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"185.5\" y=\"-182.9379\">[parity max odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4379\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-27.1379C4.178,-27.1379 17.9448,-27.1379 30.9241,-27.1379\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-27.1379 30.9808,-30.288 34.4807,-27.1379 30.9807,-27.138 30.9807,-27.138 30.9807,-27.138 34.4807,-27.1379 30.9807,-23.988 37.9807,-27.1379 37.9807,-27.1379\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4379\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M72.3264,-34.8648C95.3702,-45.7711 137.55,-65.7341 163.8289,-78.1714\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"170.4679,-81.3135 162.7932,-81.1661 167.3043,-79.8162 164.1407,-78.3189 164.1407,-78.3189 164.1407,-78.3189 167.3043,-79.8162 165.4883,-75.4717 170.4679,-81.3135 170.4679,-81.3135\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4379\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.2347,-28.1558C140.1802,-31.8372 366.3929,-44.4656 442.661,-48.7233\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"449.9758,-49.1317 442.8111,-51.8865 446.4813,-48.9365 442.9867,-48.7414 442.9867,-48.7414 442.9867,-48.7414 446.4813,-48.9365 443.1623,-45.5963 449.9758,-49.1317 449.9758,-49.1317\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9379\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9379\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.4379\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M194.4417,-105.7555C200.4125,-116.8719 209.9563,-130.616 223,-137.1379 249.4223,-150.349 283.9805,-142.2021 306.4535,-134.0898\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"313.0175,-131.597 307.5919,-137.027 309.7455,-132.8396 306.4735,-134.0822 306.4735,-134.0822 306.4735,-134.0822 309.7455,-132.8396 305.3552,-131.1374 313.0175,-131.597 313.0175,-131.597\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-146.9379\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path d=\"M450.8478,-44.1499C418.3857,-33.17 345.5214,-10.2021 282,-2.1379 255.9866,1.1646 249.1499,-.1914 223,-2.1379 172.1741,-5.9211 113.3624,-16.0956 80.8517,-22.2358\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.9414,-23.5552 80.2264,-19.1482 77.3793,-22.8988 80.8172,-22.2423 80.8172,-22.2423 80.8172,-22.2423 77.3793,-22.8988 81.408,-25.3364 73.9414,-23.5552 73.9414,-23.5552\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9379\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.9379\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M450.1447,-52.616C401.7471,-59.3331 267.9465,-77.9033 212.0485,-85.6614\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0053,-86.6389 211.5057,-82.5564 208.472,-86.1577 211.9388,-85.6765 211.9388,-85.6765 211.9388,-85.6765 208.472,-86.1577 212.3719,-88.7966 205.0053,-86.6389 205.0053,-86.6389\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M312.5568,-117.345C303.5825,-113.9337 292.3114,-109.9414 282,-107.1379 258.5876,-100.7723 231.3296,-95.8568 212.0314,-92.7832\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0495,-91.6962 212.4508,-89.6606 208.5078,-92.2347 211.9662,-92.7731 211.9662,-92.7731 211.9662,-92.7731 208.5078,-92.2347 211.4815,-95.8857 205.0495,-91.6962 205.0495,-91.6962\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.9379\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path d=\"M347.2795,-120.3178C368.6392,-115.1652 404.9704,-104.5683 432,-87.1379 439.2661,-82.4522 446.1681,-76.0438 451.9486,-69.8765\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"456.9202,-64.3368 454.5892,-71.6504 454.5825,-66.9417 452.2448,-69.5465 452.2448,-69.5465 452.2448,-69.5465 454.5825,-66.9417 449.9004,-67.4426 456.9202,-64.3368 456.9202,-64.3368\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.9379\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path d=\"M317.5762,-137.8048C312.8066,-148.7941 316.7813,-160.1379 329.5,-160.1379 339.4365,-160.1379 344.036,-153.2142 343.2986,-144.945\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"341.4238,-137.8048 346.2483,-143.7754 342.3127,-141.1901 343.2016,-144.5754 343.2016,-144.5754 343.2016,-144.5754 342.3127,-141.1901 340.1549,-145.3754 341.4238,-137.8048 341.4238,-137.8048\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.9379\">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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"249pt\" viewBox=\"0.00 0.00 494.00 249.14\" 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.1379)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-245.1379 490,-245.1379 490,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"61.5\" y=\"-226.9379\">Fin(</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"86.5\" y=\"-226.9379\">❺</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"102.5\" y=\"-226.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"149.5\" y=\"-226.9379\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"165.5\" y=\"-226.9379\">) | (Fin(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"208.5\" y=\"-226.9379\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"224.5\" y=\"-226.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"271.5\" y=\"-226.9379\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"287.5\" y=\"-226.9379\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"330.5\" y=\"-226.9379\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"346.5\" y=\"-226.9379\">) & Inf(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"389.5\" y=\"-226.9379\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"405.5\" y=\"-226.9379\">)))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182.5\" y=\"-212.9379\">[parity max even 6]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4379\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-27.1379C4.178,-27.1379 17.9448,-27.1379 30.9241,-27.1379\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-27.1379 30.9808,-30.288 34.4807,-27.1379 30.9807,-27.138 30.9807,-27.138 30.9807,-27.138 34.4807,-27.1379 30.9807,-23.988 37.9807,-27.1379 37.9807,-27.1379\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4379\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M72.3264,-34.8648C95.3702,-45.7711 137.55,-65.7341 163.8289,-78.1714\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"170.4679,-81.3135 162.7932,-81.1661 167.3043,-79.8162 164.1407,-78.3189 164.1407,-78.3189 164.1407,-78.3189 167.3043,-79.8162 165.4883,-75.4717 170.4679,-81.3135 170.4679,-81.3135\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-88.9379\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"113.5\" y=\"-73.9379\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4379\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.2347,-28.1558C140.1802,-31.8372 366.3929,-44.4656 442.661,-48.7233\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"449.9758,-49.1317 442.8111,-51.8865 446.4813,-48.9365 442.9867,-48.7414 442.9867,-48.7414 442.9867,-48.7414 446.4813,-48.9365 443.1623,-45.5963 449.9758,-49.1317 449.9758,-49.1317\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9379\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9379\">❺</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-139.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-135.4379\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M194.4797,-105.6802C200.4685,-116.7612 210.0181,-130.4938 223,-137.1379 248.5497,-150.214 282.2643,-148.1701 304.8527,-144.5334\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"311.7712,-143.3138 305.4244,-147.6313 308.3243,-143.9215 304.8775,-144.5291 304.8775,-144.5291 304.8775,-144.5291 308.3243,-143.9215 304.3306,-141.4269 311.7712,-143.3138 311.7712,-143.3138\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-165.9379\">p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-150.9379\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path d=\"M450.8478,-44.1499C418.3857,-33.17 345.5214,-10.2021 282,-2.1379 255.9866,1.1646 249.1499,-.1914 223,-2.1379 172.1741,-5.9211 113.3624,-16.0956 80.8517,-22.2358\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.9414,-23.5552 80.2264,-19.1482 77.3793,-22.8988 80.8172,-22.2423 80.8172,-22.2423 80.8172,-22.2423 77.3793,-22.8988 81.408,-25.3364 73.9414,-23.5552 73.9414,-23.5552\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9379\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.9379\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M450.1447,-52.616C401.7471,-59.3331 267.9465,-77.9033 212.0485,-85.6614\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0053,-86.6389 211.5057,-82.5564 208.472,-86.1577 211.9388,-85.6765 211.9388,-85.6765 211.9388,-85.6765 208.472,-86.1577 212.3719,-88.7966 205.0053,-86.6389 205.0053,-86.6389\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-90.9379\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"321.5\" y=\"-75.9379\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M315.4073,-127.4003C306.3888,-120.4804 294.1393,-112.1285 282,-107.1379 259.4223,-97.8559 231.8402,-93.3109 212.2247,-91.1163\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.124,-90.3853 212.4098,-87.9688 208.6056,-90.7438 212.0872,-91.1023 212.0872,-91.1023 212.0872,-91.1023 208.6056,-90.7438 211.7646,-94.2357 205.124,-90.3853 205.124,-90.3853\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.9379\">❺</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path d=\"M346.4357,-132.5855C367.5876,-123.9589 404.3546,-107.4768 432,-87.1379 438.8537,-82.0955 445.5751,-75.7045 451.3197,-69.6586\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"456.2965,-64.2518 453.8734,-71.5355 453.9261,-66.827 451.5558,-69.4021 451.5558,-69.4021 451.5558,-69.4021 453.9261,-66.827 449.2381,-67.2688 456.2965,-64.2518 456.2965,-64.2518\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-136.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-121.9379\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path d=\"M317.5762,-152.8048C312.8066,-163.7941 316.7813,-175.1379 329.5,-175.1379 339.4365,-175.1379 344.036,-168.2142 343.2986,-159.945\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"341.4238,-152.8048 346.2483,-158.7754 342.3127,-156.1901 343.2016,-159.5754 343.2016,-159.5754 343.2016,-159.5754 342.3127,-156.1901 340.1549,-160.3754 341.4238,-152.8048 341.4238,-152.8048\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-193.9379\">p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"321.5\" y=\"-178.9379\">⓿</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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.14\" 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.1379)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-215.1379 490,-215.1379 490,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"94\" y=\"-196.9379\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"119\" y=\"-196.9379\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"135\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182\" y=\"-196.9379\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"198\" y=\"-196.9379\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"241\" y=\"-196.9379\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"257\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"304\" y=\"-196.9379\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"320\" y=\"-196.9379\">) | Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-196.9379\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-196.9379\">))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"186\" y=\"-182.9379\">[parity min odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4379\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-27.1379C4.178,-27.1379 17.9448,-27.1379 30.9241,-27.1379\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-27.1379 30.9808,-30.288 34.4807,-27.1379 30.9807,-27.138 30.9807,-27.138 30.9807,-27.138 34.4807,-27.1379 30.9807,-23.988 37.9807,-27.1379 37.9807,-27.1379\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4379\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M72.3264,-34.8648C95.3702,-45.7711 137.55,-65.7341 163.8289,-78.1714\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"170.4679,-81.3135 162.7932,-81.1661 167.3043,-79.8162 164.1407,-78.3189 164.1407,-78.3189 164.1407,-78.3189 167.3043,-79.8162 165.4883,-75.4717 170.4679,-81.3135 170.4679,-81.3135\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4379\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.2347,-28.1558C140.1802,-31.8372 366.3929,-44.4656 442.661,-48.7233\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"449.9758,-49.1317 442.8111,-51.8865 446.4813,-48.9365 442.9867,-48.7414 442.9867,-48.7414 442.9867,-48.7414 446.4813,-48.9365 443.1623,-45.5963 449.9758,-49.1317 449.9758,-49.1317\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9379\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9379\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.4379\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M194.4417,-105.7555C200.4125,-116.8719 209.9563,-130.616 223,-137.1379 249.4223,-150.349 283.9805,-142.2021 306.4535,-134.0898\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"313.0175,-131.597 307.5919,-137.027 309.7455,-132.8396 306.4735,-134.0822 306.4735,-134.0822 306.4735,-134.0822 309.7455,-132.8396 305.3552,-131.1374 313.0175,-131.597 313.0175,-131.597\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-146.9379\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path d=\"M450.8478,-44.1499C418.3857,-33.17 345.5214,-10.2021 282,-2.1379 255.9866,1.1646 249.1499,-.1914 223,-2.1379 172.1741,-5.9211 113.3624,-16.0956 80.8517,-22.2358\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.9414,-23.5552 80.2264,-19.1482 77.3793,-22.8988 80.8172,-22.2423 80.8172,-22.2423 80.8172,-22.2423 77.3793,-22.8988 81.408,-25.3364 73.9414,-23.5552 73.9414,-23.5552\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9379\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.9379\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M450.1447,-52.616C401.7471,-59.3331 267.9465,-77.9033 212.0485,-85.6614\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0053,-86.6389 211.5057,-82.5564 208.472,-86.1577 211.9388,-85.6765 211.9388,-85.6765 211.9388,-85.6765 208.472,-86.1577 212.3719,-88.7966 205.0053,-86.6389 205.0053,-86.6389\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M312.5568,-117.345C303.5825,-113.9337 292.3114,-109.9414 282,-107.1379 258.5876,-100.7723 231.3296,-95.8568 212.0314,-92.7832\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0495,-91.6962 212.4508,-89.6606 208.5078,-92.2347 211.9662,-92.7731 211.9662,-92.7731 211.9662,-92.7731 208.5078,-92.2347 211.4815,-95.8857 205.0495,-91.6962 205.0495,-91.6962\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.9379\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path d=\"M347.2795,-120.3178C368.6392,-115.1652 404.9704,-104.5683 432,-87.1379 439.2661,-82.4522 446.1681,-76.0438 451.9486,-69.8765\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"456.9202,-64.3368 454.5892,-71.6504 454.5825,-66.9417 452.2448,-69.5465 452.2448,-69.5465 452.2448,-69.5465 454.5825,-66.9417 449.9004,-67.4426 456.9202,-64.3368 456.9202,-64.3368\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.9379\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path d=\"M317.5762,-137.8048C312.8066,-148.7941 316.7813,-160.1379 329.5,-160.1379 339.4365,-160.1379 344.036,-153.2142 343.2986,-144.945\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"341.4238,-137.8048 346.2483,-143.7754 342.3127,-141.1901 343.2016,-144.5754 343.2016,-144.5754 343.2016,-144.5754 342.3127,-141.1901 340.1549,-145.3754 341.4238,-137.8048 341.4238,-137.8048\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.9379\">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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.14\" 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.1379)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-215.1379 490,-215.1379 490,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"64.5\" y=\"-196.9379\">Inf(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"86.5\" y=\"-196.9379\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"102.5\" y=\"-196.9379\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"145.5\" y=\"-196.9379\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"161.5\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"208.5\" y=\"-196.9379\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"224.5\" y=\"-196.9379\">) | (Fin(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-196.9379\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"283.5\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"330.5\" y=\"-196.9379\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"346.5\" y=\"-196.9379\">) | Fin(</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"386.5\" y=\"-196.9379\">❺</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"402.5\" y=\"-196.9379\">)))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"183\" y=\"-182.9379\">[parity min even 6]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4379\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-27.1379C4.178,-27.1379 17.9448,-27.1379 30.9241,-27.1379\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-27.1379 30.9808,-30.288 34.4807,-27.1379 30.9807,-27.138 30.9807,-27.138 30.9807,-27.138 34.4807,-27.1379 30.9807,-23.988 37.9807,-27.1379 37.9807,-27.1379\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4379\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M72.3264,-34.8648C95.3702,-45.7711 137.55,-65.7341 163.8289,-78.1714\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"170.4679,-81.3135 162.7932,-81.1661 167.3043,-79.8162 164.1407,-78.3189 164.1407,-78.3189 164.1407,-78.3189 167.3043,-79.8162 165.4883,-75.4717 170.4679,-81.3135 170.4679,-81.3135\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4379\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.2347,-28.1558C140.1802,-31.8372 366.3929,-44.4656 442.661,-48.7233\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"449.9758,-49.1317 442.8111,-51.8865 446.4813,-48.9365 442.9867,-48.7414 442.9867,-48.7414 442.9867,-48.7414 446.4813,-48.9365 443.1623,-45.5963 449.9758,-49.1317 449.9758,-49.1317\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9379\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9379\">❺</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.4379\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M194.4417,-105.7555C200.4125,-116.8719 209.9563,-130.616 223,-137.1379 249.4223,-150.349 283.9805,-142.2021 306.4535,-134.0898\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"313.0175,-131.597 307.5919,-137.027 309.7455,-132.8396 306.4735,-134.0822 306.4735,-134.0822 306.4735,-134.0822 309.7455,-132.8396 305.3552,-131.1374 313.0175,-131.597 313.0175,-131.597\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-146.9379\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path d=\"M450.8478,-44.1499C418.3857,-33.17 345.5214,-10.2021 282,-2.1379 255.9866,1.1646 249.1499,-.1914 223,-2.1379 172.1741,-5.9211 113.3624,-16.0956 80.8517,-22.2358\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.9414,-23.5552 80.2264,-19.1482 77.3793,-22.8988 80.8172,-22.2423 80.8172,-22.2423 80.8172,-22.2423 77.3793,-22.8988 81.408,-25.3364 73.9414,-23.5552 73.9414,-23.5552\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9379\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.9379\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M450.1447,-52.616C401.7471,-59.3331 267.9465,-77.9033 212.0485,-85.6614\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0053,-86.6389 211.5057,-82.5564 208.472,-86.1577 211.9388,-85.6765 211.9388,-85.6765 211.9388,-85.6765 208.472,-86.1577 212.3719,-88.7966 205.0053,-86.6389 205.0053,-86.6389\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M312.5568,-117.345C303.5825,-113.9337 292.3114,-109.9414 282,-107.1379 258.5876,-100.7723 231.3296,-95.8568 212.0314,-92.7832\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0495,-91.6962 212.4508,-89.6606 208.5078,-92.2347 211.9662,-92.7731 211.9662,-92.7731 211.9662,-92.7731 208.5078,-92.2347 211.4815,-95.8857 205.0495,-91.6962 205.0495,-91.6962\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.9379\">❺</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path d=\"M347.2795,-120.3178C368.6392,-115.1652 404.9704,-104.5683 432,-87.1379 439.2661,-82.4522 446.1681,-76.0438 451.9486,-69.8765\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"456.9202,-64.3368 454.5892,-71.6504 454.5825,-66.9417 452.2448,-69.5465 452.2448,-69.5465 452.2448,-69.5465 454.5825,-66.9417 449.9004,-67.4426 456.9202,-64.3368 456.9202,-64.3368\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.9379\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path d=\"M317.5762,-137.8048C312.8066,-148.7941 316.7813,-160.1379 329.5,-160.1379 339.4365,-160.1379 344.036,-153.2142 343.2986,-144.945\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"341.4238,-137.8048 346.2483,-143.7754 342.3127,-141.1901 343.2016,-144.5754 343.2016,-144.5754 343.2016,-144.5754 342.3127,-141.1901 340.1549,-145.3754 341.4238,-137.8048 341.4238,-137.8048\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.9379\">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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.14\" 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.1379)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-215.1379 490,-215.1379 490,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"94\" y=\"-196.9379\">Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"119\" y=\"-196.9379\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"135\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182\" y=\"-196.9379\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"198\" y=\"-196.9379\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"241\" y=\"-196.9379\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"257\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"304\" y=\"-196.9379\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"320\" y=\"-196.9379\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-196.9379\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-196.9379\">))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"185.5\" y=\"-182.9379\">[parity max odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4379\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-27.1379C4.178,-27.1379 17.9448,-27.1379 30.9241,-27.1379\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-27.1379 30.9808,-30.288 34.4807,-27.1379 30.9807,-27.138 30.9807,-27.138 30.9807,-27.138 34.4807,-27.1379 30.9807,-23.988 37.9807,-27.1379 37.9807,-27.1379\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4379\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M72.3264,-34.8648C95.3702,-45.7711 137.55,-65.7341 163.8289,-78.1714\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"170.4679,-81.3135 162.7932,-81.1661 167.3043,-79.8162 164.1407,-78.3189 164.1407,-78.3189 164.1407,-78.3189 167.3043,-79.8162 165.4883,-75.4717 170.4679,-81.3135 170.4679,-81.3135\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4379\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.2347,-28.1558C140.1802,-31.8372 366.3929,-44.4656 442.661,-48.7233\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"449.9758,-49.1317 442.8111,-51.8865 446.4813,-48.9365 442.9867,-48.7414 442.9867,-48.7414 442.9867,-48.7414 446.4813,-48.9365 443.1623,-45.5963 449.9758,-49.1317 449.9758,-49.1317\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9379\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9379\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.4379\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M194.4417,-105.7555C200.4125,-116.8719 209.9563,-130.616 223,-137.1379 249.4223,-150.349 283.9805,-142.2021 306.4535,-134.0898\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"313.0175,-131.597 307.5919,-137.027 309.7455,-132.8396 306.4735,-134.0822 306.4735,-134.0822 306.4735,-134.0822 309.7455,-132.8396 305.3552,-131.1374 313.0175,-131.597 313.0175,-131.597\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-146.9379\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path d=\"M450.8478,-44.1499C418.3857,-33.17 345.5214,-10.2021 282,-2.1379 255.9866,1.1646 249.1499,-.1914 223,-2.1379 172.1741,-5.9211 113.3624,-16.0956 80.8517,-22.2358\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.9414,-23.5552 80.2264,-19.1482 77.3793,-22.8988 80.8172,-22.2423 80.8172,-22.2423 80.8172,-22.2423 77.3793,-22.8988 81.408,-25.3364 73.9414,-23.5552 73.9414,-23.5552\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9379\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.9379\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M450.1447,-52.616C401.7471,-59.3331 267.9465,-77.9033 212.0485,-85.6614\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0053,-86.6389 211.5057,-82.5564 208.472,-86.1577 211.9388,-85.6765 211.9388,-85.6765 211.9388,-85.6765 208.472,-86.1577 212.3719,-88.7966 205.0053,-86.6389 205.0053,-86.6389\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M312.5568,-117.345C303.5825,-113.9337 292.3114,-109.9414 282,-107.1379 258.5876,-100.7723 231.3296,-95.8568 212.0314,-92.7832\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0495,-91.6962 212.4508,-89.6606 208.5078,-92.2347 211.9662,-92.7731 211.9662,-92.7731 211.9662,-92.7731 208.5078,-92.2347 211.4815,-95.8857 205.0495,-91.6962 205.0495,-91.6962\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.9379\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path d=\"M347.2795,-120.3178C368.6392,-115.1652 404.9704,-104.5683 432,-87.1379 439.2661,-82.4522 446.1681,-76.0438 451.9486,-69.8765\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"456.9202,-64.3368 454.5892,-71.6504 454.5825,-66.9417 452.2448,-69.5465 452.2448,-69.5465 452.2448,-69.5465 454.5825,-66.9417 449.9004,-67.4426 456.9202,-64.3368 456.9202,-64.3368\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.9379\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path d=\"M317.5762,-137.8048C312.8066,-148.7941 316.7813,-160.1379 329.5,-160.1379 339.4365,-160.1379 344.036,-153.2142 343.2986,-144.945\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"341.4238,-137.8048 346.2483,-143.7754 342.3127,-141.1901 343.2016,-144.5754 343.2016,-144.5754 343.2016,-144.5754 342.3127,-141.1901 340.1549,-145.3754 341.4238,-137.8048 341.4238,-137.8048\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.9379\">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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"219pt\" viewBox=\"0.00 0.00 494.00 219.14\" 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.1379)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-215.1379 490,-215.1379 490,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"94\" y=\"-196.9379\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"119\" y=\"-196.9379\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"135\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"182\" y=\"-196.9379\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"198\" y=\"-196.9379\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"241\" y=\"-196.9379\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"257\" y=\"-196.9379\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"304\" y=\"-196.9379\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"320\" y=\"-196.9379\">) | Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-196.9379\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-196.9379\">))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"186\" y=\"-182.9379\">[parity min odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-27.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-23.4379\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-27.1379C4.178,-27.1379 17.9448,-27.1379 30.9241,-27.1379\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-27.1379 30.9808,-30.288 34.4807,-27.1379 30.9807,-27.138 30.9807,-27.138 30.9807,-27.138 34.4807,-27.1379 30.9807,-23.988 37.9807,-27.1379 37.9807,-27.1379\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"187\" cy=\"-89.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"187\" y=\"-85.4379\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M72.3264,-34.8648C95.3702,-45.7711 137.55,-65.7341 163.8289,-78.1714\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"170.4679,-81.3135 162.7932,-81.1661 167.3043,-79.8162 164.1407,-78.3189 164.1407,-78.3189 164.1407,-78.3189 167.3043,-79.8162 165.4883,-75.4717 170.4679,-81.3135 170.4679,-81.3135\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-73.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"468\" cy=\"-50.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"468\" y=\"-46.4379\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.2347,-28.1558C140.1802,-31.8372 366.3929,-44.4656 442.661,-48.7233\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"449.9758,-49.1317 442.8111,-51.8865 446.4813,-48.9365 442.9867,-48.7414 442.9867,-48.7414 442.9867,-48.7414 446.4813,-48.9365 443.1623,-45.5963 449.9758,-49.1317 449.9758,-49.1317\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"223\" y=\"-57.9379\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-42.9379\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"329.5\" cy=\"-124.1379\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"329.5\" y=\"-120.4379\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M194.4417,-105.7555C200.4125,-116.8719 209.9563,-130.616 223,-137.1379 249.4223,-150.349 283.9805,-142.2021 306.4535,-134.0898\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"313.0175,-131.597 307.5919,-137.027 309.7455,-132.8396 306.4735,-134.0822 306.4735,-134.0822 306.4735,-134.0822 309.7455,-132.8396 305.3552,-131.1374 313.0175,-131.597 313.0175,-131.597\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-146.9379\">p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->0</title>\n",
|
|
"<path d=\"M450.8478,-44.1499C418.3857,-33.17 345.5214,-10.2021 282,-2.1379 255.9866,1.1646 249.1499,-.1914 223,-2.1379 172.1741,-5.9211 113.3624,-16.0956 80.8517,-22.2358\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.9414,-23.5552 80.2264,-19.1482 77.3793,-22.8988 80.8172,-22.2423 80.8172,-22.2423 80.8172,-22.2423 77.3793,-22.8988 81.408,-25.3364 73.9414,-23.5552 73.9414,-23.5552\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-20.9379\">p0 & !p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-5.9379\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge9\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M450.1447,-52.616C401.7471,-59.3331 267.9465,-77.9033 212.0485,-85.6614\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0053,-86.6389 211.5057,-82.5564 208.472,-86.1577 211.9388,-85.6765 211.9388,-85.6765 211.9388,-85.6765 208.472,-86.1577 212.3719,-88.7966 205.0053,-86.6389 205.0053,-86.6389\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"300\" y=\"-75.9379\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M312.5568,-117.345C303.5825,-113.9337 292.3114,-109.9414 282,-107.1379 258.5876,-100.7723 231.3296,-95.8568 212.0314,-92.7832\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"205.0495,-91.6962 212.4508,-89.6606 208.5078,-92.2347 211.9662,-92.7731 211.9662,-92.7731 211.9662,-92.7731 208.5078,-92.2347 211.4815,-95.8857 205.0495,-91.6962 205.0495,-91.6962\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"225\" y=\"-125.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"244.5\" y=\"-110.9379\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>1->3</title>\n",
|
|
"<path d=\"M347.2795,-120.3178C368.6392,-115.1652 404.9704,-104.5683 432,-87.1379 439.2661,-82.4522 446.1681,-76.0438 451.9486,-69.8765\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"456.9202,-64.3368 454.5892,-71.6504 454.5825,-66.9417 452.2448,-69.5465 452.2448,-69.5465 452.2448,-69.5465 454.5825,-66.9417 449.9004,-67.4426 456.9202,-64.3368 456.9202,-64.3368\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-129.9379\">!p0 & p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"396.5\" y=\"-114.9379\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->1</title>\n",
|
|
"<path d=\"M317.5762,-137.8048C312.8066,-148.7941 316.7813,-160.1379 329.5,-160.1379 339.4365,-160.1379 344.036,-153.2142 343.2986,-144.945\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"341.4238,-137.8048 346.2483,-143.7754 342.3127,-141.1901 343.2016,-144.5754 343.2016,-144.5754 343.2016,-144.5754 342.3127,-141.1901 340.1549,-145.3754 341.4238,-137.8048 341.4238,-137.8048\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"303.5\" y=\"-163.9379\">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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"173pt\" viewBox=\"0.00 0.00 498.00 172.81\" 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.8065)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-168.8065 494,-168.8065 494,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"131\" y=\"-150.6065\">Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"153\" y=\"-150.6065\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-150.6065\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"212\" y=\"-150.6065\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"228\" y=\"-150.6065\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275\" y=\"-150.6065\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"291\" y=\"-150.6065\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"331\" y=\"-150.6065\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"347\" y=\"-150.6065\">)))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"187.5\" y=\"-136.6065\">[parity max odd 4]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-34.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-31.1065\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-34.8065C4.178,-34.8065 17.9448,-34.8065 30.9241,-34.8065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-34.8065 30.9808,-37.9566 34.4807,-34.8065 30.9807,-34.8066 30.9807,-34.8066 30.9807,-34.8066 34.4807,-34.8065 30.9807,-31.6566 37.9807,-34.8065 37.9807,-34.8065\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-54.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-51.1065\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M69.2358,-47.4757C89.0421,-65.4599 128.4234,-97.5662 169,-109.8065 223.8706,-126.3588 288.086,-91.2232 320.3183,-69.7806\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"326.326,-65.694 322.3098,-72.2357 323.4321,-67.6626 320.5381,-69.6311 320.5381,-69.6311 320.5381,-69.6311 323.4321,-67.6626 318.7664,-67.0265 326.326,-65.694 326.326,-65.694\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-117.6065\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-34.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-31.1065\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.0477,-34.8065C99.0722,-34.8065 144.4394,-34.8065 172.939,-34.8065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"180.1487,-34.8065 173.1488,-37.9566 176.6487,-34.8065 173.1487,-34.8066 173.1487,-34.8066 173.1487,-34.8066 176.6487,-34.8065 173.1487,-31.6566 180.1487,-34.8065 180.1487,-34.8065\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-38.6065\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-21.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-18.1065\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M359.1657,-52.8771C378.5155,-50.5179 409.8902,-45.816 436,-37.8065 440.3769,-36.4638 444.9261,-34.7294 449.2584,-32.8999\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"455.8317,-29.9893 450.7065,-35.7038 452.6314,-31.4064 449.4311,-32.8235 449.4311,-32.8235 449.4311,-32.8235 452.6314,-31.4064 448.1557,-29.9432 455.8317,-29.9893 455.8317,-29.9893\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-53.6065\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M216.5477,-37.3395C241.7097,-40.871 287.4385,-47.2891 315.9073,-51.2847\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"323.0988,-52.294 315.7289,-54.4405 319.6328,-51.8075 316.1668,-51.321 316.1668,-51.321 316.1668,-51.321 319.6328,-51.8075 316.6046,-48.2016 323.0988,-52.294 323.0988,-52.294\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-52.6065\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path d=\"M186.2539,-48.4735C181.3555,-59.4627 185.4375,-70.8065 198.5,-70.8065 208.7051,-70.8065 213.4289,-63.8828 212.6715,-55.6136\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"210.7461,-48.4735 215.61,-54.4119 211.6574,-51.8528 212.5687,-55.2321 212.5687,-55.2321 212.5687,-55.2321 211.6574,-51.8528 209.5273,-56.0522 210.7461,-48.4735 210.7461,-48.4735\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-89.6065\">p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-74.6065\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path d=\"M455.0183,-15.5417C449.0859,-13.6427 442.3273,-11.7983 436,-10.8065 323.3123,6.8572 222.0648,-1.5549 169,-7.8065 137.9101,-11.4692 102.9839,-20.6148 80.3002,-27.2488\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.3859,-29.3043 79.198,-24.2901 76.7408,-28.3069 80.0957,-27.3095 80.0957,-27.3095 80.0957,-27.3095 76.7408,-28.3069 80.9933,-30.3289 73.3859,-29.3043 73.3859,-29.3043\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-19.6065\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259.5\" y=\"-5.6065\">⓿</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275.5\" y=\"-5.6065\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M454.1457,-18.3787C434.5137,-15.42 402.3872,-13.001 377,-22.8065 369.8625,-25.5633 363.2281,-30.4374 357.6491,-35.5631\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"352.4423,-40.7036 355.2106,-33.544 354.933,-38.2446 357.4237,-35.7856 357.4237,-35.7856 357.4237,-35.7856 354.933,-38.2446 359.6368,-38.0273 352.4423,-40.7036 352.4423,-40.7036\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-26.6065\">!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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"176pt\" viewBox=\"0.00 0.00 498.00 175.85\" 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 171.8479)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-171.8479 494,-171.8479 494,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"131\" y=\"-153.6479\">Inf(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"153\" y=\"-153.6479\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-153.6479\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"212\" y=\"-153.6479\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"228\" y=\"-153.6479\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275\" y=\"-153.6479\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"291\" y=\"-153.6479\">) | Fin(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"331\" y=\"-153.6479\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"347\" y=\"-153.6479\">)))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"185\" y=\"-139.6479\">[parity min even 4]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-37.8479\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-34.1479\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-37.8479C4.178,-37.8479 17.9448,-37.8479 30.9241,-37.8479\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-37.8479 30.9808,-40.998 34.4807,-37.848 30.9807,-37.848 30.9807,-37.848 30.9807,-37.848 34.4807,-37.848 30.9807,-34.698 37.9807,-37.8479 37.9807,-37.8479\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-57.8479\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-54.1479\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M69.2358,-50.5171C89.0421,-68.5014 128.4234,-100.6076 169,-112.8479 223.8706,-129.4002 288.086,-94.2646 320.3183,-72.822\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"326.326,-68.7355 322.3098,-75.2771 323.4321,-70.704 320.5381,-72.6725 320.5381,-72.6725 320.5381,-72.6725 323.4321,-70.704 318.7664,-70.068 326.326,-68.7355 326.326,-68.7355\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-120.6479\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-37.8479\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-34.1479\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.0477,-37.8479C99.0722,-37.8479 144.4394,-37.8479 172.939,-37.8479\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"180.1487,-37.8479 173.1488,-40.998 176.6487,-37.848 173.1487,-37.848 173.1487,-37.848 173.1487,-37.848 176.6487,-37.848 173.1487,-34.698 180.1487,-37.8479 180.1487,-37.8479\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-41.6479\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-24.8479\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-21.1479\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M359.1657,-55.9185C378.5155,-53.5593 409.8902,-48.8574 436,-40.8479 440.3769,-39.5053 444.9261,-37.7709 449.2584,-35.9414\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"455.8317,-33.0308 450.7065,-38.7452 452.6314,-34.4479 449.4311,-35.8649 449.4311,-35.8649 449.4311,-35.8649 452.6314,-34.4479 448.1557,-32.9847 455.8317,-33.0308 455.8317,-33.0308\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-56.6479\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M216.5477,-40.381C241.7097,-43.9125 287.4385,-50.3305 315.9073,-54.3262\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"323.0988,-55.3355 315.7289,-57.4819 319.6328,-54.849 316.1668,-54.3625 316.1668,-54.3625 316.1668,-54.3625 319.6328,-54.849 316.6046,-51.2431 323.0988,-55.3355 323.0988,-55.3355\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-55.6479\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path d=\"M186.2539,-51.5149C181.3555,-62.5042 185.4375,-73.8479 198.5,-73.8479 208.7051,-73.8479 213.4289,-66.9243 212.6715,-58.6551\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"210.7461,-51.5149 215.61,-57.4534 211.6574,-54.8942 212.5687,-58.2735 212.5687,-58.2735 212.5687,-58.2735 211.6574,-54.8942 209.5273,-59.0937 210.7461,-51.5149 210.7461,-51.5149\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-92.6479\">p0 & !p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-77.6479\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path d=\"M455.0135,-18.6138C449.0806,-16.7173 442.323,-14.8665 436,-13.8479 318.8364,5.0264 286.8591,3.0371 169,-10.8479 137.9101,-14.5107 102.9839,-23.6562 80.3002,-30.2903\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.3859,-32.3458 79.198,-27.3316 76.7408,-31.3484 80.0957,-30.351 80.0957,-30.351 80.0957,-30.351 76.7408,-31.3484 80.9933,-33.3704 73.3859,-32.3458 73.3859,-32.3458\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-21.6479\">!p0 & p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-6.6479\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M454.1457,-21.4202C434.5137,-18.4615 402.3872,-16.0425 377,-25.8479 369.8625,-28.6047 363.2281,-33.4788 357.6491,-38.6046\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"352.4423,-43.745 355.2106,-36.5855 354.933,-41.2861 357.4237,-38.8271 357.4237,-38.8271 357.4237,-38.8271 354.933,-41.2861 359.6368,-41.0687 352.4423,-43.745 352.4423,-43.745\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-29.6479\">!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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"176pt\" viewBox=\"0.00 0.00 498.00 175.85\" 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 171.8479)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-171.8479 494,-171.8479 494,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"96\" y=\"-153.6479\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"121\" y=\"-153.6479\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"137\" y=\"-153.6479\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"184\" y=\"-153.6479\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"200\" y=\"-153.6479\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"243\" y=\"-153.6479\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259\" y=\"-153.6479\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"306\" y=\"-153.6479\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"322\" y=\"-153.6479\">) | Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"362\" y=\"-153.6479\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"378\" y=\"-153.6479\">))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"188\" y=\"-139.6479\">[parity min odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-37.8479\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-34.1479\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-37.8479C4.178,-37.8479 17.9448,-37.8479 30.9241,-37.8479\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-37.8479 30.9808,-40.998 34.4807,-37.848 30.9807,-37.848 30.9807,-37.848 30.9807,-37.848 34.4807,-37.848 30.9807,-34.698 37.9807,-37.8479 37.9807,-37.8479\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-57.8479\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-54.1479\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M69.2358,-50.5171C89.0421,-68.5014 128.4234,-100.6076 169,-112.8479 223.8706,-129.4002 288.086,-94.2646 320.3183,-72.822\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"326.326,-68.7355 322.3098,-75.2771 323.4321,-70.704 320.5381,-72.6725 320.5381,-72.6725 320.5381,-72.6725 323.4321,-70.704 318.7664,-70.068 326.326,-68.7355 326.326,-68.7355\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-120.6479\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-37.8479\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-34.1479\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.0477,-37.8479C99.0722,-37.8479 144.4394,-37.8479 172.939,-37.8479\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"180.1487,-37.8479 173.1488,-40.998 176.6487,-37.848 173.1487,-37.848 173.1487,-37.848 173.1487,-37.848 176.6487,-37.848 173.1487,-34.698 180.1487,-37.8479 180.1487,-37.8479\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-41.6479\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-24.8479\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-21.1479\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M359.1657,-55.9185C378.5155,-53.5593 409.8902,-48.8574 436,-40.8479 440.3769,-39.5053 444.9261,-37.7709 449.2584,-35.9414\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"455.8317,-33.0308 450.7065,-38.7452 452.6314,-34.4479 449.4311,-35.8649 449.4311,-35.8649 449.4311,-35.8649 452.6314,-34.4479 448.1557,-32.9847 455.8317,-33.0308 455.8317,-33.0308\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-56.6479\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M216.5477,-40.381C241.7097,-43.9125 287.4385,-50.3305 315.9073,-54.3262\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"323.0988,-55.3355 315.7289,-57.4819 319.6328,-54.849 316.1668,-54.3625 316.1668,-54.3625 316.1668,-54.3625 319.6328,-54.849 316.6046,-51.2431 323.0988,-55.3355 323.0988,-55.3355\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-55.6479\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path d=\"M186.2539,-51.5149C181.3555,-62.5042 185.4375,-73.8479 198.5,-73.8479 208.7051,-73.8479 213.4289,-66.9243 212.6715,-58.6551\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"210.7461,-51.5149 215.61,-57.4534 211.6574,-54.8942 212.5687,-58.2735 212.5687,-58.2735 212.5687,-58.2735 211.6574,-54.8942 209.5273,-59.0937 210.7461,-51.5149 210.7461,-51.5149\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-92.6479\">p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-77.6479\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path d=\"M455.0135,-18.6138C449.0806,-16.7173 442.323,-14.8665 436,-13.8479 318.8364,5.0264 286.8591,3.0371 169,-10.8479 137.9101,-14.5107 102.9839,-23.6562 80.3002,-30.2903\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.3859,-32.3458 79.198,-27.3316 76.7408,-31.3484 80.0957,-30.351 80.0957,-30.351 80.0957,-30.351 76.7408,-31.3484 80.9933,-33.3704 73.3859,-32.3458 73.3859,-32.3458\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-21.6479\">!p0 & p1</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-6.6479\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M454.1457,-21.4202C434.5137,-18.4615 402.3872,-16.0425 377,-25.8479 369.8625,-28.6047 363.2281,-33.4788 357.6491,-38.6046\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"352.4423,-43.745 355.2106,-36.5855 354.933,-41.2861 357.4237,-38.8271 357.4237,-38.8271 357.4237,-38.8271 354.933,-41.2861 359.6368,-41.0687 352.4423,-43.745 352.4423,-43.745\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-29.6479\">!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",
|
|
"\n",
|
|
"People working with parity automata usually expect all states (or edges) to be part of some acceptance set. This constraints, which come in addition to the use of a parity acceptance, is what the HOA format call \"colored\".\n",
|
|
"\n",
|
|
"A *parity automaton* is a *colored* automaton with *parity acceptance*.\n",
|
|
"\n",
|
|
"Coloring an automaton can be done with the `colorize_parity()` function.\n",
|
|
"\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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"173pt\" viewBox=\"0.00 0.00 498.00 172.81\" 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.8065)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-168.8065 494,-168.8065 494,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"131\" y=\"-150.6065\">Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"153\" y=\"-150.6065\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-150.6065\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"212\" y=\"-150.6065\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"228\" y=\"-150.6065\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275\" y=\"-150.6065\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"291\" y=\"-150.6065\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"331\" y=\"-150.6065\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"347\" y=\"-150.6065\">)))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"187.5\" y=\"-136.6065\">[parity max odd 4]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-34.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-31.1065\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-34.8065C4.178,-34.8065 17.9448,-34.8065 30.9241,-34.8065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-34.8065 30.9808,-37.9566 34.4807,-34.8065 30.9807,-34.8066 30.9807,-34.8066 30.9807,-34.8066 34.4807,-34.8065 30.9807,-31.6566 37.9807,-34.8065 37.9807,-34.8065\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-54.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-51.1065\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M69.2358,-47.4757C89.0421,-65.4599 128.4234,-97.5662 169,-109.8065 223.8706,-126.3588 288.086,-91.2232 320.3183,-69.7806\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"326.326,-65.694 322.3098,-72.2357 323.4321,-67.6626 320.5381,-69.6311 320.5381,-69.6311 320.5381,-69.6311 323.4321,-67.6626 318.7664,-67.0265 326.326,-65.694 326.326,-65.694\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-117.6065\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-34.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-31.1065\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.0477,-34.8065C99.0722,-34.8065 144.4394,-34.8065 172.939,-34.8065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"180.1487,-34.8065 173.1488,-37.9566 176.6487,-34.8065 173.1487,-34.8066 173.1487,-34.8066 173.1487,-34.8066 176.6487,-34.8065 173.1487,-31.6566 180.1487,-34.8065 180.1487,-34.8065\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-38.6065\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-21.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-18.1065\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M359.1657,-52.8771C378.5155,-50.5179 409.8902,-45.816 436,-37.8065 440.3769,-36.4638 444.9261,-34.7294 449.2584,-32.8999\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"455.8317,-29.9893 450.7065,-35.7038 452.6314,-31.4064 449.4311,-32.8235 449.4311,-32.8235 449.4311,-32.8235 452.6314,-31.4064 448.1557,-29.9432 455.8317,-29.9893 455.8317,-29.9893\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-53.6065\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M216.5477,-37.3395C241.7097,-40.871 287.4385,-47.2891 315.9073,-51.2847\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"323.0988,-52.294 315.7289,-54.4405 319.6328,-51.8075 316.1668,-51.321 316.1668,-51.321 316.1668,-51.321 319.6328,-51.8075 316.6046,-48.2016 323.0988,-52.294 323.0988,-52.294\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-52.6065\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path d=\"M186.2539,-48.4735C181.3555,-59.4627 185.4375,-70.8065 198.5,-70.8065 208.7051,-70.8065 213.4289,-63.8828 212.6715,-55.6136\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"210.7461,-48.4735 215.61,-54.4119 211.6574,-51.8528 212.5687,-55.2321 212.5687,-55.2321 212.5687,-55.2321 211.6574,-51.8528 209.5273,-56.0522 210.7461,-48.4735 210.7461,-48.4735\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-89.6065\">p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-74.6065\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path d=\"M455.0183,-15.5417C449.0859,-13.6427 442.3273,-11.7983 436,-10.8065 323.3123,6.8572 222.0648,-1.5549 169,-7.8065 137.9101,-11.4692 102.9839,-20.6148 80.3002,-27.2488\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.3859,-29.3043 79.198,-24.2901 76.7408,-28.3069 80.0957,-27.3095 80.0957,-27.3095 80.0957,-27.3095 76.7408,-28.3069 80.9933,-30.3289 73.3859,-29.3043 73.3859,-29.3043\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-19.6065\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259.5\" y=\"-5.6065\">⓿</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275.5\" y=\"-5.6065\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M454.1457,-18.3787C434.5137,-15.42 402.3872,-13.001 377,-22.8065 369.8625,-25.5633 363.2281,-30.4374 357.6491,-35.5631\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"352.4423,-40.7036 355.2106,-33.544 354.933,-38.2446 357.4237,-35.7856 357.4237,-35.7856 357.4237,-35.7856 354.933,-38.2446 359.6368,-38.0273 352.4423,-40.7036 352.4423,-40.7036\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-26.6065\">!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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"192pt\" viewBox=\"0.00 0.00 498.00 192.01\" 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.0072)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-188.0072 494,-188.0072 494,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"98\" y=\"-169.8072\">Inf(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"120\" y=\"-169.8072\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"136\" y=\"-169.8072\">) | (Fin(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"179\" y=\"-169.8072\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"195\" y=\"-169.8072\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"242\" y=\"-169.8072\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"258\" y=\"-169.8072\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"301\" y=\"-169.8072\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"317\" y=\"-169.8072\">) & Inf(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"360\" y=\"-169.8072\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"376\" y=\"-169.8072\">))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"184.5\" y=\"-155.8072\">[parity max even 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-36.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-32.3072\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-36.0072C4.178,-36.0072 17.9448,-36.0072 30.9241,-36.0072\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-36.0072 30.9808,-39.1573 34.4807,-36.0073 30.9807,-36.0073 30.9807,-36.0073 30.9807,-36.0073 34.4807,-36.0073 30.9807,-32.8573 37.9807,-36.0072 37.9807,-36.0072\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-67.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-63.3072\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M68.592,-49.5021C75.1885,-56.1405 83.6223,-63.9875 92,-70.0072 123.486,-92.6311 131.3832,-101.6165 169,-111.0072 228.2142,-125.7895 249.3842,-117.1414 305,-92.0072 310.5819,-89.4846 316.213,-86.0765 321.3104,-82.5891\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"327.0143,-78.5073 323.155,-85.1427 324.168,-80.5442 321.3218,-82.581 321.3218,-82.581 321.3218,-82.581 324.168,-80.5442 319.4886,-80.0194 327.0143,-78.5073 327.0143,-78.5073\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-136.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-121.8072\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-36.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-32.3072\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.0477,-36.0072C99.0722,-36.0072 144.4394,-36.0072 172.939,-36.0072\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"180.1487,-36.0072 173.1488,-39.1573 176.6487,-36.0072 173.1487,-36.0073 173.1487,-36.0073 173.1487,-36.0073 176.6487,-36.0072 173.1487,-32.8573 180.1487,-36.0072 180.1487,-36.0072\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-54.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"113.5\" y=\"-39.8072\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-23.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-19.3072\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M359.3459,-67.5236C379.1227,-67.4055 411.1106,-65.2254 436,-54.0072 442.7675,-50.957 449.226,-46.2199 454.7564,-41.3592\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"459.9545,-36.515 456.981,-43.5918 457.394,-38.9012 454.8335,-41.2874 454.8335,-41.2874 454.8335,-41.2874 457.394,-38.9012 452.6859,-38.9829 459.9545,-36.515 459.9545,-36.515\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-84.8072\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-69.8072\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M216.2596,-39.8707C241.433,-45.347 287.5999,-55.3903 316.1587,-61.6031\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"323.0166,-63.095 315.5069,-64.6849 319.5966,-62.351 316.1766,-61.6069 316.1766,-61.6069 316.1766,-61.6069 319.5966,-62.351 316.8462,-58.5289 323.0166,-63.095 323.0166,-63.095\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-76.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-61.8072\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path d=\"M186.2539,-49.6742C181.3555,-60.6635 185.4375,-72.0072 198.5,-72.0072 208.7051,-72.0072 213.4289,-65.0835 212.6715,-56.8143\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"210.7461,-49.6742 215.61,-55.6126 211.6574,-53.0535 212.5687,-56.4328 212.5687,-56.4328 212.5687,-56.4328 211.6574,-53.0535 209.5273,-57.2529 210.7461,-49.6742 210.7461,-49.6742\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-90.8072\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-75.8072\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path d=\"M455.0647,-16.1533C449.136,-14.0801 442.3679,-12.072 436,-11.0072 322.3531,7.9964 221.7801,-2.7891 169,-9.0072 137.9101,-12.6699 102.9839,-21.8155 80.3002,-28.4495\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.3859,-30.5051 79.198,-25.4908 76.7408,-29.5076 80.0957,-28.5102 80.0957,-28.5102 80.0957,-28.5102 76.7408,-29.5076 80.9933,-31.5296 73.3859,-30.5051 73.3859,-30.5051\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-20.8072\">!p0 & p1</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-5.8072\">❸</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M454.2068,-18.9471C434.345,-15.3493 401.747,-12.2917 377,-24.0072 367.6034,-28.4557 359.7823,-36.6744 353.8572,-44.7442\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"349.7011,-50.8213 351.0526,-43.265 351.6769,-47.9323 353.6527,-45.0433 353.6527,-45.0433 353.6527,-45.0433 351.6769,-47.9323 356.2528,-46.8215 349.7011,-50.8213 349.7011,-50.8213\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-42.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-27.8072\">⓿</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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"192pt\" viewBox=\"0.00 0.00 498.00 192.01\" 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.0072)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-188.0072 494,-188.0072 494,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"66.5\" y=\"-169.8072\">Inf(</text>\n",
|
|
"<text fill=\"#e31a1c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"88.5\" y=\"-169.8072\">❺</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"104.5\" y=\"-169.8072\">) | (Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"147.5\" y=\"-169.8072\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"163.5\" y=\"-169.8072\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"210.5\" y=\"-169.8072\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"226.5\" y=\"-169.8072\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"269.5\" y=\"-169.8072\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"285.5\" y=\"-169.8072\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"332.5\" y=\"-169.8072\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"348.5\" y=\"-169.8072\">) | Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"388.5\" y=\"-169.8072\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"404.5\" y=\"-169.8072\">)))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"187.5\" y=\"-155.8072\">[parity max odd 6]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-36.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-32.3072\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-36.0072C4.178,-36.0072 17.9448,-36.0072 30.9241,-36.0072\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-36.0072 30.9808,-39.1573 34.4807,-36.0073 30.9807,-36.0073 30.9807,-36.0073 30.9807,-36.0073 34.4807,-36.0073 30.9807,-32.8573 37.9807,-36.0072 37.9807,-36.0072\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-67.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-63.3072\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M68.592,-49.5021C75.1885,-56.1405 83.6223,-63.9875 92,-70.0072 123.486,-92.6311 131.3832,-101.6165 169,-111.0072 228.2142,-125.7895 249.3842,-117.1414 305,-92.0072 310.5819,-89.4846 316.213,-86.0765 321.3104,-82.5891\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"327.0143,-78.5073 323.155,-85.1427 324.168,-80.5442 321.3218,-82.581 321.3218,-82.581 321.3218,-82.581 324.168,-80.5442 319.4886,-80.0194 327.0143,-78.5073 327.0143,-78.5073\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-136.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-121.8072\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-36.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-32.3072\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.0477,-36.0072C99.0722,-36.0072 144.4394,-36.0072 172.939,-36.0072\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"180.1487,-36.0072 173.1488,-39.1573 176.6487,-36.0072 173.1487,-36.0073 173.1487,-36.0073 173.1487,-36.0073 176.6487,-36.0072 173.1487,-32.8573 180.1487,-36.0072 180.1487,-36.0072\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-54.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"113.5\" y=\"-39.8072\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-23.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-19.3072\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M359.3459,-67.5236C379.1227,-67.4055 411.1106,-65.2254 436,-54.0072 442.7675,-50.957 449.226,-46.2199 454.7564,-41.3592\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"459.9545,-36.515 456.981,-43.5918 457.394,-38.9012 454.8335,-41.2874 454.8335,-41.2874 454.8335,-41.2874 457.394,-38.9012 452.6859,-38.9829 459.9545,-36.515 459.9545,-36.515\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-84.8072\">!p0 & p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-69.8072\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M216.2596,-39.8707C241.433,-45.347 287.5999,-55.3903 316.1587,-61.6031\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"323.0166,-63.095 315.5069,-64.6849 319.5966,-62.351 316.1766,-61.6069 316.1766,-61.6069 316.1766,-61.6069 319.5966,-62.351 316.8462,-58.5289 323.0166,-63.095 323.0166,-63.095\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-76.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-61.8072\">❶</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path d=\"M186.2539,-49.6742C181.3555,-60.6635 185.4375,-72.0072 198.5,-72.0072 208.7051,-72.0072 213.4289,-65.0835 212.6715,-56.8143\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"210.7461,-49.6742 215.61,-55.6126 211.6574,-53.0535 212.5687,-56.4328 212.5687,-56.4328 212.5687,-56.4328 211.6574,-53.0535 209.5273,-57.2529 210.7461,-49.6742 210.7461,-49.6742\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-90.8072\">p0 & !p1</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-75.8072\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path d=\"M455.0647,-16.1533C449.136,-14.0801 442.3679,-12.072 436,-11.0072 322.3531,7.9964 221.7801,-2.7891 169,-9.0072 137.9101,-12.6699 102.9839,-21.8155 80.3002,-28.4495\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.3859,-30.5051 79.198,-25.4908 76.7408,-29.5076 80.0957,-28.5102 80.0957,-28.5102 80.0957,-28.5102 76.7408,-29.5076 80.9933,-31.5296 73.3859,-30.5051 73.3859,-30.5051\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-20.8072\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-5.8072\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M454.2068,-18.9471C434.345,-15.3493 401.747,-12.2917 377,-24.0072 367.6034,-28.4557 359.7823,-36.6744 353.8572,-44.7442\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"349.7011,-50.8213 351.0526,-43.265 351.6769,-47.9323 353.6527,-45.0433 353.6527,-45.0433 353.6527,-45.0433 351.6769,-47.9323 356.2528,-46.8215 349.7011,-50.8213 349.7011,-50.8213\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-42.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-27.8072\">❶</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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"173pt\" viewBox=\"0.00 0.00 498.00 172.81\" 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.8065)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-168.8065 494,-168.8065 494,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"128\" y=\"-150.6065\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"153\" y=\"-150.6065\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-150.6065\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"216\" y=\"-150.6065\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"232\" y=\"-150.6065\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275\" y=\"-150.6065\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"291\" y=\"-150.6065\">) & Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"334\" y=\"-150.6065\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"350\" y=\"-150.6065\">)))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"188\" y=\"-136.6065\">[parity min odd 4]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-34.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-31.1065\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-34.8065C4.178,-34.8065 17.9448,-34.8065 30.9241,-34.8065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-34.8065 30.9808,-37.9566 34.4807,-34.8065 30.9807,-34.8066 30.9807,-34.8066 30.9807,-34.8066 34.4807,-34.8065 30.9807,-31.6566 37.9807,-34.8065 37.9807,-34.8065\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-54.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-51.1065\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M69.2358,-47.4757C89.0421,-65.4599 128.4234,-97.5662 169,-109.8065 223.8706,-126.3588 288.086,-91.2232 320.3183,-69.7806\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"326.326,-65.694 322.3098,-72.2357 323.4321,-67.6626 320.5381,-69.6311 320.5381,-69.6311 320.5381,-69.6311 323.4321,-67.6626 318.7664,-67.0265 326.326,-65.694 326.326,-65.694\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-117.6065\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-34.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-31.1065\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.0477,-34.8065C99.0722,-34.8065 144.4394,-34.8065 172.939,-34.8065\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"180.1487,-34.8065 173.1488,-37.9566 176.6487,-34.8065 173.1487,-34.8066 173.1487,-34.8066 173.1487,-34.8066 176.6487,-34.8065 173.1487,-31.6566 180.1487,-34.8065 180.1487,-34.8065\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-38.6065\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-21.8065\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-18.1065\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M359.1657,-52.8771C378.5155,-50.5179 409.8902,-45.816 436,-37.8065 440.3769,-36.4638 444.9261,-34.7294 449.2584,-32.8999\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"455.8317,-29.9893 450.7065,-35.7038 452.6314,-31.4064 449.4311,-32.8235 449.4311,-32.8235 449.4311,-32.8235 452.6314,-31.4064 448.1557,-29.9432 455.8317,-29.9893 455.8317,-29.9893\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-53.6065\">!p0 & p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M216.5477,-37.3395C241.7097,-40.871 287.4385,-47.2891 315.9073,-51.2847\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"323.0988,-52.294 315.7289,-54.4405 319.6328,-51.8075 316.1668,-51.321 316.1668,-51.321 316.1668,-51.321 319.6328,-51.8075 316.6046,-48.2016 323.0988,-52.294 323.0988,-52.294\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-52.6065\">!p0 & !p1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path d=\"M186.2539,-48.4735C181.3555,-59.4627 185.4375,-70.8065 198.5,-70.8065 208.7051,-70.8065 213.4289,-63.8828 212.6715,-55.6136\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"210.7461,-48.4735 215.61,-54.4119 211.6574,-51.8528 212.5687,-55.2321 212.5687,-55.2321 212.5687,-55.2321 211.6574,-51.8528 209.5273,-56.0522 210.7461,-48.4735 210.7461,-48.4735\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-89.6065\">p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-74.6065\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path d=\"M455.0183,-15.5417C449.0859,-13.6427 442.3273,-11.7983 436,-10.8065 323.3123,6.8572 222.0648,-1.5549 169,-7.8065 137.9101,-11.4692 102.9839,-20.6148 80.3002,-27.2488\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.3859,-29.3043 79.198,-24.2901 76.7408,-28.3069 80.0957,-27.3095 80.0957,-27.3095 80.0957,-27.3095 76.7408,-28.3069 80.9933,-30.3289 73.3859,-29.3043 73.3859,-29.3043\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-19.6065\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259.5\" y=\"-5.6065\">⓿</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"275.5\" y=\"-5.6065\">❷</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M454.1457,-18.3787C434.5137,-15.42 402.3872,-13.001 377,-22.8065 369.8625,-25.5633 363.2281,-30.4374 357.6491,-35.5631\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"352.4423,-40.7036 355.2106,-33.544 354.933,-38.2446 357.4237,-35.7856 357.4237,-35.7856 357.4237,-35.7856 354.933,-38.2446 359.6368,-38.0273 352.4423,-40.7036 352.4423,-40.7036\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-26.6065\">!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": {},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"image/svg+xml": [
|
|
"<svg height=\"192pt\" viewBox=\"0.00 0.00 498.00 192.01\" 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.0072)\">\n",
|
|
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-188.0072 494,-188.0072 494,4 -4,4\" stroke=\"transparent\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"96\" y=\"-169.8072\">Fin(</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"121\" y=\"-169.8072\">⓿</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"137\" y=\"-169.8072\">) & (Inf(</text>\n",
|
|
"<text fill=\"#ff4da0\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"184\" y=\"-169.8072\">❶</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"200\" y=\"-169.8072\">) | (Fin(</text>\n",
|
|
"<text fill=\"#ff7f00\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"243\" y=\"-169.8072\">❷</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"259\" y=\"-169.8072\">) & (Inf(</text>\n",
|
|
"<text fill=\"#6a3d9a\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"306\" y=\"-169.8072\">❸</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"322\" y=\"-169.8072\">) | Fin(</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"362\" y=\"-169.8072\">❹</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"378\" y=\"-169.8072\">))))</text>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"188\" y=\"-155.8072\">[parity min odd 5]</text>\n",
|
|
"<!-- I -->\n",
|
|
"<!-- 0 -->\n",
|
|
"<g class=\"node\" id=\"node2\">\n",
|
|
"<title>0</title>\n",
|
|
"<ellipse cx=\"56\" cy=\"-36.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"56\" y=\"-32.3072\">0</text>\n",
|
|
"</g>\n",
|
|
"<!-- I->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge1\">\n",
|
|
"<title>I->0</title>\n",
|
|
"<path d=\"M1.1233,-36.0072C4.178,-36.0072 17.9448,-36.0072 30.9241,-36.0072\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"37.9807,-36.0072 30.9808,-39.1573 34.4807,-36.0073 30.9807,-36.0073 30.9807,-36.0073 30.9807,-36.0073 34.4807,-36.0073 30.9807,-32.8573 37.9807,-36.0072 37.9807,-36.0072\" stroke=\"#000000\"/>\n",
|
|
"</g>\n",
|
|
"<!-- 2 -->\n",
|
|
"<g class=\"node\" id=\"node3\">\n",
|
|
"<title>2</title>\n",
|
|
"<ellipse cx=\"341\" cy=\"-67.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"341\" y=\"-63.3072\">2</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge2\">\n",
|
|
"<title>0->2</title>\n",
|
|
"<path d=\"M68.592,-49.5021C75.1885,-56.1405 83.6223,-63.9875 92,-70.0072 123.486,-92.6311 131.3832,-101.6165 169,-111.0072 228.2142,-125.7895 249.3842,-117.1414 305,-92.0072 310.5819,-89.4846 316.213,-86.0765 321.3104,-82.5891\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"327.0143,-78.5073 323.155,-85.1427 324.168,-80.5442 321.3218,-82.581 321.3218,-82.581 321.3218,-82.581 324.168,-80.5442 319.4886,-80.0194 327.0143,-78.5073 327.0143,-78.5073\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"169\" y=\"-136.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-121.8072\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3 -->\n",
|
|
"<g class=\"node\" id=\"node4\">\n",
|
|
"<title>3</title>\n",
|
|
"<ellipse cx=\"198.5\" cy=\"-36.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"198.5\" y=\"-32.3072\">3</text>\n",
|
|
"</g>\n",
|
|
"<!-- 0->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge3\">\n",
|
|
"<title>0->3</title>\n",
|
|
"<path d=\"M74.0477,-36.0072C99.0722,-36.0072 144.4394,-36.0072 172.939,-36.0072\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"180.1487,-36.0072 173.1488,-39.1573 176.6487,-36.0072 173.1487,-36.0073 173.1487,-36.0073 173.1487,-36.0073 176.6487,-36.0072 173.1487,-32.8573 180.1487,-36.0072 180.1487,-36.0072\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"92\" y=\"-54.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"113.5\" y=\"-39.8072\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1 -->\n",
|
|
"<g class=\"node\" id=\"node5\">\n",
|
|
"<title>1</title>\n",
|
|
"<ellipse cx=\"472\" cy=\"-23.0072\" fill=\"#ffffaa\" rx=\"18\" ry=\"18\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"middle\" x=\"472\" y=\"-19.3072\">1</text>\n",
|
|
"</g>\n",
|
|
"<!-- 2->1 -->\n",
|
|
"<g class=\"edge\" id=\"edge6\">\n",
|
|
"<title>2->1</title>\n",
|
|
"<path d=\"M359.3459,-67.5236C379.1227,-67.4055 411.1106,-65.2254 436,-54.0072 442.7675,-50.957 449.226,-46.2199 454.7564,-41.3592\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"459.9545,-36.515 456.981,-43.5918 457.394,-38.9012 454.8335,-41.2874 454.8335,-41.2874 454.8335,-41.2874 457.394,-38.9012 452.6859,-38.9829 459.9545,-36.515 459.9545,-36.515\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"379\" y=\"-84.8072\">!p0 & p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-69.8072\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge7\">\n",
|
|
"<title>3->2</title>\n",
|
|
"<path d=\"M216.2596,-39.8707C241.433,-45.347 287.5999,-55.3903 316.1587,-61.6031\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"323.0166,-63.095 315.5069,-64.6849 319.5966,-62.351 316.1766,-61.6069 316.1766,-61.6069 316.1766,-61.6069 319.5966,-62.351 316.8462,-58.5289 323.0166,-63.095 323.0166,-63.095\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"246\" y=\"-76.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-61.8072\">❹</text>\n",
|
|
"</g>\n",
|
|
"<!-- 3->3 -->\n",
|
|
"<g class=\"edge\" id=\"edge8\">\n",
|
|
"<title>3->3</title>\n",
|
|
"<path d=\"M186.2539,-49.6742C181.3555,-60.6635 185.4375,-72.0072 198.5,-72.0072 208.7051,-72.0072 213.4289,-65.0835 212.6715,-56.8143\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"210.7461,-49.6742 215.61,-55.6126 211.6574,-53.0535 212.5687,-56.4328 212.5687,-56.4328 212.5687,-56.4328 211.6574,-53.0535 209.5273,-57.2529 210.7461,-49.6742 210.7461,-49.6742\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"171\" y=\"-90.8072\">p0 & !p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"190.5\" y=\"-75.8072\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->0 -->\n",
|
|
"<g class=\"edge\" id=\"edge4\">\n",
|
|
"<title>1->0</title>\n",
|
|
"<path d=\"M455.0647,-16.1533C449.136,-14.0801 442.3679,-12.072 436,-11.0072 322.3531,7.9964 221.7801,-2.7891 169,-9.0072 137.9101,-12.6699 102.9839,-21.8155 80.3002,-28.4495\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"73.3859,-30.5051 79.198,-25.4908 76.7408,-29.5076 80.0957,-28.5102 80.0957,-28.5102 80.0957,-28.5102 76.7408,-29.5076 80.9933,-31.5296 73.3859,-30.5051 73.3859,-30.5051\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"248\" y=\"-20.8072\">!p0 & p1</text>\n",
|
|
"<text fill=\"#1f78b4\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"267.5\" y=\"-5.8072\">⓿</text>\n",
|
|
"</g>\n",
|
|
"<!-- 1->2 -->\n",
|
|
"<g class=\"edge\" id=\"edge5\">\n",
|
|
"<title>1->2</title>\n",
|
|
"<path d=\"M454.2068,-18.9471C434.345,-15.3493 401.747,-12.2917 377,-24.0072 367.6034,-28.4557 359.7823,-36.6744 353.8572,-44.7442\" fill=\"none\" stroke=\"#000000\"/>\n",
|
|
"<polygon fill=\"#000000\" points=\"349.7011,-50.8213 351.0526,-43.265 351.6769,-47.9323 353.6527,-45.0433 353.6527,-45.0433 353.6527,-45.0433 351.6769,-47.9323 356.2528,-46.8215 349.7011,-50.8213 349.7011,-50.8213\" stroke=\"#000000\"/>\n",
|
|
"<text fill=\"#000000\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"377\" y=\"-42.8072\">!p0 & !p1</text>\n",
|
|
"<text fill=\"#33a02c\" font-family=\"Lato\" font-size=\"14.00\" text-anchor=\"start\" x=\"398.5\" y=\"-27.8072\">❹</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.7.3"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|