add graphs

This commit is contained in:
Niles Rogoff 2017-03-22 09:49:56 -04:00
parent fd3e043b2a
commit 964d0a43b5
No known key found for this signature in database
GPG Key ID: B78B908F23430F80
3 changed files with 479 additions and 2 deletions

147
(1+0)*1.svg Normal file
View File

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
-->
<!-- Title: test Pages: 1 -->
<svg width="238pt" height="653pt"
viewBox="0.00 0.00 238.00 653.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 649)">
<title>test</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-649 234,-649 234,4 -4,4"/>
<!-- 652 -->
<g id="node1" class="node"><title>652</title>
<ellipse fill="none" stroke="black" cx="93" cy="-627" rx="27" ry="18"/>
<text text-anchor="middle" x="93" y="-623.3" font-family="Times,serif" font-size="14.00">652</text>
</g>
<!-- 652&#45;&gt;652 -->
<g id="edge14" class="edge"><title>652&#45;&gt;652</title>
<path fill="none" stroke="black" d="M117.532,-634.752C128.508,-635.49 138,-632.906 138,-627 138,-623.032 133.715,-620.563 127.574,-619.594"/>
<polygon fill="black" stroke="black" points="127.647,-616.095 117.532,-619.248 127.406,-623.091 127.647,-616.095"/>
<text text-anchor="middle" x="150" y="-623.3" font-family="Times,serif" font-size="14.00">start</text>
</g>
<!-- 901 -->
<g id="node2" class="node"><title>901</title>
<ellipse fill="none" stroke="black" cx="33" cy="-192" rx="27" ry="18"/>
<text text-anchor="middle" x="33" y="-188.3" font-family="Times,serif" font-size="14.00">901</text>
</g>
<!-- 652&#45;&gt;901 -->
<g id="edge1" class="edge"><title>652&#45;&gt;901</title>
<path fill="none" stroke="black" d="M70.0112,-616.922C42.4713,-604.356 0,-578.841 0,-541 0,-541 0,-541 0,-278 0,-256.695 9.12081,-234.298 17.7723,-217.846"/>
<polygon fill="black" stroke="black" points="20.9454,-219.341 22.7395,-208.899 14.8254,-215.943 20.9454,-219.341"/>
<text text-anchor="middle" x="20" y="-405.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 352 -->
<g id="node3" class="node"><title>352</title>
<ellipse fill="none" stroke="black" cx="93" cy="-540" rx="27" ry="18"/>
<text text-anchor="middle" x="93" y="-536.3" font-family="Times,serif" font-size="14.00">352</text>
</g>
<!-- 652&#45;&gt;352 -->
<g id="edge2" class="edge"><title>652&#45;&gt;352</title>
<path fill="none" stroke="black" d="M93,-608.799C93,-597.163 93,-581.548 93,-568.237"/>
<polygon fill="black" stroke="black" points="96.5001,-568.175 93,-558.175 89.5001,-568.175 96.5001,-568.175"/>
<text text-anchor="middle" x="113" y="-579.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 232 -->
<g id="node8" class="node"><title>232</title>
<ellipse fill="none" stroke="black" cx="33" cy="-105" rx="27" ry="18"/>
<text text-anchor="middle" x="33" y="-101.3" font-family="Times,serif" font-size="14.00">232</text>
</g>
<!-- 901&#45;&gt;232 -->
<g id="edge12" class="edge"><title>901&#45;&gt;232</title>
<path fill="none" stroke="black" d="M33,-173.799C33,-162.163 33,-146.548 33,-133.237"/>
<polygon fill="black" stroke="black" points="36.5001,-133.175 33,-123.175 29.5001,-133.175 36.5001,-133.175"/>
<text text-anchor="middle" x="53" y="-144.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 562 -->
<g id="node4" class="node"><title>562</title>
<ellipse fill="none" stroke="black" cx="55" cy="-453" rx="27" ry="18"/>
<text text-anchor="middle" x="55" y="-449.3" font-family="Times,serif" font-size="14.00">562</text>
</g>
<!-- 352&#45;&gt;562 -->
<g id="edge8" class="edge"><title>352&#45;&gt;562</title>
<path fill="none" stroke="black" d="M77.8422,-524.961C72.3206,-519.022 66.5645,-511.698 63,-504 59.7864,-497.06 57.8331,-489.062 56.6547,-481.527"/>
<polygon fill="black" stroke="black" points="60.1007,-480.863 55.454,-471.342 53.1489,-481.683 60.1007,-480.863"/>
<text text-anchor="middle" x="83" y="-492.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 311 -->
<g id="node9" class="node"><title>311</title>
<ellipse fill="none" stroke="black" cx="127" cy="-453" rx="27" ry="18"/>
<text text-anchor="middle" x="127" y="-449.3" font-family="Times,serif" font-size="14.00">311</text>
</g>
<!-- 352&#45;&gt;311 -->
<g id="edge7" class="edge"><title>352&#45;&gt;311</title>
<path fill="none" stroke="black" d="M99.7173,-522.207C104.545,-510.138 111.145,-493.638 116.644,-479.891"/>
<polygon fill="black" stroke="black" points="119.948,-481.054 120.412,-470.469 113.449,-478.454 119.948,-481.054"/>
<text text-anchor="middle" x="132" y="-492.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 41 -->
<g id="node5" class="node"><title>41</title>
<ellipse fill="none" stroke="black" cx="63" cy="-366" rx="27" ry="18"/>
<text text-anchor="middle" x="63" y="-362.3" font-family="Times,serif" font-size="14.00">41</text>
</g>
<!-- 562&#45;&gt;41 -->
<g id="edge3" class="edge"><title>562&#45;&gt;41</title>
<path fill="none" stroke="black" d="M56.6189,-434.799C57.7141,-423.163 59.1837,-407.548 60.4365,-394.237"/>
<polygon fill="black" stroke="black" points="63.931,-394.459 61.3835,-384.175 56.9618,-393.803 63.931,-394.459"/>
<text text-anchor="middle" x="63.5" y="-405.8" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- 827 -->
<g id="node7" class="node"><title>827</title>
<ellipse fill="none" stroke="black" cx="101" cy="-279" rx="27" ry="18"/>
<text text-anchor="middle" x="101" y="-275.3" font-family="Times,serif" font-size="14.00">827</text>
</g>
<!-- 41&#45;&gt;827 -->
<g id="edge5" class="edge"><title>41&#45;&gt;827</title>
<path fill="none" stroke="black" d="M63.454,-347.658C64.272,-337.711 66.272,-325.211 71,-315 73.1164,-310.429 76.0054,-305.99 79.1593,-301.895"/>
<polygon fill="black" stroke="black" points="82.0289,-303.923 85.8422,-294.039 76.697,-299.388 82.0289,-303.923"/>
<text text-anchor="middle" x="91" y="-318.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 745 -->
<g id="node6" class="node"><title>745</title>
<ellipse fill="none" stroke="black" cx="33" cy="-18" rx="27" ry="18"/>
<text text-anchor="middle" x="33" y="-14.3" font-family="Times,serif" font-size="14.00">745</text>
</g>
<!-- 745&#45;&gt;745 -->
<g id="edge4" class="edge"><title>745&#45;&gt;745</title>
<path fill="none" stroke="black" d="M57.5325,-25.752C68.5078,-26.4902 78,-23.9062 78,-18 78,-14.0317 73.7151,-11.5632 67.5743,-10.5944"/>
<polygon fill="black" stroke="black" points="67.6472,-7.09491 57.5325,-10.248 67.4059,-14.0908 67.6472,-7.09491"/>
<text text-anchor="middle" x="101" y="-14.3" font-family="Times,serif" font-size="14.00">terminal</text>
</g>
<!-- 827&#45;&gt;652 -->
<g id="edge9" class="edge"><title>827&#45;&gt;652</title>
<path fill="none" stroke="black" d="M123.821,-288.753C136.836,-294.634 152.745,-303.431 164,-315 181.465,-332.954 190,-339.953 190,-365 190,-541 190,-541 190,-541 190,-576.004 153.829,-599.953 125.662,-613.297"/>
<polygon fill="black" stroke="black" points="124.172,-610.129 116.481,-617.416 127.038,-616.516 124.172,-610.129"/>
<text text-anchor="middle" x="210" y="-449.3" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 827&#45;&gt;901 -->
<g id="edge10" class="edge"><title>827&#45;&gt;901</title>
<path fill="none" stroke="black" d="M88.843,-262.804C78.5602,-249.95 63.6549,-231.319 51.8295,-216.537"/>
<polygon fill="black" stroke="black" points="54.2611,-213.974 45.2811,-208.351 48.795,-218.346 54.2611,-213.974"/>
<text text-anchor="middle" x="92" y="-231.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 232&#45;&gt;745 -->
<g id="edge6" class="edge"><title>232&#45;&gt;745</title>
<path fill="none" stroke="black" d="M33,-86.799C33,-75.1626 33,-59.5479 33,-46.2368"/>
<polygon fill="black" stroke="black" points="36.5001,-46.1754 33,-36.1754 29.5001,-46.1755 36.5001,-46.1754"/>
<text text-anchor="middle" x="36.5" y="-57.8" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- 502 -->
<g id="node10" class="node"><title>502</title>
<ellipse fill="none" stroke="black" cx="135" cy="-366" rx="27" ry="18"/>
<text text-anchor="middle" x="135" y="-362.3" font-family="Times,serif" font-size="14.00">502</text>
</g>
<!-- 311&#45;&gt;502 -->
<g id="edge11" class="edge"><title>311&#45;&gt;502</title>
<path fill="none" stroke="black" d="M128.619,-434.799C129.714,-423.163 131.184,-407.548 132.437,-394.237"/>
<polygon fill="black" stroke="black" points="135.931,-394.459 133.383,-384.175 128.962,-393.803 135.931,-394.459"/>
<text text-anchor="middle" x="134.5" y="-405.8" font-family="Times,serif" font-size="14.00">0</text>
</g>
<!-- 502&#45;&gt;827 -->
<g id="edge13" class="edge"><title>502&#45;&gt;827</title>
<path fill="none" stroke="black" d="M128.283,-348.207C123.455,-336.138 116.855,-319.638 111.356,-305.891"/>
<polygon fill="black" stroke="black" points="114.551,-304.454 107.588,-296.469 108.052,-307.054 114.551,-304.454"/>
<text text-anchor="middle" x="140" y="-318.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.8 KiB

