diff --git a/experiments/cdc_4_boundaries.py b/experiments/cdc_4_boundaries.py index 3fbcff8e9c939159c2d0909ec2750a14ac5fdf77..3a768902dc50b96a8554a4e5aa62c97f63d318d3 100755 --- a/experiments/cdc_4_boundaries.py +++ b/experiments/cdc_4_boundaries.py @@ -1,22 +1,19 @@ #!/usr/bin/python """ -Calculate a lower bound on the number of 4-boundaries -of a linear representation of the number of circuit double -covers. + Calculate a the number of 4-boundaries of a linear + representation of the number of circuit double covers. -It uses cyclic ladder gadgets with sizes 2 up to 7 with -permutations of all half-edges except the first one. -This gives matrix of size 36 with rank 21. + It uses cyclic ladder gadgets with sizes 2 up to 7 with + permutations of all half-edges except the first one. + This gives matrix of size 36 with rank 21 which matches + the upper bound which is the rank of the join matrix. """ -import sys, os -sys.path.append(os.path.dirname(__file__) + "/..") - +import _experiment from itertools import permutations from graph_tools.all import * - LadderGadget = lambda k: CyclicLadder().gadget(k) ladders = list(map(LadderGadget, range(2, 8))) gadgets = [ l.permute((1,) + p) diff --git a/experiments/cdc_5_boundaries.py b/experiments/cdc_5_boundaries.py index ccc0ddd1daf5714aa8ad8bfafa022b8c4849c538..44946cceed1c878a3f798ce2df9efb8e284d5bb2 100755 --- a/experiments/cdc_5_boundaries.py +++ b/experiments/cdc_5_boundaries.py @@ -1,18 +1,19 @@ #!/usr/bin/python """ -Calculate a lower bound on the number of 4-boundaries -of a linear representation of the number of circuit double -covers. + Calculate a lower bound on the number of 5-boundaries + of a linear representation of the number of circuit double + covers. -It uses cyclic ladder gadgets with sizes 2 up to 7 with -permutations of all half-edges except the first one. -This gives matrix of size 36 with rank 21. -""" + It uses cyclic ladder gadgets with sizes 2 up to 7 with + permutations of all half-edges except the first one. + This gives matrix of size 576 with rank 161. The upper + bound is 202 -- the rank of the join matrix. -import sys, os -sys.path.append(os.path.dirname(__file__) + "/..") + WARNING: This experiment takes a long time to complete. +""" +import _experiment from itertools import permutations from graph_tools.all import * diff --git a/experiments/flower-snarks.py b/experiments/flower-snarks.py index f71438d3d007e94acdb9c20ec9f0a41c855b475a..f28295528d334076cd8510a6949b47222761b875 100755 --- a/experiments/flower-snarks.py +++ b/experiments/flower-snarks.py @@ -1,17 +1,15 @@ #!/usr/bin/python -DOC = """ -Calculate that the number of CDCs of Flower snark $J_k$ is $c16^k \pm O(15^k)$. - -We calculate the step matrix $M$, show that 16 is its eigenvalue by finding -its eigenvector. The eigenvector is guessed for the ratios of coefficients -of $M^10 x$ and $M^9 x$ where $x$ is the initial vector. This eigenvector -shares one non-zero coordinate with the final vector. """ + Calculate that the number of CDCs of Flower snark $J_k$ is $c16^k \pm O(15^k)$. -import sys, os -sys.path.append(os.path.dirname(__file__) + "/..") + We calculate the step matrix $M$, show that 16 is its eigenvalue by finding + its eigenvector. The eigenvector is guessed for the ratios of coefficients + of $M^10 x$ and $M^9 x$ where $x$ is the initial vector. This eigenvector + shares one non-zero coordinate with the final vector. +""" +import _experiment from graph_tools.all import * from sage.all import identity_matrix, QQ, DiGraph, matrix @@ -77,7 +75,6 @@ def matrix_to_rev_graph(M): if __name__ == "__main__": - print(DOC) print("Stabilizing...") S = FlowerSnark.stabilize(CircuitDoubleCover, jordan=False) print("Done") diff --git a/experiments/flowers.py b/experiments/flowers.py index 393a82499ba178751f4af369a0383d26966e02f4..16271fdf8067c6bb9218333597f3284b1da542e8 100755 --- a/experiments/flowers.py +++ b/experiments/flowers.py @@ -1,14 +1,14 @@ #!/usr/bin/python """ -Derive a formula for the number of circuit double covers of a flower. - -Let $G$ be embedding of a graph into some surface. We say that a face -$f$ of size $k$ together with its neighbour faces are a {\em $k$-flower -with center $f$} given that $k \geq 3$, $f$ shares exactly one edge -with each of its neighbour faces, consecutive neighbour faces also -share exactly one edge, and non-consecutive neighbour faces do not -share any edge. + Derive a formula for the number of circuit double covers of a flower. + + Let $G$ be embedding of a graph into some surface. We say that a face + $f$ of size $k$ together with its neighbour faces are a {\em $k$-flower + with center $f$} given that $k \geq 3$, $f$ shares exactly one edge + with each of its neighbour faces, consecutive neighbour faces also + share exactly one edge, and non-consecutive neighbour faces do not + share any edge. """ import _experiment diff --git a/experiments/ladders.py b/experiments/ladders.py index b84f6c13c22deb1d22433e392dc8982ad1c56dff..e14ac96a9ac72088ea1d13fa75f6b1421e278846 100755 --- a/experiments/ladders.py +++ b/experiments/ladders.py @@ -1,20 +1,17 @@ #!/usr/bin/python """ -Derive a formula for the number of circuit double covers -of cyclic ladders and crossed cyclic ladders. + Derive a formula for the number of circuit double covers + of cyclic ladders and crossed cyclic ladders. """ -import sys, os -sys.path.append(os.path.dirname(__file__) + "/..") - +import _experiment from graph_tools.all import * L = CyclicLadder().stabilize(CircuitDoubleCover, jordan=True) CL = CyclicLadder(True).stabilize(CircuitDoubleCover, jordan=True) if __name__ == "__main__": - print(__doc__) print("Cyclic ladders:\n Formula: %s\n Under the condition %s\n" % (L["formula"], L["formula_if"])) print("Crossed cyclic ladders:\n Formula: %s\n Under the condition %s" % diff --git a/experiments/reduce-cycle.py b/experiments/reduce-cycle.py index 097b4438eee3c4a0fcf19f0fee6552b66e2630fa..d7726ece619c21f5174daf247dc2acefe436bb39 100755 --- a/experiments/reduce-cycle.py +++ b/experiments/reduce-cycle.py @@ -2,14 +2,12 @@ """ Application of Theorem 6.12 to triangles, 4-cycles (Theorem 6.13) -and 5.cycles (Theorem 6.14). Note that the results are numeric +and 5-cycles (Theorem 6.14). Note that the results are numeric calculation so it is necessary to review the system of equations by hand. (It is printed by the command-line parameter -v.) """ -import sys, os -sys.path.append(os.path.dirname(__file__) + "/..") - +import _experiment from graph_tools.base import * from graph_tools.parameters import CircuitDoubleCover, VertexCount from graph_tools.misc import sun diff --git a/experiments/small-snarks.py b/experiments/small-snarks.py index ff84ada0a6b28df38d89d1ca736a0650f38843bc..e6885df5dfc8fdc8e6ce2812c312c401ef22bd47 100755 --- a/experiments/small-snarks.py +++ b/experiments/small-snarks.py @@ -1,13 +1,11 @@ #!/usr/bin/python """ -Calculate the number of circuit double covers for the Petersen -graph a Blanusa snarks. + Calculate the number of circuit double covers for the Petersen + graph and Blanusa snarks. """ -import sys, os -sys.path.append(os.path.dirname(__file__) + "/..") - +import _experiment from graph_tools.all import * from sage.all import graphs @@ -18,7 +16,6 @@ L = { } if __name__ == "__main__": - print(__doc__) for n, g in L.items(): print("%s: %i" % (n, graph_to_gadget(g).eval(CircuitDoubleCover)))