Download presentation
Presentation is loading. Please wait.
Published byGiles Reed Modified over 9 years ago
1
Knuth-Bendix Completion Algorithm Reza Sherafat November 30, 2004
2
Word Problem Whether two given terms represent the same element? No general algorithm exists (Pyotr Sergeyevich Novikov in 1952) The problem is undecidable.
3
Knuth-Bendix Completion Algorithm Transforms a term rewriting system into a confluent term rewriting system. The word problem is undecidable so the algorithm is not guaranteed to terminate. If the algorithm succeeds it has effectively solved the word problem.
4
Knuth-Bendix Algorithm (cont’d) Let be an equational theory such that is a finite set of axioms. Given and a reduction order as input, the K-B completion algorithm: –Returns a term rewriting system for that is sound and complete with respect to, finite, confluent, and finitely terminating. –Terminates with failure. –Loops without terminating.
5
Knuth-Bendix Algorithm (con’d) The algorithm: –Constructs an initial set of rules by orienting members of according to the reduction order –Adds more reductions (rewrite rules) to eliminate possible exceptions of confluence –Confluency fails when results of applying overlapping rules are different –If algorithm succeeds rewrite system is finitely terminating
6
Knuth-Bendix Algorithm (cont’d) Adding rules: –Suppose two left sides and where overlap. Either the prefix of equals the suffix of, or vice versa. In the former case, we can write, ; and in the later case,. –Confluency may fail when reducing the word using first and then results and reducing using first and then results and.
7
Knuth-Bendix Algorithm (cont’d) Adding Rules (cont’d): –If confluency fails add the reduction –Remove any rules in that might have reducible left sides –Repeat the procedure until all overlaping left sides have been checked.
8
Example Consider the presentation: The initial rules are: (1) (2) (3) We use the lexicographical ordering as our well-ordered relation.
9
Example (cont’d) (4) (5) (6) (7) Rules (3), (4), (5) are obsolete. The algorithm has been successfully terminated.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.