Skip to main content

Complexity issues in tree-based version control

  • Conference paper
  • First Online:
Algorithms and Data Structures (WADS 1989)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 382))

Included in the following conference series:

Abstract

Version control systems are designed to allow the efficient storage of and access to multiple versions of programs. In many systems, a few versions are stored in their entirety as lines of text and the remaining versions are stored as differences between versions, recorded as modifications, additions, and removals of lines. Since the structure underlying most programs is not a list of lines, but instead a tree, it makes sense to consider storing programs as trees. We introduce a natural model for version control of program trees. We present a polynomial time algorithm that takes as input two trees and produces a difference that requires the smallest amount of space to store. However, if we store programs as directed acyclic graphs (DAGs) the problem of determining such a difference is NP-complete. Another problem of interest is that of computing, for an arbitrary pair of versions, a difference between versions such that the amount of time needed to reconstruct the second version from the first version is the least possible. We show this problem to be NP-complete for both trees and DAGs.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Richard M. Karp, “On the Complexity of Combinatorial Problems,” Networks, 5, pp. 45–68, 1975.

    Google Scholar 

  2. Naomi Nishimura, “Complexity Issues In Tree-Based Version Control,” Technical Report 212/88, Master's Thesis, University of Toronto, 1988.

    Google Scholar 

  3. Marc J. Rochkind, “The Source Code Control System,” IEEE Transactions on Software Engineering SE-1, pp. 364–370, 1975.

    Google Scholar 

  4. James A. Storer and Thomas G. Szymanski, “Data Compression via Textual Substitution,” Journal of the Association for Computing Machinery 29, 4, pp. 928–951, October 1982.

    Google Scholar 

  5. Kuo-Chung Tai, “The Tree-to-Tree Correction Problem,” Journal of the Association for Computing Machinery 26, 3, pp. 422–433, July 1979.

    Google Scholar 

  6. Walter Tichy, “Design, Implementation, Evaluation of a Revision Control System,” Proceedings of the 6th International Conference on Software Engineering, pp. 58–67, 1982.

    Google Scholar 

  7. Walter Tichy, “The String-to-String Correction Problem with Block Moves,” ACM Transactions on Computer Systems 2, 4, pp. 309–321, November 1984.

    Google Scholar 

  8. R. A. Wagner, “On the Complexity of the Extended String-to-String Correction Problem,” Proceedings of the Seventh Annual ACM Symposium on Theory of Computing, pp. 218–223, 1975.

    Google Scholar 

  9. R. A. Wagner and M. J. Fischer, “The String-to-String Correction Problem,” Journal of the Association for Computing Machinery 21, pp. 168–173, 1974.

    Google Scholar 

  10. Wilhelm, “A Modified Tree-to-Tree Correction Problem,” Information Processing Letters 12, 3, pp. 127–132, 1981.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

F. Dehne J. -R. Sack N. Santoro

Rights and permissions

Reprints and permissions

Copyright information

© 1989 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nishimura, N. (1989). Complexity issues in tree-based version control. In: Dehne, F., Sack, J.R., Santoro, N. (eds) Algorithms and Data Structures. WADS 1989. Lecture Notes in Computer Science, vol 382. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-51542-9_39

Download citation

  • DOI: https://doi.org/10.1007/3-540-51542-9_39

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-51542-5

  • Online ISBN: 978-3-540-48237-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics