# acyclic(1) [opensolaris man page]

ACYCLIC(1) General Commands Manual ACYCLIC(1)NAME

acyclic - make directed graph acyclicSYNOPSIS

acyclic [ -nv? ] [outfile ] [ file ]-oDESCRIPTION

acyclic is a filter that takes a directed graph as input and outputs a copy of the graph with sufficient edges reversed to make the graph acyclic. The reversed edge inherits all of the attributes of the original edge. The optional file argument specifies where the the input graph is stored; by default, the program reads from stdin.OPTIONS

The following options are supported:No output is produced, though the return value will indicate whether the graph is acyclic or not.-nPrint information about whether the file is acyclic, has a cycle or is undirected.-voutfile causes the output to be written to the specified file; by default, output is written to stdout. -? option causes the program to print usage information.-oRETURN CODES

acyclic returns 0 if the graph is acyclic; 1 if the graph has a cycle; 2 if the graph is undirected; and 255 if there are any errors.BUGS

If the graph is strict and there is a cycle of length 2, the attributes of the reversed edge are lost. Some edge attributes are non-symmetric, referring to either the head or tail node. At present, there is no mechanism or convention for cor- rectly switching or renaming these.AUTHORS

Stephen C. North <north@research.att.com> Emden R. Gansner <erg@research.att.com>SEE ALSO

gc(1), dot(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1), libgraph(3) 21 March 2001 ACYCLIC(1)

## Check Out this Related Man Page

GC(1) General Commands Manual GC(1)NAME

gvgen - generate graphsSYNOPSIS

gvgen [ -d? ] [] [-cn,y ] [ -g[f]x,y ] [ -G[f]x,y ] [-Cx] [-hn] [-kn,y ] [-bx] [-pn] [-sn] [-Sn] [-tn,y ] [-Tx] [-wn]-ooutfileDESCRIPTION

gvgen generates a variety of simple, regularly-structured abstract graphs.OPTIONS

The following options are supported:n Generate a cycle with n vertices and edges.-cx,y Generate an x by y cylinder. This will have x*y vertices and 2*x*y - y edges.-C[f]x,y Generate an x by y grid. If f is given, the grid is folded, with an edge attaching each pair of opposing corner vertices. This will have x*y vertices and 2*x*y - y - x edges if unfolded and 2*x*y - y - x + 2 edges if folded.-g[f]x,y Generate an x by y partial grid. If f is given, the grid is folded, with an edge attaching each pair of opposing corner vertices. This will have x*y vertices.-Gn Generate a hypercube of degree n. This will have 2^n vertices and n*2^(n-1) edges.-hn Generate a complete graph on n vertices with n*(n-1)/2 edges.-kx,y Generate a complete x by y bipartite graph. This will have x+y vertices and x*y edges.-bn Generate a path on n vertices. This will have n-1 edges.-pn Generate a star on n vertices. This will have n-1 edges.-sn Generate a Sierpinski graph of order n. This will have 3*(3^(n-1) - 1)/2 vertices and 3^n edges.-Sn Generate a binary tree of height n. This will have 2^n-1 vertices and 2^n-2 edges.-tx,y Generate an x by y torus. This will have x*y vertices and 2*x*y edges.-Tn Generate a path on n vertices. This will have n-1 edges.-woutfile If specified, the generated graph is written into the file outfile. Otherwise, the graph is written to standard out.-oMake the generated graph directed. -? Print usage information.-dEXIT STATUS

gvgen exits with 0 on successful completion, and exits with 1 if given an ill-formed or incorrect flag, or if the specified output file could not be opened.AUTHOR

Emden R. Gansner <erg@research.att.com>SEE ALSO

gc(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1), libgraph(3) 27 March 2008 GC(1)