Implementing Binary Search Trees in GP 2 (Extended Abstract)
Ziad Ismaili Alaoui (Department of Computer Science, University of Liverpool, Liverpool, United Kingdom), Detlef Plump (Department of Computer Science, University of York, York, United Kingdom)

TL;DR
This paper introduces a method to implement binary search trees in the rule-based graph language GP 2, achieving comparable theoretical time complexities to traditional implementations.
Contribution
It demonstrates how to implement binary search trees in GP 2 using graph transformation rules, with analysis of their efficiency and performance.
Findings
Operations have worst-case runtime of O(n).
Expected average runtime is O(log n).
Implementation matches imperative binary search tree performance.
Abstract
We present an approach to implement binary search trees in the rule-based graph programming language GP 2. Our implementation uses GP 2's rooted graph transformation rules to be fast and supports insertion, deletion and query operations. We argue that the worst-case runtime for each of the operations is O(n) for a tree with n nodes. In addition, we expect that, on average, the operations run in time O(log(n)). Hence the implementation would match the time complexity of binary search trees implementations in imperative languages.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsGraph Theory and Algorithms · Model-Driven Software Engineering Techniques · Semantic Web and Ontologies
