Archived from: http://archive.dimacs.rutgers.edu/pub/challenge/graph/contributed/morgenstern/morgenstern1/ggen/ ggen is a simple graph generator to construct some known types of graphs, including random graphs, K-partite graphs, Leighton graphs, and geometric graphs. Graphs are dumped to a specified file in DIMACS format. ============================================================================= Interactive usage: ggen graph_output_file.col ggen will prompt to stdout for the type of graph and other parameters, construct the graph, and then dump it to the specified file in DIMACS format. Here's a sample run: % ggen g.col graph choices are : 0. G(n,p) 1. G(k,n,p) 2. Leighton 3. U(n,d) graph choice number: 3 graph gen seed : 1234 number of vertices : 100 max number of edges: 10000 Euclidean distance : 0.25 complement? [0/1] : 0 sparse(0)/dense(1) : 1 % more g.col c c U(n,d) graph c graph gen seed : 1234 c number of vertices : 100 c max number of edges: 10000 c Euclidean distance : 0.250000 c data structure : dense c c Graph Stats c number of vertices : 100 c number of edges : 714 c edge density : 0.144242 c max degree : 26 c avg degree : 14.28 c min degree : 5 p col 100 714 e 1 5 e 1 12 e 1 16 ... ============================================================================= Batch usage: ggen graph_parameter_file graph_output_file.col ggen will read the graph generation parameters from the given input file without prompting, construct the graph, and then dump it to the specified output file in DIMACS format. A sample run: % ggen ../Leighton_in/450_25d L.col % more L.col c c Leighton graph c data structure : sparse c graph gen seed : 274955 c number of vertices : 450 c max number of edges: 50000 c number of classes : 25 c a c m : 8401 6859 420175 c clique vector : clique sz num cliques c --------- ----------- c 2 3118 c 7 94 c 16 63 c 25 31 c Leighton's proof : 25 coloring c c Graph Stats c number of vertices : 450 c number of edges : 17425 c edge density : 0.172482 c max degree : 157 c avg degree : 77.44 c min degree : 11 p col 450 17425 e 1 342 e 1 287 e 1 278 ...