<?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>Ashutosh Mehra's Blog &#187; Project Euler</title>
	<atom:link href="http://ashutoshmehra.net/blog/category/project-euler/feed/" rel="self" type="application/rss+xml" />
	<link>http://ashutoshmehra.net/blog</link>
	<description>Notes on Math, Computer Science &#38; Programming</description>
	<lastBuildDate>Mon, 31 Oct 2011 10:52:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Solving Project Euler Problems 161 (Trominoes Tiling) and 185 (Number Mind) with ZDDs</title>
		<link>http://ashutoshmehra.net/blog/2009/03/solving-project-euler-problems-with-zdds/</link>
		<comments>http://ashutoshmehra.net/blog/2009/03/solving-project-euler-problems-with-zdds/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 14:16:47 +0000</pubDate>
		<dc:creator>Ashutosh</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Project Euler]]></category>
		<category><![CDATA[TAOCP]]></category>

		<guid isPermaLink="false">http://ashutoshmehra.net/blog/?p=157</guid>
		<description><![CDATA[Some months ago, I was re-introduced to Project Euler (PE) through the blogosphere. I had visited that site before, but had been left unmotivated by the first dozen or so problem statements that I read &#8212; neither the programming nor the math involved anything new or challenging. Only in the past few months, when I [...]]]></description>
			<content:encoded><![CDATA[<p>Some months ago, I was re-introduced to <a href="http://projecteuler.net/">Project Euler</a> (PE) through the blogosphere. I had visited that site before, but had been left unmotivated by the first dozen or so problem statements that I read &#8212; neither the programming nor the math involved anything new or challenging. Only in the past few months, when I attempted to crack some of the harder nuts, did I realize how interesting many PE problems could be &#8212; requiring a neat algorithm (or invoking a crucial theorem) for an efficient solution. <span id="more-157"></span></p>
<h4>My experience with Project Euler Problems</h4>
<p>As I attempted to solve more and more problems, I found a disproportionately large number of them centered around the theory of numbers. These involved important ideas of number sieves, congruences, continued fractions, the Farey series, solving <a href="http://en.wikipedia.org/wiki/Pell%27s_equation">Pell&#8217;s equation</a>, implementing <a href="http://en.wikipedia.org/wiki/Shanks-Tonelli_algorithm">Shanks Tonelli algorithm</a> etc., and had me sifting through Hardy and Wright&#8217;s book every so often. But after a while they weren&#8217;t so much fun. I did, however, find enough problems of my interest to get me hooked &#8212; enumeration and dynamic programming (<a href="http://projecteuler.net/index.php?section=problems&#038;id=208">208</a>, <a href="http://projecteuler.net/index.php?section=problems&#038;id=161">161</a>, <a href="http://projecteuler.net/index.php?section=problems&#038;id=209">209</a>, <a href="http://projecteuler.net/index.php?section=problems&#038;id=172">172</a>, <a href="http://projecteuler.net/index.php?section=problems&#038;id=169">169</a>, <a href="http://projecteuler.net/index.php?section=problems&#038;id=215">215</a>, <a href="http://projecteuler.net/index.php?section=problems&#038;id=219">219</a>), probability (<a href="http://projecteuler.net/index.php?section=problems&#038;id=227">227</a>, <a href="http://projecteuler.net/index.php?section=problems&#038;id=213">213</a>) and those occasionally unique ones like <a href="http://projecteuler.net/index.php?section=problems&#038;id=197">197</a> (concerning the &#8220;steady-state&#8221; behavior of a certain sequence). Working through these problems made me realize what a treasure PE was. Kudos to Colin &#8220;Euler&#8221; Hughes and the PE-team for their effort in running this great site!</p>
<p>In addition to having the fun of solving the problems myself, I could study the solutions worked out by other members in the forum. Seeing the elegance, efficiency and analyses of some of their solutions was a rewarding (even if a bit humbling) experience. A case in point is the solution to <a href="http://projecteuler.net/index.php?section=problems&#038;id=208">Robot Walks (208)</a> by <tt>sajninredoc</tt> and <tt>stijn263</tt> (among others), where they reduce the enumeration problem to a single summation. And then there were those APL/J programmers with their cute one-liners!</p>
<p>In this entry, I shall outline my solutions (and their performance characteristics) to the <a href="http://projecteuler.net/index.php?section=problems&#038;id=161">Trominoes Tiling (161)</a> and <a href="http://projecteuler.net/index.php?section=problems&#038;id=185">Number Mind (185)</a> problems. To solve these problems, I used the <a href="http://en.wikipedia.org/wiki/Zero_suppressed_decision_diagram">ZDD</a> techniques I had just studied in Knuth&#8217;s <a href="http://www-cs-faculty.stanford.edu/~uno/fasc1b.ps.gz">pre-fascicle 1B</a> (now in print as <a href="http://www.amazon.com/Art-Computer-Programming-Fascicle-Techniques/dp/0321580508">Vol 4 Fascicle 1</a>). I had <a href="http://ashutoshmehra.net/blog/2008/12/notes-on-zdds/trackback/">blogged earlier</a> on <a href="http://www-cs-faculty.stanford.edu/~knuth/musings.html">Knuth&#8217;s Fun with ZDDs musing</a>.</p>
<h4>Trominoes Tiling (161): Enumerating Exact Covers using ZDDs</h4>
<p>Trominoes Tiling (<a href="http://projecteuler.net/index.php?section=problems&#038;id=161">161</a>) is almost the tiling problem of TAOCP 7.1.4 &#8212; (130) with the difference that only trominoes are allowed (no monominoes or dominoes) and the grid-size is slightly larger (<tt>9x12</tt> instead of <tt>8x8</tt>). I reuseed, with the obvious changes, the ZDD routines that I had coded while working out that section. Since Knuth has already explained the ideas involved so beautifully (see the text around 7.1.4 &#8212; (129)), I shall only briefly sketch the ZDD construction before giving some performance statistics.</p>
<p>To begin, we first model the tiling problem as an <a href="http://en.wikipedia.org/wiki/Exact_cover">Exact Cover</a>. This involves creating a boolean matrix <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_dc7ce529b32ce1c71aa499962a871b74.png" title="(a_{ij})" style="vertical-align:-20%;" class="tex" alt="(a_{ij})" /> of <tt>9x12</tt> = <tt>108</tt> columns (corresponding to cells of the board) and <tt>526</tt> rows (corresponding to the ways of placing the <tt>L</tt> and <tt>I</tt> trominoes in all possible orientations on a <tt>9x12</tt> grid). We have <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_1c9980b7224f0d30f9fca908a5d28d32.png" title="a_{ij} = 1" style="vertical-align:-20%;" class="tex" alt="a_{ij} = 1" /> iff tromino placement <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_b2d5fbf99790e9a8f89f51d876bf7d45.png" title="i" style="vertical-align:-20%;" class="tex" alt="i" /> occupies cell <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_17205bd7356afc72c6e1cad22749dbb0.png" title="j" style="vertical-align:-20%;" class="tex" alt="j" />. The strategy for placement numbering I used is shown below for the simpler <tt>4x4</tt> case (the cells are numbered in the usual row-major order). Since the placement strategy decides the variable-ordering of the ZDD and hence its size (unless, of course, we choose to sift/reorder variables later on), it is important to pick a placement strategy that is not too inefficient.<br/></p>
<p><center><div id="attachment_210" class="wp-caption aligncenter" style="width: 498px"><a href="http://ashutoshmehra.net/blog/wp-content/uploads/2009/03/tiling.png"><img src="http://ashutoshmehra.net/blog/wp-content/uploads/2009/03/tiling.png" alt="Tromino Placement Numbering" title="Tromino Placement Numbering" width="488" height="394" class="size-full wp-image-210" /></a><p class="wp-caption-text">Tromino Placement Numbering for a 4x4 grid (also used for the rows of the exact cover matrix and ZDD variable ordering)</p></div></center><br/></p>
<p><center><div id="attachment_235" class="wp-caption aligncenter" style="width: 371px"><a href="http://ashutoshmehra.net/blog/wp-content/uploads/2009/03/exactcovermatrix.png"><img src="http://ashutoshmehra.net/blog/wp-content/uploads/2009/03/exactcovermatrix.png" alt="Exact Cover Matrix (for the simplified 4x4 case)" title="Exact Cover Matrix" width="361" height="180" class="size-full wp-image-235" /></a><p class="wp-caption-text">Exact Cover Matrix (for the simplified 4x4 case)</p></div></center><br/></p>
<p>Having constructed the boolean matrix, to enumerate the tilings, we find the number of ways to select some rows of the matrix such that if we inspect any column, precisely one of the selected rows contains a <tt>1</tt> in that column. Hence the name &#8220;exact&#8221; cover &#8212; we neither want to leave any cell uncovered, nor do we want parts of two or more trominoes to overlap.</p>
<p>Exact covers can be enumerated using Knuth&#8217;s <a href="http://en.wikipedia.org/wiki/Knuth%27s_Algorithm_X">Algorithm X</a> &#8212; an efficient backtracking technique implemented using an idea Knuth calls <a href="http://en.wikipedia.org/wiki/Dancing_Links">Dancing Links</a> (<a href="http://www-cs-faculty.stanford.edu/~knuth/programs/dance.w">DANCE program</a>, <a href="http://lanl.arxiv.org/pdf/cs/0011047">paper at arXiv</a>, <a href="http://stanford-online.stanford.edu/seminars/knuth/000222-knuth-100.asx">Computer Musing video</a>, ASL Implementations for <a href="http://stlab.adobe.com:8080/@md=d&#038;cd=//adobe_source_libraries/adobe/&#038;cdf=//adobe_source_libraries/adobe/dancing_links.hpp&#038;c=unH@//adobe_source_libraries/adobe/dancing_links.hpp">dancing_links</a> and <a href="http://stlab.adobe.com:8080/@md=d&#038;cd=//adobe_source_libraries/adobe/&#038;cdf=//adobe_source_libraries/adobe/dancing_links.hpp&#038;c=unH@//adobe_source_libraries/adobe/implementation/toroid.hpp">toroid_node_t</a>). Algorithm X not only <i>enumerates</i> the solution, it in fact <i>generates</i> them all!</p>
<p>To enumerate exact covers using ZDDs, using the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_fe9bb6d8a0edbab4f541d976501129da.png" title="m\times n" style="vertical-align:-20%;" class="tex" alt="m\times n" /> matrix <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_dc7ce529b32ce1c71aa499962a871b74.png" title="(a_{ij})" style="vertical-align:-20%;" class="tex" alt="(a_{ij})" /> produced in the step above, we construct the boolean function (Eq. 7.1.4 &#8212; (129)):<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_25f8b1b2356d5a5530d3bf454b1bc8ef.png" title="f(x_1,\ldots,x_m) = \bigwedge_{j=1}^n S_1(X_j)" style="vertical-align:-20%;" class="tex" alt="f(x_1,\ldots,x_m) = \bigwedge_{j=1}^n S_1(X_j)" /></center><br />
where boolean variable <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6934f2728bd2faf498c0e5f163f0a6b5.png" title="x_i" style="vertical-align:-20%;" class="tex" alt="x_i" /> indicates selection of row <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_b2d5fbf99790e9a8f89f51d876bf7d45.png" title="i" style="vertical-align:-20%;" class="tex" alt="i" /> of the matrix (that is, placement a tromino in the orientation <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_b2d5fbf99790e9a8f89f51d876bf7d45.png" title="i" style="vertical-align:-20%;" class="tex" alt="i" />), <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_861ea1f62f4123c9fd82e1e3352ac180.png" title="X_j" style="vertical-align:-20%;" class="tex" alt="X_j" /> = <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_272031c949db9f3a7a6bc656df4314a2.png" title="\{x_i | a_{ij} = 1\}" style="vertical-align:-20%;" class="tex" alt="\{x_i | a_{ij} = 1\}" /> is the set of rows <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_b2d5fbf99790e9a8f89f51d876bf7d45.png" title="i" style="vertical-align:-20%;" class="tex" alt="i" /> that have a <tt>1</tt> in column <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_17205bd7356afc72c6e1cad22749dbb0.png" title="j" style="vertical-align:-20%;" class="tex" alt="j" />, and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_569d1d4fd0a693fbd6651ca3238a06ce.png" title="S_1" style="vertical-align:-20%;" class="tex" alt="S_1" /> is the <i>Symmetric Boolean Function</i> that is true if exactly one of its inputs are true. The function <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_8cb65257e3377e4035d06ddf990b6657.png" title="f" style="vertical-align:-20%;" class="tex" alt="f" /> will be true iff for each column <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_17205bd7356afc72c6e1cad22749dbb0.png" title="j" style="vertical-align:-20%;" class="tex" alt="j" />, exactly one of the selected row <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_b2d5fbf99790e9a8f89f51d876bf7d45.png" title="i" style="vertical-align:-20%;" class="tex" alt="i" /> has <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_02ad58c6e982b858ab5d2594c9363554.png" title="a_{ij}" style="vertical-align:-20%;" class="tex" alt="a_{ij}" /> = 1 &#8212; this is just the condition for exact cover!<br/></p>
<p>For various ways to efficiently construct the above ZDD, see Exercise 7.1.4 &#8212; 212. The function <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_569d1d4fd0a693fbd6651ca3238a06ce.png" title="S_1" style="vertical-align:-20%;" class="tex" alt="S_1" /> can itself be implemented using Exercise 207&#8242;s &#8220;Symmetrizing&#8221; operation.<br/></p>
<p>Once we have the ZDD for the boolean function <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_8cb65257e3377e4035d06ddf990b6657.png" title="f" style="vertical-align:-20%;" class="tex" alt="f" /> above, the <i>number of solutions</i>, i.e., the number of vectors <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_48928d13ced42d8a72b7bc5b9c4d194a.png" title="(x_1,\ldots,x_m)" style="vertical-align:-20%;" class="tex" alt="(x_1,\ldots,x_m)" /> that make <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_8cb65257e3377e4035d06ddf990b6657.png" title="f" style="vertical-align:-20%;" class="tex" alt="f" /> true (which are precisely the vectors representing exact covers) can be readily found using the ZDD-analog of Algorithm 7.1.4C.<br/></p>
<p><i>Runtime performance of the solution</i>: The resulting ZDD involved 526 variables and had a size of <tt>7893743</tt> zeads. Without invoking any garbage collection, the peak memory usage was <tt>~600MB</tt>  (where each zead in my implementation was a <tt>20</tt>-byte node); time taken was <tt>34s</tt> (user) and <tt>85s</tt> (elapsed). Given that my memos weren&#8217;t very optimized (I had used GCC&#8217;s <tt>std::map</tt>) and neither had I tried doing any variable reordering, the performance seemed reasonable.<br/></p>
<p>A dynamic programming approach (like one I later used for <a href="http://projecteuler.net/index.php?section=problems&#038;id=215">Crack-free Walls (215)</a>),  should have been able to give the results in about a second (this was confirmed by posts on the forum). Nevertheless, the ZDD solution was fast enough to keep my conscience clear of any violations of <a href="http://projecteuler.net/index.php?section=about">Project Euler&#8217;s one-minute-rule</a>.<br/></p>
<p><i>Aside</i>: The <a href="http://projecteuler.net/index.php?section=problems&#038;id=215">Crack-free Walls (215)</a> problem is kind of like TAOCP Exercise 7.1.4 &#8212; 214 (Knuth calls it &#8220;faultfree&#8221;) and should be amenable to the ZDD attack. There, however, appears to be a danger of hitting space-out since the grid-size <tt>10x32</tt> is somewhat large. I&#8217;ve not tried this approach.<br/></p>
<h4>Number Mind (185): Using ZDDs to satisfy an ad-hoc set of constraints</h4>
<p><a href="http://projecteuler.net/index.php?section=problems&#038;id=185">Number Mind (185)</a> was the other PE problem that I solved with ZDDs. In this problem we&#8217;re to uncover a 16-digit number given a set of &#8220;guesses&#8221; of the form:<br />
<tt><br />
5616185650518293 ;2 correct<br />
3847439647293047 ;1 correct<br />
5855462940810587 ;3 correct<br />
. . .<br />
</tt></p>
<p>The guesses along with the &#8220;hit-rates&#8221; provide partial information about the secret number. Our aim is to find the &#8220;secret&#8221; number corresponding to the set of guesses.</p>
<p>To solve this problem, we create variables <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6880c20b2ca196156a42d330b95f3113.png" title="x_{i,j}" style="vertical-align:-20%;" class="tex" alt="x_{i,j}" /> representing the condition that <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_b2d5fbf99790e9a8f89f51d876bf7d45.png" title="i" style="vertical-align:-20%;" class="tex" alt="i" /><sup>th</sup> digit (<img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_2afff0691791fbd2606dc4117a512d56.png" title="1\leq i\leq 16" style="vertical-align:-20%;" class="tex" alt="1\leq i\leq 16" />) is <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_17205bd7356afc72c6e1cad22749dbb0.png" title="j" style="vertical-align:-20%;" class="tex" alt="j" /> (<img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_731d15f2e46cf9802cf5a7d84f821fe4.png" title="0\leq j\leq 9" style="vertical-align:-20%;" class="tex" alt="0\leq j\leq 9" />). We then have the following constraints: </p>
<ul>
<li>Since each position <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_b2d5fbf99790e9a8f89f51d876bf7d45.png" title="i" style="vertical-align:-20%;" class="tex" alt="i" /> can hold just one digit, for each <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_b2d5fbf99790e9a8f89f51d876bf7d45.png" title="i" style="vertical-align:-20%;" class="tex" alt="i" /> exactly one of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6880c20b2ca196156a42d330b95f3113.png" title="x_{i,j}" style="vertical-align:-20%;" class="tex" alt="x_{i,j}" /> can be true. Constraints of this kind correspond to terms like <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_33048833db55c02df3be7c605eb7c54f.png" title="S_1(x_{i0},\ldots,x_{i9})" style="vertical-align:-20%;" class="tex" alt="S_1(x_{i0},\ldots,x_{i9})" />, where <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_569d1d4fd0a693fbd6651ca3238a06ce.png" title="S_1" style="vertical-align:-20%;" class="tex" alt="S_1" /> is again our friend, the symmetric boolean function.</li>
<li>Each of the given guess &#8220;hit-rates&#8221; must be satisfied. As an example, the third constraint &#8220;<tt>5855462940810587 (3 correct)</tt>&#8221; is represented as:<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_a60bfd11aef715abf28cbc57cace0534.png" title="S_3(x_{15},x_{28},x_{35},x_{45},x_{54},x_{66},x_{72},x_{89}, x_{94},x_{A0},x_{B8},x_{C1},x_{D0},x_{E5},x_{F8},x_{G7})" style="vertical-align:-20%;" class="tex" alt="S_3(x_{15},x_{28},x_{35},x_{45},x_{54},x_{66},x_{72},x_{89}, x_{94},x_{A0},x_{B8},x_{C1},x_{D0},x_{E5},x_{F8},x_{G7})" /></center>
</li>
</ul>
<p>Using the symmetrizing operator from Exercise 7.1.4 &#8212; 207, both the above kinds of constraints are easily represented. Finally, we compute the <tt>AND</tt> (or, <tt>INTERSECT</tt>, if one prefers family-of-subsets point-of-view) of the individual constraints &#8212; and we&#8217;re left with the final ZDD representing the family of feasible solutions (in our case, the solution in fact turns out to be unique).</p>
<p><i>Runtime performance of the solution</i>: The ZDD had <tt>160</tt> variables <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6880c20b2ca196156a42d330b95f3113.png" title="x_{i,j}" style="vertical-align:-20%;" class="tex" alt="x_{i,j}" />, program execution had a peak memory usage of <tt>~1GB</tt> without any garbage collection or reordering (zead-size <tt>20</tt>-bytes), size of the largest partial function was <tt>4665450</tt> zeads. The running time was <tt>~16s</tt> (both user and elapsed).</p>
<h4>Conclusion</h4>
<p>Comparing the ZDD solutions to the two PE problems, I think it was the kind of &#8220;unstructured&#8221; problem like Number Mind where the ZDD technique really shined.</p>
<div id="tweetbutton157" class="tw_button" style="float:left; width:75px;"><a href="http://twitter.com/share?url=http%3A%2F%2Fgoo.gl%2FqYzRn&amp;via=ashutoshmehra&amp;text=Solving%20Project%20Euler%20Problems%20161%20%28Trominoes%20Tiling%29%20and%20185%20%28Number%20Mind%29%20with%20ZDDs%20-%20Ashutosh...%20&amp;related=ashutoshmehra&amp;lang=en&amp;count=none&amp;counturl=http%3A%2F%2Fashutoshmehra.net%2Fblog%2F2009%2F03%2Fsolving-project-euler-problems-with-zdds%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://ashutoshmehra.net/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>]]></content:encoded>
			<wfw:commentRss>http://ashutoshmehra.net/blog/2009/03/solving-project-euler-problems-with-zdds/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
<enclosure url="http://stanford-online.stanford.edu/seminars/knuth/000222-knuth-100.asx" length="75" type="video/x-ms-asf" />
		</item>
	</channel>
</rss>

