Skip to content
Snippets Groups Projects
Commit 31f171ad authored by Radek Hušek's avatar Radek Hušek
Browse files

improve experiments' docs

parent 3da729c0
Branches
No related tags found
No related merge requests found
#!/usr/bin/python #!/usr/bin/python
""" """
Calculate a lower bound on the number of 4-boundaries Calculate a the number of 4-boundaries of a linear
of a linear representation of the number of circuit double representation of the number of circuit double covers.
covers.
It uses cyclic ladder gadgets with sizes 2 up to 7 with It uses cyclic ladder gadgets with sizes 2 up to 7 with
permutations of all half-edges except the first one. permutations of all half-edges except the first one.
This gives matrix of size 36 with rank 21. 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 import _experiment
sys.path.append(os.path.dirname(__file__) + "/..")
from itertools import permutations from itertools import permutations
from graph_tools.all import * from graph_tools.all import *
LadderGadget = lambda k: CyclicLadder().gadget(k) LadderGadget = lambda k: CyclicLadder().gadget(k)
ladders = list(map(LadderGadget, range(2, 8))) ladders = list(map(LadderGadget, range(2, 8)))
gadgets = [ l.permute((1,) + p) gadgets = [ l.permute((1,) + p)
......
#!/usr/bin/python #!/usr/bin/python
""" """
Calculate a lower bound on the number of 4-boundaries Calculate a lower bound on the number of 5-boundaries
of a linear representation of the number of circuit double of a linear representation of the number of circuit double
covers. covers.
It uses cyclic ladder gadgets with sizes 2 up to 7 with It uses cyclic ladder gadgets with sizes 2 up to 7 with
permutations of all half-edges except the first one. permutations of all half-edges except the first one.
This gives matrix of size 36 with rank 21. This gives matrix of size 576 with rank 161. The upper
""" bound is 202 -- the rank of the join matrix.
import sys, os WARNING: This experiment takes a long time to complete.
sys.path.append(os.path.dirname(__file__) + "/..") """
import _experiment
from itertools import permutations from itertools import permutations
from graph_tools.all import * from graph_tools.all import *
......
#!/usr/bin/python #!/usr/bin/python
DOC = """ """
Calculate that the number of CDCs of Flower snark $J_k$ is $c16^k \pm O(15^k)$. 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 We calculate the step matrix $M$, show that 16 is its eigenvalue by finding
...@@ -9,9 +9,7 @@ of $M^10 x$ and $M^9 x$ where $x$ is the initial vector. This eigenvector ...@@ -9,9 +9,7 @@ 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. shares one non-zero coordinate with the final vector.
""" """
import sys, os import _experiment
sys.path.append(os.path.dirname(__file__) + "/..")
from graph_tools.all import * from graph_tools.all import *
from sage.all import identity_matrix, QQ, DiGraph, matrix from sage.all import identity_matrix, QQ, DiGraph, matrix
...@@ -77,7 +75,6 @@ def matrix_to_rev_graph(M): ...@@ -77,7 +75,6 @@ def matrix_to_rev_graph(M):
if __name__ == "__main__": if __name__ == "__main__":
print(DOC)
print("Stabilizing...") print("Stabilizing...")
S = FlowerSnark.stabilize(CircuitDoubleCover, jordan=False) S = FlowerSnark.stabilize(CircuitDoubleCover, jordan=False)
print("Done") print("Done")
......
...@@ -5,16 +5,13 @@ Derive a formula for the number of circuit double covers ...@@ -5,16 +5,13 @@ Derive a formula for the number of circuit double covers
of cyclic ladders and crossed cyclic ladders. of cyclic ladders and crossed cyclic ladders.
""" """
import sys, os import _experiment
sys.path.append(os.path.dirname(__file__) + "/..")
from graph_tools.all import * from graph_tools.all import *
L = CyclicLadder().stabilize(CircuitDoubleCover, jordan=True) L = CyclicLadder().stabilize(CircuitDoubleCover, jordan=True)
CL = CyclicLadder(True).stabilize(CircuitDoubleCover, jordan=True) CL = CyclicLadder(True).stabilize(CircuitDoubleCover, jordan=True)
if __name__ == "__main__": if __name__ == "__main__":
print(__doc__)
print("Cyclic ladders:\n Formula: %s\n Under the condition %s\n" % print("Cyclic ladders:\n Formula: %s\n Under the condition %s\n" %
(L["formula"], L["formula_if"])) (L["formula"], L["formula_if"]))
print("Crossed cyclic ladders:\n Formula: %s\n Under the condition %s" % print("Crossed cyclic ladders:\n Formula: %s\n Under the condition %s" %
......
...@@ -2,14 +2,12 @@ ...@@ -2,14 +2,12 @@
""" """
Application of Theorem 6.12 to triangles, 4-cycles (Theorem 6.13) 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 calculation so it is necessary to review the system of equations
by hand. (It is printed by the command-line parameter -v.) by hand. (It is printed by the command-line parameter -v.)
""" """
import sys, os import _experiment
sys.path.append(os.path.dirname(__file__) + "/..")
from graph_tools.base import * from graph_tools.base import *
from graph_tools.parameters import CircuitDoubleCover, VertexCount from graph_tools.parameters import CircuitDoubleCover, VertexCount
from graph_tools.misc import sun from graph_tools.misc import sun
......
...@@ -2,12 +2,10 @@ ...@@ -2,12 +2,10 @@
""" """
Calculate the number of circuit double covers for the Petersen Calculate the number of circuit double covers for the Petersen
graph a Blanusa snarks. graph and Blanusa snarks.
""" """
import sys, os import _experiment
sys.path.append(os.path.dirname(__file__) + "/..")
from graph_tools.all import * from graph_tools.all import *
from sage.all import graphs from sage.all import graphs
...@@ -18,7 +16,6 @@ L = { ...@@ -18,7 +16,6 @@ L = {
} }
if __name__ == "__main__": if __name__ == "__main__":
print(__doc__)
for n, g in L.items(): for n, g in L.items():
print("%s: %i" % (n, graph_to_gadget(g).eval(CircuitDoubleCover))) print("%s: %i" % (n, graph_to_gadget(g).eval(CircuitDoubleCover)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment