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?
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.
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!
I was taught: Morris and Pratt developed that algorithm, and Knuth improve it with some changes in how to find NEXT table