The Viterbi Algorithm expressed in Constraint Handling Rules

Henning Christiansen, Christian Theil Have, Ole Torp Lassen, Matthieu Petit

Research output: Chapter in Book/Report/Conference proceedingArticle in proceedingsResearchpeer-review


The Viterbi algorithm is a classical example of a dynamic programming
algorithm, in which pruning reduces the search space drastically,
so that an otherwise exponential time complexity is reduced to linearity. The
central steps of the algorithm, expansion and pruning, can be expressed in
a concise and clear way in CHR, but additional control is needed in order
to obtain the desired time complexity. It is shown how auxiliary constraints,
called trigger constraints, can be applied to fine-tune the order of CHR rule
applications in order to reach this goal. It is indicated how properties such
as confluence can be useful for showing such optimized programs correct.
Original languageEnglish
Title of host publicationProceeedings of the 7th International Workshop on Constraint Handling Rules
EditorsPeter Van Weert, Leslie De Koninck
Number of pages7
Place of PublicationLeuven, Belgium
PublisherKatholieke Universiteit Leuven
Publication dateMay 2010
Publication statusPublished - May 2010


  • Logic Programming
  • Constraint Handling Rules
  • Dynamic Programming
  • Viterbi Algorithm

Cite this