EVOLUTION-MANAGER
Edit File: max_cardinality.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Maximum cardinality search</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for max_cardinality {igraph}"><tr><td>max_cardinality {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Maximum cardinality search</h2> <h3>Description</h3> <p>Maximum cardinality search is a simple ordering a vertices that is useful in determining the chordality of a graph. </p> <h3>Usage</h3> <pre> max_cardinality(graph) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The input graph. It may be directed, but edge directions are ignored, as the algorithm is defined for undirected graphs.</p> </td></tr> </table> <h3>Details</h3> <p>Maximum cardinality search visits the vertices in such an order that every time the vertex with the most already visited neighbors is visited. Ties are broken randomly. </p> <p>The algorithm provides a simple basis for deciding whether a graph is chordal, see References below, and also <code><a href="is_chordal.html">is_chordal</a></code>. </p> <h3>Value</h3> <p>A list with two components: </p> <table summary="R valueblock"> <tr valign="top"><td><code>alpha</code></td> <td> <p>Numeric vector. The 1-based rank of each vertex in the graph such that the vertex with rank 1 is visited first, the vertex with rank 2 is visited second and so on.</p> </td></tr> <tr valign="top"><td><code>alpham1</code></td> <td> <p>Numeric vector. The inverse of <code>alpha</code>. In other words, the elements of this vector are the vertices in reverse maximum cardinality search order.</p> </td></tr> </table> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>References</h3> <p>Robert E Tarjan and Mihalis Yannakakis. (1984). Simple linear-time algorithms to test chordality of graphs, test acyclicity of hypergraphs, and selectively reduce acyclic hypergraphs. <em>SIAM Journal of Computation</em> 13, 566–579. </p> <h3>See Also</h3> <p><code><a href="is_chordal.html">is_chordal</a></code> </p> <h3>Examples</h3> <pre> ## The examples from the Tarjan-Yannakakis paper g1 <- graph_from_literal(A-B:C:I, B-A:C:D, C-A:B:E:H, D-B:E:F, E-C:D:F:H, F-D:E:G, G-F:H, H-C:E:G:I, I-A:H) max_cardinality(g1) is_chordal(g1, fillin=TRUE) g2 <- graph_from_literal(A-B:E, B-A:E:F:D, C-E:D:G, D-B:F:E:C:G, E-A:B:C:D:F, F-B:D:E, G-C:D:H:I, H-G:I:J, I-G:H:J, J-H:I) max_cardinality(g2) is_chordal(g2, fillin=TRUE) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>