<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A world in dk(decay/denmark) &#187; recursive definition</title>
	<atom:link href="http://rotand.dk/blog/tag/recursive-definition/feed/" rel="self" type="application/rss+xml" />
	<link>http://rotand.dk/blog</link>
	<description>Just another pointless weblog</description>
	<lastBuildDate>Sat, 27 Jun 2009 19:17:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Finite Automatons and images</title>
		<link>http://rotand.dk/blog/2007/05/28/finite-autamatons-and-images/</link>
		<comments>http://rotand.dk/blog/2007/05/28/finite-autamatons-and-images/#comments</comments>
		<pubDate>Sun, 27 May 2007 21:45:56 +0000</pubDate>
		<dc:creator>jacob</dc:creator>
				<category><![CDATA[Automata]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[automaton]]></category>
		<category><![CDATA[Automatons]]></category>
		<category><![CDATA[dRegAut]]></category>
		<category><![CDATA[Fractal]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[recursive definition]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://rotand.dk/blog/2007/05/28/finite-autamatons-and-images/</guid>
		<description><![CDATA[At a lecture about regular expressions and automatons, we were introduced to the posibility of using automatons to compress images.  During the course we have worked with a java package for automatons, so i made a quick hack to render regexps as images.
The concept is that every acepting state represents black area, and and [...]]]></description>
			<content:encoded><![CDATA[<p>At a <a title="lecture" href="http://daimi.au.dk/dRegAut">lecture</a> about regular expressions and automatons, we were introduced to the posibility of using automatons to compress images.  During the course we have worked with a java package for automatons, so i made a quick hack to render regexps as images.</p>
<p>The concept is that every acepting state represents black area, and and using a recursive definition of the areas.</p>
<p><a title="area" href="http://www.rotand.dk/blog/wp-content/faareas1.png"><img src="http://www.rotand.dk/blog/wp-content/faareas1-150x150.png" alt="area" /></a></p>
<p>Here is the area for the string &#8220;031&#8243;</p>
<p><span id="more-18"></span></p>
<p>Using this recursive definition it is posible to adress alle aereas, well in reality I choose a &#8220;resolution&#8221; and using strings upto a certeain length. I generate all the strings and check whether they are accepted, and should be colored.</p>
<p>A couple of examples.</p>
<ul>
<li><a title="regexppicure" href="http://www.rotand.dk/blog/wp-content/repic31.png"><img src="http://www.rotand.dk/blog/wp-content/repic31-150x150.png" alt="regexppicure" /></a></li>
<li><a title="regexppicure2" href="http://www.rotand.dk/blog/wp-content/repic22.png"><img src="http://www.rotand.dk/blog/wp-content/repic22-150x150.png" alt="regexppicure2" /></a></li>
<li><a title="regexppicure3" href="http://www.rotand.dk/blog/wp-content/repic1.png"><img src="http://www.rotand.dk/blog/wp-content/repic1-150x150.png" alt="regexppicure3" /></a></li>
</ul>
<p>The hack I used to make the images above (<a title="regexppicurerendere" href="http://www.rotand.dk/blog/wp-content/dregautpic.zip"></a><a title="regexp_picture_render" href="http://www.rotand.dk/blog/wp-content/dregautpic.zip">regexp_picture_render</a>), you need the dRegAut packackage thou it might work with this (http://www.brics.dk/automaton/)</p>
<p>Here is a few regexps to try out, some are more interesting than others&#8230;</p>
<ul>
<li>(1+0+2+3)*(30+03+12+21)</li>
</ul>
<ul>
<li>(0+1+2+3)*(22+11+00+33)(1+2)</li>
</ul>
<ul>
<li>(0+1+2+3)*(33+00)(1+2+3+0)*(0+3)</li>
</ul>
<ul>
<li>(1+2+3)*03(1+2)</li>
</ul>
<ul>
<li>((0+1+2+3)*(12+21))+((03+30)(0+1+2+3)*)</li>
</ul>
<ul>
<li>(((0+1+2+3)*(12+21))+((03+30)(0+1+2+3)*))(1+2+3)*(1+2)</li>
</ul>
<ul>
<li>(((0+1+2+3)*(12+21))+((03+30)(0+1+2+3)*))(1+2)(1+2+3+0)*(0+3)</li>
</ul>
<ul>
<li>(((0+1+2+3)*(12+21))+((03+30)(0+1+2+3)*))(1+2+3)*03(1+2)</li>
</ul>
<ul>
<li>(((0+1+2+3)*(2+1))+((2+1)(0+1+2+3)*))(1+2+3+0)*0(1+2)</li>
</ul>
<ul>
<li>(((0+1+2+3)*(2+1))+((2+1)(0+1+2+3)*))(1+2+3+0)*3(0+3)</li>
</ul>
<ul>
<li>(1+2+3+0)*(1+2)(0+3)(1+2)</li>
</ul>
<ul>
<li>(1+2+3+0)*(1+2)(0+3)(1+2)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://rotand.dk/blog/2007/05/28/finite-autamatons-and-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
