Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8607071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:15:20+00:00 2026-06-12T03:15:20+00:00

What are the main differences between the Knuth-Morris-Pratt search algorithm and the Boyer-Moore search

  • 0

What are the main differences between the Knuth-Morris-Pratt search algorithm and the Boyer-Moore search algorithm?

I know KMP searches for Y in X, trying to define a pattern in Y, and saves the pattern in a vector. I also know that BM works better for small words, like DNA (ACTG).

What are the main differences in how they work? Which one is faster? Which one is less computer-greedy? In which cases?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:15:21+00:00Added an answer on June 12, 2026 at 3:15 am

    Moore’s UTexas webpage walks through both algorithms in a step-by-step fashion (he also provides various technical sources):

    • Knuth-Morris-Pratt
    • Boyer-Moore

    According to the man himself,

    The classic Boyer-Moore algorithm suffers from the phenomenon that it
    tends not to work so efficiently on small alphabets like DNA. The skip
    distance tends to stop growing with the pattern length because
    substrings re-occur frequently. By remembering more of what has
    already been matched, one can get larger skips through the text. One
    can even arrange “perfect memory” and thus look at each character at
    most once, whereas the Boyer-Moore algorithm, while linear, may
    inspect a character from the text multiple times. This idea of
    remembering more has been explored in the literature by others. It
    suffers from the need for very large tables or state machines.

    However, there have been some modifications of BM that have made small-alphabet searching viable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to know the main differences between CloudFoundry and Google App Engine for
Would like to know the main differences between the Android NetBEANS plugin and Eclipse
I would like to know what are the main differences between Microformat's hRecipe and
What are the main differences between these WPF controls? And when I should use
What are the main differences between Objective-C and C++ in terms of the syntax,
what are main differences between SelectNodes and GetElementsByTagName.
Can somebody explain the main differences between (advantages / disadvantages) the two implementations? For
I have read somewhere one of the main differences between Java and C++/C# is
I want to know the main difference between .live() vs. .bind() methods in jQuery.
Can someone point out the main differences between the two? It seems that, at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.