25
Views
2
CrossRef citations to date
0
Altmetric
Original Articles

Generation of binary trees from (0-1) codes

Pages 157-162 | Received 18 Feb 1991, Published online: 19 Mar 2007
 

Abstract

A Binary tree can be represented by a code reflecting the traversal of the corresponding regular binary tree in a given monotonic order. A different coding scheme based on the branches of a regular binary tree with n-nodes is proposed. It differs from the coding scheme generally used and makes no distinction between internal nodes and terminal nodes. A code of a regular binary tree with n-nodes is formed by labeling the left branches by 0's and the right branches by 1's and then traversing these branches in pre-order. Root is always assumed to be on a left branch. Different order of traversals yield different codes. An efficient nonrecursive Pascal program of 0(nlog2 n) time complexity using the backtracking approach is given to generate these codes in colexicographic order.

Reprints and Corporate Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

To request a reprint or corporate permissions for this article, please click on the relevant link below:

Academic Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

Obtain permissions instantly via Rightslink by clicking on the button below:

If you are unable to obtain permissions via Rightslink, please complete and submit this Permissions form. For more information, please visit our Permissions help page.