<?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.21.5.128</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.21.5.128"/>
	<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Special:Contributions/172.21.5.128"/>
	<updated>2026-05-02T05:14:17Z</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)/More_on_Chernoff_bounds&amp;diff=1387</id>
		<title>Randomized Algorithms (Spring 2010)/More on Chernoff bounds</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1387"/>
		<updated>2010-02-25T14:56:37Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.128: /* A two-phase randomized routing algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Permutation Routing ==&lt;br /&gt;
The problem raises from parallel computing. Consider that we have &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; processors, connected by a communication network. The processors communicate with each other by sending and receiving &#039;&#039;&#039;packets&#039;&#039;&#039; through the network. We consider the following packet routing problem:&lt;br /&gt;
* Every processor is sending a packet to a unique destination. Therefore for &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt; the set of processors, the destinations are given by a &#039;&#039;&#039;permutation&#039;&#039;&#039; &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, such that for every processor &amp;lt;math&amp;gt;i\in[N]&amp;lt;/math&amp;gt;, the processor &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is sending a packet to processor &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The communication is &#039;&#039;&#039;synchronized&#039;&#039;&#039;, such that for each &#039;&#039;&#039;round&#039;&#039;&#039;, every link (an edge of the graph) can forward at most one packet.&lt;br /&gt;
&lt;br /&gt;
With a complete graph as the network. For any permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, all packets can be routed to their destinations in parallel with one round of communication. However, such an ideal connectivity is usually not available in reality, either because they are too expensive, or because they are physically impossible. We are interested in the case the graph is &#039;&#039;&#039;sparse&#039;&#039;&#039;, such that the number of edges is significantly smaller than the complete graph, yet the distance between any pair of vertices is small, so that the packets can be efficiently routed between pairs of vertices.&lt;br /&gt;
&lt;br /&gt;
=== Routing on a hypercube ===&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Hypercube hypercube] (sometimes called a Boolean cube, a Hamming cube, or just cube) is defined over &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; nodes, for &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; a power of 2. We assume that &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt;. A hypercube of &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; dimensions, or a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube, is an undirected graph with the vertex set &amp;lt;math&amp;gt;\{0,1\}^d&amp;lt;/math&amp;gt;, such that for any &amp;lt;math&amp;gt;u,v\in\{0,1\}^d&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; are adjacent if and only if &amp;lt;math&amp;gt;h(u,v)=1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;h(u,v)&amp;lt;/math&amp;gt; is the [http://en.wikipedia.org/wiki/Hamming_distance Hamming distance] between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube is a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-degree regular graph over &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt; vertices. For any pair &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; of vertices, the distance between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;. (How do we know this? Since it takes at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; steps to fix any binary string of length &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; bit-by-bit to any other.) This directly gives us the following very natural routing algorithm.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Bit-Fixing Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|For each packet:&lt;br /&gt;
#Let &amp;lt;math&amp;gt;u, v\in\{0,1\}^d&amp;lt;/math&amp;gt; be the origin and destination of the packet respectively.&lt;br /&gt;
#For &amp;lt;math&amp;gt;i=1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, do:&lt;br /&gt;
::if &amp;lt;math&amp;gt;u_i\neq v_i&amp;lt;/math&amp;gt; then traverse the edge &amp;lt;math&amp;gt;(v_1,\ldots,v_{i-1},u_i,\ldots,u_d)\rightarrow (v_1,\ldots,v_{i-1},v_i,u_{i+1}\ldots,u_d)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Oblivious routing algorithms&lt;br /&gt;
:This algorithm is blessed with a desirable property: it depends only on the origin, the destination, and the current node. We call the algorithms with this property &#039;&#039;&#039;oblivious&#039;&#039;&#039; routing algorithms. Compared to the routing algorithms which are adaptive to the path that the packet traversed, oblivious routing is more simple thus can be implemented by smaller routing table (or simple devices called &#039;&#039;&#039;switches&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
;Queuing policies&lt;br /&gt;
:When routing &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets in parallel, it is possible that more than one packets want to use the same edge at the same time. We assume that a queue is associated to each edge, such that the packets to be delivered through an edge are put into the queue associated with the edge. With some &#039;&#039;&#039;queuing policy&#039;&#039;&#039; (e.g. FIFO, or furthest to do), the queued packets are delivered through the edge by at most one packet per each round.&lt;br /&gt;
&lt;br /&gt;
For the bit-fixing routing algorithm defined above, regardless of the queuing policy, there always exists a bad permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; which specifies the destinations, such that it takes &amp;lt;math&amp;gt;\Omega(\sqrt{N})&amp;lt;/math&amp;gt; steps by the bit-fixing algorithm to route all &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets to their destinations. (You can prove this by yourself.)&lt;br /&gt;
&lt;br /&gt;
This is pretty bad, because we expect that the routing time is comparable to the diameter of the network, which is only &amp;lt;math&amp;gt;d=\log N&amp;lt;/math&amp;gt; for hypercube.&lt;br /&gt;
&lt;br /&gt;
The lower bound actually applies generally for any deterministic oblivious routing algorithms:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Theorem [Kaklamanis, Krizanc, Tsantilas, 1991]&#039;&#039;&#039;&lt;br /&gt;
:In any &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;-node communication network with maximum degree &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, any deterministic oblivious algorithm for routing an arbitrary permutation requires &amp;lt;math&amp;gt;\Omega(\sqrt{N}/d)&amp;lt;/math&amp;gt; parallel communication steps in the worst case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The proof of the lower bound is rather technical and complicated. However, the intuition is quite clear: for any oblivious rule for routing, there always exists a permutation which causes a very high &#039;&#039;&#039;congestion&#039;&#039;&#039;, such that many packets have to be delivered through the same edge, thus no matter what queuing policy is used, the maximum delay must be very high.&lt;br /&gt;
&lt;br /&gt;
=== A two-phase randomized routing algorithm ===&lt;br /&gt;
It is somehow surprising that routing the packet first to some completely irrelevant &amp;quot;relay&amp;quot; actually improves the overall performance.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Two-Phase Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|For each packet:&lt;br /&gt;
&#039;&#039;&#039;Phase I:&#039;&#039;&#039; Route the packet to a random destination using the bit-fixing algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Phase II:&#039;&#039;&#039; Route the packet from the random location to its final destination using the bit-fixing algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Johnson-Lindenstrauss Theorem ==&lt;/div&gt;</summary>
		<author><name>172.21.5.128</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1386</id>
		<title>Randomized Algorithms (Spring 2010)/More on Chernoff bounds</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1386"/>
		<updated>2010-02-25T14:50:34Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.128: /* A two-phase randomized routing algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Permutation Routing ==&lt;br /&gt;
The problem raises from parallel computing. Consider that we have &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; processors, connected by a communication network. The processors communicate with each other by sending and receiving &#039;&#039;&#039;packets&#039;&#039;&#039; through the network. We consider the following packet routing problem:&lt;br /&gt;
* Every processor is sending a packet to a unique destination. Therefore for &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt; the set of processors, the destinations are given by a &#039;&#039;&#039;permutation&#039;&#039;&#039; &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, such that for every processor &amp;lt;math&amp;gt;i\in[N]&amp;lt;/math&amp;gt;, the processor &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is sending a packet to processor &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The communication is &#039;&#039;&#039;synchronized&#039;&#039;&#039;, such that for each &#039;&#039;&#039;round&#039;&#039;&#039;, every link (an edge of the graph) can forward at most one packet.&lt;br /&gt;
&lt;br /&gt;
With a complete graph as the network. For any permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, all packets can be routed to their destinations in parallel with one round of communication. However, such an ideal connectivity is usually not available in reality, either because they are too expensive, or because they are physically impossible. We are interested in the case the graph is &#039;&#039;&#039;sparse&#039;&#039;&#039;, such that the number of edges is significantly smaller than the complete graph, yet the distance between any pair of vertices is small, so that the packets can be efficiently routed between pairs of vertices.&lt;br /&gt;
&lt;br /&gt;
=== Routing on a hypercube ===&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Hypercube hypercube] (sometimes called a Boolean cube, a Hamming cube, or just cube) is defined over &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; nodes, for &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; a power of 2. We assume that &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt;. A hypercube of &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; dimensions, or a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube, is an undirected graph with the vertex set &amp;lt;math&amp;gt;\{0,1\}^d&amp;lt;/math&amp;gt;, such that for any &amp;lt;math&amp;gt;u,v\in\{0,1\}^d&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; are adjacent if and only if &amp;lt;math&amp;gt;h(u,v)=1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;h(u,v)&amp;lt;/math&amp;gt; is the [http://en.wikipedia.org/wiki/Hamming_distance Hamming distance] between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube is a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-degree regular graph over &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt; vertices. For any pair &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; of vertices, the distance between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;. (How do we know this? Since it takes at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; steps to fix any binary string of length &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; bit-by-bit to any other.) This directly gives us the following very natural routing algorithm.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Bit-Fixing Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|For each packet:&lt;br /&gt;
#Let &amp;lt;math&amp;gt;u, v\in\{0,1\}^d&amp;lt;/math&amp;gt; be the origin and destination of the packet respectively.&lt;br /&gt;
#For &amp;lt;math&amp;gt;i=1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, do:&lt;br /&gt;
::if &amp;lt;math&amp;gt;u_i\neq v_i&amp;lt;/math&amp;gt; then traverse the edge &amp;lt;math&amp;gt;(v_1,\ldots,v_{i-1},u_i,\ldots,u_d)\rightarrow (v_1,\ldots,v_{i-1},v_i,u_{i+1}\ldots,u_d)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Oblivious routing algorithms&lt;br /&gt;
:This algorithm is blessed with a desirable property: it depends only on the origin, the destination, and the current node. We call the algorithms with this property &#039;&#039;&#039;oblivious&#039;&#039;&#039; routing algorithms. Compared to the routing algorithms which are adaptive to the path that the packet traversed, oblivious routing is more simple thus can be implemented by smaller routing table (or simple devices called &#039;&#039;&#039;switches&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
;Queuing policies&lt;br /&gt;
:When routing &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets in parallel, it is possible that more than one packets want to use the same edge at the same time. We assume that a queue is associated to each edge, such that the packets to be delivered through an edge are put into the queue associated with the edge. With some &#039;&#039;&#039;queuing policy&#039;&#039;&#039; (e.g. FIFO, or furthest to do), the queued packets are delivered through the edge by at most one packet per each round.&lt;br /&gt;
&lt;br /&gt;
For the bit-fixing routing algorithm defined above, regardless of the queuing policy, there always exists a bad permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; which specifies the destinations, such that it takes &amp;lt;math&amp;gt;\Omega(\sqrt{N})&amp;lt;/math&amp;gt; steps by the bit-fixing algorithm to route all &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets to their destinations. (You can prove this by yourself.)&lt;br /&gt;
&lt;br /&gt;
This is pretty bad, because we expect that the routing time is comparable to the diameter of the network, which is only &amp;lt;math&amp;gt;d=\log N&amp;lt;/math&amp;gt; for hypercube.&lt;br /&gt;
&lt;br /&gt;
The lower bound actually applies generally for any deterministic oblivious routing algorithms:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Theorem [Kaklamanis, Krizanc, Tsantilas, 1991]&#039;&#039;&#039;&lt;br /&gt;
:In any &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;-node communication network with maximum degree &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, any deterministic oblivious algorithm for routing an arbitrary permutation requires &amp;lt;math&amp;gt;\Omega(\sqrt{N}/d)&amp;lt;/math&amp;gt; parallel communication steps in the worst case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The proof of the lower bound is rather technical and complicated. However, the intuition is quite clear: for any oblivious rule for routing, there always exists a permutation which causes a very high &#039;&#039;&#039;congestion&#039;&#039;&#039;, such that many packets have to be delivered through the same edge, thus no matter what queuing policy is used, the maximum delay must be very high.&lt;br /&gt;
&lt;br /&gt;
=== A two-phase randomized routing algorithm ===&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Two-Phase Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|For each packet:&lt;br /&gt;
&#039;&#039;&#039;Phase I:&#039;&#039;&#039; Route the packet to a random destination using the bit-fixing algorithm.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Phase II:&#039;&#039;&#039; Route the packet from the random location to its final destination using the bit-fixing algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Johnson-Lindenstrauss Theorem ==&lt;/div&gt;</summary>
		<author><name>172.21.5.128</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1385</id>
		<title>Randomized Algorithms (Spring 2010)/More on Chernoff bounds</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1385"/>
		<updated>2010-02-25T14:48:06Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.128: /* A two-phase randomized routing algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Permutation Routing ==&lt;br /&gt;
The problem raises from parallel computing. Consider that we have &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; processors, connected by a communication network. The processors communicate with each other by sending and receiving &#039;&#039;&#039;packets&#039;&#039;&#039; through the network. We consider the following packet routing problem:&lt;br /&gt;
* Every processor is sending a packet to a unique destination. Therefore for &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt; the set of processors, the destinations are given by a &#039;&#039;&#039;permutation&#039;&#039;&#039; &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, such that for every processor &amp;lt;math&amp;gt;i\in[N]&amp;lt;/math&amp;gt;, the processor &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is sending a packet to processor &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The communication is &#039;&#039;&#039;synchronized&#039;&#039;&#039;, such that for each &#039;&#039;&#039;round&#039;&#039;&#039;, every link (an edge of the graph) can forward at most one packet.&lt;br /&gt;
&lt;br /&gt;
With a complete graph as the network. For any permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, all packets can be routed to their destinations in parallel with one round of communication. However, such an ideal connectivity is usually not available in reality, either because they are too expensive, or because they are physically impossible. We are interested in the case the graph is &#039;&#039;&#039;sparse&#039;&#039;&#039;, such that the number of edges is significantly smaller than the complete graph, yet the distance between any pair of vertices is small, so that the packets can be efficiently routed between pairs of vertices.&lt;br /&gt;
&lt;br /&gt;
=== Routing on a hypercube ===&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Hypercube hypercube] (sometimes called a Boolean cube, a Hamming cube, or just cube) is defined over &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; nodes, for &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; a power of 2. We assume that &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt;. A hypercube of &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; dimensions, or a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube, is an undirected graph with the vertex set &amp;lt;math&amp;gt;\{0,1\}^d&amp;lt;/math&amp;gt;, such that for any &amp;lt;math&amp;gt;u,v\in\{0,1\}^d&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; are adjacent if and only if &amp;lt;math&amp;gt;h(u,v)=1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;h(u,v)&amp;lt;/math&amp;gt; is the [http://en.wikipedia.org/wiki/Hamming_distance Hamming distance] between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube is a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-degree regular graph over &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt; vertices. For any pair &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; of vertices, the distance between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;. (How do we know this? Since it takes at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; steps to fix any binary string of length &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; bit-by-bit to any other.) This directly gives us the following very natural routing algorithm.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Bit-Fixing Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|For each packet:&lt;br /&gt;
#Let &amp;lt;math&amp;gt;u, v\in\{0,1\}^d&amp;lt;/math&amp;gt; be the origin and destination of the packet respectively.&lt;br /&gt;
#For &amp;lt;math&amp;gt;i=1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, do:&lt;br /&gt;
::if &amp;lt;math&amp;gt;u_i\neq v_i&amp;lt;/math&amp;gt; then traverse the edge &amp;lt;math&amp;gt;(v_1,\ldots,v_{i-1},u_i,\ldots,u_d)\rightarrow (v_1,\ldots,v_{i-1},v_i,u_{i+1}\ldots,u_d)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Oblivious routing algorithms&lt;br /&gt;
:This algorithm is blessed with a desirable property: it depends only on the origin, the destination, and the current node. We call the algorithms with this property &#039;&#039;&#039;oblivious&#039;&#039;&#039; routing algorithms. Compared to the routing algorithms which are adaptive to the path that the packet traversed, oblivious routing is more simple thus can be implemented by smaller routing table (or simple devices called &#039;&#039;&#039;switches&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
;Queuing policies&lt;br /&gt;
:When routing &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets in parallel, it is possible that more than one packets want to use the same edge at the same time. We assume that a queue is associated to each edge, such that the packets to be delivered through an edge are put into the queue associated with the edge. With some &#039;&#039;&#039;queuing policy&#039;&#039;&#039; (e.g. FIFO, or furthest to do), the queued packets are delivered through the edge by at most one packet per each round.&lt;br /&gt;
&lt;br /&gt;
For the bit-fixing routing algorithm defined above, regardless of the queuing policy, there always exists a bad permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; which specifies the destinations, such that it takes &amp;lt;math&amp;gt;\Omega(\sqrt{N})&amp;lt;/math&amp;gt; steps by the bit-fixing algorithm to route all &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets to their destinations. (You can prove this by yourself.)&lt;br /&gt;
&lt;br /&gt;
This is pretty bad, because we expect that the routing time is comparable to the diameter of the network, which is only &amp;lt;math&amp;gt;d=\log N&amp;lt;/math&amp;gt; for hypercube.&lt;br /&gt;
&lt;br /&gt;
The lower bound actually applies generally for any deterministic oblivious routing algorithms:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Theorem [Kaklamanis, Krizanc, Tsantilas, 1991]&#039;&#039;&#039;&lt;br /&gt;
:In any &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;-node communication network with maximum degree &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, any deterministic oblivious algorithm for routing an arbitrary permutation requires &amp;lt;math&amp;gt;\Omega(\sqrt{N}/d)&amp;lt;/math&amp;gt; parallel communication steps in the worst case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The proof of the lower bound is rather technical and complicated. However, the intuition is quite clear: for any oblivious rule for routing, there always exists a permutation which causes a very high &#039;&#039;&#039;congestion&#039;&#039;&#039;, such that many packets have to be delivered through the same edge, thus no matter what queuing policy is used, the maximum delay must be very high.&lt;br /&gt;
&lt;br /&gt;
=== A two-phase randomized routing algorithm ===&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Two-Phase Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Phase I:&#039;&#039;&#039; Route the packet to a random destination using the bit-fixing algorithm.&lt;br /&gt;
&#039;&#039;&#039;Phase II:&#039;&#039;&#039; Route the packet from the random location to its final destination using the bit-fixing algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Johnson-Lindenstrauss Theorem ==&lt;/div&gt;</summary>
		<author><name>172.21.5.128</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1384</id>
		<title>Randomized Algorithms (Spring 2010)/More on Chernoff bounds</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1384"/>
		<updated>2010-02-25T14:47:26Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.128: /* A two-phase randomized routing algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Permutation Routing ==&lt;br /&gt;
The problem raises from parallel computing. Consider that we have &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; processors, connected by a communication network. The processors communicate with each other by sending and receiving &#039;&#039;&#039;packets&#039;&#039;&#039; through the network. We consider the following packet routing problem:&lt;br /&gt;
* Every processor is sending a packet to a unique destination. Therefore for &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt; the set of processors, the destinations are given by a &#039;&#039;&#039;permutation&#039;&#039;&#039; &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, such that for every processor &amp;lt;math&amp;gt;i\in[N]&amp;lt;/math&amp;gt;, the processor &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is sending a packet to processor &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The communication is &#039;&#039;&#039;synchronized&#039;&#039;&#039;, such that for each &#039;&#039;&#039;round&#039;&#039;&#039;, every link (an edge of the graph) can forward at most one packet.&lt;br /&gt;
&lt;br /&gt;
With a complete graph as the network. For any permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, all packets can be routed to their destinations in parallel with one round of communication. However, such an ideal connectivity is usually not available in reality, either because they are too expensive, or because they are physically impossible. We are interested in the case the graph is &#039;&#039;&#039;sparse&#039;&#039;&#039;, such that the number of edges is significantly smaller than the complete graph, yet the distance between any pair of vertices is small, so that the packets can be efficiently routed between pairs of vertices.&lt;br /&gt;
&lt;br /&gt;
=== Routing on a hypercube ===&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Hypercube hypercube] (sometimes called a Boolean cube, a Hamming cube, or just cube) is defined over &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; nodes, for &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; a power of 2. We assume that &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt;. A hypercube of &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; dimensions, or a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube, is an undirected graph with the vertex set &amp;lt;math&amp;gt;\{0,1\}^d&amp;lt;/math&amp;gt;, such that for any &amp;lt;math&amp;gt;u,v\in\{0,1\}^d&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; are adjacent if and only if &amp;lt;math&amp;gt;h(u,v)=1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;h(u,v)&amp;lt;/math&amp;gt; is the [http://en.wikipedia.org/wiki/Hamming_distance Hamming distance] between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube is a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-degree regular graph over &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt; vertices. For any pair &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; of vertices, the distance between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;. (How do we know this? Since it takes at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; steps to fix any binary string of length &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; bit-by-bit to any other.) This directly gives us the following very natural routing algorithm.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Bit-Fixing Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|For each packet:&lt;br /&gt;
#Let &amp;lt;math&amp;gt;u, v\in\{0,1\}^d&amp;lt;/math&amp;gt; be the origin and destination of the packet respectively.&lt;br /&gt;
#For &amp;lt;math&amp;gt;i=1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, do:&lt;br /&gt;
::if &amp;lt;math&amp;gt;u_i\neq v_i&amp;lt;/math&amp;gt; then traverse the edge &amp;lt;math&amp;gt;(v_1,\ldots,v_{i-1},u_i,\ldots,u_d)\rightarrow (v_1,\ldots,v_{i-1},v_i,u_{i+1}\ldots,u_d)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Oblivious routing algorithms&lt;br /&gt;
:This algorithm is blessed with a desirable property: it depends only on the origin, the destination, and the current node. We call the algorithms with this property &#039;&#039;&#039;oblivious&#039;&#039;&#039; routing algorithms. Compared to the routing algorithms which are adaptive to the path that the packet traversed, oblivious routing is more simple thus can be implemented by smaller routing table (or simple devices called &#039;&#039;&#039;switches&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
;Queuing policies&lt;br /&gt;
:When routing &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets in parallel, it is possible that more than one packets want to use the same edge at the same time. We assume that a queue is associated to each edge, such that the packets to be delivered through an edge are put into the queue associated with the edge. With some &#039;&#039;&#039;queuing policy&#039;&#039;&#039; (e.g. FIFO, or furthest to do), the queued packets are delivered through the edge by at most one packet per each round.&lt;br /&gt;
&lt;br /&gt;
For the bit-fixing routing algorithm defined above, regardless of the queuing policy, there always exists a bad permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; which specifies the destinations, such that it takes &amp;lt;math&amp;gt;\Omega(\sqrt{N})&amp;lt;/math&amp;gt; steps by the bit-fixing algorithm to route all &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets to their destinations. (You can prove this by yourself.)&lt;br /&gt;
&lt;br /&gt;
This is pretty bad, because we expect that the routing time is comparable to the diameter of the network, which is only &amp;lt;math&amp;gt;d=\log N&amp;lt;/math&amp;gt; for hypercube.&lt;br /&gt;
&lt;br /&gt;
The lower bound actually applies generally for any deterministic oblivious routing algorithms:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Theorem [Kaklamanis, Krizanc, Tsantilas, 1991]&#039;&#039;&#039;&lt;br /&gt;
:In any &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;-node communication network with maximum degree &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, any deterministic oblivious algorithm for routing an arbitrary permutation requires &amp;lt;math&amp;gt;\Omega(\sqrt{N}/d)&amp;lt;/math&amp;gt; parallel communication steps in the worst case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The proof of the lower bound is rather technical and complicated. However, the intuition is quite clear: for any oblivious rule for routing, there always exists a permutation which causes a very high &#039;&#039;&#039;congestion&#039;&#039;&#039;, such that many packets have to be delivered through the same edge, thus no matter what queuing policy is used, the maximum delay must be very high.&lt;br /&gt;
&lt;br /&gt;
=== A two-phase randomized routing algorithm ===&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Two-Phase Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Phase I:&#039;&#039;&#039; Route the packet to a uniformly random destination using the bit-fixing algorithm.&lt;br /&gt;
&#039;&#039;&#039;Phase II:&#039;&#039;&#039; Route the packet from the random location to its final destination using the bit-fixing algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Johnson-Lindenstrauss Theorem ==&lt;/div&gt;</summary>
		<author><name>172.21.5.128</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1383</id>
		<title>Randomized Algorithms (Spring 2010)/More on Chernoff bounds</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1383"/>
		<updated>2010-02-25T14:40:12Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.128: /* Routing on a hypercube */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Permutation Routing ==&lt;br /&gt;
