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 ] [ -Sn,d ] [ -tn ] [ -td,n ] [ -Tx,y ] [ -Tx,y,u,v
12 ] [ -wn ] [ -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 -S n,d Generate a d-dimensional Sierpinski graph of order n. At
69 present, d must be 2 or 3. For d equal to 3, there will be
70 4*(4^(n-1) + 1)/2 vertices and 6 * 4^(n-1) edges.
71
72 -t n Generate a binary tree of height n. This will have 2^n-1 ver‐
73 tices and 2^n-2 edges.
74
75 -t h,n Generate a n-ary tree of height h.
76
77 -T x,y
78
79 -T x,y,u,v
80 Generate an x by y torus. This will have x*y vertices and 2*x*y
81 edges. If u and v are given, they specify twists of that amount
82 in the horizontal and vertical directions, respectively.
83
84 -w n Generate a path on n vertices. This will have n-1 edges.
85
86 -i n Generate n graphs of the requested type. At present, only avail‐
87 able if the -R flag is used.
88
89 -n prefix
90 Normally, integers are used as node names. If prefix is speci‐
91 fied, this will be prepended to the integer to create the name.
92
93 -N name
94 Use name as the name of the graph. By default, the graph is
95 anonymous.
96
97 -o outfile
98 If specified, the generated graph is written into the file out‐
99 file. Otherwise, the graph is written to standard out.
100
101 -d Make the generated graph directed.
102
103 -v Verbose output.
104
105 -? Print usage information.
106
108 gvgen exits with 0 on successful completion, and exits with 1 if given
109 an ill-formed or incorrect flag, or if the specified output file could
110 not be opened.
111
113 Emden R. Gansner <erg@research.att.com>
114
116 gc(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1),
117 libgraph(3)
118
119
120
121 5 June 2012 GVGEN(1)