Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How one can get a tree with exactly a given degree sequence and a given set of edges?

I tried for the following graph but in the resultant graph edge set changes.

G = graphs.DegreeSequenceTree([1,2,3,1,3,1,3,1,1]) G.edges(labels=False) [(6,1),(1,5),(5,0),(5,3),(3,2),(3,8),(8,4),(8,7)] G.show()