The problem raises from parallel computing. Consider that we have &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; processors, connected by a communication network. The processors communicate with each other by sending and receiving &#039;&#039;&#039;packets&#039;&#039;&#039; through the network. We consider the following packet routing problem:&lt;br /&gt;
* Every processor is sending a packet to a unique destination. Therefore for &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt; the set of processors, the destinations are given by a &#039;&#039;&#039;permutation&#039;&#039;&#039; &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, such that for every processor &amp;lt;math&amp;gt;i\in[N]&amp;lt;/math&amp;gt;, the processor &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is sending a packet to processor &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The communication is &#039;&#039;&#039;synchronized&#039;&#039;&#039;, such that for each &#039;&#039;&#039;round&#039;&#039;&#039;, every link (an edge of the graph) can forward at most one packet.&lt;br /&gt;
&lt;br /&gt;
With a complete graph as the network. For any permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, all packets can be routed to their destinations in parallel with one round of communication. However, such an ideal connectivity is usually not available in reality, either because they are too expensive, or because they are physically impossible. We are interested in the case the graph is &#039;&#039;&#039;sparse&#039;&#039;&#039;, such that the number of edges is significantly smaller than the complete graph, yet the distance between any pair of vertices is small, so that the packets can be efficiently routed between pairs of vertices.&lt;br /&gt;
&lt;br /&gt;
=== Routing on a hypercube ===&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Hypercube hypercube] (sometimes called a Boolean cube, a Hamming cube, or just cube) is defined over &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; nodes, for &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; a power of 2. We assume that &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt;. A hypercube of &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; dimensions, or a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube, is an undirected graph with the vertex set &amp;lt;math&amp;gt;\{0,1\}^d&amp;lt;/math&amp;gt;, such that for any &amp;lt;math&amp;gt;u,v\in\{0,1\}^d&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; are adjacent if and only if &amp;lt;math&amp;gt;h(u,v)=1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;h(u,v)&amp;lt;/math&amp;gt; is the [http://en.wikipedia.org/wiki/Hamming_distance Hamming distance] between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube is a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-degree regular graph over &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt; vertices. For any pair &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; of vertices, the distance between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;. (How do we know this? Since it takes at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; steps to fix any binary string of length &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; bit-by-bit to any other.) This directly gives us the following very natural routing algorithm.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Bit-Fixing Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|For each packet:&lt;br /&gt;
#Let &amp;lt;math&amp;gt;u, v\in\{0,1\}^d&amp;lt;/math&amp;gt; be the origin and destination of the packet respectively.&lt;br /&gt;
#For &amp;lt;math&amp;gt;i=1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, do:&lt;br /&gt;
::if &amp;lt;math&amp;gt;u_i\neq v_i&amp;lt;/math&amp;gt; then traverse the edge &amp;lt;math&amp;gt;(v_1,\ldots,v_{i-1},u_i,\ldots,u_d)\rightarrow (v_1,\ldots,v_{i-1},v_i,u_{i+1}\ldots,u_d)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Oblivious routing algorithms&lt;br /&gt;
:This algorithm is blessed with a desirable property: it depends only on the origin, the destination, and the current node. We call the algorithms with this property &#039;&#039;&#039;oblivious&#039;&#039;&#039; routing algorithms. Compared to the routing algorithms which are adaptive to the path that the packet traversed, oblivious routing is more simple thus can be implemented by smaller routing table (or simple devices called &#039;&#039;&#039;switches&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
;Queuing policies&lt;br /&gt;
:When routing &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets in parallel, it is possible that more than one packets want to use the same edge at the same time. We assume that a queue is associated to each edge, such that the packets to be delivered through an edge are put into the queue associated with the edge. With some &#039;&#039;&#039;queuing policy&#039;&#039;&#039; (e.g. FIFO, or furthest to do), the queued packets are delivered through the edge by at most one packet per each round.&lt;br /&gt;
&lt;br /&gt;
For the bit-fixing routing algorithm defined above, regardless of the queuing policy, there always exists a bad permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; which specifies the destinations, such that it takes &amp;lt;math&amp;gt;\Omega(\sqrt{N})&amp;lt;/math&amp;gt; steps by the bit-fixing algorithm to route all &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets to their destinations. (You can prove this by yourself.)&lt;br /&gt;
&lt;br /&gt;
This is pretty bad, because we expect that the routing time is comparable to the diameter of the network, which is only &amp;lt;math&amp;gt;d=\log N&amp;lt;/math&amp;gt; for hypercube.&lt;br /&gt;
&lt;br /&gt;
The lower bound actually applies generally for any deterministic oblivious routing algorithms:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Theorem [Kaklamanis, Krizanc, Tsantilas, 1991]&#039;&#039;&#039;&lt;br /&gt;
:In any &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;-node communication network with maximum degree &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, any deterministic oblivious algorithm for routing an arbitrary permutation requires &amp;lt;math&amp;gt;\Omega(\sqrt{N}/d)&amp;lt;/math&amp;gt; parallel communication steps in the worst case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The proof of the lower bound is rather technical and complicated. However, the intuition is quite clear: for any oblivious rule for routing, there always exists a permutation which causes a very high &#039;&#039;&#039;congestion&#039;&#039;&#039;, such that many packets have to be delivered through the same edge, thus no matter what queuing policy is used, the maximum delay must be very high.&lt;br /&gt;
&lt;br /&gt;
=== A two-phase randomized routing algorithm ===&lt;br /&gt;
&lt;br /&gt;
== Johnson-Lindenstrauss Theorem ==&lt;/div&gt;</summary>
		<author><name>172.21.5.128</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1382</id>
		<title>Randomized Algorithms (Spring 2010)/More on Chernoff bounds</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1382"/>
		<updated>2010-02-25T14:38:57Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.128: /* Routing on a hypercube */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Permutation Routing ==&lt;br /&gt;
The problem raises from parallel computing. Consider that we have &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; processors, connected by a communication network. The processors communicate with each other by sending and receiving &#039;&#039;&#039;packets&#039;&#039;&#039; through the network. We consider the following packet routing problem:&lt;br /&gt;
* Every processor is sending a packet to a unique destination. Therefore for &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt; the set of processors, the destinations are given by a &#039;&#039;&#039;permutation&#039;&#039;&#039; &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, such that for every processor &amp;lt;math&amp;gt;i\in[N]&amp;lt;/math&amp;gt;, the processor &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is sending a packet to processor &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The communication is &#039;&#039;&#039;synchronized&#039;&#039;&#039;, such that for each &#039;&#039;&#039;round&#039;&#039;&#039;, every link (an edge of the graph) can forward at most one packet.&lt;br /&gt;
&lt;br /&gt;
With a complete graph as the network. For any permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, all packets can be routed to their destinations in parallel with one round of communication. However, such an ideal connectivity is usually not available in reality, either because they are too expensive, or because they are physically impossible. We are interested in the case the graph is &#039;&#039;&#039;sparse&#039;&#039;&#039;, such that the number of edges is significantly smaller than the complete graph, yet the distance between any pair of vertices is small, so that the packets can be efficiently routed between pairs of vertices.&lt;br /&gt;
&lt;br /&gt;
=== Routing on a hypercube ===&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Hypercube hypercube] (sometimes called a Boolean cube, a Hamming cube, or just cube) is defined over &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; nodes, for &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; a power of 2. We assume that &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt;. A hypercube of &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; dimensions, or a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube, is an undirected graph with the vertex set &amp;lt;math&amp;gt;\{0,1\}^d&amp;lt;/math&amp;gt;, such that for any &amp;lt;math&amp;gt;u,v\in\{0,1\}^d&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; are adjacent if and only if &amp;lt;math&amp;gt;h(u,v)=1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;h(u,v)&amp;lt;/math&amp;gt; is the [http://en.wikipedia.org/wiki/Hamming_distance Hamming distance] between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube is a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-degree regular graph over &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt; vertices. For any pair &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; of vertices, the distance between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;. (How do we know this? Since it takes at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; steps to fix any binary string of length &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; bit-by-bit to any other.) This directly gives us the following very natural routing algorithm.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Bit-Fixing Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|For each packet:&lt;br /&gt;
#Let &amp;lt;math&amp;gt;u, v\in\{0,1\}^d&amp;lt;/math&amp;gt; be the origin and destination of the packet respectively.&lt;br /&gt;
#For &amp;lt;math&amp;gt;i=1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, do:&lt;br /&gt;
::if &amp;lt;math&amp;gt;u_i\neq v_i&amp;lt;/math&amp;gt; then traverse the edge &amp;lt;math&amp;gt;(v_1,\ldots,v_{i-1},u_i,\ldots,u_d)\rightarrow (v_1,\ldots,v_{i-1},v_i,u_{i+1}\ldots,u_d)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Oblivious routing algorithms&lt;br /&gt;
:This algorithm is blessed with a desirable property: it depends only on the origin, the destination, and the current node. We call the algorithms with this property &#039;&#039;&#039;oblivious&#039;&#039;&#039; routing algorithms. Compared to the routing algorithms which are adaptive to the path that the packet traversed, oblivious routing is more simple thus can be implemented by smaller routing table (or simple devices called &#039;&#039;&#039;switches&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
;Queuing policies&lt;br /&gt;
:When routing &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets in parallel, it is possible that more than one packets want to use the same edge at the same time. We assume that a queue is associated to each edge, such that the packets to be delivered through an edge are put into the queue associated with the edge. With some &#039;&#039;&#039;queuing policy&#039;&#039;&#039; (e.g. FIFO, or furthest to do), the queued packets are delivered through the edge by at most one packet per each round.&lt;br /&gt;
&lt;br /&gt;
For the bit-fixing routing algorithm defined above, regardless of the queuing policy, there always exists a bad permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; which specifies the destinations, such that it takes &amp;lt;math&amp;gt;\Omega(\sqrt{N})&amp;lt;/math&amp;gt; steps by the bit-fixing algorithm to route all &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets to their destinations. (You can prove this by yourself.)&lt;br /&gt;
&lt;br /&gt;
This is pretty bad, because we expect that the routing time is comparable to the diameter of the network, which is only &amp;lt;math&amp;gt;d=\log N&amp;lt;/math&amp;gt; for hypercube.&lt;br /&gt;
&lt;br /&gt;
The lower bound actually applies generally for any deterministic oblivious routing algorithms:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Theorem [Kaklamanis, Krizanc, Tsantilas, 1991]&#039;&#039;&#039;&lt;br /&gt;
:In any &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;-node communication network with maximum degree &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, any deterministic oblivious algorithm for routing an arbitrary permutation requires &amp;lt;math&amp;gt;\Omega(\sqrt{N}/d)&amp;lt;/math&amp;gt; parallel communication steps in the worst case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The proof of the lower bound is rather technical and complicated. However, the intuition is quite clear: for any oblivious rule for routing, there always exists a permutation which causes a very high &#039;&#039;&#039;congestion&#039;&#039;&#039;, such that many packets have to be delivered through the same edge, thus no matter what queuing policy is used, the maximum delay must be very high.&lt;br /&gt;
&lt;br /&gt;
== Johnson-Lindenstrauss Theorem ==&lt;/div&gt;</summary>
		<author><name>172.21.5.128</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1381</id>
		<title>Randomized Algorithms (Spring 2010)/More on Chernoff bounds</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Randomized_Algorithms_(Spring_2010)/More_on_Chernoff_bounds&amp;diff=1381"/>
		<updated>2010-02-25T14:32:38Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.128: /* Permutation Routing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Permutation Routing ==&lt;br /&gt;
The problem raises from parallel computing. Consider that we have &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; processors, connected by a communication network. The processors communicate with each other by sending and receiving &#039;&#039;&#039;packets&#039;&#039;&#039; through the network. We consider the following packet routing problem:&lt;br /&gt;
* Every processor is sending a packet to a unique destination. Therefore for &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt; the set of processors, the destinations are given by a &#039;&#039;&#039;permutation&#039;&#039;&#039; &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, such that for every processor &amp;lt;math&amp;gt;i\in[N]&amp;lt;/math&amp;gt;, the processor &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is sending a packet to processor &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The communication is &#039;&#039;&#039;synchronized&#039;&#039;&#039;, such that for each &#039;&#039;&#039;round&#039;&#039;&#039;, every link (an edge of the graph) can forward at most one packet.&lt;br /&gt;
&lt;br /&gt;
With a complete graph as the network. For any permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[N]&amp;lt;/math&amp;gt;, all packets can be routed to their destinations in parallel with one round of communication. However, such an ideal connectivity is usually not available in reality, either because they are too expensive, or because they are physically impossible. We are interested in the case the graph is &#039;&#039;&#039;sparse&#039;&#039;&#039;, such that the number of edges is significantly smaller than the complete graph, yet the distance between any pair of vertices is small, so that the packets can be efficiently routed between pairs of vertices.&lt;br /&gt;
&lt;br /&gt;
=== Routing on a hypercube ===&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Hypercube hypercube] (sometimes called a Boolean cube, a Hamming cube, or just cube) is defined over &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; nodes, for &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; a power of 2. We assume that &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt;. A hypercube of &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; dimensions, or a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube, is an undirected graph with the vertex set &amp;lt;math&amp;gt;\{0,1\}^d&amp;lt;/math&amp;gt;, such that for any &amp;lt;math&amp;gt;u,v\in\{0,1\}^d&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; are adjacent if and only if &amp;lt;math&amp;gt;h(u,v)=1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;h(u,v)&amp;lt;/math&amp;gt; is the [http://en.wikipedia.org/wiki/Hamming_distance Hamming distance] between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-cube is a &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;-degree regular graph over &amp;lt;math&amp;gt;N=2^d&amp;lt;/math&amp;gt; vertices. For any pair &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; of vertices, the distance between &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;. (How do we know this? Since it takes at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; steps to fix any binary string of length &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; bit-by-bit to any other.) This directly gives us the following very natural routing algorithm.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Bit-Fixing Routing Algorithm:&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|For each packet:&lt;br /&gt;
#Let &amp;lt;math&amp;gt;u, v\in\{0,1\}^d&amp;lt;/math&amp;gt; be the origin and destination of the packet respectively.&lt;br /&gt;
#For &amp;lt;math&amp;gt;i=1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, do:&lt;br /&gt;
::if &amp;lt;math&amp;gt;u_i\neq v_i&amp;lt;/math&amp;gt; then traverse the edge &amp;lt;math&amp;gt;(v_1,\ldots,v_{i-1},u_i,\ldots,u_d)\rightarrow (v_1,\ldots,v_{i-1},v_i,u_{i+1}\ldots,u_d)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Oblivious routing algorithms&lt;br /&gt;
:This algorithm is blessed with a desirable property: it depends only on the origin, the destination, and the current node. We call the algorithms with this property &#039;&#039;&#039;oblivious&#039;&#039;&#039; routing algorithms. Compared to the routing algorithms which are adaptive to the path that the packet traversed, oblivious routing is more simple thus can be implemented by smaller routing table (or simple devices called &#039;&#039;&#039;switches&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
;Queuing policies&lt;br /&gt;
:When routing &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets in parallel, it is possible that more than one packets want to use the same edge at the same time. We assume that a queue is associated to each edge, such that the packets to be delivered through an edge are put into the queue associated with the edge. With some &#039;&#039;&#039;queuing policy&#039;&#039;&#039; (e.g. FIFO, or furthest to do), the queued packets are delivered through the edge by at most one packet per each round.&lt;br /&gt;
&lt;br /&gt;
For the bit-fixing routing algorithm defined above, regardless of the queuing policy, there always exists a bad permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; which specifies the destinations, such that it takes &amp;lt;math&amp;gt;\Omega(\sqrt{N})&amp;lt;/math&amp;gt; steps by the bit-fixing algorithm to route all &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; packets to their destinations. (You can prove this by yourself.)&lt;br /&gt;
&lt;br /&gt;
The lower bound actually applies generally for any deterministic oblivious routing algorithms:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Theorem [Kaklamanis, Krizanc, Tsantilas, 1991]&#039;&#039;&#039;&lt;br /&gt;
:In any &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;-node communication network with maximum degree &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, any deterministic oblivious algorithm for routing an arbitrary permutation requires &amp;lt;math&amp;gt;\Omega(\sqrt{N}/d)&amp;lt;/math&amp;gt; parallel communication steps in the worst case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is pretty bad, because we expect that the routing time is comparable to the diameter of the network, which is only &amp;lt;math&amp;gt;d=\log N&amp;lt;/math&amp;gt; for hypercube.&lt;br /&gt;
&lt;br /&gt;
== Johnson-Lindenstrauss Theorem ==&lt;/div&gt;</summary>
		<author><name>172.21.5.128</name></author>
	</entry>
</feed>