<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Regular Expressions From Scratch, Part Nine: A Dream of a Machine</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/12/15/regular-expressions-from-scratch-part-nine-a-dream-of-a-machine.aspx</link><description>I want to come up with the simplest possible device that can identify whether a given string is a 
member of a given regular language. 
We need some kind of computer, but to make it easy to analyze, I want to put as many restrictions upon it
as possible</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Regular Expression:  The Theory behind it!</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/12/15/regular-expressions-from-scratch-part-nine-a-dream-of-a-machine.aspx#543296</link><pubDate>Sat, 04 Mar 2006 02:29:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:543296</guid><dc:creator>Dan Sellers's WebLog</dc:creator><description>When it comes to validating input regular expression becomes a very important part of your security plan.&amp;amp;amp;nbsp;...&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=543296" width="1" height="1"&gt;</description></item><item><title>Synesthesia &amp;raquo; Links Roundup for 2006-02-21</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/12/15/regular-expressions-from-scratch-part-nine-a-dream-of-a-machine.aspx#536729</link><pubDate>Wed, 22 Feb 2006 12:18:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:536729</guid><dc:creator>Synesthesia » Links Roundup for 2006-02-21</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://www.synesthesia.co.uk/blog/archives/2006/02/22/links-24/"&gt;http://www.synesthesia.co.uk/blog/archives/2006/02/22/links-24/&lt;/a&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=536729" width="1" height="1"&gt;</description></item><item><title>re: Regular Expressions From Scratch, Part Nine: A Dream of a Machine</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/12/15/regular-expressions-from-scratch-part-nine-a-dream-of-a-machine.aspx#504697</link><pubDate>Fri, 16 Dec 2005 20:03:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:504697</guid><dc:creator>Eric Lippert</dc:creator><description>Wait for it...&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=504697" width="1" height="1"&gt;</description></item><item><title>re: Regular Expressions From Scratch, Part Nine: A Dream of a Machine</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/12/15/regular-expressions-from-scratch-part-nine-a-dream-of-a-machine.aspx#504696</link><pubDate>Fri, 16 Dec 2005 20:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:504696</guid><dc:creator>Jonas Grumby</dc:creator><description>Is there an algorithm to go from a DFA description of a language to a regular expression that describes the language?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=504696" width="1" height="1"&gt;</description></item><item><title>re: Regular Expressions From Scratch, Part Nine: A Dream of a Machine</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/12/15/regular-expressions-from-scratch-part-nine-a-dream-of-a-machine.aspx#504306</link><pubDate>Thu, 15 Dec 2005 22:45:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:504306</guid><dc:creator>Eric Lippert</dc:creator><description>Whoops, yes, you guys are correct.  I'll emend the text.&lt;br&gt;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=504306" width="1" height="1"&gt;</description></item><item><title>re: Regular Expressions From Scratch, Part Nine: A Dream of a Machine</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/12/15/regular-expressions-from-scratch-part-nine-a-dream-of-a-machine.aspx#504293</link><pubDate>Thu, 15 Dec 2005 22:28:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:504293</guid><dc:creator>Lee Feigenbaum</dc:creator><description>Yes, the language in question should really be:&lt;br&gt;&lt;br&gt;All strings with no b's and an odd number of a's AND all strings with an even number of a's following the final b in the string.&lt;br&gt;&lt;br&gt;Why?&lt;br&gt;&lt;br&gt;a's cause the machine to flip between the two states, so in the absence of any b's an odd number of a's is needed to get the machine to state 1.&lt;br&gt;&lt;br&gt;All b transitions, though, leave the machine in an acceptable state, regardless of what happened before. Thus, if we see at least one b, we're only interested in what happens after the last b in the string. Again, since a's toggle the state, pairs of a's leave the state unchanged, and so if we have a b then we require an even number of a's to follow the last b in the string.&lt;br&gt;&lt;br&gt;Lee&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=504293" width="1" height="1"&gt;</description></item><item><title>re: Regular Expressions From Scratch, Part Nine: A Dream of a Machine</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/12/15/regular-expressions-from-scratch-part-nine-a-dream-of-a-machine.aspx#504267</link><pubDate>Thu, 15 Dec 2005 21:54:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:504267</guid><dc:creator>Lance Fisher</dc:creator><description>Also, wouldn't any odd number of a's be acceptable?  Such as &amp;quot;aaa&amp;quot;:&lt;br&gt;&lt;br&gt;(0,a) -&amp;gt; 1&lt;br&gt;(1,a) -&amp;gt; 0&lt;br&gt;(0,a) -&amp;gt; 1&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=504267" width="1" height="1"&gt;</description></item><item><title>re: Regular Expressions From Scratch, Part Nine: A Dream of a Machine</title><link>http://blogs.msdn.com/b/ericlippert/archive/2005/12/15/regular-expressions-from-scratch-part-nine-a-dream-of-a-machine.aspx#504224</link><pubDate>Thu, 15 Dec 2005 20:51:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:504224</guid><dc:creator>Scott Pedersen</dc:creator><description>In addition to &amp;quot;every string is either a or anything ending in b&amp;quot; would not any sting ending with series of a of even length also be acceptible?  That is, baaaa would seem to be accetpable as well.  &lt;br&gt;&lt;br&gt;Just making sure I haven't missed anything in my understanding of your DFA.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=504224" width="1" height="1"&gt;</description></item></channel></rss>