1GVGEN(1) General Commands Manual GVGEN(1)
2
3
4
6 gvgen - generate graphs
7
9 gvgen [ -dV? ] [ -in ] [ -cn ] [ -Cx,y ] [ -g[f]x,y ] [ -G[f]x,y ] [
10 -hn ] [ -kn ] [ -bx,y ] [ -Bx,y ] [ -mn ] [ -Mx,y ] [ -pn ] [ -rx,y ] [
11 -Rx ] [ -sn ] [ -Sn ] [ -tn ] [ -td,n ] [ -Tx,y ] [ -Tx,y,u,v ] [ -wn ]
12 [ -nprefix ] [ -Nname ] [ -ooutfile ]
13
15 gvgen generates a variety of simple, regularly-structured abstract
16 graphs.
17
19 The following options are supported:
20
21 -c n Generate a cycle with n vertices and edges.
22
23 -C x,y Generate an x by y cylinder. This will have x*y vertices and
24 2*x*y - y edges.
25
26 -g [f]x,y
27 Generate an x by y grid. If f is given, the grid is folded,
28 with an edge attaching each pair of opposing corner vertices.
29 This will have x*y vertices and 2*x*y - y - x edges if unfolded
30 and 2*x*y - y - x + 2 edges if folded.
31
32 -G [f]x,y
33 Generate an x by y partial grid. If f is given, the grid is
34 folded, with an edge attaching each pair of opposing corner ver‐
35 tices. This will have x*y vertices.
36
37 -h n Generate a hypercube of degree n. This will have 2^n vertices
38 and n*2^(n-1) edges.
39
40 -k n Generate a complete graph on n vertices with n*(n-1)/2 edges.
41
42 -b x,y Generate a complete x by y bipartite graph. This will have x+y
43 vertices and x*y edges.
44
45 -B x,y Generate an x by y ball, i.e., an x by y cylinder with two "cap"
46 nodes closing the ends. This will have x*y + 2 vertices and
47 2*x*y + y edges.
48
49 -m n Generate a triangular mesh with n vertices on a side. This will
50 have (n+1)*n/2 vertices and 3*(n-1)*n/2 edges.
51
52 -M x,y Generate an x by y Moebius strip. This will have x*y vertices
53 and 2*x*y - y edges.
54
55 -p n Generate a path on n vertices. This will have n-1 edges.
56
57 -r x,y Generate a random graph. The number of vertices will be the
58 largest value of the form 2^n-1 less than or equal to x. Larger
59 values of y increase the density of the graph.
60
61 -R x Generate a random rooted tree on x vertices.
62
63 -s n Generate a star on n vertices. This will have n-1 edges.
64
65 -S n Generate a Sierpinski graph of order n. This will have
66 3*(3^(n-1) - 1)/2 vertices and 3^n edges.
67
68 -t n Generate a binary tree of height n. This will have 2^n-1 ver‐
69 tices and 2^n-2 edges.
70
71 -t h,n Generate a n-ary tree of height h.
72
73 -T x,y
74
75 -T x,y,u,v
76 Generate an x by y torus. This will have x*y vertices and 2*x*y
77 edges. If u and v are given, they specify twists of that amount
78 in the horizontal and vertical directions, respectively.
79
80 -w n Generate a path on n vertices. This will have n-1 edges.
81
82 -i n Generate n graphs of the requested type. At present, only avail‐
83 able if the -R flag is used.
84
85 -n prefix
86 Normally, integers are used as node names. If prefix is speci‐
87 fied, this will be prepended to the integer to create the name.
88
89 -N name
90 Use name as the name of the graph. By default, the graph is
91 anonymous.
92
93 -o outfile
94 If specified, the generated graph is written into the file out‐
95 file. Otherwise, the graph is written to standard out.
96
97 -d Make the generated graph directed.
98
99 -V Verbose output.
100
101 -? Print usage information.
102
104 gvgen exits with 0 on successful completion, and exits with 1 if given
105 an ill-formed or incorrect flag, or if the specified output file could
106 not be opened.
107
109 Emden R. Gansner <erg@research.att.com>
110
112 gc(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1),
113 libgraph(3)
114
115
116
117 5 June 2012 GVGEN(1)