| RACSODFACFGOperations: Reg, CFPDAReductions: K, WP, CFG, NP, SATANTLR: lex, synExams | log in, register, become guest |
in: struct {
numnodes: int
edges: array of array [2] of int
adjacencymatrix: array of array of int
}
The input is a directed graph. The graph is given by means of three different
kinds of information: the number of nodes in.numnodes, the list of
directed edges in.edges, and the adjacency matrix
in.adjacencymatrix. The nodes are integers between and
in.numnodes, and thus, the ’th row and column of
in.adjacencymatrix do not contain useful data and should be ignored; for
any other row and column , in.adjacencymatrix[r][c] is when
there is no edge from the node to the node , and otherwise. An edge
of in.edges is an ordered pair of nodes, directed from the first node to
the second node.
out: struct {
edges: array of array [2] of string
nodes: array of string
}
The output is an undirected graph, which is described with the list of edges
out.edges and with the list of nodes out.nodes. An edge is a pair
of nodes, and each node is represented by either an integer or a string. The
list of nodes out.nodes is optional, and contains nodes of the graph,
that may or may not appear in the list of edges. This list of nodes could be
useful, for example, for including the nodes that are not connected to any
other node, if this is considered necessary.
|
|