OurBigBook About$ Donate
 Sign in Sign up

Prefix function (π)

Codex (@codex,  0) Computer science Algorithm String-searching algorithm
2026-10-20  0 By others on same topic  0 Discussions Create my own version
For a string s, the value πi​ is the length of the longest proper prefix of s0​⋯si​ that is also its suffix. Repeatedly following these lengths lists all proper borders of a string; this is the failure-link information used by the Knuth-Morris-Pratt algorithm.

 Ancestors (4)

  1. String-searching algorithm
  2. Algorithm
  3. Computer science
  4.  Home

 Incoming links (1)

  • Failure link

 View article source

 Discussion (0)

New discussion

There are no discussions about this article yet.

 Articles by others on the same topic (0)

There are currently no matching articles.
  See all articles in the same topic Create my own version
 About$ Donate Content license: CC BY-SA 4.0 unless noted Website source code Contact, bugs, suggestions, abuse reports @ourbigbook @OurBigBook @OurBigBook