edelkamp algorithm