<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Computer Algorithms: Morris-Pratt String Searching</title>
	<atom:link href="/2012/04/09/computer-algorithms-morris-pratt-string-searching/feed/" rel="self" type="application/rss+xml" />
	<link>/2012/04/09/computer-algorithms-morris-pratt-string-searching/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: Amit Moondra</title>
		<link>/2012/04/09/computer-algorithms-morris-pratt-string-searching/comment-page-1/#comment-511215</link>
		<dc:creator><![CDATA[Amit Moondra]]></dc:creator>
		<pubDate>Fri, 26 Oct 2018 21:40:18 +0000</pubDate>
		<guid isPermaLink="false">/?p=3019#comment-511215</guid>
		<description><![CDATA[&quot;It is clear that if the pattern consists only of different letters in case of a mismatch we should start comparing the next character of the text with the first character of the pattern!&quot;

Hi, I&#039;m a little confused about this part.

PATTERN = &#039;ABCD&#039;
STRING =    &#039;ABABCDA&#039;

There will be a mismatch at  STRING[2]   A !=C
However, if we move to the next letter instead of starting at the mismatch, we would miss out on &#039;ABCD&#039;]]></description>
		<content:encoded><![CDATA[<p>&#8220;It is clear that if the pattern consists only of different letters in case of a mismatch we should start comparing the next character of the text with the first character of the pattern!&#8221;</p>
<p>Hi, I&#8217;m a little confused about this part.</p>
<p>PATTERN = &#8216;ABCD&#8217;<br />
STRING =    &#8216;ABABCDA&#8217;</p>
<p>There will be a mismatch at  STRING[2]   A !=C<br />
However, if we move to the next letter instead of starting at the mismatch, we would miss out on &#8216;ABCD&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahendra</title>
		<link>/2012/04/09/computer-algorithms-morris-pratt-string-searching/comment-page-1/#comment-420561</link>
		<dc:creator><![CDATA[Mahendra]]></dc:creator>
		<pubDate>Sun, 18 Sep 2016 05:53:28 +0000</pubDate>
		<guid isPermaLink="false">/?p=3019#comment-420561</guid>
		<description><![CDATA[@Varun Kakumani : if use strpos for find pattern position in our text, you just can find one position pattern when pattern more than one exist in text. But if use KMP Algorithm with little modify, you can return multiple pattern position in text. And KMP Algorithm can implement in another programing language. :D

@Admin : Thanks for your sharing :)]]></description>
		<content:encoded><![CDATA[<p>@Varun Kakumani : if use strpos for find pattern position in our text, you just can find one position pattern when pattern more than one exist in text. But if use KMP Algorithm with little modify, you can return multiple pattern position in text. And KMP Algorithm can implement in another programing language. 😀</p>
<p>@Admin : Thanks for your sharing 🙂</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Varun Kakumani</title>
		<link>/2012/04/09/computer-algorithms-morris-pratt-string-searching/comment-page-1/#comment-98958</link>
		<dc:creator><![CDATA[Varun Kakumani]]></dc:creator>
		<pubDate>Tue, 30 Sep 2014 12:03:32 +0000</pubDate>
		<guid isPermaLink="false">/?p=3019#comment-98958</guid>
		<description><![CDATA[I have tested your code by comparing with PHP&#039;s inbuilt function strpos. The results are quite shocking. strpos took 2 milli seconds and your code took 171 milli seconds for a text with more than 2500 lines.]]></description>
		<content:encoded><![CDATA[<p>I have tested your code by comparing with PHP&#8217;s inbuilt function strpos. The results are quite shocking. strpos took 2 milli seconds and your code took 171 milli seconds for a text with more than 2500 lines.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: umesh</title>
		<link>/2012/04/09/computer-algorithms-morris-pratt-string-searching/comment-page-1/#comment-17694</link>
		<dc:creator><![CDATA[umesh]]></dc:creator>
		<pubDate>Sun, 09 Dec 2012 23:42:51 +0000</pubDate>
		<guid isPermaLink="false">/?p=3019#comment-17694</guid>
		<description><![CDATA[&lt;pre lang=&quot;PHP&quot;&gt;
while ($j &gt; -1 &amp;&amp; $pattern[$i] != $pattern[$j]) {
	$j = $nextTable[$j];
}
 
$nextTable[++$i] = ++$j;
&lt;/pre&gt;
Can you explain me this? this loop goes infinite....and I could not run ......can you clarify to me?]]></description>
		<content:encoded><![CDATA[<pre lang="PHP">
while ($j > -1 &#038;& $pattern[$i] != $pattern[$j]) {
	$j = $nextTable[$j];
}
 
$nextTable[++$i] = ++$j;
</pre>
<p>Can you explain me this? this loop goes infinite&#8230;.and I could not run &#8230;&#8230;can you clarify to me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radnus Mayhs</title>
		<link>/2012/04/09/computer-algorithms-morris-pratt-string-searching/comment-page-1/#comment-17657</link>
		<dc:creator><![CDATA[Radnus Mayhs]]></dc:creator>
		<pubDate>Fri, 07 Dec 2012 10:06:35 +0000</pubDate>
		<guid isPermaLink="false">/?p=3019#comment-17657</guid>
		<description><![CDATA[Hi Stoimen
This post is totally awesome. The way you have broken down complex concepts into simple words is great. But I have a small problem understanding this code snippet:
while ($i  -1 &#038;&#038; $pattern[$i] != $pattern[$j]) {
			$j = $nextTable[$j];
		}
 
		$nextTable[++$i] = ++$j;
	}
Won&#039;t the Inner while lead to an Infinite loop? Can you please explain this?

Keep up the good work
Cheers]]></description>
		<content:encoded><![CDATA[<p>Hi Stoimen<br />
This post is totally awesome. The way you have broken down complex concepts into simple words is great. But I have a small problem understanding this code snippet:<br />
while ($i  -1 &amp;&amp; $pattern[$i] != $pattern[$j]) {<br />
			$j = $nextTable[$j];<br />
		}</p>
<p>		$nextTable[++$i] = ++$j;<br />
	}<br />
Won&#8217;t the Inner while lead to an Infinite loop? Can you please explain this?</p>
<p>Keep up the good work<br />
Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sophie</title>
		<link>/2012/04/09/computer-algorithms-morris-pratt-string-searching/comment-page-1/#comment-15891</link>
		<dc:creator><![CDATA[Sophie]]></dc:creator>
		<pubDate>Sat, 26 May 2012 05:18:21 +0000</pubDate>
		<guid isPermaLink="false">/?p=3019#comment-15891</guid>
		<description><![CDATA[Hello Stoimen,

First, thanks for your posts about string searching algorithms. You did a great job!

But I have some queries about some pictures in this post:
In the picture for pattern-with-no-repeating-char, when the mismatch happened at &#039;d&#039;, I think, rather than shift one char to the right in the text, it should compare with &#039;a&#039; first. The mismatch only means &#039;d&#039; != &#039;c&#039;, but it doesn&#039;t mean &#039;d&#039; != &#039;a&#039;. Also, according to the next table, &#039;d&#039; should compare to position-0 which is &#039;a&#039;.
In the picture for pattern-with-one-repeating-char, shall the text be &#039;ababad&#039;?

Let me know if I misunderstand anything...

PS: I&#039;m translating your post into Chinese so that it can be read by more people. Thanks again for making such a great post about this algorithm. :D

Best,
~Sophie]]></description>
		<content:encoded><![CDATA[<p>Hello Stoimen,</p>
<p>First, thanks for your posts about string searching algorithms. You did a great job!</p>
<p>But I have some queries about some pictures in this post:<br />
In the picture for pattern-with-no-repeating-char, when the mismatch happened at &#8216;d&#8217;, I think, rather than shift one char to the right in the text, it should compare with &#8216;a&#8217; first. The mismatch only means &#8216;d&#8217; != &#8216;c&#8217;, but it doesn&#8217;t mean &#8216;d&#8217; != &#8216;a&#8217;. Also, according to the next table, &#8216;d&#8217; should compare to position-0 which is &#8216;a&#8217;.<br />
In the picture for pattern-with-one-repeating-char, shall the text be &#8216;ababad&#8217;?</p>
<p>Let me know if I misunderstand anything&#8230;</p>
<p>PS: I&#8217;m translating your post into Chinese so that it can be read by more people. Thanks again for making such a great post about this algorithm. 😀</p>
<p>Best,<br />
~Sophie</p>
]]></content:encoded>
	</item>
</channel>
</rss>
