Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question
1

coefficient of smallest power of x in the adjacency characteristic polynomial of g is 1

asked 3 years ago

anonymous user

Anonymous

updated 3 years ago

slelievre gravatar image

This shows connected graphs on 7 vertices with nonsingular adjacency matrix.

for g in graphs.nauty_geng('7 -c'):
    if g.adjacency_matrix().determinant() == 0:
        t = g.adjacency_matrix().charpoly()
        g.show()
        print(t)

Using the above code, how we can obtain only those graphs (if any) satisfying the following property: coefficient of smallest power of x in the adjacency characteristic polynomial of g is 1.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 3 years ago

Max Alekseyev gravatar image

Just add if t[t.ord()] == 1: before g.show()

Preview: (hide)
link

Comments

Nice..thanks

rewi gravatar imagerewi ( 3 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

1 follower

Stats

Asked: 3 years ago

Seen: 179 times

Last updated: Feb 07 '22