<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tcs.nju.edu.cn/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=172.25.50.3</id>
	<title>TCS Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://tcs.nju.edu.cn/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=172.25.50.3"/>
	<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Special:Contributions/172.25.50.3"/>
	<updated>2026-05-02T14:34:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/Problem_Set_1&amp;diff=1694</id>
		<title>Randomized Algorithms (Spring 2010)/Problem Set 1</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/Problem_Set_1&amp;diff=1694"/>
		<updated>2010-03-28T12:02:33Z</updated>

		<summary type="html">&lt;p&gt;172.25.50.3: /* Problem 0 (10 points) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;刘正 MF0933021&lt;br /&gt;
&lt;br /&gt;
==Problem 1 (10 points)==&lt;br /&gt;
[MR]-1.1&lt;br /&gt;
&lt;br /&gt;
* Suppose that you are given a coin for which the probability of HEADS, say &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;, is &#039;&#039;unknown&#039;&#039;. How can you use this coin to generate unbiased (i.e., &amp;lt;math&amp;gt;\Pr[\mathrm{HEADS}]=\Pr[\mathrm{TAILS}]=1/2&amp;lt;/math&amp;gt;) coin-flips? Give a scheme for which the expected number of flips of the biased coin for extracting one unbiased coin-flip is no more than &amp;lt;math&amp;gt;\frac{1}{p(1-p)}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:(&#039;&#039;&#039;Hint&#039;&#039;&#039;: Consider two consecutive flips of the biased coin.)&lt;br /&gt;
&lt;br /&gt;
* (Bonus problem) Devise an extension of the scheme that extracts the largest possible number of independent, unbiased coin-flips from a given number of flips of the biased coin.&lt;br /&gt;
&lt;br /&gt;
==Problem 2 (10 points)==&lt;br /&gt;
The original Karger&#039;s algorithm returns a min-cut with probability &amp;lt;math&amp;gt;\ge\frac{2}{n(n-1)}&amp;lt;/math&amp;gt; after &amp;lt;math&amp;gt;n-2&amp;lt;/math&amp;gt; contractions.&lt;br /&gt;
We have seen that by running the original Karger&#039;s algorithm for multiple times, the probability of success can be improved. Consider the following variation. Starting with a graph with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices, first contract the graph down to &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; vertices using Karger&#039;s algorithm. Make &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; copies of the graph with &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; vertices, and now run Karger&#039;s algorithm independently on these &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; copies. Return the smallest returned cut of these &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; instances. &lt;br /&gt;
* What is the total number of contractions?&lt;br /&gt;
* What is the probability of finding a min-cut?&lt;br /&gt;
* Try to optimize the probability of success subject to the constraint of using no more than &amp;lt;math&amp;gt;2n&amp;lt;/math&amp;gt; contractions.&lt;br /&gt;
&lt;br /&gt;
==Problem 3 (10 points)==&lt;br /&gt;
Recall the following definitions:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Definition 2:&#039;&#039;&#039; The class &#039;&#039;&#039;NP&#039;&#039;&#039; consists of all decision problems &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; that have a polynomial time deterministic algorithm &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; such that for any input &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;f(x)=1&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;\exists y&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;V(x,y)=1&amp;lt;/math&amp;gt;, where the size of &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; is within polynomial of the size of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Definition 4:&#039;&#039;&#039; The class &#039;&#039;&#039;ZPP&#039;&#039;&#039; consists of all decision problems &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; that have a randomized algorithm &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; running in expected polynomial time for any input such that for any input &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A(x)=f(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Definition 5:&#039;&#039;&#039; The class &#039;&#039;&#039;RP&#039;&#039;&#039; consists of all decision problems &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; that have a randomized algorithm &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; running in worst-case polynomial time such that for any input &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;,&lt;br /&gt;
*if &amp;lt;math&amp;gt;f(x)=1&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;\Pr[A(x)=1]\ge 1-1/2&amp;lt;/math&amp;gt;;&lt;br /&gt;
*if &amp;lt;math&amp;gt;f(x)=0&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;\Pr[A(x)=0]=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Prove that &#039;&#039;&#039;ZPP&#039;&#039;&#039;&amp;lt;math&amp;gt;\subseteq&amp;lt;/math&amp;gt;&#039;&#039;&#039;NP&#039;&#039;&#039; and &#039;&#039;&#039;RP&#039;&#039;&#039;&amp;lt;math&amp;gt;\subseteq&amp;lt;/math&amp;gt;&#039;&#039;&#039;NP&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;&#039;Hint&#039;&#039;&#039;: Notice that a randomized algorithm &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; on input &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; can be represented as a deterministic algorithm &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; with two inputs: &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and a sequence &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; of random bits.)&lt;br /&gt;
&lt;br /&gt;
==Problem 4 (10 points)==&lt;br /&gt;
A parallel computer consists of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; processors and &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; memory modules. During a step, each processor sends a memory request to one of the memory modules, and each memory modul answer the request if it receives exactly one request. Note that a memory module may receive more than one requests. There are two schemes for dealing with conflicted memory requests:&lt;br /&gt;
# Upon receiving more than one requests, a memory module does not answer any request.&lt;br /&gt;
# Upon receiving more than one requests, a memory module answers one of the received requests.&lt;br /&gt;
Assuming that each processor sends a request to a memory module chosen uniformly and independently at random:&lt;br /&gt;
:(a) with the first scheme, what is the expected number of processors whose requests are answered?&lt;br /&gt;
:(b) with the second scheme, what is the expected number of processors whose requests are answered?&lt;br /&gt;
:(c) We upgrade the memory of the machine, so that a memory module that receives either one or two requests can answer its request(s); modules that receive more than two requests will answer two requests and discard the rest. What is the expected number of processors whose requests are answered?&lt;br /&gt;
&lt;br /&gt;
(You may assume the approximation &amp;lt;math&amp;gt;\left(1-\frac{1}{n}\right)^n\approx\frac{1}{e}&amp;lt;/math&amp;gt;.)&lt;/div&gt;</summary>
		<author><name>172.25.50.3</name></author>
	</entry>
</feed>