<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Mr. S. and Mr. P.</title>
	<atom:link href="http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/feed/" rel="self" type="application/rss+xml" />
	<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/</link>
	<description>A collection of etudes, updated weekly, for the education and enjoyment of the savvy programmer</description>
	<lastBuildDate>Mon, 28 May 2012 03:30:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Roy van Rijn</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-1539</link>
		<dc:creator><![CDATA[Roy van Rijn]]></dc:creator>
		<pubDate>Mon, 02 Aug 2010 06:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-1539</guid>
		<description><![CDATA[Just ran my program a bit longer:

Once you increase N to around 850 you&#039;ll have two solutions, not just 4 - 13.
The second solution is 4 - 61.]]></description>
		<content:encoded><![CDATA[<p>Just ran my program a bit longer:</p>
<p>Once you increase N to around 850 you&#8217;ll have two solutions, not just 4 &#8211; 13.<br />
The second solution is 4 &#8211; 61.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: _raf</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-758</link>
		<dc:creator><![CDATA[_raf]]></dc:creator>
		<pubDate>Tue, 10 Nov 2009 13:51:05 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-758</guid>
		<description><![CDATA[Correction: 4 *or 5* and &quot;singleton? good-summands&quot;...]]></description>
		<content:encoded><![CDATA[<p>Correction: 4 *or 5* and &#8220;singleton? good-summands&#8221;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: _raf</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-757</link>
		<dc:creator><![CDATA[_raf]]></dc:creator>
		<pubDate>Tue, 10 Nov 2009 12:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-757</guid>
		<description><![CDATA[fact2? is Mr S&#039;s assertion that he doesn&#039;t know: s=m+n is such that m and n can not be known (or, the list of good-summands for s has length &gt; 1). The only &quot;good-summand&quot; in this sense is 4, but in that case both Mr P and Mr S know the numbers and we wouldn&#039;t be having this pleasant conversation.

Here&#039;s a slightly modified version of your program that produces ((13 4)) in plt-scheme-4.2.2: http://codepad.org/3BAukrSO

regards,
_raf]]></description>
		<content:encoded><![CDATA[<p>fact2? is Mr S&#8217;s assertion that he doesn&#8217;t know: s=m+n is such that m and n can not be known (or, the list of good-summands for s has length &gt; 1). The only &#8220;good-summand&#8221; in this sense is 4, but in that case both Mr P and Mr S know the numbers and we wouldn&#8217;t be having this pleasant conversation.</p>
<p>Here&#8217;s a slightly modified version of your program that produces ((13 4)) in plt-scheme-4.2.2: <a href="http://codepad.org/3BAukrSO" rel="nofollow">http://codepad.org/3BAukrSO</a></p>
<p>regards,<br />
_raf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: programmingpraxis</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-754</link>
		<dc:creator><![CDATA[programmingpraxis]]></dc:creator>
		<pubDate>Tue, 10 Nov 2009 00:58:45 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-754</guid>
		<description><![CDATA[&lt;code&gt;Fact2?&lt;/code&gt; is used in the final calculation of &lt;code&gt;result&lt;/code&gt;.  The calculation fails without &lt;code&gt;fact2?&lt;/code&gt;.  What do you mean?]]></description>
		<content:encoded><![CDATA[<p><code>Fact2?</code> is used in the final calculation of <code>result</code>.  The calculation fails without <code>fact2?</code>.  What do you mean?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: _raf</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-753</link>
		<dc:creator><![CDATA[_raf]]></dc:creator>
		<pubDate>Tue, 10 Nov 2009 00:53:30 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-753</guid>
		<description><![CDATA[fact2 is irrelevant. why?
regards,
_raf]]></description>
		<content:encoded><![CDATA[<p>fact2 is irrelevant. why?<br />
regards,<br />
_raf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rudi Angela</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-721</link>
		<dc:creator><![CDATA[Rudi Angela]]></dc:creator>
		<pubDate>Sun, 25 Oct 2009 21:09:43 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-721</guid>
		<description><![CDATA[My solution is programmed in Erlang and can be viewed at &lt;a href=&quot;http://pastebin.com/d5644b5ae&quot; rel=&quot;nofollow&quot;&gt;PasteBin&lt;/a&gt;
The source code contains extensive explanation in comments.
Running my solution yields:
io:format(&quot;Solution: ~w~n&quot;, [pssolver:solve(2,99)]).
Solution: [{13,4}]
So the sought number pair is 13 and 4.
It was quite a challenge!]]></description>
		<content:encoded><![CDATA[<p>My solution is programmed in Erlang and can be viewed at <a href="http://pastebin.com/d5644b5ae" rel="nofollow">PasteBin</a><br />
The source code contains extensive explanation in comments.<br />
Running my solution yields:<br />
io:format(&#8220;Solution: ~w~n&#8221;, [pssolver:solve(2,99)]).<br />
Solution: [{13,4}]<br />
So the sought number pair is 13 and 4.<br />
It was quite a challenge!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michel S.</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-719</link>
		<dc:creator><![CDATA[Michel S.]]></dc:creator>
		<pubDate>Sat, 24 Oct 2009 10:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-719</guid>
		<description><![CDATA[@shiro interesting indeed, thanks for sharing! While code is universal, sometimes language barrier means these gems don&#039;t get found...

For those interested, I&#039;ve translated Oleg&#039;s Haskell code to Clojure. It&#039;s Lisp, it&#039;s on the JVM, and it has lazy sequences -- the translation is virtually 1-to-1, apart from syntactic differences.

http://github.com/hircus/clj-puzzles/blob/master/Mr-S-P.clj]]></description>
		<content:encoded><![CDATA[<p>@shiro interesting indeed, thanks for sharing! While code is universal, sometimes language barrier means these gems don&#8217;t get found&#8230;</p>
<p>For those interested, I&#8217;ve translated Oleg&#8217;s Haskell code to Clojure. It&#8217;s Lisp, it&#8217;s on the JVM, and it has lazy sequences &#8212; the translation is virtually 1-to-1, apart from syntactic differences.</p>
<p><a href="http://github.com/hircus/clj-puzzles/blob/master/Mr-S-P.clj" rel="nofollow">http://github.com/hircus/clj-puzzles/blob/master/Mr-S-P.clj</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michel</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-718</link>
		<dc:creator><![CDATA[Michel]]></dc:creator>
		<pubDate>Sat, 24 Oct 2009 10:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-718</guid>
		<description><![CDATA[@shiro intriguing indeed! Thanks for sharing the Japanese site -- all too often, gems on the Internet lie undiscovered because of language barriers (even though the code itself is universal).

For those interested in Lispy solutions, I&#039;ve translated Oleg&#039;s code from Haskell to Clojure. It&#039;s Lisp, it&#039;s on the JVM, and best of all, it has lazy sequences. The translation is almost 1-to-1.

http://github.com/hircus/clj-puzzles/blob/master/Mr-S-P.clj

Cheers!]]></description>
		<content:encoded><![CDATA[<p>@shiro intriguing indeed! Thanks for sharing the Japanese site &#8212; all too often, gems on the Internet lie undiscovered because of language barriers (even though the code itself is universal).</p>
<p>For those interested in Lispy solutions, I&#8217;ve translated Oleg&#8217;s code from Haskell to Clojure. It&#8217;s Lisp, it&#8217;s on the JVM, and best of all, it has lazy sequences. The translation is almost 1-to-1.</p>
<p><a href="http://github.com/hircus/clj-puzzles/blob/master/Mr-S-P.clj" rel="nofollow">http://github.com/hircus/clj-puzzles/blob/master/Mr-S-P.clj</a></p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michel</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-717</link>
		<dc:creator><![CDATA[Michel]]></dc:creator>
		<pubDate>Sat, 24 Oct 2009 10:18:38 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-717</guid>
		<description><![CDATA[@Shiro: thanks for the link! A lot of gems are hidden away behind language barriers...

For those who are interested, I translated Oleg&#039;s code into Clojure. It&#039;s Lispy, it runs on the JVM, and best of all, it has lazy sequences a la Haskell.

http://github.com/hircus/clj-puzzles/blob/master/Mr-S-P.clj]]></description>
		<content:encoded><![CDATA[<p>@Shiro: thanks for the link! A lot of gems are hidden away behind language barriers&#8230;</p>
<p>For those who are interested, I translated Oleg&#8217;s code into Clojure. It&#8217;s Lispy, it runs on the JVM, and best of all, it has lazy sequences a la Haskell.</p>
<p><a href="http://github.com/hircus/clj-puzzles/blob/master/Mr-S-P.clj" rel="nofollow">http://github.com/hircus/clj-puzzles/blob/master/Mr-S-P.clj</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shiro</title>
		<link>http://programmingpraxis.com/2009/10/23/mr-s-and-mr-p/#comment-716</link>
		<dc:creator><![CDATA[shiro]]></dc:creator>
		<pubDate>Fri, 23 Oct 2009 19:34:59 +0000</pubDate>
		<guid isPermaLink="false">http://programmingpraxis.com/?p=1530#comment-716</guid>
		<description><![CDATA[This puzzle is quite intriguing.   There&#039;s a Japanese website where users can post programming puzzles and solutions, and a variation of this puzzle was posted some time ago.  You can browse solutions in whole bunch of different languages:

http://ja.doukaku.org/34/nested/  (descriptions are in japanese, but code is universal).

I like the solution using Python&#039;s list comprehension.  Haskell ones are also concise.
(Note: some posted solutions contained bugs and later corrected by comments).

The original puzzle posted in the above url limited the number of the range between 1 &lt;= a &lt;= b &lt;= 13.  Then upper bound became a variable N.  As N gets larger there can be more than one solutions, and an interesting question was posted that whether you could tell the relationship between N and the number of solutions.  Some guys checked solutions with varying N up to 1000 to find out the relation but couldn&#039;t.  Do you know any reference that analyzes the pattern of solutions of this puzzle with varying N?]]></description>
		<content:encoded><![CDATA[<p>This puzzle is quite intriguing.   There&#8217;s a Japanese website where users can post programming puzzles and solutions, and a variation of this puzzle was posted some time ago.  You can browse solutions in whole bunch of different languages:</p>
<p><a href="http://ja.doukaku.org/34/nested/" rel="nofollow">http://ja.doukaku.org/34/nested/</a>  (descriptions are in japanese, but code is universal).</p>
<p>I like the solution using Python&#8217;s list comprehension.  Haskell ones are also concise.<br />
(Note: some posted solutions contained bugs and later corrected by comments).</p>
<p>The original puzzle posted in the above url limited the number of the range between 1 &lt;= a &lt;= b &lt;= 13.  Then upper bound became a variable N.  As N gets larger there can be more than one solutions, and an interesting question was posted that whether you could tell the relationship between N and the number of solutions.  Some guys checked solutions with varying N up to 1000 to find out the relation but couldn&#039;t.  Do you know any reference that analyzes the pattern of solutions of this puzzle with varying N?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

