Implementing Binary Search Trees in GP 2 (Extended Abstract)
By: Ziad Ismaili Alaoui, Detlef Plump
Potential Business Impact:
Makes computer searches faster, like finding a word in a book.
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.
Similar Papers
Rule-Based Graph Programs Matching the Time Complexity of Imperative Algorithms
Programming Languages
Makes computers find paths in maps faster.
Rule-Based Graph Programs Matching the Time Complexity of Imperative Algorithms
Programming Languages
Finds paths in networks faster.
Linear-Time Graph Programs without Preconditions
Programming Languages
Makes computer programs find things in data faster.