EVOLUTION-MANAGER
Edit File: to_prufer.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: Convert a tree graph to its Prufer sequence</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 to_prufer {igraph}"><tr><td>to_prufer {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Convert a tree graph to its Prufer sequence</h2> <h3>Description</h3> <p><code>to_prufer</code> converts a tree graph into its Prufer sequence. </p> <h3>Usage</h3> <pre> to_prufer(graph) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph to convert to a Prufer sequence</p> </td></tr> </table> <h3>Details</h3> <p>The Prufer sequence of a tree graph with n labeled vertices is a sequence of n-2 numbers, constructed as follows. If the graph has more than two vertices, find a vertex with degree one, remove it from the tree and add the label of the vertex that it was connected to to the sequence. Repeat until there are only two vertices in the remaining graph. </p> <h3>Value</h3> <p>The Prufer sequence of the graph, represented as a numeric vector of vertex IDs in the sequence. </p> <h3>See Also</h3> <p><code><a href="make_from_prufer.html">make_from_prufer</a></code> to construct a graph from its Prufer sequence </p> <h3>Examples</h3> <pre> g <- make_tree(13, 3) to_prufer(g) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>