Skip to main content
Log in

Storage representations for tree-like data structures

  • Published:
Mathematical systems theory Aims and scope Submit manuscript

Abstract

Adata encoding is a formal counterpart of the “translation of a logical data structure into a physical storage structure". In this paper, both kinds of structures are represented by graphs; and an encoding is a type of embedding of the guest (logical structure) graph in the host (physical structure) graph. Thecost of an encoding is the average amount that the edges of the guest graph are stretched as they are replaced by paths in the host graph via the encoding; this “average” is weighted by an assignment of probabilities to the edges of the guest graph (called ausage pattern) that weights the edges according to their anticipated frequencies of traversals.

This paper continues the study begun in [13] of encodings of data structures in the leaves of complete trees. The major thrust of the paper is to show that tree-hosts do not accommodate tree-like guests as congenially as they do array-like guests. Specifically, we study two encodings of tree-guests in tree-hosts, and three usage patterns for the guests. One of these usage patterns can be accommodated with cost independent of the size of the guest by one of the encodings but not by the other; the second usage pattern engenders the complementary situation; and the third usage pattern resists size-independent cost not only on the part of the two encodings studied here but also on the part ofany encoding of trees into trees. We do, however, find a third encoding of trees in trees whose cost relative to this intransigent usage pattern is exponentially smaller than the costs of our two encodings and is, in fact, optimal in rate of growth.

Motivated by the demonstrated weaknesses of trees as hosts in data encodings, we introduce a new tree-like storage structure called adree; and we show that drees are quite congenial hosts for array-like and tree-like (and dree-like) guests.

Throughout the paper, demonstrations of size-independence in the costs of encodings are accompanied by proofs of the (asympotic) near-optimality of the attained costs.

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.

Institutional subscriptions

Similar content being viewed by others

References

  1. R. A. DeMillo, S. C. Eisenstat, and R. J. Lipton, Preserving average proximity in arrays.C.ACM 21, 228–231 (1978).

    Google Scholar 

  2. R. A. DeMillo, S. C. Eisenstat, and R. J. Lipton, On small universal data structures and related combinatorial problems.Proc. Johns Hopkins Conf. on Inf. Sci. and Syst., pp. 408–411, 1978.

  3. C. C. Gotlieb and F. W. Tompa, Choosing a storage schema.Acta Inform. 3, 297–319 (1974).

    Google Scholar 

  4. L. H. Harper, Optimal assignments of numbers to vertices.J. Soc. Ind. Appl. Math. 12, 131–135 (1964).

    Google Scholar 

  5. L. H. Harper, Optimal numberings and isoperimetric problems.J. Comb. Th. 1, 385–393 (1966).

    Google Scholar 

  6. M. A. Iordansk'ii, Minimalnye numeratsii vershin derevyev (in Russian).Problemy Kibernetiki 31, 109–132 (1976).

    Google Scholar 

  7. D. E. Knuth,The Art of Computer Programming I: Fundamental Algorithms, Addison-Wesley, Reading, MA, 1968.

    Google Scholar 

  8. R. J. Lipton, S. C. Eisenstat, and R. A. DeMillo, Space and time hierarchies for classes of control structures and data structures.J. ACM 23, 720–732 (1976).

    Google Scholar 

  9. R. J. Lipton and R. E. Tarjan, A separator theorem for planar graphs.Proc. U. Waterloo Conf. on Theoretical Comp. Sci., pp. 1–10, 1977.

  10. R. J. Lipton and R. E. Tarjan, Applications of a planar separator theorem.Proc. 18th Ann. Symp. on Found. of Comp. Sci., pp. 162–170, 1977.

  11. A. L. Rosenberg, Preserving proximity in arrays.SIAM J. Comput. 4, 443–460 (1975).

    Google Scholar 

  12. A. L. Rosenberg, Data encodings and their costs.Acta Inform. 9, 273–292 (1978).

    Google Scholar 

  13. A. L. Rosenberg, Encoding data structures in trees.J. ACM, to appear; see alsoProc. Johns Hopkins Conf. on Inf. Sci. and Syst., pp. 380–384, 1978.

  14. A. L. Rosenberg and L. Snyder, Bounds on the costs of data encodings.Math. Syst. Th. 12, 9–39 (1978).

    Google Scholar 

  15. A. L. Rosenberg, L. Snyder, and L. J. Stockmeyer, Uniform data encodings.Theor. Comp. Sci., to appear; see alsoProc. Johns Hopkins Conf. on Inf. Sci. and Syst., pp. 412–417, 1978.

  16. P. Scheuermann and J. Heller, A view of logical data organization and its mapping to physical storage.Proc. 3rd Texas Conf. on Comp. Syst., 1974.

  17. M. A. Sheidvasser, O dline i shirine razmeshchenii grafov v reshetkakh (in Russian).Problemy Kibernetiki 29, 63–102 (1974).

    Google Scholar 

  18. T. A. Standish, Data structures-an axiomatic approach. Cap. 3 inCurrent Trends in Programming Methodology IV: Data Structuring (R. T. Yeh, ed.), Prentice-Hall, Englewood Cliffs, NJ, 1978.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

The research of this author was supported in part by the Natural Sciences and Engineering Research Council of Canada under Grant A-7700.

The research of this author was done while he was visiting the Mathematical Sciences Department of the IBM Research Center.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Rosenberg, A.L., Wood, D. & Galil, Z. Storage representations for tree-like data structures. Math. Systems Theory 13, 105–130 (1979). https://doi.org/10.1007/BF01744292

Download citation

  • Received:

  • Revised:

  • Issue Date:

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

Keywords

Navigation