First time here? Check out the FAQ!

Ask Your Question
0

Connected non-bipartite graphs with a unique perfect matching having highest value of determinant

asked 0 years ago

rewi gravatar image

updated 0 years ago

Suppose we consider the class of connected non-bipartite graphs with a unique perfect matching with 10 vertices and 12 edges. Now from this collection, how one can obtain the graph(s) whose adjacency matrix has highest absolute value of its determinant?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 0 years ago

Max Alekseyev gravatar image

updated 0 years ago

The following code tells that the max absolute value of determinant is 9 and there are 4 such graphs achieving it:

maxdet = 0
res = []
for G in graphs.nauty_geng('-c 10 12'):
    if G.is_bipartite() or abs(G.matching_polynomial()[0])!=1:
        continue
    d = abs(G.adjacency_matrix().det())
    if d>maxdet:
        res = []
        maxdet = d
    if d==maxdet:
        res.append(G)
print('Max:',maxdet)
print('#graphs:', len(res))
Preview: (hide)
link

Comments

Thank you..

rewi gravatar imagerewi ( 0 years ago )

Can you please help me in displaying those graphs, maximizing the determinant?

rewi gravatar imagerewi ( 0 years ago )

Add something along these lines:

for G in res:
    G.show()

You can see them at Sagecell: https://sagecell.sagemath.org/?q=czfqjg

Max Alekseyev gravatar imageMax Alekseyev ( 0 years ago )

ok.But I need those graphs having a unique perfect matching.. see the question

rewi gravatar imagerewi ( 0 years ago )

They do have a unique perfect matching. In my code this is controlled by the requirement for G.matching_polynomial()[0] to be equal -1.

Max Alekseyev gravatar imageMax Alekseyev ( 0 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 0 years ago

Seen: 527 times

Last updated: May 23 '24