Skip to main content

An Improved Algorithm for Constructing Binary Trees Using the Traversal Sequences

  • Conference paper
  • First Online:
Bio-inspired Computing – Theories and Applications (BIC-TA 2016)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 682))

  • 1092 Accesses

Abstract

The present algorithm can not be applied to construct a binary tree by using the traversal sequences in which there are same elements. That is to say, the previous algorithms require there are not same elements in the binary tree. This paper designs an improved recursive algorithm to solve the problem. Based on the existing recursive algorithm, this algorithm introduces flag sequences for the traversal sequences. According to the relationship among the elements in the flag sequences, it is theoretically proved that there are three recursive algorithms that can construct binary trees from the traversal sequences. Simulation results show that the algorithm designed in this paper can construct binary trees through the traversal sequences in which there are same elements.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Yan, Y.M., Wu, W.M.: Data Structure. Tsinghua University Press, Beijing (1992)

    Google Scholar 

  2. Xiang, L.M., Lawi, A., Ushijima, K.: On constructing a binary tree from its traversals. Res. Rep. Inf. Sci. Electr. Eng. Kyushu Univ. 5(1), 13–18 (2000)

    Google Scholar 

  3. Mikinen, E.: Constructing a binary tree efficiently from its traversals. Int. J. Comput. Math. 75, 143–147 (2000)

    Article  MathSciNet  Google Scholar 

  4. Tang, Z.L.: Algorithm of constructing tree based on ergodic sequence. J. Suzhou Univ. Nat. Sci. Ed. 27, 26–29 (2011)

    Google Scholar 

  5. Tang, Z.L.: An efficient algorithm for constructing a strict binary tree based on the preorder traversal sequence and the left child of the node. J. Nantong Univ. Nat. Sci. Ed. 3, 9–13 (2013)

    Google Scholar 

  6. Tang, Z.L.: A non recursive algorithm for constructing a strict binary tree by the parents of the nodes and the postorder traversal sequence. J. Nantong Vocat. Coll. 12, 93–98 (2014)

    Google Scholar 

  7. Lu, L.: A non recursive algorithm for constructing a binary tree by the traversal sequences. J. Hengshui Univ. 8, 37–40 (2009)

    Google Scholar 

  8. Wang, F.X., Zhou, K.: Establishment of the binary tree based on the sort binary tree. J. Wuhan Polytechnic Univ. 9, 53–57 (2013)

    Google Scholar 

  9. Li, L.S.: An algorithm using the traversal sequences to construct a binary tree. J. Radio TV Univ. 3, 53–54 (2010)

    Google Scholar 

  10. Zhao, G., Li, K.: Using the traversal sequences to determine the binary tree. J. Nanchang Univ. Aeronaut. Astronaut. 24, 55–59 (2013)

    Google Scholar 

  11. Zhu, T.: Reconstruction analysis of the binary tree based on the traversal sequences. J. Honghe Univ. 4, 27–30 (2013)

    Google Scholar 

  12. Hua, Z.Z.: A new method and proof for recovery of the binary tree based on the traversal sequences. J. Jiangxi Normal Univ. 5, 268–272 (2013)

    Google Scholar 

Download references

Acknowledgments

This project was supported by National Natural Science Foundation of China (Grant No. 61179032), the Special Scientific Research Fund of Food Public Welfare Profession of China(Grant No. 201513004-3) and the Research and Practice Project of Graduate Education Teaching Reform of Wuhan Polytechnic University (YZ2015002).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kang Zhou .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer Nature Singapore Pte Ltd.

About this paper

Cite this paper

Wang, F., Zhou, K., Qi, H., Song, B. (2016). An Improved Algorithm for Constructing Binary Trees Using the Traversal Sequences. In: Gong, M., Pan, L., Song, T., Zhang, G. (eds) Bio-inspired Computing – Theories and Applications. BIC-TA 2016. Communications in Computer and Information Science, vol 682. Springer, Singapore. https://doi.org/10.1007/978-981-10-3614-9_59

Download citation

  • DOI: https://doi.org/10.1007/978-981-10-3614-9_59

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-10-3613-2

  • Online ISBN: 978-981-10-3614-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics