<?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: Facebook job puzzles: Korn Shell</title>
	<atom:link href="http://20bits.com/articles/facebook-job-puzzles-korn-shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/</link>
	<description>Driven by Data</description>
	<lastBuildDate>Wed, 28 Jul 2010 21:50:46 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Gaganpp</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-5099</link>
		<dc:creator>Gaganpp</dc:creator>
		<pubDate>Mon, 26 Jul 2010 12:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-5099</guid>
		<description>find a similar application on @www.cinterviews.com and preapare and learn for you</description>
		<content:encoded><![CDATA[<p>find a similar application on @www.cinterviews.com and preapare and learn for you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Farmer</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-4050</link>
		<dc:creator>Jesse Farmer</dc:creator>
		<pubDate>Sun, 11 Jan 2009 21:18:20 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-4050</guid>
		<description>You&#039;re right, Mike.  Unfortunately I don&#039;t have time to correct it myself.&lt;br&gt;&lt;br&gt;I thought I found a solution that didn&#039;t require a full search of the problem space.  Guess I was too clever.&lt;br&gt;&lt;br&gt;Know of any papers that outline an efficient algorithm for calculating Landau&#039;s function?</description>
		<content:encoded><![CDATA[<p>You&#39;re right, Mike.  Unfortunately I don&#39;t have time to correct it myself.</p>
<p>I thought I found a solution that didn&#39;t require a full search of the problem space.  Guess I was too clever.</p>
<p>Know of any papers that outline an efficient algorithm for calculating Landau&#39;s function?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-950</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 29 Jan 2008 03:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-950</guid>
		<description>the landau function in the code section seems incorrect. landau(29) gives 2310, while g(29) from http://www.research.att.com/~njas/sequences/A000793 is 2520 (i.e 9*8*7*5). i can see no reason to assume that g(n) is always lcm(m, g(n - m)) for some m.</description>
		<content:encoded><![CDATA[<p>the landau function in the code section seems incorrect. landau(29) gives 2310, while g(29) from <a href="http://www.research.att.com/~njas/sequences/A000793" rel="nofollow">http://www.research.att.com/~njas/sequences/A000793</a> is 2520 (i.e 9*8*7*5). i can see no reason to assume that g(n) is always lcm(m, g(n &#8211; m)) for some m.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Knoll</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-949</link>
		<dc:creator>Justin Knoll</dc:creator>
		<pubDate>Mon, 28 Jan 2008 22:50:19 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-949</guid>
		<description>You can find the required email address with Google, too:
http://www.google.com/search?q=0xFACEB00C+%2F+4+in+decimal&amp;btnG=Search

Your solution makes for interesting reading -- thanks for writing it up.

Here&#039;s my own page on &lt;a href=&quot;http://www.justinknoll.com/wordpress/?p=116&quot; rel=&quot;nofollow&quot;&gt;0xFACEB00C &gt;&gt; 2 in decimal&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>You can find the required email address with Google, too:<br />
<a href="http://www.google.com/search?q=0xFACEB00C+%2F+4+in+decimal&amp;btnG=Search" rel="nofollow">http://www.google.com/search?q=0xFACEB00C+%2F+4+in+decimal&amp;btnG=Search</a></p>
<p>Your solution makes for interesting reading &#8212; thanks for writing it up.</p>
<p>Here&#8217;s my own page on <a href="http://www.justinknoll.com/wordpress/?p=116" rel="nofollow">0xFACEB00C &gt;&gt; 2 in decimal</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saumitro</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-926</link>
		<dc:creator>Saumitro</dc:creator>
		<pubDate>Fri, 18 Jan 2008 03:34:08 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-926</guid>
		<description>[got truncated?] Ah, I used an incorrect constraint of sum(cycle-lengths)=26 instead of sum(cycle-lengths)</description>
		<content:encoded><![CDATA[<p>[got truncated?] Ah, I used an incorrect constraint of sum(cycle-lengths)=26 instead of sum(cycle-lengths)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saumitro</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-925</link>
		<dc:creator>Saumitro</dc:creator>
		<pubDate>Fri, 18 Jan 2008 03:30:14 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-925</guid>
		<description>Ah, I used an incorrect constraint of sum(cycle-lengths)=26 instead of sum(cycle-lengths)</description>
		<content:encoded><![CDATA[<p>Ah, I used an incorrect constraint of sum(cycle-lengths)=26 instead of sum(cycle-lengths)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-920</link>
		<dc:creator>Jesse</dc:creator>
		<pubDate>Thu, 17 Jan 2008 08:17:30 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-920</guid>
		<description>Saumitro,

In the general case we&#039;re not computing partitions of 26, but rather the value of Laundau&#039;s function.  We only have to consider partitions of 26 because we&#039;re left with too few letters to fill each cycle.

Also, in the general case, I&#039;m talking about cycles in permutations rather than partitions.  Why I list 4 rather than 5 is a side-effect of the mathematical notation: cycles of length one are left out.  Thus, up to conjugation, the permutation of interest is (1..4)(5..9)(10..16)(17..25).  At least, that&#039;s how we&#039;d write it in group theory.

So, IOW, if we have at least four distinct letters we can put one in each of those cycles, producing a game that lasts 1260 rounds.  That the fifth, single-element cycle is left unfilled has no impact, as you said.

As for the name, I got it from Facebook.  Blame them. :P</description>
		<content:encoded><![CDATA[<p>Saumitro,</p>
<p>In the general case we&#8217;re not computing partitions of 26, but rather the value of Laundau&#8217;s function.  We only have to consider partitions of 26 because we&#8217;re left with too few letters to fill each cycle.</p>
<p>Also, in the general case, I&#8217;m talking about cycles in permutations rather than partitions.  Why I list 4 rather than 5 is a side-effect of the mathematical notation: cycles of length one are left out.  Thus, up to conjugation, the permutation of interest is (1..4)(5..9)(10..16)(17..25).  At least, that&#8217;s how we&#8217;d write it in group theory.</p>
<p>So, IOW, if we have at least four distinct letters we can put one in each of those cycles, producing a game that lasts 1260 rounds.  That the fifth, single-element cycle is left unfilled has no impact, as you said.</p>
<p>As for the name, I got it from Facebook.  Blame them. :P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saumitro</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-918</link>
		<dc:creator>Saumitro</dc:creator>
		<pubDate>Wed, 16 Jan 2008 06:54:51 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-918</guid>
		<description>I believe there is a slight error in your calculations. The problem is right on the &quot;threshold length&quot; of 4. The maximum LCM of a length four partition of 26 is 1155, corresponding to the partition [11,7,5,3], not 1260. The set you specified [4,5,7,9] isn&#039;t a partition of 26; it adds up to 25. However, you can insert a 1 in the set, leaving the lcm unaffected which gives you the max lcm of 1260 for length 5 and beyond.

I solved the problem on a lazy afternoon last year, and was curious about its origins and other solutions, and I came across your page. The origin as far as I can tell is an ancient 70s paper entitled &quot;Control Structure Abstractions of the Backtracking Programming Technique&quot;. They called the problem &quot;Malicious Secretary&quot; (IMHO, a much better title than the misleading &quot;Korn Shell&quot;)</description>
		<content:encoded><![CDATA[<p>I believe there is a slight error in your calculations. The problem is right on the &#8220;threshold length&#8221; of 4. The maximum LCM of a length four partition of 26 is 1155, corresponding to the partition [11,7,5,3], not 1260. The set you specified [4,5,7,9] isn&#8217;t a partition of 26; it adds up to 25. However, you can insert a 1 in the set, leaving the lcm unaffected which gives you the max lcm of 1260 for length 5 and beyond.</p>
<p>I solved the problem on a lazy afternoon last year, and was curious about its origins and other solutions, and I came across your page. The origin as far as I can tell is an ancient 70s paper entitled &#8220;Control Structure Abstractions of the Backtracking Programming Technique&#8221;. They called the problem &#8220;Malicious Secretary&#8221; (IMHO, a much better title than the misleading &#8220;Korn Shell&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-119</link>
		<dc:creator>Jesse</dc:creator>
		<pubDate>Mon, 30 Apr 2007 21:43:26 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-119</guid>
		<description>wilson,

Oh, for sure.  I don&#039;t think anyone is claiming they&#039;re anything more than puzzles (although Landau&#039;s function is not without its uses).  But it does demonstrate ones ability to reason analytically and translate that reasoning into code.</description>
		<content:encoded><![CDATA[<p>wilson,</p>
<p>Oh, for sure.  I don&#8217;t think anyone is claiming they&#8217;re anything more than puzzles (although Landau&#8217;s function is not without its uses).  But it does demonstrate ones ability to reason analytically and translate that reasoning into code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wilson</title>
		<link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/comment-page-1/#comment-118</link>
		<dc:creator>wilson</dc:creator>
		<pubDate>Mon, 30 Apr 2007 21:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://20bits.com/2007/04/19/facebook-job-puzzles-korn-shell/#comment-118</guid>
		<description>While those are some snazzy puzzles, I imagine that they are not at all along the lines of the work that anyone hired by Facebook will actually be doing...  They are more like brain teasers to see how motivated you are and to see if you can solve odd problems like that.</description>
		<content:encoded><![CDATA[<p>While those are some snazzy puzzles, I imagine that they are not at all along the lines of the work that anyone hired by Facebook will actually be doing&#8230;  They are more like brain teasers to see how motivated you are and to see if you can solve odd problems like that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
