<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>阅微堂 &#187; 医生和病人</title>
	<atom:link href="http://zhiqiang.org/blog/tag/%e5%8c%bb%e7%94%9f%e5%92%8c%e7%97%85%e4%ba%ba/feed" rel="self" type="application/rss+xml" />
	<link>http://zhiqiang.org/blog</link>
	<description>理工科背景的证券从业人员</description>
	<lastBuildDate>Sun, 05 Feb 2012 03:59:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>策略游戏：医生和病人（I）</title>
		<link>http://zhiqiang.org/blog/science/strategy-games-doctors-and-patients-i.html</link>
		<comments>http://zhiqiang.org/blog/science/strategy-games-doctors-and-patients-i.html#comments</comments>
		<pubDate>Tue, 10 Jul 2007 07:56:51 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[自然科学]]></category>
		<category><![CDATA[医生和病人]]></category>
		<category><![CDATA[头脑风暴]]></category>
		<category><![CDATA[游戏]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/617.html</guid>
		<description><![CDATA[博客 » 自然科学 » 头脑风暴 » 系列：头脑风暴 查看该系列所有文章 我很早之前就想过这个问题，但一直只知道一个trivial的答案。前两天无意中发现网上已经有高手给出了更好的方案，故记录在此。有兴趣的可以自己想一想。 岛国上流行一种极易接触传染的病一旦染上该病1月后病发身亡但该病可通外科手术治愈 岛上每个人都有已被传染的可能国王怀疑自己得了该病在该岛...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/science">自然科学</a> » <a href='http://zhiqiang.org/blog/tag/%e5%a4%b4%e8%84%91%e9%a3%8e%e6%9a%b4'>头脑风暴</a>  » </p><div class="series"><span>系列：<b>头脑风暴</b></span><br/>
<a href="http://zhiqiang.org/blog/tag/%e5%a4%b4%e8%84%91%e9%a3%8e%e6%9a%b4">查看该系列所有文章</a>
<div id='series'></div>
</div>  <p>我很早之前就想过这个问题，但一直只知道一个trivial的答案。前两天无意中发现网上已经有高手给出了更好的方案，故记录在此。有兴趣的可以自己想一想。  </p>
<p>岛国上流行一种极易接触传染的病<br />一旦染上该病1月后病发身亡<br />但该病可通外科手术治愈  </p>
<p>岛上每个人都有已被传染的可能<br />国王怀疑自己得了该病<br />在该岛上找到了医术最高名的3个医生<br />并要求这3个医生在当天轮流给自己动手术<br />然而已消毒过的手术手套只有2双<br />怎样最安全  </p>
<p>现在把问题一般化，假设岛上有n个医生，还有m个（非医生）居民。现在岛上流行一种极易接触传染的病。每个居民要想治愈传染病，必须得到这n个医生的治疗，治疗的顺序无所谓（先别管这种假设的由来）。怎么安排它们手术的次序和带手套的方案，使得所用的手术手套最少。  </p>
<p>注一：医生也有可能已被传染，故他们之间也要防止相互感染。<br />注二：手套可以套着用...还可以反着用...  </p>
<p>下面的解答作者是JtR，来自水母IQDoor版。  </p>
<p>用{m/2}+{n/2}+{n/4}(m&lt;=n)双手套即可。{}表示向上取整。  </p>
<p>为了叙述方便，假设m是2的倍数，n是4的倍数，不是4的倍数时类似，只是手套的“利用率”没有那么高。可能可以通过优化减少一副到两副。  </p>
<p>1.将医生平均分为两组，分别为A，B。各m/2人；<br />将病人分为三组，人数分别为a＝n/2，b=n/4，c=n/4  </p>
<p>2.将m/2副手套分配给A，n/2副手套分配给a，A中的每一个医生检查a中的每一个病人；<br />检查前均在自己的手套外套上指定给该病人的手套；<br />注意所有的手套均只有一面污染。（假设医生之间也要防止相互感染）  </p>
<p>3.将分配给a的n/2副手套中的一半翻转，两两一组套在一起，污染面互相接触，此时每一组手套内外均无污染；将这n/4组手套分配给b(n/4人）；<br />将剩下的未使用过的n/4只手套分配给c(n/4人）；  </p>
<p>4.A中的每一位医生分别检查b，c中的病人，检查前均在自己的手套外套上指定给该病人的手套（或两只套在一起的手套）；<br />这样A中的医生完成对所有病人的检查，而且医生的手套外侧和指定给病人的手套内侧(注意有n/4是翻转过的)均无污染。  </p>
<p>5.A中所有的医生将各自的手套翻转后给B中的医生戴上；<br />b中的病人把套在一起的手套里面的那只抽出来翻转后套入c组病人的手套中。此时c组的手套每一组相互接触的面都是干净的；  </p>
<p>6.B中所有的医生按前述方法给b，c两组病人检查；  </p>
<p>7.将c组的手套两两分开，把套在外面的手套翻转，这样得到n/2只外侧干净的手套重新分配给a组的病人。  </p>
<p>8.B中的所有医生检查a组的病人。  </p>
<p>这样就完成了所有医生对病人的检查。  </p>
<p>如果医生的数量比病人多只要把医生和病人交换即可。在该问题中二者是对称的。 </p>
<p>[tags]医生和病人,策略,游戏[/tags]</p>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/science/rotate-coin-games.html">硬币游戏</a></li><li><a href="http://zhiqiang.org/blog/entertainment/fan-tan-game-empty-when-most-difficult-relationship.html">空当接龙中最难的关</a></li><li><a href="http://zhiqiang.org/blog/science/theoritical-analysis-marfia-game.html">杀人的理论分析</a></li><li><a href="http://zhiqiang.org/blog/science/15-puzzle.html">15 puzzle</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/most-windows-game-are-np-complete.html">Windows游戏中的NP完全问题</a></li><li><a href="http://zhiqiang.org/blog/science/two-taking-coins-game.html">取硬币游戏</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/boxes-problem-on-static-data-structure-problems.html">摸箱子问题以及应用</a></li><li><a href="http://zhiqiang.org/blog/entertainment/cat-game.html">堵猫游戏</a></li><li><a href="http://zhiqiang.org/blog/entertainment/kerrigan-starcraft-ii.html">Kerrigan！</a></li><li><a href="http://zhiqiang.org/blog/science/37-rule-is-optimal.html">37-rule-is-optimal</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2007. | <a href="http://zhiqiang.org/blog/science/strategy-games-doctors-and-patients-i.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/strategy-games-doctors-and-patients-i.html#comments">6 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/strategy-games-doctors-and-patients-i.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

