Graph Theory : Laudari Sudip

1872 days ago by bigdata2016

 
       
 
       

I tried to find out a graph G. Where vertices are given below. 

G=Graph({1:[3,4],3:[5,1,4,2],5:[2,1]}); G.show() 
       

Adjacency matrix of graph G 

G=Graph({1:[3,4],3:[5,1,4,2],5:[2,1]}); A=G.adjacency_matrix() 
       
 
       
[0 0 1 1 1]
[0 0 1 0 1]
[1 1 0 1 1]
[1 0 1 0 0]
[1 1 1 0 0]
[0 0 1 1 1]
[0 0 1 0 1]
[1 1 0 1 1]
[1 0 1 0 0]
[1 1 1 0 0]

EIgenvalues of A.

ie. Eigenvalues of graph G

A.eigenvalues() 
       
[-1.618033988749895?, 0.618033988749895?, -1.472833908995256?,
-0.4625984229747743?, 2.935432331970030?]
[-1.618033988749895?, 0.618033988749895?, -1.472833908995256?, -0.4625984229747743?, 2.935432331970030?]