Jump to content

Bitap algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nroets (talk | contribs) at 20:52, 15 July 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The bitap algorithm computes the levenshtein distance between two strings assuming it is smaller than a small integer n. It does this by precomputing a bit mask indicating which letter is allowed in which place. Then it is able to do most of the work bitwise operations which are extremely fast.

External References

  • A simple implementation of the bitap algorithm that can handle most regular expressions.