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

  • SEARCH
  • Home
  • 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 8374927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:02:44+00:00 2026-06-09T15:02:44+00:00

Many articles on KMP mention that the failure function in KMP itself has a

  • 0

Many articles on KMP mention that the failure function in KMP itself has a large number of applications.

One such application is finding the smallest string which when concatenated k times gives the original string(period).

But I could not find any other. What other problems involve the KMP failure function?

  • 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-09T15:02:45+00:00Added an answer on June 9, 2026 at 3:02 pm

    KMP computes the borders of all prefixes of a string, which are themselves a key notion in algorithm on strings. (Computing the border of the whole word itself is nontrivial, and KMP (failure function) is the standard for doing that!)

    A border of s is simply any word that is both a prefix and suffix of s.

    As you rightly noticed, an outstanding application of the ability to compute borders is the possibility to compute the smallest string w such that for some natural k w^k = s for a given string s. This is called the primitive root of s.

    The reason for this is the duality between borders and periods of a string. A period of a string s is any string w no longer than s such that s is the prefix of the string wwww… For example, abc is a period of abcabcab. It turns out that there is a 1:1 correspondence between borders and periods of a word; in the above example, note that abcab is a border of abcabcab. In general, whenever w is a period of s, then the string that remains from s after removing w from its beginning (w^-1 s) is a border of s. Similarly, if w is a border of s, then the word that remains from s when you remove the suffix w is a period of s.

    Periods are an important tool in analyzing the properties of strings. They are used for example in the algorithms for finding repetitions (runs) in strings; for an overview see this paper.

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

Sidebar

Related Questions

.Net MVC application also running Linq-to-SQL. I have seen many articles on grids that
Many articles I've read on the Net about Singleton design pattern mention that the
An article has many articles that it refers to and many other articles can
I'm finding many articles on the web where it is implied that you can
Many articles (e.g. msdn ) have said that a circular reference cannot be cleaned
There are many articles available to explain architecture design of MVC application , some
I have a Rails application (Rails 3.0.10) where users can have many articles, and
I read many articles comparing programming languages. There is a word that comes often:
I'm trying to code a page which has many articles. Each article's title is
I've read many articles which they state that querying should not be placed in

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.