Mar-14-2017, 04:10 PM
I am trying to a graph that consists of 100 vertices obtained by starting with 50 isolated vertices and a complete subgraph of 50 vertices (K50) and connecting each isolated vertex to all vertices in K50. This is what I have so far.
Any help would be appreciated, thanks!
K50=nx.complete_graph(50) K50.add_nodes_from(range(50,100)) nx.draw(K50)I cannot figure out how to connect the isolated vertices to those in the subgraph. I have tried many things but can't seem to figure out, I thought it should be along the lines of
K50.add_edges_from([(range(0,50),range(50,100))]I have also tried
e=zip(range(0,50),range(50,100)) K5.add_edges_from(e)but this only connects one vertex from the subgraph to each isolated vertex not 50.
Any help would be appreciated, thanks!