Ask Your Question
0

How to find the graph(s) with a perfect matching from the following collection whose adjacency spectral radius is maximum?

asked 2025-08-05 20:20:34 +0200

anonymous user

Anonymous

for g in graphs.nauty_geng("8 -c"):
if g.size()==9:
    A=g.adjacency_matrix().eigenvalues()
    A.sort()
    g.show()
    show(A)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2025-08-06 10:44:00 +0200

This question is similar to https://ask.sagemath.org/question/832...

# Get list of connected graphs of order 8 and size 9 with a perfect matching
candidates = [g for g in graphs.nauty_geng("8 9:9 -c") if g.has_perfect_matching()]
# Compute the spectral radius
candidates = [(g.spectral_radius(), g) for g in candidates]
# Get the candidate graph with maximum spectral radius
max_radius, best_graph = max(candidates)
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2025-08-05 20:20:34 +0200

Seen: 1,405 times

Last updated: Aug 06