Skip to main content
Log in

An Efficient Algorithm for Generating Prüfer Codes from Labelled Trees

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

    We’re sorry, something doesn't seem to be working properly.

    Please try refreshing the page. If that doesn't work, please contact support so we can address the problem.

Abstract.

According to Cayley's tree formula, there are n n-2 labelled trees on n vertices. Prüfer gave a bijection between the set of labelled trees on n vertices and sequences of n-2 numbers, each in the range 1, 2, ..., n . Such a number sequence is called a Prüfer code. The straightforward implementation of his bijection takes O(n log n ) time. In this paper we propose an O(n) time algorithm for the same problem. Our algorithm can be easily parallelized so that a Prüfer code can be generated in O (log n ) time using O(n) processors on the EREW PRAM computational model.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Author information

Authors and Affiliations

Authors

Additional information

Received October 2, 1998, and in final form March 1, 1999.

Rights and permissions

Reprints and permissions

About this article

Cite this article

-C. Chen, H., -L. Wang, Y. An Efficient Algorithm for Generating Prüfer Codes from Labelled Trees. Theory Comput. Systems 33, 97–105 (2000). https://doi.org/10.1007/s002249910006

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s002249910006

Keywords

Navigation