7 research outputs found
Balanced trees with removals: an exercise in rewriting and proof
AbstractAn equational algorithm to remove values from 2-3-trees is given along with a novel proof technique for use in showing correctness. The removal algorithm involves rewrite rules which ensure balance is restored in trees and uses similar methods to those used by Hoffman and O'Donnell for an insertion algorithm. However, the combination of equational rewrite steps is more subtle for removals and the algorithm is less obviously correct. Diagrams are used to show informally how the rewriting steps preserve order and balance and a method for formalising a correctness proof is also shown. This formalisation involves proofs with “subtypes” in the sense of sets of values of the same type which aid the derivation of properties of auxiliary functions