Implementing Binary Search Trees in GP 2 (Extended Abstract)

📅 2026-01-07
🏛️ Electronic Proceedings in Theoretical Computer Science
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the efficient implementation of fundamental binary search tree operations in the graph programming language GP 2. By designing graph programs based on root-preserving graph transformation rules, the authors present the first GP 2 implementation supporting insertion, deletion, and search operations on binary search trees. The approach achieves a worst-case time complexity of O(n) and an expected average-case complexity of O(log n), matching the performance of equivalent implementations in conventional imperative languages. This work not only demonstrates the feasibility of realizing efficient data structures in GP 2 but also extends the applicability of graph transformation-based programming to practical algorithm engineering.

Technology Category

Application Category

📝 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.
Problem

Research questions and friction points this paper is trying to address.

Binary Search Trees
Graph Programming
GP 2
Time Complexity
Graph Transformation
Innovation

Methods, ideas, or system contributions that make the work stand out.

binary search trees
graph programming
GP 2
rooted graph transformation
time complexity
🔎 Similar Papers
No similar papers found.