Distance matrix cospectrality & verification of examples (or lack thereof)

1354 days ago by reinh196

###Defining the distance matrix### def Dist(G): n=G.order() M=zero_matrix(QQ,n,n) for i in range(n): for j in range(i+1,n): x=G.distance(i,j) M[i,j]=x M[j,i]=x return M 
       
# Definition of transmission sequence def trs(G): n=G.order() ones = ones_matrix(n,1) dg=G.distance_matrix() trg=vector(dg*ones) trgs=trg.list() trgs.sort() return trgs # Checks if a graph is transmission regular def IsTrsReg(G): unique_list_t=[] trans=list(trs(G)) for y in trans: if y not in unique_list_t: unique_list_t.append(y) if len(unique_list_t)==1: return True else: return False 
       
#### COSPECTRALITY ##### 
       
### Distance cospectral mates on 7 vertices L7=[] for G in graphs.cospectral_graphs(7, matrix_function=Dist, graphs=lambda g: g.is_connected()): L7.append([i.graph6_string() for i in G]) L7 
       
[['FnlkG', 'F~LKg'],
 ['F|UL?', 'FlVKG'],
 ['FzLNW', 'F~L[g'],
 ['FnLKg', 'FlkNG'],
 ['FlKlG', 'FpJ^?'],
 ['FhmL?', 'FxeK_'],
 ['Fl[KW', 'FlMkG'],
 ['F|^[g', 'F|\\lg'],
 ['Fx}L?', 'F|mK_'],
 ['FllkG', 'F|LLG'],
 ['F|NkG', 'Fl{MW']]
[['FnlkG', 'F~LKg'],
 ['F|UL?', 'FlVKG'],
 ['FzLNW', 'F~L[g'],
 ['FnLKg', 'FlkNG'],
 ['FlKlG', 'FpJ^?'],
 ['FhmL?', 'FxeK_'],
 ['Fl[KW', 'FlMkG'],
 ['F|^[g', 'F|\\lg'],
 ['Fx}L?', 'F|mK_'],
 ['FllkG', 'F|LLG'],
 ['F|NkG', 'Fl{MW']]
### Distance cospectral mates on 8 vertices L8=[] for G in graphs.cospectral_graphs(8, matrix_function=Dist, graphs=lambda g: g.is_connected()): L8.append([i.graph6_string() for i in G]) L8 
       
WARNING: Output truncated!  
full_output.txt



