Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Views: 103
Image: ubuntu2004
Kernel: SageMath 9.8
for n in range(3, 9): for m in range(n, n+1): L=list(graphs(n, size=m)) C=[] for g in L: if g.is_connected(): C.append(g) print('(n, m)=(', n,',', m, ') ') D=[] max=0 for g in C: E=g.edges() sum=0 for e in E: sum=sum+(1/(g.degree(e[0]))^2+1/(g.degree(e[1]))^2)^(1/2) if max<sum: max=sum D=[];D.append(g) else: if max==sum: D.append(g) print('maximum value=',max) print('All the extremal (',n,',',m,')-graphs with maximum BSO are') graphs_list.show_graphs(D)
(n, m)=( 3 , 3 ) maximum value= 3*sqrt(1/2) All the extremal ( 3 , 3 )-graphs with maximum BSO are
/tmp/ipykernel_1003/2545000740.py:12: DeprecationWarning: parameter 'sort' will be set to False by default in the future See https://trac.sagemath.org/27408 for details. E=g.edges()
Image in a Jupyter notebook
(n, m)=( 4 , 4 ) maximum value= 1/3*sqrt(13) + 1/3*sqrt(10) + sqrt(1/2) All the extremal ( 4 , 4 )-graphs with maximum BSO are
Image in a Jupyter notebook
(n, m)=( 5 , 5 ) maximum value= 1/2*sqrt(17) + 1/2*sqrt(5) + sqrt(1/2) All the extremal ( 5 , 5 )-graphs with maximum BSO are
Image in a Jupyter notebook
(n, m)=( 6 , 6 ) maximum value= 1/5*sqrt(29) + 3/5*sqrt(26) + sqrt(1/2) All the extremal ( 6 , 6 )-graphs with maximum BSO are
Image in a Jupyter notebook
(n, m)=( 7 , 7 ) maximum value= 2/3*sqrt(37) + 2/3*sqrt(5/2) + sqrt(1/2) All the extremal ( 7 , 7 )-graphs with maximum BSO are
Image in a Jupyter notebook
(n, m)=( 8 , 8 ) maximum value= 1/7*sqrt(53) + 25/7*sqrt(2) + sqrt(1/2) All the extremal ( 8 , 8 )-graphs with maximum BSO are
Image in a Jupyter notebook