Solved

How to generate a next [] table in KMP algorithm using Java code

Posted on 2011-02-12
4
1,114 Views
Last Modified: 2012-05-11
Hi, The idea is to create an automatic data string table which will be used for string matching
0
Comment
Question by:vicbis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 37

Accepted Solution

by:
TommySzalapski earned 250 total points
ID: 34879532
Are you talking about the preprocessing step as the "next [] table"? This describes the algorithm well and provides code in C/C++/Java.
http://www.inf.fh-flensburg.de/lang/algorithmen/pattern/kmpen.htm
It's a bit technical; but if you read it carefully, it makes sense.

If you need a more English explanation of anything, let us know.
If you are using some non-standard version of KMP, post a link to where it is described.
0
 
LVL 32

Assisted Solution

by:phoffric
phoffric earned 250 total points
ID: 34880395
You may be interested in reviewing this answered question: Calculating the "next" table in the KMP searching algorithm

If you learn better by watching course lectures, then review this Knuth-Morris-Pratt Algorithm video; just click on the 16:54 Knuth-Morris-Pratt Algorithm link. The following slides are used in this 10 minute video section.

KMP-1.PNG
KMP-2.PNG
KMP-3.PNG
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 35321677
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question