Prüfer Sequence ↔ Tree
Convert between a labeled tree and its Prüfer sequence, a unique encoding of length n−2. It demonstrates Cayley's formula (nⁿ⁻² labeled trees) and is used to generate random trees. Converts both ways.
Resultado
—
Sequência de Prüfer
A sequência de Prüfer codifica uma árvore rotulada de n vértices como uma lista de n−2 números, e essa correspondência é uma bijeção. Ela é a prova construtiva da fórmula de Cayley, segundo a qual existem exatamente nⁿ⁻² árvores rotuladas distintas. É usada para gerar árvores aleatórias uniformemente e para contar estruturas em combinatória.
Related Tools
PDF to Images
Convert PDF pages to individual PNG images. Everything in your browser via pdf.js.
Pixel Art Converter
Convert an image to pixel art by reducing resolution and color palette. Stylized retro output.
Currency Converter
Convert between major currencies (USD, EUR, BRL, GBP, JPY, ARS) using live rates from open.er-api.com.