maximally irregular

133 days ago by Buyan

n=5 L=list(graphs(n)) R=[] for g in L: if g.is_connected() and g.degree_sequence()[n-1]==1: w=0 for i in range(1,n): if g.degree_sequence()[i-1]-g.degree_sequence()[i]<2: w=w+1 if w==n-1: R.append(g) print 'R has been constructed' 
       
R has been constructed
R has been constructed
D=[] d=[] max=0 min=100000 for g in R: E=g.edges() sum=0 for e in E: sum=sum+abs(g.degree(e[0])-g.degree(e[1])) if max<sum: max=sum D=[];D.append(g) else: if max==sum: D.append(g) if min>sum: min=sum d=[];d.append(g) else: if min==sum: d.append(g) print max graphs_list.show_graphs(D) print min graphs_list.show_graphs(d) 
       
10
2
10
2

n=6 L=list(graphs(n)) R=[] for g in L: if g.is_connected() and g.degree_sequence()[n-1]==1: w=0 for i in range(1,n): if g.degree_sequence()[i-1]-g.degree_sequence()[i]<2: w=w+1 if w==n-1: R.append(g) print 'R has been constructed' 
       
R has been constructed
R has been constructed
D=[] d=[] max=0 min=100000 for g in R: E=g.edges() sum=0 for e in E: sum=sum+abs(g.degree(e[0])-g.degree(e[1])) if max<sum: max=sum D=[];D.append(g) else: if max==sum: D.append(g) if min>sum: min=sum d=[];d.append(g) else: if min==sum: d.append(g) print max graphs_list.show_graphs(D) print min graphs_list.show_graphs(d) 
       
16
2
16
2

n=7 L=list(graphs(n)) R=[] for g in L: if g.is_connected() and g.degree_sequence()[n-1]==1: w=0 for i in range(1,n): if g.degree_sequence()[i-1]-g.degree_sequence()[i]<2: w=w+1 if w==n-1: R.append(g) print 'R has been constructed' 
       
R has been constructed
R has been constructed
D=[] d=[] max=0 min=100000 for g in R: E=g.edges() sum=0 for e in E: sum=sum+abs(g.degree(e[0])-g.degree(e[1])) if max<sum: max=sum D=[];D.append(g) else: if max==sum: D.append(g) if min>sum: min=sum d=[];d.append(g) else: if min==sum: d.append(g) print max graphs_list.show_graphs(D) print min graphs_list.show_graphs(d) 
       
28
2
28
2

n=8 L=list(graphs(n)) R=[] for g in L: if g.is_connected() and g.degree_sequence()[n-1]==1: w=0 for i in range(1,n): if g.degree_sequence()[i-1]-g.degree_sequence()[i]<2: w=w+1 if w==n-1: R.append(g) print 'R has been constructed' 
       
R has been constructed
R has been constructed
D=[] d=[] max=0 min=100000 for g in R: E=g.edges() sum=0 for e in E: sum=sum+abs(g.degree(e[0])-g.degree(e[1])) if max<sum: max=sum D=[];D.append(g) else: if max==sum: D.append(g) if min>sum: min=sum d=[];d.append(g) else: if min==sum: d.append(g) print max graphs_list.show_graphs(D) print min graphs_list.show_graphs(d) 
       
40
2
40
2

n=9 L=list(graphs(n)) R=[] for g in L: if g.is_connected() and g.degree_sequence()[n-1]==1: w=0 for i in range(1,n): if g.degree_sequence()[i-1]-g.degree_sequence()[i]<2: w=w+1 if w==n-1: R.append(g) print 'R has been constructed' 
       
R has been constructed
R has been constructed
D=[] d=[] max=0 min=100000 for g in R: E=g.edges() sum=0 for e in E: sum=sum+abs(g.degree(e[0])-g.degree(e[1])) if max<sum: max=sum D=[];D.append(g) else: if max==sum: D.append(g) if min>sum: min=sum d=[];d.append(g) else: if min==sum: d.append(g) print max graphs_list.show_graphs(D) print min graphs_list.show_graphs(d) 
       
60
2
60
2