[['Gj\\nvg', 'GbT~~g'],
 ['Gv\\\\[s', 'GzX\\}c'],
 ['Gvx|Ro', 'GztmRk'],
 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\x?', 'GfS{x?'],
 ['GjIlvG', 'GvoX|C'],
 ['Gb[kTW', 'GrcW{S'],
 ['G~{k|k', 'G~X]^s'],
 ['GvwlT?', 'GzklPC'],
 ['GbTnvK', 'GrSk^{'],
 ['GbwkvO', 'GvpW{C'],
 ['Grsk\\K', 'GjSl\\K'],
 ['GrGmv?', 'GrPmpG'],
 ['GzolTG', 'GvQ\\[C'],
 ['GzDlTO', 'GrqW{c'],
 ['GnakDC', 'GhmND?'],
 ['GbckvO', 'GbEkVo'],
 ['Gre{TG', 'Grs[{C'],
 ['GbR}\\G', 'Gb}kRo'],
 ['G~EkRo', 'Gr\\W{c'],
 ['GzPmR_', 'GvSW{c'],
 ['GzTnTG', 'GvyW[k'],
 ['GfZ}|G', 'GzSn^K'],
 ['Gf@kz_', 'Grc}DO'],
 ['GjQmtG', 'GbS{VK'],
 ['GzGkv?', 'GrS[{C']]
WARNING: Output truncated!  
full_output.txt



[['Gj\\nvg', 'GbT~~g'],
 ['Gv\\\\[s', 'GzX\\}c'],
 ['Gvx|Ro', 'GztmRk'],
 ['Gl]N@?', 'GtUn@?'],
 ['GvI[P?', 'GfA|P?'],
 ['Gj@m\\G', 'GvO[{C'],
 ['GbwkV?', 'GfakTO'],
 ['GzclTG', 'GvoX{C'],
 ['Gjml@C', 'GjslPC'],
 ['GzSlVG', 'Gr]kV_'],
 ['GjolTG', 'GrPlpG'],
 ['GjlkT?', 'GzOlpG'],
 ['Gr_kP?', 'GdEMD?'],
 ['GrzX[c', 'GzZX[c'],
 ['Gne{TG', 'GvsY[S'],
 ['GzQkTO', 'G|Ul@O'],
 ['GbD~|O', 'GfonvO'],
 ['GrxW{c', 'GvW[[k'],
 ['Gn`lR_', 'GjekRo'],
 ['Gr]{V?', 'GrwW\\s'],
 ['GfF|tW', 'Gr|X[s'],
 ['GnEkTG', 'GrO[{S'],
 ['GbWmv?', 'Glc}DO'],
 ['Gv_LtW', 'GvC}Do'],
 ['Gvx[{c', 'Gr|[[s'],
 ['G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zokTG', 'GvQ[[C'],
 ['GbtmR?', 'GjYkR_'],
 ['Gz[m^K', 'Gvz[\\c'],
 ['GvYLH?', 'GvXkH?'],
 ['Gvq{VO', 'Gr}kV_'],
 ['GjWkv?', 'GzcmR?'],
 ['Gf]|TG', 'GvZ[[c'],
 ['GfK{VO', 'GrO\\|C'],
 ['GjxlR?', 'GzInR?'],
 ['GzWmv?', 'GrPnxG'],
 ['GzQkR?', 'G|Ql@O'],
 ['Gb{{VW', 'GbS{V{', 'GzmkRo'],
 ['G~e{VG', 'GbT{V{', 'Gj||R_'],
 ['GjOntG', 'Gjk{TG'],
 ['Grk{VG', 'GbSk^['],
 ['G~OlT?', 'GrcKT['],
 ['Gba{V?', 'GjokTG'],
 ['GfNkP?', 'GvFLP?'],
 ['GvQktG', 'GfMkV_'],
 ['GzDltO', 'GrU{VO'],
 ['GrZ\\pG', 'GrW^[c'],
 ['GjT}DO', 'GrT[{C'],
 ['GfWlTO', 'GbWlv?'],
 ['GzOlTG', 'Gro[{C'],
 ['Gf?nz_', 'GnwkR_'],
 ['GbF\\x?', 'GfS{x?'],
 ['GjIlvG', 'GvoX|C'],
 ['Gb[kTW', 'GrcW{S'],
 ['G~{k|k', 'G~X]^s'],
 ['GvwlT?', 'GzklPC'],
 ['GbTnvK', 'GrSk^{'],
 ['GbwkvO', 'GvpW{C'],
 ['Grsk\\K', 'GjSl\\K'],
 ['GrGmv?', 'GrPmpG'],
 ['GzolTG', 'GvQ\\[C'],
 ['GzDlTO', 'GrqW{c'],
 ['GnakDC', 'GhmND?'],
 ['GbckvO', 'GbEkVo'],
 ['Gre{TG', 'Grs[{C'],
 ['GbR}\\G', 'Gb}kRo'],
 ['G~EkRo', 'Gr\\W{c'],
 ['GzPmR_', 'GvSW{c'],
 ['GzTnTG', 'GvyW[k'],
 ['GfZ}|G', 'GzSn^K'],
 ['Gf@kz_', 'Grc}DO'],
 ['GjQmtG', 'GbS{VK'],
 ['GzGkv?', 'GrS[{C']]
### Distance cospectral mates on 9 vertices L9=[] for G in graphs.cospectral_graphs(9, matrix_function=Dist, graphs=lambda g: g.is_connected()): L9.append([i.graph6_string() for i in G]) L9 
       
WARNING: Output truncated!  
full_output.txt



[['HlS}IeR', 'HlKmhFJ'],
 ['HlSimVb', 'HnCinEj'],
 ['HlThyFB', 'HlkmLEJ'],
 ['Hhn~LU?', 'HlyNxm?'],
 ['H~MyKMH', 'Hjoi}eR'],
 ['HntigN_', 'HvLWtn?'],
 ['HjCm[Em', 'Hjc]KFi'],
 ['Hzt\\[u?', 'Hjunku?'],
 ['Hjc[kMo', 'Hh]KLUW'],
 ['HlTwNMb', 'H|diHFj'],
 ['HhdkHEj', 'HhdiHEj'],
 ['H|t{^EB', 'H|TJxUx', 'Hnxk{fS'],
 ['HnFjKfN', 'HnFmHfZ'],
 ['HjCLK]g', 'HlcJHMc'],
 ['HjewK]l', 'Hltk{EY'],
 ['H|{kyVR', 'Hlf}^eH'],
 ['HjUgkmO', 'HlKNKUg'],
 ['H|knwEH', 'HhtIZVJ'],
 ['HlkMkEg', 'H|Sh{EO'],
 ['Hnk[]EO', 'H|Ik]ES'],
 ['HjkmKMi', 'Hhej]Ew'],
 ['H~SkjUZ', 'HlTi}Uf'],
 ['Hzcn[Ek', 'HldigF^'],
 ['Hhe}{Ew', 'HhugNNX'],
 ['HhSgKFV', 'HlShLU@'],
 ['H|ShJUz', 'HlTgmFv'],
 ['HjVGNmW', 'HjfwMMg'],
 ['H|fiH]L', 'H|fINUL'],
 ['Hl{gjeB', 'HlshjeB'],
 ['HhcjKEz', 'HxdWLmB'],
 ['HzmHkEG', 'H|FGLMH'],
 ['Hhki{EW', 'H|DwHEL', 'HhdI\\UB'],
 ['HjkILFW', 'HldXKEw'],
 ['HjCM[Ni', 'HrKYeEy'],
 ['HlSwkmS', 'HlI^MEa'],
 ['HlunheJ', 'HnEyjEn'],
 ['H|SngF\\', 'HlCijfn'],
 ['Hle|KF_', 'HzE[KmP'],
 ['HlkjzEH', 'HhlnJEJ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ING: Output truncated!  
full_output.txt



[['HlS}IeR', 'HlKmhFJ'],
 ['HlSimVb', 'HnCinEj'],
 ['HlThyFB', 'HlkmLEJ'],
 ['Hhn~LU?', 'HlyNxm?'],
 ['H~MyKMH', 'Hjoi}eR'],
 ['HntigN_', 'HvLWtn?'],
 ['HjCm[Em', 'Hjc]KFi'],
 ['Hzt\\[u?', 'Hjunku?'],
 ['Hjc[kMo', 'Hh]KLUW'],
 ['HlTwNMb', 'H|diHFj'],
 ['HhdkHEj', 'HhdiHEj'],
 ['H|t{^EB', 'H|TJxUx', 'Hnxk{fS'],
 ['HnFjKfN', 'HnFmHfZ'],
 ['HjCLK]g', 'HlcJHMc'],
 ['HjewK]l', 'Hltk{EY'],
 ['H|{kyVR', 'Hlf}^eH'],
 ['HjUgkmO', 'HlKNKUg'],
 ['H|knwEH', 'HhtIZVJ'],
 ['HlkMkEg', 'H|Sh{EO'],
 ['Hnk[]EO', 'H|Ik]ES'],
 ['HjkmKMi', 'Hhej]Ew'],
 ['H~SkjUZ', 'HlTi}Uf'],
 ['Hzcn[Ek', 'HldigF^'],
 ['Hhe}{Ew', 'HhugNNX'],
 ['HhSgKFV', 'HlShLU@'],
 ['H|ShJUz', 'HlTgmFv'],
 ['HjVGNmW', 'HjfwMMg'],
 ['H|fiH]L', 'H|fINUL'],
 ['Hl{gjeB', 'HlshjeB'],
 ['HhcjKEz', 'HxdWLmB'],
 ['HzmHkEG', 'H|FGLMH'],
 ['Hhki{EW', 'H|DwHEL', 'HhdI\\UB'],
 ['HjkILFW', 'HldXKEw'],
 ['HjCM[Ni', 'HrKYeEy'],
 ['HlSwkmS', 'HlI^MEa'],
 ['HlunheJ', 'HnEyjEn'],
 ['H|SngF\\', 'HlCijfn'],
 ['Hle|KF_', 'HzE[KmP'],
 ['HlkjzEH', 'HhlnJEJ'],
 ['Hntw~EB', 'Hlxw{fs'],
 ['HhK|{EW', 'HhKW}}O'],
 ['H|UhIUv', 'HlvwZeB'],
 ['Hjcl[U_', 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['HxCmNE]', 'HhCnnE['],
 ['HjKg~U?', 'HjSymU?'],
 ['H|cjGEZ', 'HjtGZeB'],
 ['H||IXEJ', 'Hh{W}uo'],
 ['HxSL[UW', 'HlcJ[Ug'],
 ['HnkI}m?', 'HnxNgm?'],
 ['H|lmXUz', 'H|\\MxUz', 'Hn|mxUh'],
 ['HnShjEV', 'H|Li\\MH'],
 ['HnviHe~', 'HnuyJe^', 'Hl}~LE\\'],
 ['Hjcl[E_', 'H|og{EO'],
 ['H|{n^EJ', 'H~knXEz'],
 ['H|SknUR', 'HnKiLf\\'],
 ['HnUGL}\\', 'H||{hf?'],
 ['H~UwI}R', 'H|\\JHUz'],
 ['H|lM|uZ', 'H|zn[f['],
 ['H|uj~Er', 'HlVzjfZ'],
 ['HlSiZEj', 'HlSjheJ'],
 ['Hjg]}eO', 'HjwY}eO'],
 ['H|~kKEU', 'HxK~{Ew'],
 ['H~TYNuX', 'H~{jXFJ'],
 ['Hj{jKEX', 'H|swNEB', 'HndyHMH', 'HnWw[fS'],
 ['Hhk{[U_', 'HxGh^ES'],
 ['H~{nH]L', 'Hz||Hef'],
 ['H|fmlEL', 'H|cmn]H'],
 ['HlVg}Vr', 'H|dmh^h'],
 ['Hx{hMUQ', 'HlKi\\]H'],
 ['H|SL{EW', 'H|U{[EO'],
 ['HnK[KEi', 'HltHgN_'],
 ['H|mN|Eg', 'H|f{LmD'],
 ['HxYg[uO', 'HnGYMEq'],
 ['Hx{gkU?', 'H~IXoM?'],
 ['HhKjWU?', 'HhKGb}?'],
 ['HllIJfH', 'Hl|IHmH'],
 ['HhJloFo', 'HhJgwFq'],
 ['HnC~jFj', 'H~om|eR'],
 ['H||ikEu', 'H|SlJVr'],
 ['HxkH{UW', 'Hxe|KEg', 'Hzg~KE_'],
 ['HxeJW]?', 'HngWkm?']]
### To find cospectral graphs on 10 vertices, first sort the graphs in to groups of potentially cospectral graphs Num1 = 545 Num2 = 5279 Num_Vertices = 10 L = [] for i in range(Num2): L.append([i,[]]) for G in graphs(Num_Vertices): if G.is_connected(): a=Dist(G).charpoly()(Num1) b=mod(a, Num2) L[b][1].append(G.graph6_string()) 
       
### Checking within each group for sets with similar characteristic polynomial evaluated at a prime N=[] for i in range(Num2): K=[] M=[] for j in range(len(L[i][1])): a=Dist(Graph(L[i][1][j])).charpoly()(167) K.append([L[i][1][j],a]) for i in range(len(K)): A=[K[i][0]] for j in range(i+1,len(K)): if K[i][1]-K[j][1]==0: A.append(K[j][0]) if len(A)>1: N.append(A) 
       
### Checking each of these sets for cospectrality. This is our set of cospectral graphs on 10 vertices L10=[] for i in range(len(N)): K=[] M=[] for j in range(len(N[i])): a=Dist(Graph(N[i][j])).charpoly() K.append([N[i][j],a]) for i in range(len(K)): A=[K[i][0]] for j in range(i+1,len(K)): if K[i][1]-K[j][1]==0: A.append(K[j][0]) if len(A)>1: L10.append(A) 
       
##### GIRTH ####### 
       
### Finds cospectral graphs with different girth, no results on 7 for x in L7: unique_list = [] girths=[] for y in x: girths.append(Graph(y).girth()) for y in girths: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: print x print unique_list 
       
### Finds cospectral graphs with different girth, no results on 8 for x in L8: unique_list = [] girths=[] for y in x: girths.append(Graph(y).girth()) for y in girths: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: print x print unique_list 
       
### Finds cospectral graphs with different girth for x in L9: unique_list = [] girths=[] for y in x: girths.append(Graph(y).girth()) for y in girths: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: print x print unique_list 
       
['HlDHKUG', 'HlDHGEJ']
[4, 3]
['HlDHKUG', 'HlDHGEJ']
[4, 3]
A1=Graph('HlDHKUG') A2=Graph('HlDHGEJ') 
       
A1 
       
A2 
       
A1.girth() 
       
4
4
A2.girth() 
       
3
3
### Checks the graphs are cospectral Dist(A1).charpoly()-Dist(A2).charpoly() 
       
0
0
Dist(A1).charpoly() 
       
x^9 - 112*x^7 - 758*x^6 - 1994*x^5 - 2010*x^4 + 184*x^3 + 1262*x^2 +
193*x - 222
x^9 - 112*x^7 - 758*x^6 - 1994*x^5 - 2010*x^4 + 184*x^3 + 1262*x^2 + 193*x - 222
#### PLANARITY, DEGREE SEQUENCE, TRANSMISSION SEQUENCE, AND NUMBER OF CONNECTED COMPONENTS OF THE COMPLEMENT 
       
### Finds cospectral graphs with where one is planar and one is not for x in L7: unique_list = [] planar=[] for y in x: planar.append(Graph(y).is_planar()) for y in planar: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: print x print unique_list 
       
['FnlkG', 'F~LKg']
[True, False]
['FzLNW', 'F~L[g']
[True, False]
['F|^[g', 'F|\\lg']
[True, False]
['FllkG', 'F|LLG']
[True, False]
['FnlkG', 'F~LKg']
[True, False]
['FzLNW', 'F~L[g']
[True, False]
['F|^[g', 'F|\\lg']
[True, False]
['FllkG', 'F|LLG']
[True, False]
### Finds cospectral graphs with different transmission sequences for x in L7: unique_list=[] transseq=[] for y in x: transseq.append(trs(Graph(y))) for y in transseq: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: print x print unique_list 
       
['FnlkG', 'F~LKg']
[[8, 8, 8, 8, 8, 8, 10], [7, 8, 8, 8, 9, 9, 9]]
['F|UL?', 'FlVKG']
[[7, 8, 9, 9, 10, 10, 11], [8, 8, 8, 9, 9, 11, 11]]
['FzLNW', 'F~L[g']
[[7, 7, 7, 8, 9, 9, 9], [6, 8, 8, 8, 8, 9, 9]]
['FnLKg', 'FlkNG']
[[7, 8, 9, 9, 9, 9, 9], [8, 8, 8, 8, 9, 9, 10]]
['FlKlG', 'FpJ^?']
[[7, 9, 9, 9, 9, 9, 10], [8, 8, 8, 9, 9, 10, 10]]
['FhmL?', 'FxeK_']
[[8, 8, 8, 10, 10, 10, 10], [7, 9, 9, 9, 10, 10, 10]]
['Fl[KW', 'FlMkG']
[[7, 9, 9, 9, 9, 9, 10], [8, 8, 8, 9, 9, 10, 10]]
['F|^[g', 'F|\\lg']
[[7, 7, 7, 8, 8, 8, 9], [6, 8, 8, 8, 8, 8, 8]]
['Fx}L?', 'F|mK_']
[[7, 7, 7, 9, 10, 10, 10], [6, 8, 8, 8, 10, 10, 10]]
['FllkG', 'F|LLG']
[[8, 8, 8, 8, 9, 9, 10], [7, 8, 9, 9, 9, 9, 9]]
['F|NkG', 'Fl{MW']
[[7, 7, 7, 9, 9, 9, 10], [6, 8, 8, 8, 9, 9, 10]]
['FnlkG', 'F~LKg']
[[8, 8, 8, 8, 8, 8, 10], [7, 8, 8, 8, 9, 9, 9]]
['F|UL?', 'FlVKG']
[[7, 8, 9, 9, 10, 10, 11], [8, 8, 8, 9, 9, 11, 11]]
['FzLNW', 'F~L[g']
[[7, 7, 7, 8, 9, 9, 9], [6, 8, 8, 8, 8, 9, 9]]
['FnLKg', 'FlkNG']
[[7, 8, 9, 9, 9, 9, 9], [8, 8, 8, 8, 9, 9, 10]]
['FlKlG', 'FpJ^?']
[[7, 9, 9, 9, 9, 9, 10], [8, 8, 8, 9, 9, 10, 10]]
['FhmL?', 'FxeK_']
[[8, 8, 8, 10, 10, 10, 10], [7, 9, 9, 9, 10, 10, 10]]
['Fl[KW', 'FlMkG']
[[7, 9, 9, 9, 9, 9, 10], [8, 8, 8, 9, 9, 10, 10]]
['F|^[g', 'F|\\lg']
[[7, 7, 7, 8, 8, 8, 9], [6, 8, 8, 8, 8, 8, 8]]
['Fx}L?', 'F|mK_']
[[7, 7, 7, 9, 10, 10, 10], [6, 8, 8, 8, 10, 10, 10]]
['FllkG', 'F|LLG']
[[8, 8, 8, 8, 9, 9, 10], [7, 8, 9, 9, 9, 9, 9]]
['F|NkG', 'Fl{MW']
[[7, 7, 7, 9, 9, 9, 10], [6, 8, 8, 8, 9, 9, 10]]
### Finds cospectral graphs with different degree sequences for x in L7: unique_list=[] degseq=[] for y in x: degseq.append(Graph(y).degree_sequence()) for y in degseq: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: print x print unique_list 
       
['FnlkG', 'F~LKg']
[[4, 4, 4, 4, 4, 4, 2], [5, 4, 4, 4, 3, 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 2], [4, 4, 4, 3, 3, 2, 2]]
['F|^[g', 'F|\\lg']
[[5, 5, 5, 4, 4, 4, 3], [6, 4, 4, 4, 4, 4, 4]]
['Fx}L?', 'F|mK_']
[[5, 5, 5, 3, 2, 2, 2], [6, 4, 4, 4, 2, 2, 2]]
['FllkG', 'F|LLG']
[[4, 4, 4, 4, 3, 3, 2], [5, 4, 3, 3, 3, 3, 3]]
['F|NkG', 'Fl{MW']
[[5, 5, 5, 3, 3, 3, 2], [6, 4, 4, 4, 3, 3, 2]]
### Finds cospectral graphs with a different number of complement connected components for x in L7: unique_list = [] components=[] for y in x: Gbar=Graph(y).complement() components.append(Gbar.connected_components_number()) for y in components: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: print x print unique_list 
       
['FzLNW', 'F~L[g']
[1, 2]
['F|^[g', 'F|\\lg']
[1, 2]
['Fx}L?', 'F|mK_']
[1, 2]
['F|NkG', 'Fl{MW']
[1, 2]
['FzLNW', 'F~L[g']
[1, 2]
['F|^[g', 'F|\\lg']
[1, 2]
['Fx}L?', 'F|mK_']
[1, 2]
['F|NkG', 'Fl{MW']
[1, 2]
### This pair of graphs has all four properties B1=Graph('F|^[g') B2=Graph('F|\\lg') 
       
B1 
       
B2 
       
B1.complement() 
       
B2.complement() 
       
trs(B1) 
       
[7, 7, 7, 8, 8, 8, 9]
[7, 7, 7, 8, 8, 8, 9]
trs(B2) 
       
[6, 8, 8, 8, 8, 8, 8]
[6, 8, 8, 8, 8, 8, 8]
B1.degree_sequence() 
       
[5, 5, 5, 4, 4, 4, 3]
[5, 5, 5, 4, 4, 4, 3]
B2.degree_sequence() 
       
[6, 4, 4, 4, 4, 4, 4]
[6, 4, 4, 4, 4, 4, 4]
B1.is_planar() 
       
True
True
B2.is_planar() 
       
False
False
### Checks the graphs are cospectral Dist(B1).charpoly()-Dist(B2).charpoly() 
       
Dist(B1).charpoly() 
       
x^7 - 39*x^5 - 142*x^4 - 180*x^3 - 72*x^2
x^7 - 39*x^5 - 142*x^4 - 180*x^3 - 72*x^2
#### TRANSMISSION REGULARITY (evidence of no example on <=10 vertices) 
       
### Finds cospectral graphs with different transmission sequence, no results on 7 for x in L7: unique_list=[] transseq=[] for y in x: transseq.append(trs(Graph(y))) for y in transseq: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: for y in x: if IsTrsReg(Graph(y))==True: print x print unique_list 
       
### Finds cospectral graphs with different transmission sequence, no results on 8 for x in L8: unique_list=[] transseq=[] for y in x: transseq.append(trs(Graph(y))) for y in transseq: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: for y in x: if IsTrsReg(Graph(y))==True: print x print unique_list 
       
### Finds cospectral graphs with different transmission sequence, no results on 9 for x in L9: unique_list=[] transseq=[] for y in x: transseq.append(trs(Graph(y))) for y in transseq: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: for y in x: if IsTrsReg(Graph(y))==True: print x print unique_list 
       
### Finds cospectral graphs with different transmission sequence, no results on 10 for x in L10: unique_list=[] transseq=[] for y in x: transseq.append(trs(Graph(y))) for y in transseq: if y not in unique_list: unique_list.append(y) if len(unique_list)>1: for y in x: if IsTrsReg(Graph(y))==True: print x print unique_list