Calculating permanents via Branch and Bound
Imported on
The forum classified this question as unanswered when collected. This does not certify an open research problem; check the answers and revision history at the source.
Read the question with its definitions and background below. The source provides the full formulation and further discussion; the glossary and Wikipedia links offer additional reading aids.
Problem statement
Permanents can be interpreted as counting directed cycle covers of an asymmetric graph with unit cost edge weights.
That interpretation leads to a branch and bound algorithm for calculating the permanent.
I observed that the execution time depends crucially on the order in which the adjacency lists are encountered during recursion, namely that the algorithm is fastest, if the adjacency lists are encountered according to ascending vertex-degrees and slowest if encountered according to descending vertex-degrees; the times were obtained via the following python program:
"""
@author: Manfred Weis
Branch and bound directed cycle covers
"""
import time
T0 = [
{1,2},
{2,3,4},
{3,4,5,6},
{4,5,6,7,8},
{5,6,7,8,9,10},
{6,7,8, 9,10,11,12},
{7,8, 9,10,11,12, 0, 1},
{8, 9,10,11,12, 0, 1, 2, 3},
{ 9,10,11,12, 0, 1, 2, 3, 4, 5},
{10,11,12, 0, 1, 2, 3, 4, 5, 6, 7},
{11,12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
{12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10},
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11}
]
T1 = [
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11},
{12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10},
{11,12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
{10,11,12, 0, 1, 2, 3, 4, 5, 6, 7},
{ 9,10,11,12, 0, 1, 2, 3, 4, 5},
{8, 9,10,11,12, 0, 1, 2, 3},
{7,8, 9,10,11,12, 0, 1},
{6,7,8, 9,10,11,12},
{5,6,7,8,9,10},
{4,5,6,7,8},
{3,4,5,6},
{2,3,4},
{1,2}
]
"""
r is the row index in the adjacency matrix
c is the adjacency list of vertex r
"""
def cycle_covers( G, r=0):
#iterate over the adjacency lists of G
global seen
global c
global perm
global cover
global cycle_covers
for c[r] in G[r]:
if seen[c[r]]:
# as cycle covers resemble a permutation we skip vertices that
# ware previously encountered
continue
# attach the newly encountered vertex to the permutation
cover[r] = c[r]
seen[c[r]] = True
if r == len(G)-1:
# print(cover)
perm += 1
else:
# enter recursion
cycle_covers(G,r+1)
seen[c[r]] = False # prepare for the next iteration
n=len(T0)
perm = 0
seen = [False]*n
cover = [0]*n
c = [0]*n
start = time.time()
cycle_covers(T0)
end = time.time()
print(f'ascending: {end - start}')
print(f'permanent = {perm}')
perm = 0
seen = [False]*n
cover = [0]*n
c = [0]*n
start = time.time()
cycle_covers(T1)
end = time.time()
print(f'descending: {end - start}')
print(f'permanent = {perm}')
which printed
ascending: 26.05
permanent = 2016788
descending: 233.97
permanent = 2016788
Questions:
how does the Branch and Bound calculation of the permanent compare to the calculation via Ryser's formula, i.e. how does the quotient of eexecution times grow as a function of ?
has the impact of ordering of the adjacency lists on the performance of Branch and Bound "exploration" of directed graphs been noticed before in the sense that it is
accounted for as a preprocessing step of combinatorial algorithms?
Statement and context adapted from MathOverflow · Manfred Weis
CC BY-SA 4.0 · Formatting adapted; mathematical formulas preserved · Source history
A few useful definitions
- Graph
- A set of vertices connected by edges. A vertex’s degree counts the incident edges; the statement specifies whether directions or multiple edges are allowed.
Sources and original status
- MathOverflow Status in source : unanswered at collection
Last activity on the question :
Coverage, sources and method
This count measures imported entries, including distinct variants. It is not a count of all open mathematical questions worldwide. One entry may belong to several fields and sources.
This directory is neither exhaustive nor updated in real time. “Reported open” describes the source classification observed at import; imported entries have not each undergone independent mathematical verification. The 32 explained entries were reviewed separately.
Formal Conjectures: only “research open” statements with no reported formal proof are retained; their tag is checked in a pinned repository revision. Variants remain distinct. A “sorry” placeholder is not sufficient to establish open status.
Erdős: solved or independent problems and entries with a Lean solution are excluded, including “open (Lean)”. Exact matches to the main Formal Conjectures statements are merged.
Open Problem Garden: the open index is checked against the solved index; spam, identified clones and some outdated statuses are excluded. Statements and definition context are attributed to their original pages; formulas are preserved and the content remains under the GFDL. Recognized duplicates across sources are merged; this does not resolve every mathematical equivalence.
OEIS: direct extraction of conjectural comments and formulas, one entry per sequence, excluding mentioned resolutions. MathOverflow and Math Stack Exchange: questions classified as unanswered by their API, excluding closed posts and non-research categories. They remain distinct from problems reported open. This is a partial, dated collection; every entry credits its authors and license.
Documented exclusions account for recent announcements and conflicting statuses. A stronger variant or a special case can remain open after a different statement is settled.
Attribution: The Formal Conjectures Authors; teorth/erdosproblems and contributors; Open Problem Garden and contributors. Each source retains its license.
- Formal Conjectures · 1,924 · Apache-2.0 / CC-BY-4.0
- Erdős Problems (teorth) · 622 · Apache-2.0
- Open Problem Garden · 404 · GFDL (source content); only title/category/link metadata imported
- OEIS · 18,857 · CC BY-SA 4.0
- MathOverflow · 19,035 · CC BY-SA (version on each entry)
- Mathematics Stack Exchange · 35 · CC BY-SA (version on each entry)