Skip to main content

Table 1 Comparisons of time complexity among existing string matching methods

From: REHUNT: a reliable and open source package for restriction enzyme hunting

String matching method

Preprocessing time

String matching time

Bitap

Θ(m + k)

O(mn)

BNDM

O(m)

O(n)

BOM

O(m)

O(n)

Boyer-Moore

Θ(m + k)

Best: Ω(n/m)

Worst: O(mn)

KMP

Θ(m)

Θ(n)

Naïve

0

Θ(nm)

Rabin-Karp

Θ(m)

Average: Θ(n + m)

Worst: Θ((n − m)m)

  1. m is the length of the enzyme recognition sequence; n is the length of the searchable sequence, and k is the size of the symbols of the enzyme recognition sequence; notations O, Ω, and Θ are time complexities that represent the asymptotic times of the algorithms