I am doing a program in C on graph theory. So I need an idea with which i can generate random graphs which are mostlyhighly disconnected. Can anyone give me any idea please?

Printable View

- 06-08-2008anirbanGenerate Disconnected Graph in C
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? - 06-08-2008Salem
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). - 06-08-2008anirban
Oh thanks! Nice idea let me try! Will ask here if I get struck! Thanks a lot!

- 06-08-2008Perspective
Create N nodes and 0 edges. That's the most disconnected you can get.