I am doing a program in C on graph theory. So I need an idea with which i can generate random graphs which are mostly highly disconnected. Can anyone give me any idea please?
Printable View
I am doing a program in C on graph theory. So I need an idea with which i can generate random graphs which are mostly highly disconnected. Can anyone give me any idea please?
Create N nodes and log2(N) paths between random pairs of nodes.
Eg, if N = 256, then log2(N) will be 8 (that's going to be pretty well disconnected).
Oh thanks! Nice idea let me try! Will ask here if I get struck! Thanks a lot!
Create N nodes and 0 edges. That's the most disconnected you can get.