Dec 19, 2014 at 8:22am
Hi everyone!
i have a question about Morris-Pratt and Knuth-Morris-Pratt algorithm
When we use MP and KMP, we need to find NEXT[j] table. Is there any differences between MP NEXT[j] table and KMP NEXT[j] table?
Dec 19, 2014 at 5:18pm
Two names for the same algorithm.
It was developed by Knuth and Morris, and independently by Pratt.
MP just leaves off the K in KMP.
Dec 19, 2014 at 5:25pm
But i have a homework:
//--------------------------------------
P = 01011001011
a. Use MP to find NEXT[j] table
b. Use KMP to find NEXT[j] table
Compare two NEXT[j] table?
//--------------------------------------
I wonder if two NEXT[j] tables are different
Need ur help! Thanks in advance!
Dec 19, 2014 at 5:28pm
I was taught: Morris and Pratt developed that algorithm, and Knuth improve it with some changes in how to find NEXT table