<?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>留言於︰Josephus Problem</title>
	<atom:link href="http://djws.wordpress.com/2009/07/12/josephus-problem/feed/" rel="self" type="application/rss+xml" />
	<link>http://djws.wordpress.com/2009/07/12/josephus-problem/</link>
	<description>http://www.csie.ntnu.edu.tw/~u91029/</description>
	<lastBuildDate>Sun, 20 Dec 2009 03:45:21 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>由：DJWS</title>
		<link>http://djws.wordpress.com/2009/07/12/josephus-problem/#comment-423</link>
		<dc:creator>DJWS</dc:creator>
		<pubDate>Mon, 13 Jul 2009 05:59:05 +0000</pubDate>
		<guid isPermaLink="false">http://djws.wordpress.com/2009/07/12/josephus-problem/#comment-423</guid>
		<description>感謝你提供的資料。citeseer 的那篇論文應該是時間複雜度最好的一個，不過它的代數符號太多了，我恐怕會消化不良。等哪天我良心發現了，才會去細讀它吧。:)

順便補充一下 m = 2 的時候的解法：去除 n 的最高位元，然後整體左移一位，最後加上一。時間複雜度為 O(logn)。</description>
		<content:encoded><![CDATA[<p>感謝你提供的資料。citeseer 的那篇論文應該是時間複雜度最好的一個，不過它的代數符號太多了，我恐怕會消化不良。等哪天我良心發現了，才會去細讀它吧。:)</p>
<p>順便補充一下 m = 2 的時候的解法：去除 n 的最高位元，然後整體左移一位，最後加上一。時間複雜度為 O(logn)。</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：Yu-Han</title>
		<link>http://djws.wordpress.com/2009/07/12/josephus-problem/#comment-418</link>
		<dc:creator>Yu-Han</dc:creator>
		<pubDate>Sun, 12 Jul 2009 16:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://djws.wordpress.com/2009/07/12/josephus-problem/#comment-418</guid>
		<description>如果是要找出所有被殺的順序，那O(n)應該沒辦法再改進了。如果只是要找最後一個被殺的人，或是找第k個被殺的人，上一篇提的方法應該在理論上都有改進。</description>
		<content:encoded><![CDATA[<p>如果是要找出所有被殺的順序，那O(n)應該沒辦法再改進了。如果只是要找最後一個被殺的人，或是找第k個被殺的人，上一篇提的方法應該在理論上都有改進。</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：Yu-Han</title>
		<link>http://djws.wordpress.com/2009/07/12/josephus-problem/#comment-415</link>
		<dc:creator>Yu-Han</dc:creator>
		<pubDate>Sun, 12 Jul 2009 16:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://djws.wordpress.com/2009/07/12/josephus-problem/#comment-415</guid>
		<description>其實還有其他更快的解法，Concrete Mathematics 3.3節上的解法類似http://www.auto.tuwien.ac.at/~blieb/woop/josephus.html。
而The Art of Computer Programming 1.3.3的習題31解法類似http://blog.csdn.net/solofancy/archive/2009/05/24/4211770.aspx的解法1（它的解法三好像有問題）。
而http://citeseer.ist.psu.edu/gelgi02time.html這裡提供的方法和上一個解法結合之後就是我看到最快的方法了，實做也不難。</description>
		<content:encoded><![CDATA[<p>其實還有其他更快的解法，Concrete Mathematics 3.3節上的解法類似http://www.auto.tuwien.ac.at/~blieb/woop/josephus.html。<br />
而The Art of Computer Programming 1.3.3的習題31解法類似http://blog.csdn.net/solofancy/archive/2009/05/24/4211770.aspx的解法1（它的解法三好像有問題）。<br />
而http://citeseer.ist.psu.edu/gelgi02time.html這裡提供的方法和上一個解法結合之後就是我看到最快的方法了，實做也不難。</p>
]]></content:encoded>
	</item>
</channel>
</rss>
