<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>20bits - Latest Comments in Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.disqus.com/</link><description></description><language>en</language><lastBuildDate>Sun, 11 Jan 2009 17:18:20 -0000</lastBuildDate><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-5061852</link><description>You're right, Mike.  Unfortunately I don't have time to correct it myself.&lt;br&gt;&lt;br&gt;I thought I found a solution that didn'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's function?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jfarmer</dc:creator><pubDate>Sun, 11 Jan 2009 17:18:20 -0000</pubDate></item><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-3793253</link><description>the landau function in the code section seems incorrect. landau(29) gives 2310, while g(29) from &lt;a href="http://www.research.att.com/%7Enjas/sequences/A000793" rel="nofollow"&gt;http://www.research.att.com/~njas/sequences/A00...&lt;/a&gt; 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><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mike</dc:creator><pubDate>Mon, 28 Jan 2008 22:55:04 -0000</pubDate></item><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-3793256</link><description>You can find the required email address with Google, too:&lt;br&gt;&lt;a href="http://www.google.com/search?q=0xFACEB00C+%252F+4+in+decimal&amp;amp;btnG=Search" rel="nofollow"&gt;http://www.google.com/search?q=0xFACEB00C+%2F+4...&lt;/a&gt;&lt;br&gt;&lt;br&gt;Your solution makes for interesting reading -- thanks for writing it up.&lt;br&gt;&lt;br&gt;Here's my own page on &lt;a href="http://www.justinknoll.com/wordpress/?p=116" rel="nofollow"&gt;0xFACEB00C &amp;gt;&amp;gt; 2 in decimal&lt;/a&gt;.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Justin Knoll</dc:creator><pubDate>Mon, 28 Jan 2008 17:50:19 -0000</pubDate></item><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-3793255</link><description>[got truncated?] Ah, I used an incorrect constraint of sum(cycle-lengths)=26 instead of sum(cycle-lengths)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Saumitro</dc:creator><pubDate>Thu, 17 Jan 2008 22:34:08 -0000</pubDate></item><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-3793254</link><description>Ah, I used an incorrect constraint of sum(cycle-lengths)=26 instead of sum(cycle-lengths)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Saumitro</dc:creator><pubDate>Thu, 17 Jan 2008 22:30:14 -0000</pubDate></item><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-3793252</link><description>Saumitro,&lt;br&gt;&lt;br&gt;In the general case we're not computing partitions of 26, but rather the value of Laundau's function.  We only have to consider partitions of 26 because we're left with too few letters to fill each cycle.&lt;br&gt;&lt;br&gt;Also, in the general case, I'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's how we'd write it in group theory.&lt;br&gt;&lt;br&gt;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.&lt;br&gt;&lt;br&gt;As for the name, I got it from Facebook.  Blame them. :P</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Thu, 17 Jan 2008 03:17:30 -0000</pubDate></item><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-3793251</link><description>I believe there is a slight error in your calculations. The problem is right on the "threshold length" 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'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.&lt;br&gt;&lt;br&gt;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 "Control Structure Abstractions of the Backtracking Programming Technique". They called the problem "Malicious Secretary" (IMHO, a much better title than the misleading "Korn Shell")</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Saumitro</dc:creator><pubDate>Wed, 16 Jan 2008 01:54:51 -0000</pubDate></item><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-3793250</link><description>wilson,&lt;br&gt;&lt;br&gt;Oh, for sure.  I don't think anyone is claiming they're anything more than puzzles (although Landau's function is not without its uses).  But it does demonstrate ones ability to reason analytically and translate that reasoning into code.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Mon, 30 Apr 2007 17:43:26 -0000</pubDate></item><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-3793249</link><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><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">wilson</dc:creator><pubDate>Mon, 30 Apr 2007 17:30:05 -0000</pubDate></item><item><title>Re: Facebook job puzzles: Korn Shell | 20bits</title><link>http://20bits.com/articles/facebook-job-puzzles-korn-shell/#comment-3793248</link><description>Awesome explanation and a nice solution! I've recently started realizing the power of math and taking a very huge interest in it. Also, just wanted to bring to your attention a minor typo in your article. Under the section "The Computation" you have "2+3+4+5+7+11 = 28" when I'm sure you meant '2+3+5+7+11 = 28'&lt;br&gt;&lt;br&gt;Thanks.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gOcOOl</dc:creator><pubDate>Mon, 30 Apr 2007 02:27:52 -0000</pubDate></item></channel></rss>