reduce_parity: add layered option
* spot/twaalgos/parity.cc: Implement it. * spot/twaalgos/parity.hh, NEWS: Document it. * tests/python/parity.ipynb: Demonstrate it. This is the only test so far, but more uses are coming.
This commit is contained in:
parent
eb2616efaa
commit
b0c299b9e9
4 changed files with 357 additions and 165 deletions
6
NEWS
6
NEWS
|
|
@ -1,5 +1,11 @@
|
||||||
New in spot 2.11.1.dev (not yet released)
|
New in spot 2.11.1.dev (not yet released)
|
||||||
|
|
||||||
|
Library:
|
||||||
|
|
||||||
|
- spot::reduce_parity() now has a "layered" option to force all
|
||||||
|
transition in the same parity layer to receive the same color;
|
||||||
|
like acd_transform() would do.
|
||||||
|
|
||||||
Bugs fixed:
|
Bugs fixed:
|
||||||
|
|
||||||
- Fix pkg-config files containing @LIBSPOT_PTHREAD@ (issue #520)
|
- Fix pkg-config files containing @LIBSPOT_PTHREAD@ (issue #520)
|
||||||
|
|
|
||||||
|
|
@ -388,14 +388,14 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
twa_graph_ptr
|
twa_graph_ptr
|
||||||
reduce_parity(const const_twa_graph_ptr& aut, bool colored)
|
reduce_parity(const const_twa_graph_ptr& aut, bool colored, bool layered)
|
||||||
{
|
{
|
||||||
return reduce_parity_here(make_twa_graph(aut, twa::prop_set::all()),
|
return reduce_parity_here(make_twa_graph(aut, twa::prop_set::all()),
|
||||||
colored);
|
colored, layered);
|
||||||
}
|
}
|
||||||
|
|
||||||
twa_graph_ptr
|
twa_graph_ptr
|
||||||
reduce_parity_here(twa_graph_ptr aut, bool colored)
|
reduce_parity_here(twa_graph_ptr aut, bool colored, bool layered)
|
||||||
{
|
{
|
||||||
unsigned num_sets = aut->num_sets();
|
unsigned num_sets = aut->num_sets();
|
||||||
if (!colored && num_sets == 0)
|
if (!colored && num_sets == 0)
|
||||||
|
|
@ -507,15 +507,30 @@ namespace spot
|
||||||
m.first += (piri - m.first) & 1;
|
m.first += (piri - m.first) & 1;
|
||||||
m.second += (piri - m.second) & 1;
|
m.second += (piri - m.second) & 1;
|
||||||
}
|
}
|
||||||
for (unsigned state: si.states_of(scc))
|
// Recolor edges. Depending on LAYERED we want to
|
||||||
for (auto& e: aut->out(state))
|
// either recolor all edges for which piprime1 is -2
|
||||||
if ((sba || si.scc_of(e.dst) == scc) &&
|
// (uncolored), or only the edges that we were removed
|
||||||
((piri >= 0 && e.acc.has(color)) || (piri < 0 && !e.acc)))
|
// by the previous filter.
|
||||||
{
|
auto coloredge = [&](auto& e) {
|
||||||
unsigned en = aut->edge_number(e);
|
unsigned en = aut->edge_number(e);
|
||||||
|
bool recolor = layered
|
||||||
|
? piprime1[en] == -2
|
||||||
|
: (piri >= 0 && e.acc.has(color)) || (piri < 0 && !e.acc);
|
||||||
|
if (recolor)
|
||||||
|
{
|
||||||
piprime1[en] = m.first;
|
piprime1[en] = m.first;
|
||||||
piprime2[en] = m.second;
|
piprime2[en] = m.second;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
if (sba)
|
||||||
|
// si.edges_of(scc) would be wrong as it can ignore
|
||||||
|
// outgoing edges removed from a previous level.
|
||||||
|
for (unsigned s: si.states_of(scc))
|
||||||
|
for (auto& e: aut->out(s))
|
||||||
|
coloredge(e);
|
||||||
|
else
|
||||||
|
for (auto& e: si.inner_edges_of(scc))
|
||||||
|
coloredge(e);
|
||||||
res.first = std::max(res.first, m.first);
|
res.first = std::max(res.first, m.first);
|
||||||
res.second = std::max(res.second, m.second);
|
res.second = std::max(res.second, m.second);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2016-2019 Laboratoire de Recherche et Développement
|
// Copyright (C) 2016-2019, 2022 Laboratoire de Recherche et Développement
|
||||||
// de l'Epita (LRDE).
|
// de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
|
|
@ -134,7 +134,6 @@ namespace spot
|
||||||
colorize_parity_here(twa_graph_ptr aut, bool keep_style = false);
|
colorize_parity_here(twa_graph_ptr aut, bool keep_style = false);
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
/// \brief Reduce the parity acceptance condition to use a minimal
|
/// \brief Reduce the parity acceptance condition to use a minimal
|
||||||
/// number of colors.
|
/// number of colors.
|
||||||
///
|
///
|
||||||
|
|
@ -149,11 +148,51 @@ namespace spot
|
||||||
/// the above paper assumes). Otherwise, the smallest or highest
|
/// the above paper assumes). Otherwise, the smallest or highest
|
||||||
/// colors (depending on the parity kind) is removed to simplify the
|
/// colors (depending on the parity kind) is removed to simplify the
|
||||||
/// acceptance condition.
|
/// acceptance condition.
|
||||||
|
///
|
||||||
|
/// If the input uses state-based acceptance, the output will use
|
||||||
|
/// state-based acceptance as well.
|
||||||
|
///
|
||||||
|
/// A parity automaton, sometimes called a chain automaton, can be
|
||||||
|
/// seen as a stack of layers that are alternatively rejecting and
|
||||||
|
/// accepting. For instance imagine a parity max automaton that is
|
||||||
|
/// strongly connected. Removing the transitions with the maximal
|
||||||
|
/// color might leave a few transitions that were not labeled by
|
||||||
|
/// this maximal color, but that are part of any cycle anymore:
|
||||||
|
/// those transition could have been colored with the maximal color,
|
||||||
|
/// since any cycle going through them would have seen the maximal
|
||||||
|
/// color. (Once your remove this maximal layer,
|
||||||
|
/// your can define the next layer similarly.)
|
||||||
|
///
|
||||||
|
/// When \a layered is true all transition that belong to the same
|
||||||
|
/// layer receive the same color. When layer is `false`, only the
|
||||||
|
/// transition that where used initially to define the layers (i.e,
|
||||||
|
/// the transition with the maximal color in the previous exemple),
|
||||||
|
/// get their color adjusted. The other will receive either no
|
||||||
|
/// color (if \a colored is false), or a useless color (if \a colored
|
||||||
|
/// is true). Here "useless color" means the smallest color
|
||||||
|
/// for parity max, and the largest color for parity min.
|
||||||
|
///
|
||||||
|
/// When \a layered is true, the output of this function is
|
||||||
|
/// comparable to what acd_transform() would produce. The
|
||||||
|
/// difference is that this function preserve the kind (min/max) of
|
||||||
|
/// parity input, while acd_transform() always output a parity min
|
||||||
|
/// automaton. Additionally, this function needs fewer resources
|
||||||
|
/// than acd_transform() because it is already known that the input
|
||||||
|
/// is a parity automaton. In some (historically inaccurate) way,
|
||||||
|
/// reduce_parity() can be seen as a specialized version of
|
||||||
|
/// acd_transform().
|
||||||
|
///
|
||||||
|
/// The reason layered is false by default, is that not introducing
|
||||||
|
/// colors in place where there where none occasionally help with
|
||||||
|
/// simulation-based reductions.
|
||||||
|
///
|
||||||
/// @{
|
/// @{
|
||||||
SPOT_API twa_graph_ptr
|
SPOT_API twa_graph_ptr
|
||||||
reduce_parity(const const_twa_graph_ptr& aut, bool colored = false);
|
reduce_parity(const const_twa_graph_ptr& aut,
|
||||||
|
bool colored = false, bool layered = false);
|
||||||
|
|
||||||
SPOT_API twa_graph_ptr
|
SPOT_API twa_graph_ptr
|
||||||
reduce_parity_here(twa_graph_ptr aut, bool colored = false);
|
reduce_parity_here(twa_graph_ptr aut,
|
||||||
|
bool colored = false, bool layered = false);
|
||||||
/// @}
|
/// @}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,9 @@
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"Of course the case of parity automata with a single color is a bit degenerate, as the same formula correspond to two parity conditions with different kinds. \n",
|
"Of course the case of parity automata with a single color is a bit degenerate, as the same formula corresponds to two parity conditions of different kinds. \n",
|
||||||
"\n",
|
"\n",
|
||||||
"In addition the the above, an automaton is said to be **colored** if each of its edges (or states) has exactly one color. Automata that people usually call *parity automata* correspond in Spot to *colored* automata with *parity acceptance*. For this reason try to use the term *automata with parity acceptance* rather than *parity automata* for automata that are not *colored*."
|
"In addition to the above, an automaton is said to be **colored** if each of its edges (or states) has exactly one color. Automata that people usually call *parity automata* correspond in Spot to *colored* automata with *parity acceptance*. For this reason try to use the term *automata with parity acceptance* rather than *parity automata* for automata that are not *colored*."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -3009,11 +3009,11 @@
|
||||||
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
||||||
" -->\n",
|
" -->\n",
|
||||||
"<!-- Pages: 1 -->\n",
|
"<!-- Pages: 1 -->\n",
|
||||||
"<svg width=\"499pt\" height=\"140pt\"\n",
|
"<svg width=\"499pt\" height=\"124pt\"\n",
|
||||||
" viewBox=\"0.00 0.00 498.50 140.34\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
" viewBox=\"0.00 0.00 498.50 123.54\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
||||||
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 136.34)\">\n",
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 119.54)\">\n",
|
||||||
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-136.34 494.5,-136.34 494.5,4 -4,4\"/>\n",
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-119.54 494.5,-119.54 494.5,4 -4,4\"/>\n",
|
||||||
"<text text-anchor=\"start\" x=\"213.75\" y=\"-102.14\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
"<text text-anchor=\"start\" x=\"213.75\" y=\"-100.34\" font-family=\"Lato\" font-size=\"14.00\">[co-Büchi]</text>\n",
|
||||||
"<!-- I -->\n",
|
"<!-- I -->\n",
|
||||||
"<!-- 0 -->\n",
|
"<!-- 0 -->\n",
|
||||||
"<g id=\"node2\" class=\"node\">\n",
|
"<g id=\"node2\" class=\"node\">\n",
|
||||||
|
|
@ -3237,11 +3237,11 @@
|
||||||
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
||||||
" -->\n",
|
" -->\n",
|
||||||
"<!-- Pages: 1 -->\n",
|
"<!-- Pages: 1 -->\n",
|
||||||
"<svg width=\"499pt\" height=\"140pt\"\n",
|
"<svg width=\"499pt\" height=\"124pt\"\n",
|
||||||
" viewBox=\"0.00 0.00 498.50 140.34\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
" viewBox=\"0.00 0.00 498.50 123.54\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
||||||
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 136.34)\">\n",
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 119.54)\">\n",
|
||||||
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-136.34 494.5,-136.34 494.5,4 -4,4\"/>\n",
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-119.54 494.5,-119.54 494.5,4 -4,4\"/>\n",
|
||||||
"<text text-anchor=\"start\" x=\"223.75\" y=\"-102.14\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
|
"<text text-anchor=\"start\" x=\"223.75\" y=\"-100.34\" font-family=\"Lato\" font-size=\"14.00\">[Büchi]</text>\n",
|
||||||
"<!-- I -->\n",
|
"<!-- I -->\n",
|
||||||
"<!-- 0 -->\n",
|
"<!-- 0 -->\n",
|
||||||
"<g id=\"node2\" class=\"node\">\n",
|
"<g id=\"node2\" class=\"node\">\n",
|
||||||
|
|
@ -4223,14 +4223,15 @@
|
||||||
"\n",
|
"\n",
|
||||||
"# Reduce parity\n",
|
"# Reduce parity\n",
|
||||||
"\n",
|
"\n",
|
||||||
"The `reduce_parity()` function is a more elaborate version of `cleanup_parity()`. It implements an algorithm by Carton and Maceiras (*Computing the Rabin index of a parity automaton*, Informatique théorique et applications, 1999), to obtain the minimal parity acceptance condition for a given automaton. Why the original algorithm assume *max odd* parity, this version with work with the four types of parity acceptance. It will only try to preserve the kind (max/min) and may change the style if it allows saving one color. Furthermore, it can colorize (or uncolorize) automata at the same time,\n",
|
"The `reduce_parity()` function is a more elaborate version of `cleanup_parity()`. It implements an algorithm by Carton and Maceiras (*Computing the Rabin index of a parity automaton*, Informatique théorique et applications, 1999), to obtain the minimal parity acceptance condition for a given automaton. While the original algorithm assumes *max odd* parity, this version works with the four types of parity acceptance. It will only try to preserve the kind (max/min) and may change the style if it allows saving one color. Furthermore, it can colorize (or uncolorize) automata at the same time,\n",
|
||||||
"making it a very nice replacement for both `cleanup_parity()` and `colorize_parity()`.\n",
|
"making it a very nice replacement for both `cleanup_parity()` and `colorize_parity()`.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"It takes two arguments:\n",
|
"It takes three arguments:\n",
|
||||||
"1. the automaton whose parity acceptance condition should be reduced\n",
|
"1. the automaton whose parity acceptance condition should be reduced\n",
|
||||||
"2. a Boolean indicating whether the output should be colored (`True`), or if transition with no color can be used (`False`).\n",
|
"2. a Boolean indicating whether the output should be colored (`True`), or if transition with no color can be used (`False`).\n",
|
||||||
|
"3. a Boolean indicating whether the output should be layered, i.e., in a max parity automaton, that means the color of a transition should be the maximal color visited by all cycles going through it.\n",
|
||||||
"\n",
|
"\n",
|
||||||
"By default, the second argument is `False`, because acceptance sets is a scarse ressource in Spot."
|
"By default, the second argument is `False`, because acceptance sets is a scarse ressource in Spot. The third argument also defaults to `False`, but for empircal reason: adding more colors like this tends to hinder simulation-based reductions."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -4715,8 +4716,8 @@
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
"text/html": [
|
"image/svg+xml": [
|
||||||
"<div style='vertical-align:text-top;display:inline-block;width:50%;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
||||||
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
||||||
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
||||||
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
||||||
|
|
@ -4829,8 +4830,19 @@
|
||||||
"<text text-anchor=\"start\" x=\"371\" y=\"-22.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
"<text text-anchor=\"start\" x=\"371\" y=\"-22.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
||||||
"</g>\n",
|
"</g>\n",
|
||||||
"</g>\n",
|
"</g>\n",
|
||||||
"</svg>\n",
|
"</svg>\n"
|
||||||
"</div><div style='vertical-align:text-top;display:inline-block;width:50%;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
],
|
||||||
|
"text/plain": [
|
||||||
|
"<spot.twa_graph; proxy of <Swig Object of type 'std::shared_ptr< spot::twa_graph > *' at 0x7f2c282eb960> >"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "display_data"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/html": [
|
||||||
|
"<div style='vertical-align:text-top;display:inline-block;width:50%;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
||||||
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
||||||
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
||||||
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
||||||
|
|
@ -4939,132 +4951,6 @@
|
||||||
"</g>\n",
|
"</g>\n",
|
||||||
"</g>\n",
|
"</g>\n",
|
||||||
"</svg>\n",
|
"</svg>\n",
|
||||||
"</div>"
|
|
||||||
],
|
|
||||||
"text/plain": [
|
|
||||||
"<IPython.core.display.HTML object>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "display_data"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/html": [
|
|
||||||
"<div style='vertical-align:text-top;display:inline-block;width:50%;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
|
||||||
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
|
||||||
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
|
||||||
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
|
||||||
" -->\n",
|
|
||||||
"<!-- Pages: 1 -->\n",
|
|
||||||
"<svg width=\"490pt\" height=\"169pt\"\n",
|
|
||||||
" viewBox=\"0.00 0.00 490.00 169.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
|
||||||
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 165)\">\n",
|
|
||||||
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-165 486,-165 486,4 -4,4\"/>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"126.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"149.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"165.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\">) & (Inf(</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"211.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"227.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\">) | (Fin(</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"269.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"285.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"327.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"343.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\">)))</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"182.5\" y=\"-132.8\" font-family=\"Lato\" font-size=\"14.00\">[parity max even 4]</text>\n",
|
|
||||||
"<!-- I -->\n",
|
|
||||||
"<!-- 0 -->\n",
|
|
||||||
"<g id=\"node2\" class=\"node\">\n",
|
|
||||||
"<title>0</title>\n",
|
|
||||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-50\" rx=\"18\" ry=\"18\"/>\n",
|
|
||||||
"<text text-anchor=\"middle\" x=\"56\" y=\"-46.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- I->0 -->\n",
|
|
||||||
"<g id=\"edge1\" class=\"edge\">\n",
|
|
||||||
"<title>I->0</title>\n",
|
|
||||||
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-50C2.79,-50 17.15,-50 30.63,-50\"/>\n",
|
|
||||||
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-50 30.94,-53.15 34.44,-50 30.94,-50 30.94,-50 30.94,-50 34.44,-50 30.94,-46.85 37.94,-50 37.94,-50\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 2 -->\n",
|
|
||||||
"<g id=\"node3\" class=\"node\">\n",
|
|
||||||
"<title>2</title>\n",
|
|
||||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"335\" cy=\"-51\" rx=\"18\" ry=\"18\"/>\n",
|
|
||||||
"<text text-anchor=\"middle\" x=\"335\" y=\"-47.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 0->2 -->\n",
|
|
||||||
"<g id=\"edge2\" class=\"edge\">\n",
|
|
||||||
"<title>0->2</title>\n",
|
|
||||||
"<path fill=\"none\" stroke=\"black\" d=\"M69.99,-61.47C76.33,-66.68 84.24,-72.63 92,-77 123.14,-94.54 131.87,-99.44 167,-106 225.87,-116.98 246.74,-108.24 299,-79 304.66,-75.83 310.35,-71.76 315.44,-67.7\"/>\n",
|
|
||||||
"<polygon fill=\"black\" stroke=\"black\" points=\"321.11,-63.01 317.73,-69.9 318.42,-65.24 315.72,-67.47 315.72,-67.47 315.72,-67.47 318.42,-65.24 313.71,-65.05 321.11,-63.01 321.11,-63.01\"/>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"167\" y=\"-113.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 3 -->\n",
|
|
||||||
"<g id=\"node4\" class=\"node\">\n",
|
|
||||||
"<title>3</title>\n",
|
|
||||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"195.5\" cy=\"-31\" rx=\"18\" ry=\"18\"/>\n",
|
|
||||||
"<text text-anchor=\"middle\" x=\"195.5\" y=\"-27.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 0->3 -->\n",
|
|
||||||
"<g id=\"edge3\" class=\"edge\">\n",
|
|
||||||
"<title>0->3</title>\n",
|
|
||||||
"<path fill=\"none\" stroke=\"black\" d=\"M73.9,-53.85C92.57,-57.43 123.38,-61.34 149,-55 157.5,-52.9 166.15,-48.89 173.61,-44.74\"/>\n",
|
|
||||||
"<polygon fill=\"black\" stroke=\"black\" points=\"180.07,-40.94 175.63,-47.2 177.05,-42.71 174.04,-44.49 174.04,-44.49 174.04,-44.49 177.05,-42.71 172.44,-41.77 180.07,-40.94 180.07,-40.94\"/>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"92\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 1 -->\n",
|
|
||||||
"<g id=\"node5\" class=\"node\">\n",
|
|
||||||
"<title>1</title>\n",
|
|
||||||
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"464\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
|
||||||
"<text text-anchor=\"middle\" x=\"464\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 2->1 -->\n",
|
|
||||||
"<g id=\"edge6\" class=\"edge\">\n",
|
|
||||||
"<title>2->1</title>\n",
|
|
||||||
"<path fill=\"none\" stroke=\"black\" d=\"M352.92,-49.14C371.61,-46.8 402.44,-42.07 428,-34 432.35,-32.63 436.87,-30.85 441.15,-28.98\"/>\n",
|
|
||||||
"<polygon fill=\"black\" stroke=\"black\" points=\"447.64,-26.01 442.59,-31.79 444.46,-27.47 441.28,-28.92 441.28,-28.92 441.28,-28.92 444.46,-27.47 439.97,-26.06 447.64,-26.01 447.64,-26.01\"/>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"373\" y=\"-49.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & p1</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 3->0 -->\n",
|
|
||||||
"<g id=\"edge8\" class=\"edge\">\n",
|
|
||||||
"<title>3->0</title>\n",
|
|
||||||
"<path fill=\"none\" stroke=\"black\" d=\"M178.34,-25.22C157.68,-18.77 121.1,-10.51 92,-21 85.46,-23.36 79.27,-27.53 73.97,-31.99\"/>\n",
|
|
||||||
"<polygon fill=\"black\" stroke=\"black\" points=\"68.6,-36.86 71.67,-29.83 71.19,-34.51 73.78,-32.16 73.78,-32.16 73.78,-32.16 71.19,-34.51 75.9,-34.49 68.6,-36.86 68.6,-36.86\"/>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"94\" y=\"-39.8\" font-family=\"Lato\" font-size=\"14.00\">p0 & !p1</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"112.5\" y=\"-24.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 3->2 -->\n",
|
|
||||||
"<g id=\"edge7\" class=\"edge\">\n",
|
|
||||||
"<title>3->2</title>\n",
|
|
||||||
"<path fill=\"none\" stroke=\"black\" d=\"M213.36,-33.45C237.59,-36.98 282.36,-43.49 310.02,-47.51\"/>\n",
|
|
||||||
"<polygon fill=\"black\" stroke=\"black\" points=\"317,-48.53 309.62,-50.64 313.54,-48.02 310.07,-47.52 310.07,-47.52 310.07,-47.52 313.54,-48.02 310.53,-44.4 317,-48.53 317,-48.53\"/>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"242\" y=\"-63.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"262.5\" y=\"-48.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#6a3d9a\">❸</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 3->3 -->\n",
|
|
||||||
"<g id=\"edge9\" class=\"edge\">\n",
|
|
||||||
"<title>3->3</title>\n",
|
|
||||||
"<path fill=\"none\" stroke=\"black\" d=\"M183.58,-44.67C178.81,-55.66 182.78,-67 195.5,-67 205.44,-67 210.04,-60.08 209.3,-51.81\"/>\n",
|
|
||||||
"<polygon fill=\"black\" stroke=\"black\" points=\"207.42,-44.67 212.25,-50.64 208.31,-48.05 209.2,-51.44 209.2,-51.44 209.2,-51.44 208.31,-48.05 206.15,-52.24 207.42,-44.67 207.42,-44.67\"/>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"169\" y=\"-85.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & p1</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"187.5\" y=\"-70.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 1->0 -->\n",
|
|
||||||
"<g id=\"edge4\" class=\"edge\">\n",
|
|
||||||
"<title>1->0</title>\n",
|
|
||||||
"<path fill=\"none\" stroke=\"black\" d=\"M446.81,-12.43C440.96,-10.67 434.25,-8.94 428,-8 386.76,-1.81 239.1,-0.64 167,-4 133.56,-5.56 121.91,4.05 92,-11 83.75,-15.15 76.53,-22.15 70.83,-29.08\"/>\n",
|
|
||||||
"<polygon fill=\"black\" stroke=\"black\" points=\"66.41,-34.82 68.19,-27.35 68.55,-32.05 70.68,-29.27 70.68,-29.27 70.68,-29.27 68.55,-32.05 73.18,-31.2 66.41,-34.82 66.41,-34.82\"/>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"244\" y=\"-19.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & p1</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"254.5\" y=\"-5.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"270.5\" y=\"-5.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"<!-- 1->2 -->\n",
|
|
||||||
"<g id=\"edge5\" class=\"edge\">\n",
|
|
||||||
"<title>1->2</title>\n",
|
|
||||||
"<path fill=\"none\" stroke=\"black\" d=\"M446.03,-14.68C427.03,-11.74 395.67,-9.27 371,-19 363.88,-21.81 357.31,-26.8 351.84,-32.02\"/>\n",
|
|
||||||
"<polygon fill=\"black\" stroke=\"black\" points=\"346.75,-37.24 349.38,-30.03 349.19,-34.73 351.63,-32.23 351.63,-32.23 351.63,-32.23 349.19,-34.73 353.89,-34.43 346.75,-37.24 346.75,-37.24\"/>\n",
|
|
||||||
"<text text-anchor=\"start\" x=\"371\" y=\"-22.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"</svg>\n",
|
|
||||||
"</div><div style='vertical-align:text-top;display:inline-block;width:50%;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
"</div><div style='vertical-align:text-top;display:inline-block;width:50%;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
||||||
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
||||||
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
||||||
|
|
@ -5188,17 +5074,263 @@
|
||||||
},
|
},
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "display_data"
|
"output_type": "display_data"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/html": [
|
||||||
|
"<div style='vertical-align:text-top;display:inline-block;width:50%;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
||||||
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
||||||
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
||||||
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
||||||
|
" -->\n",
|
||||||
|
"<!-- Pages: 1 -->\n",
|
||||||
|
"<svg width=\"490pt\" height=\"191pt\"\n",
|
||||||
|
" viewBox=\"0.00 0.00 490.00 191.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
||||||
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 187)\">\n",
|
||||||
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-187 486,-187 486,4 -4,4\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"190.5\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"213.5\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"229.5\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\">) & Inf(</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"271.5\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"287.5\" y=\"-168.8\" font-family=\"Lato\" font-size=\"14.00\">)</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"182.5\" y=\"-154.8\" font-family=\"Lato\" font-size=\"14.00\">[parity max even 2]</text>\n",
|
||||||
|
"<!-- I -->\n",
|
||||||
|
"<!-- 0 -->\n",
|
||||||
|
"<g id=\"node2\" class=\"node\">\n",
|
||||||
|
"<title>0</title>\n",
|
||||||
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-53\" rx=\"18\" ry=\"18\"/>\n",
|
||||||
|
"<text text-anchor=\"middle\" x=\"56\" y=\"-49.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- I->0 -->\n",
|
||||||
|
"<g id=\"edge1\" class=\"edge\">\n",
|
||||||
|
"<title>I->0</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-53C2.79,-53 17.15,-53 30.63,-53\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-53 30.94,-56.15 34.44,-53 30.94,-53 30.94,-53 30.94,-53 34.44,-53 30.94,-49.85 37.94,-53 37.94,-53\"/>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 2 -->\n",
|
||||||
|
"<g id=\"node3\" class=\"node\">\n",
|
||||||
|
"<title>2</title>\n",
|
||||||
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"335\" cy=\"-54\" rx=\"18\" ry=\"18\"/>\n",
|
||||||
|
"<text text-anchor=\"middle\" x=\"335\" y=\"-50.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 0->2 -->\n",
|
||||||
|
"<g id=\"edge2\" class=\"edge\">\n",
|
||||||
|
"<title>0->2</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M65.79,-68.15C71.95,-77.37 81.03,-88.57 92,-95 142.89,-124.84 165.88,-119.15 224,-109 258.9,-102.91 268.08,-99.3 299,-82 304.66,-78.84 310.35,-74.76 315.44,-70.71\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"321.11,-66.01 317.73,-72.9 318.42,-68.24 315.72,-70.48 315.72,-70.48 315.72,-70.48 318.42,-68.24 313.71,-68.05 321.11,-66.01 321.11,-66.01\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"167\" y=\"-135.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"187.5\" y=\"-120.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 3 -->\n",
|
||||||
|
"<g id=\"node4\" class=\"node\">\n",
|
||||||
|
"<title>3</title>\n",
|
||||||
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"195.5\" cy=\"-34\" rx=\"18\" ry=\"18\"/>\n",
|
||||||
|
"<text text-anchor=\"middle\" x=\"195.5\" y=\"-30.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 0->3 -->\n",
|
||||||
|
"<g id=\"edge3\" class=\"edge\">\n",
|
||||||
|
"<title>0->3</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M73.9,-56.86C92.57,-60.44 123.38,-64.35 149,-58 157.5,-55.9 166.15,-51.89 173.61,-47.74\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"180.07,-43.94 175.63,-50.21 177.05,-45.72 174.04,-47.49 174.04,-47.49 174.04,-47.49 177.05,-45.72 172.44,-44.77 180.07,-43.94 180.07,-43.94\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"92\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"112.5\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 1 -->\n",
|
||||||
|
"<g id=\"node5\" class=\"node\">\n",
|
||||||
|
"<title>1</title>\n",
|
||||||
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"464\" cy=\"-21\" rx=\"18\" ry=\"18\"/>\n",
|
||||||
|
"<text text-anchor=\"middle\" x=\"464\" y=\"-17.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 2->1 -->\n",
|
||||||
|
"<g id=\"edge6\" class=\"edge\">\n",
|
||||||
|
"<title>2->1</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M352.92,-52.15C371.61,-49.8 402.44,-45.07 428,-37 432.35,-35.63 436.87,-33.85 441.15,-31.98\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"447.64,-29.02 442.59,-34.79 444.46,-30.47 441.28,-31.93 441.28,-31.93 441.28,-31.93 444.46,-30.47 439.97,-29.06 447.64,-29.02 447.64,-29.02\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"373\" y=\"-52.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & p1</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 3->0 -->\n",
|
||||||
|
"<g id=\"edge8\" class=\"edge\">\n",
|
||||||
|
"<title>3->0</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M178.34,-28.22C157.68,-21.77 121.1,-13.52 92,-24 85.46,-26.36 79.27,-30.53 73.97,-34.99\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"68.6,-39.87 71.67,-32.83 71.19,-37.51 73.78,-35.16 73.78,-35.16 73.78,-35.16 71.19,-37.51 75.9,-37.5 68.6,-39.87 68.6,-39.87\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"94\" y=\"-42.8\" font-family=\"Lato\" font-size=\"14.00\">p0 & !p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"112.5\" y=\"-27.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 3->2 -->\n",
|
||||||
|
"<g id=\"edge7\" class=\"edge\">\n",
|
||||||
|
"<title>3->2</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M213.36,-36.46C237.59,-39.98 282.36,-46.49 310.02,-50.52\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"317,-51.53 309.62,-53.64 313.54,-51.03 310.07,-50.52 310.07,-50.52 310.07,-50.52 313.54,-51.03 310.53,-47.41 317,-51.53 317,-51.53\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"242\" y=\"-66.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"262.5\" y=\"-51.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 3->3 -->\n",
|
||||||
|
"<g id=\"edge9\" class=\"edge\">\n",
|
||||||
|
"<title>3->3</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M183.58,-47.67C178.81,-58.66 182.78,-70 195.5,-70 205.44,-70 210.04,-63.08 209.3,-54.81\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"207.42,-47.67 212.25,-53.64 208.31,-51.06 209.2,-54.44 209.2,-54.44 209.2,-54.44 208.31,-51.06 206.15,-55.24 207.42,-47.67 207.42,-47.67\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"169\" y=\"-88.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"187.5\" y=\"-73.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 1->0 -->\n",
|
||||||
|
"<g id=\"edge4\" class=\"edge\">\n",
|
||||||
|
"<title>1->0</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M446.81,-15.47C440.95,-13.72 434.24,-11.98 428,-11 313.37,6.87 282.89,-1.61 167,-7 133.56,-8.56 121.91,1.04 92,-14 83.75,-18.16 76.53,-25.15 70.83,-32.08\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"66.41,-37.83 68.19,-30.36 68.55,-35.05 70.68,-32.28 70.68,-32.28 70.68,-32.28 68.55,-35.05 73.18,-34.2 66.41,-37.83 66.41,-37.83\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"244\" y=\"-20.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"262.5\" y=\"-5.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 1->2 -->\n",
|
||||||
|
"<g id=\"edge5\" class=\"edge\">\n",
|
||||||
|
"<title>1->2</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M446.03,-17.68C427.03,-14.74 395.67,-12.27 371,-22 363.88,-24.81 357.31,-29.81 351.84,-35.02\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"346.75,-40.24 349.38,-33.03 349.19,-37.74 351.63,-35.23 351.63,-35.23 351.63,-35.23 349.19,-37.74 353.89,-37.43 346.75,-40.24 346.75,-40.24\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"371\" y=\"-25.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"</svg>\n",
|
||||||
|
"</div><div style='vertical-align:text-top;display:inline-block;width:50%;'><?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
|
||||||
|
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
||||||
|
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
||||||
|
"<!-- Generated by graphviz version 2.43.0 (0)\n",
|
||||||
|
" -->\n",
|
||||||
|
"<!-- Pages: 1 -->\n",
|
||||||
|
"<svg width=\"490pt\" height=\"183pt\"\n",
|
||||||
|
" viewBox=\"0.00 0.00 490.00 183.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
|
||||||
|
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1.0 1.0) rotate(0) translate(4 179)\">\n",
|
||||||
|
"<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-179 486,-179 486,4 -4,4\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"159.5\" y=\"-160.8\" font-family=\"Lato\" font-size=\"14.00\">Fin(</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"182.5\" y=\"-160.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"198.5\" y=\"-160.8\" font-family=\"Lato\" font-size=\"14.00\">) & (Inf(</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"244.5\" y=\"-160.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"260.5\" y=\"-160.8\" font-family=\"Lato\" font-size=\"14.00\">) | Fin(</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"298.5\" y=\"-160.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"314.5\" y=\"-160.8\" font-family=\"Lato\" font-size=\"14.00\">))</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"185.5\" y=\"-146.8\" font-family=\"Lato\" font-size=\"14.00\">[parity max odd 3]</text>\n",
|
||||||
|
"<!-- I -->\n",
|
||||||
|
"<!-- 0 -->\n",
|
||||||
|
"<g id=\"node2\" class=\"node\">\n",
|
||||||
|
"<title>0</title>\n",
|
||||||
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"56\" cy=\"-50\" rx=\"18\" ry=\"18\"/>\n",
|
||||||
|
"<text text-anchor=\"middle\" x=\"56\" y=\"-46.3\" font-family=\"Lato\" font-size=\"14.00\">0</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- I->0 -->\n",
|
||||||
|
"<g id=\"edge1\" class=\"edge\">\n",
|
||||||
|
"<title>I->0</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M1.15,-50C2.79,-50 17.15,-50 30.63,-50\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"37.94,-50 30.94,-53.15 34.44,-50 30.94,-50 30.94,-50 30.94,-50 34.44,-50 30.94,-46.85 37.94,-50 37.94,-50\"/>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 2 -->\n",
|
||||||
|
"<g id=\"node3\" class=\"node\">\n",
|
||||||
|
"<title>2</title>\n",
|
||||||
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"335\" cy=\"-62\" rx=\"18\" ry=\"18\"/>\n",
|
||||||
|
"<text text-anchor=\"middle\" x=\"335\" y=\"-58.3\" font-family=\"Lato\" font-size=\"14.00\">2</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 0->2 -->\n",
|
||||||
|
"<g id=\"edge2\" class=\"edge\">\n",
|
||||||
|
"<title>0->2</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M65.79,-65.14C71.95,-74.36 81.03,-85.57 92,-92 121.25,-109.15 133.24,-102.88 167,-106 226.02,-111.46 245.23,-111.93 299,-87 304.43,-84.48 309.89,-81.09 314.83,-77.62\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"320.77,-73.24 317.01,-79.93 317.95,-75.32 315.14,-77.39 315.14,-77.39 315.14,-77.39 317.95,-75.32 313.27,-74.86 320.77,-73.24 320.77,-73.24\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"167\" y=\"-127.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"187.5\" y=\"-112.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 3 -->\n",
|
||||||
|
"<g id=\"node4\" class=\"node\">\n",
|
||||||
|
"<title>3</title>\n",
|
||||||
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"195.5\" cy=\"-31\" rx=\"18\" ry=\"18\"/>\n",
|
||||||
|
"<text text-anchor=\"middle\" x=\"195.5\" y=\"-27.3\" font-family=\"Lato\" font-size=\"14.00\">3</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 0->3 -->\n",
|
||||||
|
"<g id=\"edge3\" class=\"edge\">\n",
|
||||||
|
"<title>0->3</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M73.9,-53.85C92.57,-57.43 123.38,-61.34 149,-55 157.5,-52.9 166.15,-48.89 173.61,-44.74\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"180.07,-40.94 175.63,-47.2 177.05,-42.71 174.04,-44.49 174.04,-44.49 174.04,-44.49 177.05,-42.71 172.44,-41.77 180.07,-40.94 180.07,-40.94\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"92\" y=\"-76.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"112.5\" y=\"-61.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 1 -->\n",
|
||||||
|
"<g id=\"node5\" class=\"node\">\n",
|
||||||
|
"<title>1</title>\n",
|
||||||
|
"<ellipse fill=\"#ffffaa\" stroke=\"black\" cx=\"464\" cy=\"-18\" rx=\"18\" ry=\"18\"/>\n",
|
||||||
|
"<text text-anchor=\"middle\" x=\"464\" y=\"-14.3\" font-family=\"Lato\" font-size=\"14.00\">1</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 2->1 -->\n",
|
||||||
|
"<g id=\"edge6\" class=\"edge\">\n",
|
||||||
|
"<title>2->1</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M353.1,-62.47C372.22,-62.36 403.69,-60.23 428,-49 434.74,-45.89 441.14,-41.04 446.57,-36.09\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"451.66,-31.18 448.81,-38.31 449.14,-33.61 446.63,-36.04 446.63,-36.04 446.63,-36.04 449.14,-33.61 444.44,-33.77 451.66,-31.18 451.66,-31.18\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"373\" y=\"-79.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"391.5\" y=\"-64.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 3->0 -->\n",
|
||||||
|
"<g id=\"edge8\" class=\"edge\">\n",
|
||||||
|
"<title>3->0</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M178.34,-25.22C157.68,-18.77 121.1,-10.51 92,-21 85.46,-23.36 79.27,-27.53 73.97,-31.99\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"68.6,-36.86 71.67,-29.83 71.19,-34.51 73.78,-32.16 73.78,-32.16 73.78,-32.16 71.19,-34.51 75.9,-34.49 68.6,-36.86 68.6,-36.86\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"94\" y=\"-39.8\" font-family=\"Lato\" font-size=\"14.00\">p0 & !p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"112.5\" y=\"-24.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 3->2 -->\n",
|
||||||
|
"<g id=\"edge7\" class=\"edge\">\n",
|
||||||
|
"<title>3->2</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M213.36,-34.8C237.59,-40.26 282.36,-50.36 310.02,-56.59\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"317,-58.17 309.48,-59.7 313.59,-57.4 310.17,-56.63 310.17,-56.63 310.17,-56.63 313.59,-57.4 310.87,-53.56 317,-58.17 317,-58.17\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"242\" y=\"-71.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"262.5\" y=\"-56.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff7f00\">❷</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 3->3 -->\n",
|
||||||
|
"<g id=\"edge9\" class=\"edge\">\n",
|
||||||
|
"<title>3->3</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M183.58,-44.67C178.81,-55.66 182.78,-67 195.5,-67 205.44,-67 210.04,-60.08 209.3,-51.81\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"207.42,-44.67 212.25,-50.64 208.31,-48.05 209.2,-51.44 209.2,-51.44 209.2,-51.44 208.31,-48.05 206.15,-52.24 207.42,-44.67 207.42,-44.67\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"169\" y=\"-85.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"187.5\" y=\"-70.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 1->0 -->\n",
|
||||||
|
"<g id=\"edge4\" class=\"edge\">\n",
|
||||||
|
"<title>1->0</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M447.25,-11.4C441.33,-9.24 434.46,-7.11 428,-6 377.52,2.67 236.49,-0.76 167,-4 133.56,-5.56 121.91,4.05 92,-11 83.75,-15.15 76.53,-22.15 70.83,-29.08\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"66.41,-34.82 68.19,-27.35 68.55,-32.05 70.68,-29.27 70.68,-29.27 70.68,-29.27 68.55,-32.05 73.18,-31.2 66.41,-34.82 66.41,-34.82\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"244\" y=\"-19.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"262.5\" y=\"-4.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#ff4da0\">❶</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"<!-- 1->2 -->\n",
|
||||||
|
"<g id=\"edge5\" class=\"edge\">\n",
|
||||||
|
"<title>1->2</title>\n",
|
||||||
|
"<path fill=\"none\" stroke=\"black\" d=\"M446.09,-14.08C426.86,-10.52 395.03,-7.42 371,-19 361.6,-23.53 353.89,-31.93 348.12,-40.11\"/>\n",
|
||||||
|
"<polygon fill=\"black\" stroke=\"black\" points=\"344.09,-46.26 345.29,-38.68 346.01,-43.33 347.93,-40.41 347.93,-40.41 347.93,-40.41 346.01,-43.33 350.56,-42.13 344.09,-46.26 344.09,-46.26\"/>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"371\" y=\"-37.8\" font-family=\"Lato\" font-size=\"14.00\">!p0 & !p1</text>\n",
|
||||||
|
"<text text-anchor=\"start\" x=\"391.5\" y=\"-22.8\" font-family=\"Lato\" font-size=\"14.00\" fill=\"#1f78b4\">⓿</text>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"</g>\n",
|
||||||
|
"</svg>\n",
|
||||||
|
"</div>"
|
||||||
|
],
|
||||||
|
"text/plain": [
|
||||||
|
"<IPython.core.display.HTML object>"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "display_data"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"display2(maxeven4, spot.reduce_parity(maxeven4))\n",
|
"display(maxeven4)\n",
|
||||||
"display2(maxeven4, spot.reduce_parity(maxeven4, True))"
|
"display2(spot.reduce_parity(maxeven4), spot.reduce_parity(maxeven4, True))\n",
|
||||||
|
"display2(spot.reduce_parity(maxeven4, False, True), spot.reduce_parity(maxeven4, True, True))"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3",
|
"display_name": "Python 3 (ipykernel)",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python3"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
|
|
@ -5212,7 +5344,7 @@
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.8.2"
|
"version": "3.10.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue