<?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: JavaScript 快速组合算法</title>
	<atom:link href="http://lifesinger.org/blog/2009/09/javascript-quick-combine/feed/" rel="self" type="application/rss+xml" />
	<link>http://lifesinger.org/blog/2009/09/javascript-quick-combine/</link>
	<description>关注用户体验、前端开发，记录生活点滴、岁月足迹。</description>
	<lastBuildDate>Fri, 30 Jul 2010 02:05:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: aolu11</title>
		<link>http://lifesinger.org/blog/2009/09/javascript-quick-combine/comment-page-1/#comment-4784</link>
		<dc:creator>aolu11</dc:creator>
		<pubDate>Sun, 07 Mar 2010 16:31:09 +0000</pubDate>
		<guid isPermaLink="false">http://lifesinger.org/blog/?p=2210#comment-4784</guid>
		<description>这种算法有个BUG
比如 comb(10,5)
只要遇到形如 0010xxxx 的组合，此时 p1=p2，因此((1 &lt;&lt; p1) - (1 &lt;&lt; p2)).toString(2)
是 0 而不是我们所期望的 00，因此会少一位，然后后面会越算越少
实际上我们似乎应该为构造 111000 形式的函数 ((1 &lt;&lt; p1) - (1 &lt;&lt; p2)).toString(2) 加一个边界条件，当 p1==p2，即全为 0 时，直接返回 (1 &lt;&lt; p1).toString(2).slice(1)</description>
		<content:encoded><![CDATA[<p>这种算法有个BUG<br />
比如 comb(10,5)<br />
只要遇到形如 0010xxxx 的组合，此时 p1=p2，因此((1 &lt;&lt; p1) &#8211; (1 &lt;&lt; p2)).toString(2)<br />
是 0 而不是我们所期望的 00，因此会少一位，然后后面会越算越少<br />
实际上我们似乎应该为构造 111000 形式的函数 ((1 &lt;&lt; p1) &#8211; (1 &lt;&lt; p2)).toString(2) 加一个边界条件，当 p1==p2，即全为 0 时，直接返回 (1 &lt;&lt; p1).toString(2).slice(1)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lifesinger</title>
		<link>http://lifesinger.org/blog/2009/09/javascript-quick-combine/comment-page-1/#comment-3635</link>
		<dc:creator>lifesinger</dc:creator>
		<pubDate>Sun, 13 Dec 2009 03:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://lifesinger.org/blog/?p=2210#comment-3635</guid>
		<description>@tomijerry: 数学上有证明的，可以搜索。</description>
		<content:encoded><![CDATA[<p>@tomijerry: 数学上有证明的，可以搜索。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomijerry</title>
		<link>http://lifesinger.org/blog/2009/09/javascript-quick-combine/comment-page-1/#comment-3631</link>
		<dc:creator>tomijerry</dc:creator>
		<pubDate>Sat, 12 Dec 2009 17:20:14 +0000</pubDate>
		<guid isPermaLink="false">http://lifesinger.org/blog/?p=2210#comment-3631</guid>
		<description>请问下这种算法在数学上已经证明是正确的吗</description>
		<content:encoded><![CDATA[<p>请问下这种算法在数学上已经证明是正确的吗</p>
]]></content:encoded>
	</item>
</channel>
</rss>
