Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdc-counting
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Radek Hušek
cdc-counting
Commits
d06360dc
Commit
d06360dc
authored
3 years ago
by
Radek Hušek
Browse files
Options
Downloads
Patches
Plain Diff
experiments/cdc_?-boundaries
parent
edac6251
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
experiments/cdc_4-boudaries.py
+20
-1
20 additions, 1 deletion
experiments/cdc_4-boudaries.py
experiments/cdc_5-boudaries.py
+42
-0
42 additions, 0 deletions
experiments/cdc_5-boudaries.py
with
62 additions
and
1 deletion
experiments/cdc_4-boudaries.py
+
20
−
1
View file @
d06360dc
...
@@ -21,8 +21,27 @@ LadderGadget = lambda k: CyclicLadder().gadget(k)
...
@@ -21,8 +21,27 @@ 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
)
for
l
in
ladders
for
p
in
permutations
([
2
,
3
,
4
])
]
for
l
in
ladders
for
p
in
permutations
([
2
,
3
,
4
])
]
M
=
parameter_matrix
(
CircuitDoubleCover
,
gadgets
)
M
=
parameter_matrix
(
CircuitDoubleCover
,
gadgets
)
pivot_rows
=
M
.
pivot_rows
()
gadgets
=
[
gadgets
[
i
]
for
i
in
pivot_rows
]
MM
=
parameter_matrix
(
CircuitDoubleCover
,
gadgets
)
B
,
J
=
edge_model_join_matrix
(
CircuitDoubleCover
,
4
,
boundaries
=
True
)
p
=
J
.
pivot_rows
()
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
print
(
"
Matrix of size %i with rank %i
"
%
(
M
.
nrows
(),
M
.
rank
()))
print
(
"
Circuit double covers -- 4-boundaries:
"
)
print
(
"
Lower bound: Matrix of size %i with rank %i
"
%
(
M
.
nrows
(),
len
(
pivot_rows
)))
print
(
"
Pivot rows: %s
"
%
(
pivot_rows
,))
print
(
"
Rank of reduced matrix: %i
"
%
(
MM
.
rank
(),))
print
(
"
Upper bound: Join matrix of size %i with rank %i
"
%
(
J
.
nrows
(),
J
.
rank
()))
print
(
"
Pivot rows: %s
"
%
(
p
,))
print
(
"
Idependent boundaries:
"
)
for
i
in
p
:
print
(
"
%s
"
%
(
B
[
i
],))
print
(
"
\n
Unused boundaries:
"
)
for
i
in
range
(
J
.
nrows
()):
if
i
not
in
p
:
print
(
"
%s
"
%
(
B
[
i
],))
This diff is collapsed.
Click to expand it.
experiments/cdc_5-boudaries.py
0 → 100755
+
42
−
0
View file @
d06360dc
#!/usr/bin/python
"""
Calculate a lower bound on 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.
"""
import
sys
,
os
sys
.
path
.
append
(
os
.
path
.
dirname
(
__file__
)
+
"
/..
"
)
from
itertools
import
permutations
from
graph_tools.all
import
*
def
LadderGadget
(
k
):
g
=
CyclicLadder
().
gadget
(
k
)
return
Gadget
.
join
([
g
,
CUBIC_VERTEX
],
[((
1
,
1
),
(
2
,
1
))],
[(
2
,
2
),
(
2
,
3
),
(
1
,
2
),
(
1
,
3
),
(
1
,
4
)])
ladders
=
list
(
map
(
LadderGadget
,
range
(
2
,
8
)))
gadgets
=
[
l
.
permute
((
1
,)
+
p
)
for
l
in
ladders
for
p
in
permutations
([
2
,
3
,
4
,
5
])
]
+
[
l
.
permute
((
3
,)
+
p
)
for
l
in
ladders
for
p
in
permutations
([
1
,
2
,
4
,
5
])
]
+
[
l
.
permute
((
4
,)
+
p
)
for
l
in
ladders
for
p
in
permutations
([
1
,
2
,
3
,
5
])
]
+
[
l
.
permute
((
5
,)
+
p
)
for
l
in
ladders
for
p
in
permutations
([
1
,
2
,
3
,
4
])
]
M
=
parameter_matrix
(
CircuitDoubleCover
,
gadgets
,
threads
=
None
)
pivot_rows
=
M
.
pivot_rows
()
J
=
edge_model_join_matrix
(
CircuitDoubleCover
,
5
,
threads
=
None
)
if
__name__
==
"
__main__
"
:
print
(
"
Circuit double covers -- 5-boundaries:
"
)
print
(
"
Matrix of size %i with rank %i
"
%
(
M
.
nrows
(),
M
.
rank
()))
print
(
"
Pivot rows: %s
"
%
(
pivot_rows
,))
print
(
"
Upper bound: Join matrix of size %i with rank %i
"
%
(
J
.
nrows
(),
J
.
rank
()))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment