Two algorithms for maintaining order in a list
STOC '87 Proceedings of the nineteenth annual ACM symposium on Theory of computing
Making data structures persistent
Journal of Computer and System Sciences - 18th Annual ACM Symposium on Theory of Computing (STOC), May 28-30, 1986
Purely functional data structures
Purely functional data structures
Adaptive set intersections, unions, and differences
SODA '00 Proceedings of the eleventh annual ACM-SIAM symposium on Discrete algorithms
Making data structures confluently persistent
SODA '01 Proceedings of the twelfth annual ACM-SIAM symposium on Discrete algorithms
Two Simplified Algorithms for Maintaining Order in a List
ESA '02 Proceedings of the 10th Annual European Symposium on Algorithms
Confluently Persistent Tries for Efficient Version Control
Algorithmica - Special Issue: Scandinavian Workshop on Algorithm Theory; Guest Editor: Joachim Gudmundsson
Hi-index | 0.00 |
We consider the problem of merging individual text documents, motivated by the single-file merge algorithms of document-based version control systems. Abstracting away the merging of conflicting edits to an external conflict resolution function (possibly implemented by a human), we consider the efficient identification of conflicting regions. We show how to implement tree-based document representation to quickly answer a data structure inspired by the "blame" query of some version control systems. A "blame" query associates every line of a document with the revision in which it was last edited. Our tree uses this idea to quickly identify conflicting edits. We show how to perform a merge operation in time proportional to the sum of the logarithms of the shared regions of the documents, plus the cost of conflict resolution. Our data structure is functional and therefore confluently persistent, allowing arbitrary version DAGs as in real version-control systems. Our results rely on concurrent traversal of two trees with short circuiting when shared subtrees are encountered.