330
ab(c1+2d(e*f)d)*e.svg Normal file
View File

@ -0,0 +1,330 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
-->
<!-- Title: test Pages: 1 -->
<svg width="324pt" height="1457pt"
viewBox="0.00 0.00 324.00 1457.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 1453)">
<title>test</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-1453 320,-1453 320,4 -4,4"/>
<!-- 842 -->
<g id="node1" class="node"><title>842</title>
<ellipse fill="none" stroke="black" cx="212" cy="-1431" rx="27" ry="18"/>
<text text-anchor="middle" x="212" y="-1427.3" font-family="Times,serif" font-size="14.00">842</text>
</g>
<!-- 842&#45;&gt;842 -->
<g id="edge1" class="edge"><title>842&#45;&gt;842</title>
<path fill="none" stroke="black" d="M236.532,-1438.75C247.508,-1439.49 257,-1436.91 257,-1431 257,-1427.03 252.715,-1424.56 246.574,-1423.59"/>
<polygon fill="black" stroke="black" points="246.647,-1420.09 236.532,-1423.25 246.406,-1427.09 246.647,-1420.09"/>
<text text-anchor="middle" x="280" y="-1427.3" font-family="Times,serif" font-size="14.00">terminal</text>
</g>
<!-- 820 -->
<g id="node5" class="node"><title>820</title>
<ellipse fill="none" stroke="black" cx="245" cy="-1344" rx="27" ry="18"/>
<text text-anchor="middle" x="245" y="-1340.3" font-family="Times,serif" font-size="14.00">820</text>
</g>
<!-- 842&#45;&gt;820 -->
<g id="edge15" class="edge"><title>842&#45;&gt;820</title>
<path fill="none" stroke="black" d="M218.52,-1413.21C223.175,-1401.22 229.528,-1384.85 234.845,-1371.16"/>
<polygon fill="black" stroke="black" points="238.137,-1372.35 238.494,-1361.76 231.612,-1369.81 238.137,-1372.35"/>
<text text-anchor="middle" x="250" y="-1383.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 353 -->
<g id="node8" class="node"><title>353</title>
<ellipse fill="none" stroke="black" cx="133" cy="-1344" rx="27" ry="18"/>
<text text-anchor="middle" x="133" y="-1340.3" font-family="Times,serif" font-size="14.00">353</text>
</g>
<!-- 842&#45;&gt;353 -->
<g id="edge14" class="edge"><title>842&#45;&gt;353</title>
<path fill="none" stroke="black" d="M198.239,-1415.19C185.892,-1401.91 167.601,-1382.23 153.525,-1367.08"/>
<polygon fill="black" stroke="black" points="155.975,-1364.58 146.603,-1359.64 150.847,-1369.34 155.975,-1364.58"/>
<text text-anchor="middle" x="197" y="-1383.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 565 -->
<g id="node2" class="node"><title>565</title>
<ellipse fill="none" stroke="black" cx="68" cy="-366" rx="27" ry="18"/>
<text text-anchor="middle" x="68" y="-362.3" font-family="Times,serif" font-size="14.00">565</text>
</g>
<!-- 686 -->
<g id="node3" class="node"><title>686</title>
<ellipse fill="none" stroke="black" cx="68" cy="-279" rx="27" ry="18"/>
<text text-anchor="middle" x="68" y="-275.3" font-family="Times,serif" font-size="14.00">686</text>
</g>
<!-- 565&#45;&gt;686 -->
<g id="edge2" class="edge"><title>565&#45;&gt;686</title>
<path fill="none" stroke="black" d="M68,-347.799C68,-336.163 68,-320.548 68,-307.237"/>
<polygon fill="black" stroke="black" points="71.5001,-307.175 68,-297.175 64.5001,-307.175 71.5001,-307.175"/>
<text text-anchor="middle" x="71.5" y="-318.8" font-family="Times,serif" font-size="14.00">b</text>
</g>
<!-- 521 -->
<g id="node4" class="node"><title>521</title>
<ellipse fill="none" stroke="black" cx="96" cy="-192" rx="27" ry="18"/>
<text text-anchor="middle" x="96" y="-188.3" font-family="Times,serif" font-size="14.00">521</text>
</g>
<!-- 686&#45;&gt;521 -->
<g id="edge3" class="edge"><title>686&#45;&gt;521</title>
<path fill="none" stroke="black" d="M65.7319,-260.862C65.0592,-250.983 65.3092,-238.483 69,-228 70.5324,-223.648 72.8343,-219.409 75.4598,-215.471"/>
<polygon fill="black" stroke="black" points="78.3194,-217.492 81.551,-207.402 72.7325,-213.275 78.3194,-217.492"/>
<text text-anchor="middle" x="89" y="-231.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 521&#45;&gt;842 -->
<g id="edge6" class="edge"><title>521&#45;&gt;842</title>
<path fill="none" stroke="black" d="M72.7611,-201.654C44.3496,-213.918 0,-239.266 0,-278 0,-1345 0,-1345 0,-1345 0,-1419.25 113.431,-1430.36 174.35,-1430.97"/>
<polygon fill="black" stroke="black" points="174.716,-1434.47 184.719,-1430.97 174.721,-1427.47 174.716,-1434.47"/>
<text text-anchor="middle" x="20" y="-797.3" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 412 -->
<g id="node7" class="node"><title>412</title>
<ellipse fill="none" stroke="black" cx="186" cy="-105" rx="27" ry="18"/>
<text text-anchor="middle" x="186" y="-101.3" font-family="Times,serif" font-size="14.00">412</text>
</g>
<!-- 521&#45;&gt;412 -->
<g id="edge5" class="edge"><title>521&#45;&gt;412</title>
<path fill="none" stroke="black" d="M105.37,-174.953C111.963,-164.516 121.465,-151.032 132,-141 139.386,-133.967 148.371,-127.499 156.876,-122.088"/>
<polygon fill="black" stroke="black" points="158.755,-125.041 165.477,-116.852 155.115,-119.062 158.755,-125.041"/>
<text text-anchor="middle" x="152" y="-144.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 119 -->
<g id="node6" class="node"><title>119</title>
<ellipse fill="none" stroke="black" cx="250" cy="-1257" rx="27" ry="18"/>
<text text-anchor="middle" x="250" y="-1253.3" font-family="Times,serif" font-size="14.00">119</text>
</g>
<!-- 820&#45;&gt;119 -->
<g id="edge4" class="edge"><title>820&#45;&gt;119</title>
<path fill="none" stroke="black" d="M246.012,-1325.8C246.696,-1314.16 247.615,-1298.55 248.398,-1285.24"/>
<polygon fill="black" stroke="black" points="251.896,-1285.36 248.99,-1275.18 244.908,-1284.95 251.896,-1285.36"/>
<text text-anchor="middle" x="250.5" y="-1296.8" font-family="Times,serif" font-size="14.00">c</text>
</g>
<!-- 194 -->
<g id="node10" class="node"><title>194</title>
<ellipse fill="none" stroke="black" cx="253" cy="-1170" rx="27" ry="18"/>
<text text-anchor="middle" x="253" y="-1166.3" font-family="Times,serif" font-size="14.00">194</text>
</g>
<!-- 119&#45;&gt;194 -->
<g id="edge8" class="edge"><title>119&#45;&gt;194</title>
<path fill="none" stroke="black" d="M250.607,-1238.8C251.018,-1227.16 251.569,-1211.55 252.039,-1198.24"/>
<polygon fill="black" stroke="black" points="255.539,-1198.29 252.394,-1188.18 248.543,-1198.05 255.539,-1198.29"/>
<text text-anchor="middle" x="271" y="-1209.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 261 -->
<g id="node18" class="node"><title>261</title>
<ellipse fill="none" stroke="black" cx="264" cy="-18" rx="27" ry="18"/>
<text text-anchor="middle" x="264" y="-14.3" font-family="Times,serif" font-size="14.00">261</text>
</g>
<!-- 412&#45;&gt;261 -->
<g id="edge18" class="edge"><title>412&#45;&gt;261</title>
<path fill="none" stroke="black" d="M199.587,-89.1941C211.778,-75.9087 229.837,-56.2284 243.734,-41.0842"/>
<polygon fill="black" stroke="black" points="246.387,-43.3706 250.569,-33.6362 241.229,-38.6377 246.387,-43.3706"/>
<text text-anchor="middle" x="249" y="-57.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 876 -->
<g id="node9" class="node"><title>876</title>
<ellipse fill="none" stroke="black" cx="118" cy="-1257" rx="27" ry="18"/>
<text text-anchor="middle" x="118" y="-1253.3" font-family="Times,serif" font-size="14.00">876</text>
</g>
<!-- 353&#45;&gt;876 -->
<g id="edge7" class="edge"><title>353&#45;&gt;876</title>
<path fill="none" stroke="black" d="M129.965,-1325.8C127.911,-1314.16 125.156,-1298.55 122.806,-1285.24"/>
<polygon fill="black" stroke="black" points="126.216,-1284.41 121.031,-1275.18 119.322,-1285.63 126.216,-1284.41"/>
<text text-anchor="middle" x="129.5" y="-1296.8" font-family="Times,serif" font-size="14.00">2</text>
</g>
<!-- 993 -->
<g id="node11" class="node"><title>993</title>
<ellipse fill="none" stroke="black" cx="115" cy="-1170" rx="27" ry="18"/>
<text text-anchor="middle" x="115" y="-1166.3" font-family="Times,serif" font-size="14.00">993</text>
</g>
<!-- 876&#45;&gt;993 -->
<g id="edge22" class="edge"><title>876&#45;&gt;993</title>
<path fill="none" stroke="black" d="M117.393,-1238.8C116.982,-1227.16 116.431,-1211.55 115.961,-1198.24"/>
<polygon fill="black" stroke="black" points="119.457,-1198.05 115.606,-1188.18 112.461,-1198.29 119.457,-1198.05"/>
<text text-anchor="middle" x="136" y="-1209.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 777 -->
<g id="node15" class="node"><title>777</title>
<ellipse fill="none" stroke="black" cx="254" cy="-1029" rx="27" ry="18"/>
<text text-anchor="middle" x="254" y="-1025.3" font-family="Times,serif" font-size="14.00">777</text>
</g>
<!-- 194&#45;&gt;777 -->
<g id="edge13" class="edge"><title>194&#45;&gt;777</title>
<path fill="none" stroke="black" d="M253.123,-1151.96C253.292,-1128.4 253.6,-1085.64 253.802,-1057.53"/>
<polygon fill="black" stroke="black" points="257.304,-1057.21 253.876,-1047.18 250.304,-1057.16 257.304,-1057.21"/>
<text text-anchor="middle" x="256.5" y="-1122.8" font-family="Times,serif" font-size="14.00">1</text>
</g>
<!-- 804 -->
<g id="node12" class="node"><title>804</title>
<ellipse fill="none" stroke="black" cx="115" cy="-1083" rx="27" ry="18"/>
<text text-anchor="middle" x="115" y="-1079.3" font-family="Times,serif" font-size="14.00">804</text>
</g>
<!-- 993&#45;&gt;804 -->
<g id="edge9" class="edge"><title>993&#45;&gt;804</title>
<path fill="none" stroke="black" d="M115,-1151.8C115,-1140.16 115,-1124.55 115,-1111.24"/>
<polygon fill="black" stroke="black" points="118.5,-1111.18 115,-1101.18 111.5,-1111.18 118.5,-1111.18"/>
<text text-anchor="middle" x="118.5" y="-1122.8" font-family="Times,serif" font-size="14.00">d</text>
</g>
<!-- 208 -->
<g id="node13" class="node"><title>208</title>
<ellipse fill="none" stroke="black" cx="115" cy="-975" rx="27" ry="18"/>
<text text-anchor="middle" x="115" y="-971.3" font-family="Times,serif" font-size="14.00">208</text>
</g>
<!-- 804&#45;&gt;208 -->
<g id="edge10" class="edge"><title>804&#45;&gt;208</title>
<path fill="none" stroke="black" d="M115,-1064.97C115,-1048.38 115,-1022.88 115,-1003.43"/>
<polygon fill="black" stroke="black" points="118.5,-1003.34 115,-993.341 111.5,-1003.34 118.5,-1003.34"/>
<text text-anchor="middle" x="135" y="-1025.3" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 512 -->
<g id="node16" class="node"><title>512</title>
<ellipse fill="none" stroke="black" cx="199" cy="-888" rx="27" ry="18"/>
<text text-anchor="middle" x="199" y="-884.3" font-family="Times,serif" font-size="14.00">512</text>
</g>
<!-- 208&#45;&gt;512 -->
<g id="edge26" class="edge"><title>208&#45;&gt;512</title>
<path fill="none" stroke="black" d="M129.249,-959.581C142.403,-946.271 162.13,-926.309 177.252,-911.007"/>
<polygon fill="black" stroke="black" points="180.141,-913.063 184.681,-903.49 175.162,-908.142 180.141,-913.063"/>
<text text-anchor="middle" x="182" y="-927.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 320 -->
<g id="node19" class="node"><title>320</title>
<ellipse fill="none" stroke="black" cx="134" cy="-714" rx="27" ry="18"/>
<text text-anchor="middle" x="134" y="-710.3" font-family="Times,serif" font-size="14.00">320</text>
</g>
<!-- 208&#45;&gt;320 -->
<g id="edge25" class="edge"><title>208&#45;&gt;320</title>
<path fill="none" stroke="black" d="M106.621,-957.746C94.4888,-932.287 74.1876,-881.326 81,-837 86.5124,-801.133 105.227,-763.33 118.859,-739.483"/>
<polygon fill="black" stroke="black" points="121.935,-741.157 123.977,-730.761 115.897,-737.615 121.935,-741.157"/>
<text text-anchor="middle" x="101" y="-840.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 547 -->
<g id="node14" class="node"><title>547</title>
<ellipse fill="none" stroke="black" cx="186" cy="-279" rx="27" ry="18"/>
<text text-anchor="middle" x="186" y="-275.3" font-family="Times,serif" font-size="14.00">547</text>
</g>
<!-- 547&#45;&gt;521 -->
<g id="edge12" class="edge"><title>547&#45;&gt;521</title>
<path fill="none" stroke="black" d="M165.477,-267.148C154.806,-260.926 141.952,-252.476 132,-243 124.181,-235.555 116.931,-226.207 111.017,-217.616"/>
<polygon fill="black" stroke="black" points="113.795,-215.47 105.37,-209.047 107.951,-219.322 113.795,-215.47"/>
<text text-anchor="middle" x="152" y="-231.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 547&#45;&gt;412 -->
<g id="edge11" class="edge"><title>547&#45;&gt;412</title>
<path fill="none" stroke="black" d="M186,-260.879C186,-231.001 186,-169.113 186,-133.274"/>
<polygon fill="black" stroke="black" points="189.5,-133.052 186,-123.052 182.5,-133.052 189.5,-133.052"/>
<text text-anchor="middle" x="206" y="-188.3" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 777&#45;&gt;547 -->
<g id="edge16" class="edge"><title>777&#45;&gt;547</title>
<path fill="none" stroke="black" d="M254,-1010.75C254,-991.622 254,-959.857 254,-932.5 254,-932.5 254,-932.5 254,-365 254,-337.508 232.042,-313.814 213.081,-298.478"/>
<polygon fill="black" stroke="black" points="215.006,-295.544 204.942,-292.234 210.746,-301.098 215.006,-295.544"/>
<text text-anchor="middle" x="274" y="-666.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 462 -->
<g id="node17" class="node"><title>462</title>
<ellipse fill="none" stroke="black" cx="134" cy="-801" rx="27" ry="18"/>
<text text-anchor="middle" x="134" y="-797.3" font-family="Times,serif" font-size="14.00">462</text>
</g>
<!-- 512&#45;&gt;462 -->
<g id="edge17" class="edge"><title>512&#45;&gt;462</title>
<path fill="none" stroke="black" d="M187.078,-871.41C177.274,-858.589 163.226,-840.219 152.045,-825.597"/>
<polygon fill="black" stroke="black" points="154.701,-823.309 145.846,-817.491 149.141,-827.561 154.701,-823.309"/>
<text text-anchor="middle" x="173.5" y="-840.8" font-family="Times,serif" font-size="14.00">e</text>
</g>
<!-- 462&#45;&gt;208 -->
<g id="edge20" class="edge"><title>462&#45;&gt;208</title>
<path fill="none" stroke="black" d="M130.847,-818.991C128.398,-832.713 125.08,-852.544 123,-870 119.917,-895.878 117.772,-925.528 116.485,-946.53"/>
<polygon fill="black" stroke="black" points="112.982,-946.471 115.889,-956.659 119.97,-946.882 112.982,-946.471"/>
<text text-anchor="middle" x="143" y="-884.3" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 462&#45;&gt;320 -->
<g id="edge19" class="edge"><title>462&#45;&gt;320</title>
<path fill="none" stroke="black" d="M134,-782.799C134,-771.163 134,-755.548 134,-742.237"/>
<polygon fill="black" stroke="black" points="137.5,-742.175 134,-732.175 130.5,-742.175 137.5,-742.175"/>
<text text-anchor="middle" x="154" y="-753.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 261&#45;&gt;842 -->
<g id="edge24" class="edge"><title>261&#45;&gt;842</title>
<path fill="none" stroke="black" d="M277.501,-33.7272C290.757,-49.7654 309,-76.7833 309,-104 309,-1345 309,-1345 309,-1345 309,-1380 272.829,-1403.95 244.662,-1417.3"/>
<polygon fill="black" stroke="black" points="243.172,-1414.13 235.481,-1421.42 246.038,-1420.52 243.172,-1414.13"/>
<text text-anchor="middle" x="312.5" y="-710.3" font-family="Times,serif" font-size="14.00">e</text>
</g>
<!-- 581 -->
<g id="node20" class="node"><title>581</title>
<ellipse fill="none" stroke="black" cx="155" cy="-627" rx="27" ry="18"/>
<text text-anchor="middle" x="155" y="-623.3" font-family="Times,serif" font-size="14.00">581</text>
</g>
<!-- 320&#45;&gt;581 -->
<g id="edge27" class="edge"><title>320&#45;&gt;581</title>
<path fill="none" stroke="black" d="M138.149,-696.207C141.064,-684.409 145.024,-668.378 148.373,-654.822"/>
<polygon fill="black" stroke="black" points="151.787,-655.597 150.788,-645.049 144.991,-653.918 151.787,-655.597"/>
<text text-anchor="middle" x="165" y="-666.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 532 -->
<g id="node21" class="node"><title>532</title>
<ellipse fill="none" stroke="black" cx="184" cy="-540" rx="27" ry="18"/>
<text text-anchor="middle" x="184" y="-536.3" font-family="Times,serif" font-size="14.00">532</text>
</g>
<!-- 581&#45;&gt;532 -->
<g id="edge21" class="edge"><title>581&#45;&gt;532</title>
<path fill="none" stroke="black" d="M160.729,-609.207C164.781,-597.332 170.295,-581.168 174.939,-567.557"/>
<polygon fill="black" stroke="black" points="178.366,-568.353 178.282,-557.758 171.741,-566.093 178.366,-568.353"/>
<text text-anchor="middle" x="173.5" y="-579.8" font-family="Times,serif" font-size="14.00">f</text>
</g>
<!-- 165 -->
<g id="node22" class="node"><title>165</title>
<ellipse fill="none" stroke="black" cx="185" cy="-453" rx="27" ry="18"/>
<text text-anchor="middle" x="185" y="-449.3" font-family="Times,serif" font-size="14.00">165</text>
</g>
<!-- 532&#45;&gt;165 -->
<g id="edge29" class="edge"><title>532&#45;&gt;165</title>
<path fill="none" stroke="black" d="M184.202,-521.799C184.339,-510.163 184.523,-494.548 184.68,-481.237"/>
<polygon fill="black" stroke="black" points="188.18,-481.216 184.798,-471.175 181.18,-481.134 188.18,-481.216"/>
<text text-anchor="middle" x="204" y="-492.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 645 -->
<g id="node23" class="node"><title>645</title>
<ellipse fill="none" stroke="black" cx="185" cy="-366" rx="27" ry="18"/>
<text text-anchor="middle" x="185" y="-362.3" font-family="Times,serif" font-size="14.00">645</text>
</g>
<!-- 165&#45;&gt;645 -->
<g id="edge23" class="edge"><title>165&#45;&gt;645</title>
<path fill="none" stroke="black" d="M185,-434.799C185,-423.163 185,-407.548 185,-394.237"/>
<polygon fill="black" stroke="black" points="188.5,-394.175 185,-384.175 181.5,-394.175 188.5,-394.175"/>
<text text-anchor="middle" x="188.5" y="-405.8" font-family="Times,serif" font-size="14.00">d</text>
</g>
<!-- 645&#45;&gt;547 -->
<g id="edge30" class="edge"><title>645&#45;&gt;547</title>
<path fill="none" stroke="black" d="M185.202,-347.799C185.339,-336.163 185.523,-320.548 185.68,-307.237"/>
<polygon fill="black" stroke="black" points="189.18,-307.216 185.798,-297.175 182.18,-307.134 189.18,-307.216"/>
<text text-anchor="middle" x="205" y="-318.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
<!-- 848 -->
<g id="node24" class="node"><title>848</title>
<ellipse fill="none" stroke="black" cx="68" cy="-540" rx="27" ry="18"/>
<text text-anchor="middle" x="68" y="-536.3" font-family="Times,serif" font-size="14.00">848</text>
</g>
<!-- 848&#45;&gt;848 -->
<g id="edge32" class="edge"><title>848&#45;&gt;848</title>
<path fill="none" stroke="black" d="M92.5325,-547.752C103.508,-548.49 113,-545.906 113,-540 113,-536.032 108.715,-533.563 102.574,-532.594"/>
<polygon fill="black" stroke="black" points="102.647,-529.095 92.5325,-532.248 102.406,-536.091 102.647,-529.095"/>
<text text-anchor="middle" x="125" y="-536.3" font-family="Times,serif" font-size="14.00">start</text>
</g>
<!-- 232 -->
<g id="node25" class="node"><title>232</title>
<ellipse fill="none" stroke="black" cx="68" cy="-453" rx="27" ry="18"/>
<text text-anchor="middle" x="68" y="-449.3" font-family="Times,serif" font-size="14.00">232</text>
</g>
<!-- 848&#45;&gt;232 -->
<g id="edge28" class="edge"><title>848&#45;&gt;232</title>
<path fill="none" stroke="black" d="M68,-521.799C68,-510.163 68,-494.548 68,-481.237"/>
<polygon fill="black" stroke="black" points="71.5001,-481.175 68,-471.175 64.5001,-481.175 71.5001,-481.175"/>
<text text-anchor="middle" x="71.5" y="-492.8" font-family="Times,serif" font-size="14.00">a</text>
</g>
<!-- 232&#45;&gt;565 -->
<g id="edge31" class="edge"><title>232&#45;&gt;565</title>
<path fill="none" stroke="black" d="M68,-434.799C68,-423.163 68,-407.548 68,-394.237"/>
<polygon fill="black" stroke="black" points="71.5001,-394.175 68,-384.175 64.5001,-394.175 71.5001,-394.175"/>
<text text-anchor="middle" x="88" y="-405.8" font-family="Times,serif" font-size="14.00">epsilon</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

4
nfa.py
View File

@ -67,7 +67,7 @@ def either(a, b):
new_start.moves['ε'].add(b.start)
new_end = nfa()
new_end.terminal = True
for node in union(a.nodes, b.nodes):
for node in (a.nodes | b.nodes):
if node.terminal:
node.terminal = False
node.moves['ε'].add(new_end)
@ -210,7 +210,7 @@ def pmap(f): # prints out the passed field in a way that dot can compile to an s
#pmap(compile("ab(c1+2d(e*f)d)*e"))
#pmap(either(build_from_char('a'), build_from_char('b')))
# x = compile("(1+0)*1")
# #pmap(x)
# pmap(x)
# for s in ["101", "111110", "11001", "1", "0"]:
# print(match(x, s))
# x = compile("a+b+c")