<?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>Ashutosh Mehra's Blog &#187; Math</title>
	<atom:link href="http://ashutoshmehra.net/blog/category/math/feed/" rel="self" type="application/rss+xml" />
	<link>http://ashutoshmehra.net/blog</link>
	<description>Notes on Math, Computer Science &#38; Programming</description>
	<lastBuildDate>Sat, 27 Feb 2010 14:22:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Wire Identification Problem</title>
		<link>http://ashutoshmehra.net/blog/2009/09/wire-identification-problem/</link>
		<comments>http://ashutoshmehra.net/blog/2009/09/wire-identification-problem/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 10:10:01 +0000</pubDate>
		<dc:creator>Ashutosh</dc:creator>
				<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://ashutoshmehra.net/blog/?p=598</guid>
		<description><![CDATA[
A bunch of n wires have been labeled at one end with alphabetic codes A, B&#8230; The wire identification problem asks for an efficient procedure to mark the other end of the bunch with the corresponding labels. The wires run underground so you can&#8217;t track them individually and any wire is visibly indistinguishable from any [...]]]></description>
			<content:encoded><![CDATA[<div class="alignleft" style="margin-right: 5px"><img border="0" src="http://ashutoshmehra.net/images/posts/wireident/wire_ident.png" width="250px" alt="The Wire Identification Problem: Try to label the wires on the right with labels corresponding to those on the left"></div>
<p>A bunch of <it>n</it> wires have been labeled at one end with alphabetic codes <tt>A</tt>, <tt>B</tt>&#8230; The <i>wire identification problem</i> asks for an efficient procedure to mark the other end of the bunch with the corresponding labels. The wires run underground so you can&#8217;t track them individually and any wire is visibly indistinguishable from any other (except for the labeling). <span id="more-598"></span></p>
<p>As you might have guessed, the only way to gain information in this setup is to connect some set of wires at one end, walk up to the other end, and test for conductivity &#8212; this would give some partial labeling information. The process may have to be repeated many times before a complete labeling can be constructed. And since each such step involves walking across the distance of the wires, we wish to solve the problem <i>with the least number of trips</i>.</p>
<h4>Small Cases</h4>
<p>It should be easy to convince oneself that this problem cannot be solved when <tt>n = 2</tt> &#8212; there&#8217;s really nothing we can use to break the symmetry of the situation.</p>
<div class="alignright" style="margin-left: 5px"><img border="0" src="http://ashutoshmehra.net/images/posts/wireident/three_wires.png" width="200px" alt="Solution to the wire identification problem of 3 wires with just two trips"></div>
<p>For <tt>n = 3</tt>, we can use the following simple procedure (see the illustration on the right):</p>
<ul>
<li><i>Step 1</i>: Connect the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_abdfb1ee5ca8eaf34770b230fed37ffd.png" title="A" style="vertical-align:-20%;" class="tex" alt="A" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_ed6558df25ce694119274d78624a4df9.png" title="B" style="vertical-align:-20%;" class="tex" alt="B" /> wires at the labeled end, walk up to the unlabeled end, and test for conductivity. The pair that conducts electricity would be <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" />, although we cannot determine exactly which is <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> or <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> at this point, and the remaining wire is uniquely identified as <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_8390854cea1afc6c349c4c26b8bebb3c.png" title="c" style="vertical-align:-20%;" class="tex" alt="c" />. For notation, we use lowercase letters for the labelings that we discover, versus uppercase letters for the given labeling.</li>
<p><br/></p>
<li><i>Step 2</i>: Connect the newly identified wire <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_8390854cea1afc6c349c4c26b8bebb3c.png" title="c" style="vertical-align:-20%;" class="tex" alt="c" /> with any one of the wires <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_a507101e260cbc3dfcd3d8748fcbf821.png" title="a/b" style="vertical-align:-20%;" class="tex" alt="a/b" /> (recall, we don&#8217;t know which is <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> or <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> individually, only that one is <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> and the other <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" />). Now walk back to the labeled side and test for conductivity of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_7f4c3f605551dd79f35a2b26c504b279.png" title="C" style="vertical-align:-20%;" class="tex" alt="C" /> with the remaining wires. If we find that <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_7f4c3f605551dd79f35a2b26c504b279.png" title="C" style="vertical-align:-20%;" class="tex" alt="C" />&#8211;<img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_ed6558df25ce694119274d78624a4df9.png" title="B" style="vertical-align:-20%;" class="tex" alt="B" /> is conducting, then the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_a507101e260cbc3dfcd3d8748fcbf821.png" title="a/b" style="vertical-align:-20%;" class="tex" alt="a/b" /> wire we hooked up on the other side was really <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" />, otherwise it was <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" />.
</ul>
<p>The case <tt>n = 4</tt> can be solved similarly with just two trip: Hook up <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_abdfb1ee5ca8eaf34770b230fed37ffd.png" title="A" style="vertical-align:-20%;" class="tex" alt="A" />&#8211;<img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_ed6558df25ce694119274d78624a4df9.png" title="B" style="vertical-align:-20%;" class="tex" alt="B" /> on one side and then run conductivity tests on the other side to partition the wires into two groups <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" />&#8211;<img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_8390854cea1afc6c349c4c26b8bebb3c.png" title="c" style="vertical-align:-20%;" class="tex" alt="c" />&#8211;<img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_497cff51c95d215717abe330faa6c838.png" title="d" style="vertical-align:-20%;" class="tex" alt="d" />; then hook up one from each of the two groups together etc.</p>
<p>So the question is: Can the problem be solved for all <tt>n</tt> with just two trips?</p>
<h4>The General Case</h4>
<p>The wire identification problem is one of those puzzles that is deceptively simple in its description, whose small cases are easy enough to solve in the head, and yet a fair amount of math goes into proving the general result.</p>
<p>I first read about this fascinating problem in the Don Knuth&#8217;s <a href="http://www-cs-faculty.stanford.edu/~knuth/dm.html">Selected Papers on Discrete Mathematics</a> book &#8212; in a short 5-page paper titled <a href="http://portal.acm.org/citation.cfm?id=229834.229849">The Knowlton&#8211;Graham partition problem</a> (<a href="http://arxiv.org/abs/math/9502237">arXiv link</a>).</p>
<p>Knuth states the following idea, attributed to <a href="http://en.wikipedia.org/wiki/Ken_Knowlton">Kenneth Knowlton</a>, to solve the general problem:</p>
<blockquote style="background-color: #ffffff"><p>Partition <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_37db547b4d62a40a25f7582fd757155f.png" title="\{1,\ldots,n\}" style="vertical-align:-20%;" class="tex" alt="\{1,\ldots,n\}" /> into disjoint sets in two ways <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_a9d5bb33753d3bce556e4872680864d7.png" title="A_1,\ldots,A_p" style="vertical-align:-20%;" class="tex" alt="A_1,\ldots,A_p" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_49ce03efedd641691e0db4bf08b75cc2.png" title="B_1,\ldots,B_q" style="vertical-align:-20%;" class="tex" alt="B_1,\ldots,B_q" />, subject to the condition that at most one element appears in <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_abdfb1ee5ca8eaf34770b230fed37ffd.png" title="A" style="vertical-align:-20%;" class="tex" alt="A" />-set of cardinality <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_17205bd7356afc72c6e1cad22749dbb0.png" title="j" style="vertical-align:-20%;" class="tex" alt="j" /> and a <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_ed6558df25ce694119274d78624a4df9.png" title="B" style="vertical-align:-20%;" class="tex" alt="B" />-set of cardinality <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_1536fd5a256e8ae0bf1cd5a9c828392e.png" title="k" style="vertical-align:-20%;" class="tex" alt="k" />, for each <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_17205bd7356afc72c6e1cad22749dbb0.png" title="j" style="vertical-align:-20%;" class="tex" alt="j" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_1536fd5a256e8ae0bf1cd5a9c828392e.png" title="k" style="vertical-align:-20%;" class="tex" alt="k" />. We can then use the coordinates <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_361a29e906ad728b0b44b89f8f4f02a2.png" title="(j,k)" style="vertical-align:-20%;" class="tex" alt="(j,k)" /> to identify each element.</p></blockquote>
<p>By a theorem of <a href="http://math.ucsd.edu/~fan/ron/">Ronald Graham</a>, a solution involving just two trip always exists for <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23e517569a067209bf264db2132df9e1.png" title="n" style="vertical-align:-20%;" class="tex" alt="n" /> wires unless <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23e517569a067209bf264db2132df9e1.png" title="n" style="vertical-align:-20%;" class="tex" alt="n" /> is 2, 5, or 9 (<a href="http://www.math.ucsd.edu/~sbutler/ron/66_01_finite_set.pdf">On partitions of a finite set [PDF]</a>).</p>
<p>Knuth in <a href="http://arxiv.org/abs/math/9502237">his paper</a> translates the problem of Knowlton-Graham partitions in terms of <a href="http://mathworld.wolfram.com/01-Matrix.html">0/1-matrices</a>. Lemma 1 in that paper states: <i>Knowlton-Graham partitions exist for <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23e517569a067209bf264db2132df9e1.png" title="n" style="vertical-align:-20%;" class="tex" alt="n" /> <u>iff</u> there&#8217;s a 0/1-matrix having row sums <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_1adb696d2fc8c83e04fd21d967222530.png" title="(r_1,\ldots,r_m)" style="vertical-align:-20%;" class="tex" alt="(r_1,\ldots,r_m)" /> and column sums <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c2748e393a6f1496187a0ca941f98d8c.png" title="(c_1,\ldots,c_m)" style="vertical-align:-20%;" class="tex" alt="(c_1,\ldots,c_m)" /> such that <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_1cb553dc51f902cad549c8919e078958.png" title="r_j" style="vertical-align:-20%;" class="tex" alt="r_j" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_b47b4b1a76f49711d2704abe2f6125fc.png" title="c_j" style="vertical-align:-20%;" class="tex" alt="c_j" /> are multiples of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_17205bd7356afc72c6e1cad22749dbb0.png" title="j" style="vertical-align:-20%;" class="tex" alt="j" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_5a98011eff00f5af57a04e0e13e6d265.png" title="\sum r_j = \sum c_j = n" style="vertical-align:-20%;" class="tex" alt="\sum r_j = \sum c_j = n" /></i>.</p>
<p>Let&#8217;s use this lemma to label a set of 6 wires (<img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_a1b754dce3ce7b8bcc6fe139145a78b5.png" title="A\ldots F" style="vertical-align:-20%;" class="tex" alt="A\ldots F" />). Since we can write 6 = 1 + 2 + 3, a rather obvious matrix satisfying the conditions of the lemma is: <br/><br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c249fe859c8806537d69ee529c481613.png" title="\left(\begin{array}{ccc}0 &#038; 0 &#038; 1\\ 0 &#038; 1 &#038; 1\\ 1 &#038; 1 &#038; 1\end{array}\right)\quad" style="vertical-align:-20%;" class="tex" alt="\left(\begin{array}{ccc}0 &#038; 0 &#038; 1\\ 0 &#038; 1 &#038; 1\\ 1 &#038; 1 &#038; 1\end{array}\right)\quad" />, corresponding to the assignment <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_e547ae3187532f0182c3897f5580279b.png" title="\left(\begin{array}{ccc}0 &#038; 0 &#038; A\\ 0 &#038; B &#038; C\\ D &#038; E &#038; F\end{array}\right)" style="vertical-align:-20%;" class="tex" alt="\left(\begin{array}{ccc}0 &#038; 0 &#038; A\\ 0 &#038; B &#038; C\\ D &#038; E &#038; F\end{array}\right)" /></center></p>
<p>Guided by this matrix, here&#8217;s our two-trip identification procedure:</p>
<ul>
<li>On the labeled side, hook up wires in the following groups: <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_dd131ab893e404d89956b6c7c8ea6058.png" title="\{A\}" style="vertical-align:-20%;" class="tex" alt="\{A\}" />, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_9d26d3f7e33560299fc1e1c2c4b808e8.png" title="\{B,C\}" style="vertical-align:-20%;" class="tex" alt="\{B,C\}" />, and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_935f387dca435507c4d94acbd0e69328.png" title="\{D,E,F\}" style="vertical-align:-20%;" class="tex" alt="\{D,E,F\}" />.</li>
<li>Walk over to the unlabeled side, run the conductivity tests, and make the corresponding groups <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_8089cdf57099db6f489f74687a927e6f.png" title="\{a\}" style="vertical-align:-20%;" class="tex" alt="\{a\}" />, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_078e413ea9156a97c7716bd7ead529b2.png" title="\{b,c\}" style="vertical-align:-20%;" class="tex" alt="\{b,c\}" />, and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c9056f32dd1902dcbb401ccb2837bc13.png" title="\{d,e,f\}" style="vertical-align:-20%;" class="tex" alt="\{d,e,f\}" />.</li>
<li>Still on the unlabeled side, hook up the wires in the groups <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_dcae3eaf383d2d66eabcb6b231a33dd3.png" title="\{d/e/f\}" style="vertical-align:-20%;" class="tex" alt="\{d/e/f\}" />, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c2b281670bf0764b3d420099860d2971.png" title="\{b/c, d/e/f\}" style="vertical-align:-20%;" class="tex" alt="\{b/c, d/e/f\}" />, and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_88cf1c09415f6fdfb949394783147ed1.png" title="\{a, b/c, e/f/g\}" style="vertical-align:-20%;" class="tex" alt="\{a, b/c, e/f/g\}" />. Note that we still don&#8217;t know exactly which wire is, say, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" />; but we do know the two wires of which one if <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_55490d5b9084c964ed789b39be71bbad.png" title="b" style="vertical-align:-20%;" class="tex" alt="b" /> and the other <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_8390854cea1afc6c349c4c26b8bebb3c.png" title="c" style="vertical-align:-20%;" class="tex" alt="c" />.</li>
<li>Walk over to the labeled side, unhook the connection we had made in the first step, and check for conductivity. The sole wire here, say, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_4bdee45bb8394ab19c11eac5997c8153.png" title="F" style="vertical-align:-20%;" class="tex" alt="F" /> would correspond to the the sole wire from the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_f9918e717de7e50dffda0ec33b48cf5b.png" title="e/f/g" style="vertical-align:-20%;" class="tex" alt="e/f/g" /> group on the other side. Similarly, the connected-pair of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_70855464e1a033461d96eee013edaced.png" title="B/C" style="vertical-align:-20%;" class="tex" alt="B/C" /> &#8212; <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_18744d201a45f8f04592f7cfb03ea92d.png" title="E/F/G" style="vertical-align:-20%;" class="tex" alt="E/F/G" /> corresponds to the pair <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c2b281670bf0764b3d420099860d2971.png" title="\{b/c, d/e/f\}" style="vertical-align:-20%;" class="tex" alt="\{b/c, d/e/f\}" /> on the other side. etc.</li>
</ul>
<h4>Extensions</h4>
<p><a href="http://research.microsoft.com/en-us/people/navingo/default.aspx">Navin Goyal</a>, Sachin Lodha, and <a href="http://www.cs.rutgers.edu/~muthu/">S. Muthukrishnan</a> consider some variants &#038; generalizations of the wire identification problem in their paper <a href="http://portal.acm.org/citation.cfm?id=1132710">The Graham-Knowlton Problem Revisited</a>. In particular, they consider the restrictions to just hooking up pairs in the identification process (in our examples above, we were free to hook, say, 3 wires).</p>
]]></content:encoded>
			<wfw:commentRss>http://ashutoshmehra.net/blog/2009/09/wire-identification-problem/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>On Asymptotic Methods in Analysis: Prof. de Bruijn&#8217;s beautiful little book</title>
		<link>http://ashutoshmehra.net/blog/2009/05/asymptotic-methods-in-analysis/</link>
		<comments>http://ashutoshmehra.net/blog/2009/05/asymptotic-methods-in-analysis/#comments</comments>
		<pubDate>Fri, 08 May 2009 23:44:33 +0000</pubDate>
		<dc:creator>Ashutosh</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[TAOCP]]></category>

		<guid isPermaLink="false">http://ashutoshmehra.net/blog/?p=441</guid>
		<description><![CDATA[

For the past several days, I&#8217;ve been working my way through Prof. N.G. de Bruijn&#8217;s book Asymptotic Methods in Analysis; and I want to share some of the fun I&#8217;ve had reading it.
This post is not a review or anything (here&#8217;s an image of the back cover with some reviews). Below are just fragments of [...]]]></description>
			<content:encoded><![CDATA[<div class="alignright" style="margin-left: 5px"><a href="http://www.amazon.com/gp/product/0486642216?ie=UTF8&#038;tag=ashmehblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0486642216"><img border="0" src="http://ashutoshmehra.net/images/books/amia/de_Bruijn_asymptotic_methods_in_analysis_back_small.png" width="75px"></a><img src="http://www.assoc-amazon.com/e/ir?t=ashmehblo-20&#038;l=as2&#038;o=1&#038;a=0486642216" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></div>
<div class="alignright" style="margin-left: 5px"><a href="http://www.amazon.com/gp/product/0486642216?ie=UTF8&#038;tag=ashmehblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0486642216"><img border="0" src="http://ashutoshmehra.net/images/books/amia/de_Bruijn_asymptotic_methods_in_analysis_front_small.jpg" width="75px"></a><img src="http://www.assoc-amazon.com/e/ir?t=ashmehblo-20&#038;l=as2&#038;o=1&#038;a=0486642216" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></div>
<p>For the past several days, I&#8217;ve been working my way through <a href="http://www.win.tue.nl/~wsdwnb/">Prof. N.G. de Bruijn&#8217;s</a> book <a href="http://www.amazon.com/gp/product/0486642216?ie=UTF8&#038;tag=ashmehblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0486642216">Asymptotic Methods in Analysis</a>; and I want to share some of the fun I&#8217;ve had reading it.</p>
<p>This post is not a review or anything (here&#8217;s an <a href="http://ashutoshmehra.net/images/books/amia/de_Bruijn_asymptotic_methods_in_analysis_back_big.png">image of the back cover</a> with some reviews). Below are just fragments of what I&#8217;ve read so far and found fascinating. <span id="more-441"></span> You could also consider this my attempt at trying to persuade you to get a copy of this beautiful little book! Sadly, new copies appear <i>not</i> to be available at most online bookstores, so it might be hard to get one.</p>
<h4>Prof. de Bruijn, his cycles, and average height of trees</h4>
<div class="alignleft" style="margin-right: 5px"><img src="http://ashutoshmehra.net/images/books/amia/de_bruijn_cycle_color.png" width="150px" alt="A de Bruijn cycle"></div>
<p>This book is by the same Prof. de Bruijn well-known, among other things, for his <a href="http://en.wikipedia.org/wiki/De_Bruijn_sequence">cycles</a>, which are defined as following: An <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_39b54fb569800b4de76f3a22735c0ec5.png" title="m" style="vertical-align:-20%;" class="tex" alt="m" />-ary <i>de Bruijn cycle</i> is a sequence of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_90223c6cfe2c22939b91052bf5096d05.png" title="m^n" style="vertical-align:-20%;" class="tex" alt="m^n" /> radix-<img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_39b54fb569800b4de76f3a22735c0ec5.png" title="m" style="vertical-align:-20%;" class="tex" alt="m" /> digits such that every combinations of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23e517569a067209bf264db2132df9e1.png" title="n" style="vertical-align:-20%;" class="tex" alt="n" /> digits occurs consecutively in the cycle. For example, one possible binary de Bruijn cycle of length <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_2eb0518083e46aef997ecb32a917459c.png" title="2^4" style="vertical-align:-20%;" class="tex" alt="2^4" /> is:<br />
<center><tt>0 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0</tt>.</center></p>
<p>Treating this sequence as a cycle, notice that each of the 16 possible 4-bit patterns (<tt>0000</tt> &#8230; <tt>1111</tt>) appear exactly once in it. Knuth describes at least <i>three</i> interesting algorithms for generating such cycles in TAOCP Section 7.2.1.1 (printed in <a href="http://www.amazon.com/gp/product/0201853930?ie=UTF8&#038;tag=ashmehblo-20&#038;link_code=as3&#038;camp=211189&#038;creative=373489&#038;creativeASIN=0201853930">Volume 4, Fascicle 2</a> and downloadable as <a href="http://www-cs-faculty.stanford.edu/~knuth/fasc2a.ps.gz">pre-fascicle 2a</a>).</p>
<div class="alignright" style="margin-left: 5px"><a href="http://owpdb.mfo.de/person_detail?id=539"><img src="http://ashutoshmehra.net/images/books/amia/de_Bruijn_(196x)_1_Oberwolfach_Collection.jpg" width="100px" alt="Prof. de Bruijn; From the Oberwolfach Collection"></a></div>
<p>There&#8217;s surely lots to say about Prof. de Bruijn&#8217;s work (including his cycles), but I&#8217;ll reserve them for future posts. Take a look, for example, at the index of TAOCP Vol I (perhaps also in other volumes) and you&#8217;ll see references to many of his results, sometimes framed as exercises. And if you enjoy asymptotic calculations and analyses of algorithms, you would find it interesting to read his co-authored paper (with Knuth and Rice) where it is shown that <i>the average height of planted plane trees</i> is:<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c99c19546a80f8e17954618ea271dcac.png" title="\sqrt{\pi n} - {1\over2} + O(n^{-1/2})" style="vertical-align:-20%;" class="tex" alt="\sqrt{\pi n} - {1\over2} + O(n^{-1/2})" />.</center><br />
This is also TAOCP Ex. 2.3.1&#8211;11, where the question is posed in terms of the average value of the maximum stack size consumed while running the usual in-order binary tree traversal, assuming all binary trees with n nodes are equally probable.</p>
<p>As an interesting note, Knuth in his <a href="http://scpd.stanford.edu/knuth/index.jsp">musings</a> on <i>The Joy of Asymptotics</i> (30 May 2000) said:</p>
<blockquote>
<div class="alignleft" style="margin-right: 5px"><a href="http://www.amazon.com/gp/product/1575862123?ie=UTF8&#038;tag=ashmehblo-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=1575862123"><img border="0" src="http://ashutoshmehra.net/images/books/amia/knuth_papers_on_analysis_of_algorithms_front_small.jpg" width="75px"></a><img src="http://www.assoc-amazon.com/e/ir?t=ashmehblo-20&#038;l=as2&#038;o=1&#038;a=1575862123" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></div>
<p>I&#8217;ve dedicated this book [<a href="http://www-cs-faculty.stanford.edu/~knuth/aa.html">Selected Papers on Analysis of Algorithms</a>] to Prof. de Bruijn &#8230; in the Netherlands because he has been my <i>guru</i> &#8230; Ever since I got my PhD, I considered him my post-graduate doctoral advisor. Every time I had a problem that I got stuck on, I would write to him, and he would write me back a letter that would help me get unstuck. And that&#8217;s been going on for over fourty years now. So I dedicated this book to him. And what I want to talk to you about today is one of the things <i>he</i> has spent most of <i>his</i> life on &#8212; asymptotic methods.</p></blockquote>
<p>By the way, that paper deriving the cool formula for the height of trees is included in these <i>Selected Papers</i> (Ch. 15).</p>
<h4>The Book: A Pragmatic Exposition</h4>
<p>I had got myself a copy of this book several years ago after first reading about it in the section on asymptotic calculations in TAOCP (Sec 1.2.11.3). But unfortunately, the book suffered the same fate as countless others &#8212; it just kept resting on my bookshelf. But a few days ago, I decided to give it a try.</p>
<p><i>A brief history</i>. As described in its preface, this book grew out of lectures given in 1954&#8211;55 and was first published in 1958. The Dover edition I have is a reprint of the third edition from 1970.</p>
<p>Most computer programmers are familiar with the <a href="http://en.wikipedia.org/wiki/Big_O_notation">Big-O notation</a>, or the Bachmann-Landau notation, for analyzing space/time-complexity of an algorithm. Among other things, this book talks of the tricks involved in getting precise asymptotic bounds once we have reduced the problem at hand to, say, a sum or an integral.</p>
<p>This is a <i>pragmatic</i> book &#8212; its focus is on demonstrating general techniques by working out several examples in detail (sometimes in more than one way) rather than expounding highly generalized theories of analysis. In this context, I found these lines from the preface reassuring:</p>
<blockquote><p>Usually in mathematics one has to choose between saying more and more about less and less on the one hand, and saying less and less about more and more on the other. In a practical subject like this, however, the proper attitude should be to say as much as possible in a given situation.</p></blockquote>
<p>From my reading, at certain places it, of necessity, assumes a basic knowledge of analysis and complex variable theory. Other than that, it is a fairly elementary treatment. (Note: as Feynman made a quip in <a href="http://www.amazon.com/gp/product/0393039188?ie=UTF8&#038;tag=ashmehblo-20&#038;link_code=as3&#038;camp=211189&#038;creative=373489&#038;creativeASIN=0393039188">one of his lectures</a>, <i>&#8220;Elementary&#8221; means that very little is required to know ahead of time in order to understand it, except to have an infinite amount of intelligence.&#8221;</i>)</p>
<p>It&#8217;s a small book (200 pages) with very few exercises and so can be read in about two weeks, if you read an hour a day. And since there are lots of cliff-hanging moments (well, to the extent a book on analysis can have!) and the reader is left wondering how a tricky sum/integral would be tamed, your might be compelled to finish it even sooner!</p>
<p>de Bruijn has a good sense of humor too. At the start of the first chapter, when trying to answer the question <i>&#8220;What is Asymptotics?&#8221;</i>, he says:</p>
<blockquote><p>The safest and not the vaguest definition is the following one: Asymptotics is that part of analysis which considers problems of the type dealt with in this book.</p></blockquote>
<p>Didn&#8217;t see that one coming! </p>
<p>And while the book is tiny, it covers lots of tricks &amp; techniques. So, to give my interested readers a taste, I&#8217;ve picked a couple of my favorite from the first chapter. All examples are de Bruijn&#8217;s. </p>
<h4>Uniform Estimates</h4>
<p><i>Uniformity of estimates</i> is this little thing that keeps popping up every so often when analyzing the asymptotics of some characteristic of an algorithm. But it is rarely explained what it means or why uniformity is crucial to the application at hand. Grown up boys and girls are supposed to know what uniformity is, I suppose.</p>
<p>Before looking at uniformity, let&#8217;s recap the definition of the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_2f55e2f764c899f5c8dabb45cd9338d8.png" title="O" style="vertical-align:-20%;" class="tex" alt="O" />-notation. We say:<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_62bc6f0b98d5560f041b8bc6c43f9135.png" title="f(x)=O(\phi(x))\qquad(x\rightarrow\infty)" style="vertical-align:-20%;" class="tex" alt="f(x)=O(\phi(x))\qquad(x\rightarrow\infty)" /></center><br />
to mean the existence of numbers <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_abdfb1ee5ca8eaf34770b230fed37ffd.png" title="A" style="vertical-align:-20%;" class="tex" alt="A" /> such that:<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c85fe500fc2a4584b5cbc6b4167a79d2.png" title="|f(x)|\leq A|\phi(x)|\qquad\text{whenever}\quad x\,\textgreater\,a" style="vertical-align:-20%;" class="tex" alt="|f(x)|\leq A|\phi(x)|\qquad\text{whenever}\quad x\,\textgreater\,a" />.</center><br />
The thing to note in this definition is that <i>the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_2f55e2f764c899f5c8dabb45cd9338d8.png" title="O" style="vertical-align:-20%;" class="tex" alt="O" />-notation implies two implicit constants</i>, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_abdfb1ee5ca8eaf34770b230fed37ffd.png" title="A" style="vertical-align:-20%;" class="tex" alt="A" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_51271a2c86027496c0237a713770db43.png" title="a" style="vertical-align:-20%;" class="tex" alt="a" />.</p>
<p>Returning to the question of uniformity, suppose <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_1536fd5a256e8ae0bf1cd5a9c828392e.png" title="k" style="vertical-align:-20%;" class="tex" alt="k" /> is a positive integer and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_57a3db9b14bded9c06fc0922f156537d.png" title="f(x)" style="vertical-align:-20%;" class="tex" alt="f(x)" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_ce53f5d0df72577c4cd72dad85303234.png" title="g(x)" style="vertical-align:-20%;" class="tex" alt="g(x)" /> are arbitrary functions. Then:<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_5a545d3ddd3d049250ff49fe425f31c4.png" title="( f(x) + g(x) )^k = O( ( f(x) )^k + ( g(x) )^k)" style="vertical-align:-20%;" class="tex" alt="( f(x) + g(x) )^k = O( ( f(x) )^k + ( g(x) )^k)" />, because,</center><br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_e575fac57bcde5edb2e9993ba6e89396.png" title="|(f+g)^k|\leq (|f|+|g|)^k\leq (2\max(|f|, |g|))^k\leq 2^k(|f|^k + |g|^k)" style="vertical-align:-20%;" class="tex" alt="|(f+g)^k|\leq (|f|+|g|)^k\leq (2\max(|f|, |g|))^k\leq 2^k(|f|^k + |g|^k)" /></center><br />
Rewriting the last line as: <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_017c3150b4a36dc7f99f888efbd23ac1.png" title="(f(x) + g(x))^k\leq A|f(x)|^k + B|g(x)|^k" style="vertical-align:-20%;" class="tex" alt="(f(x) + g(x))^k\leq A|f(x)|^k + B|g(x)|^k" />, we see that <i>the implicit &#8220;constants&#8221; <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_abdfb1ee5ca8eaf34770b230fed37ffd.png" title="A" style="vertical-align:-20%;" class="tex" alt="A" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_ed6558df25ce694119274d78624a4df9.png" title="B" style="vertical-align:-20%;" class="tex" alt="B" /> depend on the parameter <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_1536fd5a256e8ae0bf1cd5a9c828392e.png" title="k" style="vertical-align:-20%;" class="tex" alt="k" /></i>. We call such an estimate <i>non-uniform</i>.</p>
<p></p>
<p>On the other hand, in the asymptotic relation (with <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_1536fd5a256e8ae0bf1cd5a9c828392e.png" title="k" style="vertical-align:-20%;" class="tex" alt="k" /> again being a positive integer):<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_93f8c949fcda792fe4e9cbb767d13b41.png" title="({k\over{x^2+k^2}})^k=O({1\over{x^k}})\qquad (x \,\textgreater\, 1)" style="vertical-align:-20%;" class="tex" alt="({k\over{x^2+k^2}})^k=O({1\over{x^k}})\qquad (x \,\textgreater\, 1)" /></center><br />
the implicit constant in the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_2f55e2f764c899f5c8dabb45cd9338d8.png" title="O" style="vertical-align:-20%;" class="tex" alt="O" />-notation is independent of k, since we have<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_18a183079c6b8cf7e8f05501e347d5cf.png" title="({k\over{x^2+k^2}})^k\leq ({k\over{2kx}})^k\leq {1\over{x^k}}" style="vertical-align:-20%;" class="tex" alt="({k\over{x^2+k^2}})^k\leq ({k\over{2kx}})^k\leq {1\over{x^k}}" />.</center></p>
<p>Hence if we write <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_150fb51734afc97fdbf930e24a5972a1.png" title="({k\over{x^2+k^2}})^k\leq {A\over{x^k}}" style="vertical-align:-20%;" class="tex" alt="({k\over{x^2+k^2}})^k\leq {A\over{x^k}}" />, with <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_521d1468fd87987f5107a61b41c12251.png" title="x \,\textgreater\,1" style="vertical-align:-20%;" class="tex" alt="x \,\textgreater\,1" />, we can choose <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_abdfb1ee5ca8eaf34770b230fed37ffd.png" title="A" style="vertical-align:-20%;" class="tex" alt="A" /> to be 1. In such a case &#8212; when the hidden constants in the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_2f55e2f764c899f5c8dabb45cd9338d8.png" title="O" style="vertical-align:-20%;" class="tex" alt="O" />-notation do not depend on the parameter <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_1536fd5a256e8ae0bf1cd5a9c828392e.png" title="k" style="vertical-align:-20%;" class="tex" alt="k" /> &#8212; the estimate is called <i>uniform</i>. This requirement is much like that of <a href="http://en.wikipedia.org/wiki/Uniform_convergence">uniform convergence</a> or <a href="http://en.wikipedia.org/wiki/Uniform_continuity">uniform continuity</a> in analysis.</p>
<p>So why trouble oneself with uniformity? Here&#8217;s one case where uniform estimates prove helpful: In &#8220;balancing&#8221; the asymptotic terms of a sum evenly to achieve a tight bound.</p>
<p>For instance, if we have somehow shown that <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_d73c4c3b4ed0a9491e5a5db2e61e7611.png" title="f(x) = O(x^2t) + O(x^4t^{-2})" style="vertical-align:-20%;" class="tex" alt="f(x) = O(x^2t) + O(x^4t^{-2})" /> with <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6424a0e9bc3f3fce99cca400465275c5.png" title="x, t \,\textgreater\, 1" style="vertical-align:-20%;" class="tex" alt="x, t \,\textgreater\, 1" /> and where <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_7719e254cdcddde73868082c03747973.png" title="t" style="vertical-align:-20%;" class="tex" alt="t" /> is a parameter. If the formula holds uniformly, we can get a tight bound by reasoning as follows: When <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_7719e254cdcddde73868082c03747973.png" title="t" style="vertical-align:-20%;" class="tex" alt="t" /> is small, the first part, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_845054021567cb9b8967fc193af6ee05.png" title="O(x^2t)" style="vertical-align:-20%;" class="tex" alt="O(x^2t)" />, is small, but the second part, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_40f19fc474d7c6d7d6dc67fbb530880e.png" title="O(x^4t^{-2})" style="vertical-align:-20%;" class="tex" alt="O(x^4t^{-2})" />, is large; the reverse holds if <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_7719e254cdcddde73868082c03747973.png" title="t" style="vertical-align:-20%;" class="tex" alt="t" /> is large. Hence we wish to find a &#8220;balance&#8221; that minimizes the sum of the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23cf3a439d9492818690c93067ded298.png" title="O(\cdot)" style="vertical-align:-20%;" class="tex" alt="O(\cdot)" /> terms. And this happens when both the terms are asymptotically equivalent. So to achieve such a balance, we simply equate the two expressions <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_f3d3544bb21c11888c1b9f9236600434.png" title="x^2t = x^4t^{-2}" style="vertical-align:-20%;" class="tex" alt="x^2t = x^4t^{-2}" />, giving <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6ded7e8506cf9c320a56fc69e8d5f04e.png" title="t=x^{2/3}" style="vertical-align:-20%;" class="tex" alt="t=x^{2/3}" />, and we finally get <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_59516dcbc0d883e23593df6c74bb6a58.png" title="f(x) = O(x^{8/3})" style="vertical-align:-20%;" class="tex" alt="f(x) = O(x^{8/3})" />.</p>
<p>Notice that because of uniformity, the four hidden constants (<img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_91d90b51ee8342c289278378741b884b.png" title="A_1" style="vertical-align:-20%;" class="tex" alt="A_1" />, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_5b9b5c199983fd0b6465db77e6cda44a.png" title="a_1" style="vertical-align:-20%;" class="tex" alt="a_1" />, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_d01f353275520948daf9d74cf8e70dbf.png" title="A_2" style="vertical-align:-20%;" class="tex" alt="A_2" />, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_3da18de36bc90bc95a74c746ac13e605.png" title="a_2" style="vertical-align:-20%;" class="tex" alt="a_2" />) of the two <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23cf3a439d9492818690c93067ded298.png" title="O(\cdot)" style="vertical-align:-20%;" class="tex" alt="O(\cdot)" /> do not vary when we vary the parameter <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_7719e254cdcddde73868082c03747973.png" title="t" style="vertical-align:-20%;" class="tex" alt="t" />. If the two original <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23cf3a439d9492818690c93067ded298.png" title="O(\cdot)" style="vertical-align:-20%;" class="tex" alt="O(\cdot)" /> estimates had not been uniform; that is, had their hidden constants (implied by the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_2f55e2f764c899f5c8dabb45cd9338d8.png" title="O" style="vertical-align:-20%;" class="tex" alt="O" />-notation) varied with <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_7719e254cdcddde73868082c03747973.png" title="t" style="vertical-align:-20%;" class="tex" alt="t" />, we wouldn&#8217;t have been able to apply this simplistic &#8220;balancing&#8221; idea. For instance, while for small <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_7719e254cdcddde73868082c03747973.png" title="t" style="vertical-align:-20%;" class="tex" alt="t" />, the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_085cbcc5243900a13a760673f18bc0e0.png" title="x^2t" style="vertical-align:-20%;" class="tex" alt="x^2t" /> term might have been small, the hidden constant <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_91d90b51ee8342c289278378741b884b.png" title="A_1" style="vertical-align:-20%;" class="tex" alt="A_1" /> in <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_845054021567cb9b8967fc193af6ee05.png" title="O(x^2t)" style="vertical-align:-20%;" class="tex" alt="O(x^2t)" /> might have grown, leading to unpredictable overall behavior.</p>
<p>The good thing about uniform estimates is that they are sometimes more useful; but proving uniformity might require a more careful analysis. </p>
<h4>Asymptotic Series and Convergence: Some Curious Facts</h4>
<p>An <i>asymptotic series</i> or <a href="http://en.wikipedia.org/wiki/Asymptotic_expansion"><i>asymptotic expansion</i></a> for a function <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_57a3db9b14bded9c06fc0922f156537d.png" title="f(x)" style="vertical-align:-20%;" class="tex" alt="f(x)" /> is a formula like:<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_ad7f5a1fbecc853bd4486d8a6bca0780.png" title="f(x) \approx c_0\phi_0(x) + c_1\phi_1(x) + c_2\phi_2(x) + \ldots \qquad (x\rightarrow\infty)" style="vertical-align:-20%;" class="tex" alt="f(x) \approx c_0\phi_0(x) + c_1\phi_1(x) + c_2\phi_2(x) + \ldots \qquad (x\rightarrow\infty)" /></center><br />
where, as <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_0f1aa60bf517a5bbf13780fa564b5e69.png" title="x\rightarrow\infty" style="vertical-align:-20%;" class="tex" alt="x\rightarrow\infty" />,<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_e68d7586867d3ea3ba4723b3ee3f264e.png" title="\phi_{j+1}(x)=o(\phi_j(x))\qquad j\geq 0" style="vertical-align:-20%;" class="tex" alt="\phi_{j+1}(x)=o(\phi_j(x))\qquad j\geq 0" />, and,</center><br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_dbb4ba230b58aefd99ec2256eedc3218.png" title="f(x) = c_0\phi_0(x) + c_1\phi_1(x) + \cdots + c_{n-1}\phi_{n-1}(x) + O(\phi_n(x))\qquad (n\geq 0)" style="vertical-align:-20%;" class="tex" alt="f(x) = c_0\phi_0(x) + c_1\phi_1(x) + \cdots + c_{n-1}\phi_{n-1}(x) + O(\phi_n(x))\qquad (n\geq 0)" />.</center><br />
That is, the asymptotic expansion for <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_57a3db9b14bded9c06fc0922f156537d.png" title="f(x)" style="vertical-align:-20%;" class="tex" alt="f(x)" /> is a series of functions such that if we truncate the series at the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23e517569a067209bf264db2132df9e1.png" title="n" style="vertical-align:-20%;" class="tex" alt="n" /><sup>th</sup> term, the partial series provides an approximation to <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_57a3db9b14bded9c06fc0922f156537d.png" title="f(x)" style="vertical-align:-20%;" class="tex" alt="f(x)" /> (as <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_0f1aa60bf517a5bbf13780fa564b5e69.png" title="x\rightarrow\infty" style="vertical-align:-20%;" class="tex" alt="x\rightarrow\infty" />) with the error term asymptotically bound by the first truncated function. The <a href="http://en.wikipedia.org/wiki/Euler%27s_summation_formula#Asymptotic_expansion_of_sums">Euler-Maclaurin formula</a> is one way to get such an expansion. de Bruijn mentions other techniques in the book.</p>
<p>A large class of examples of asymptotic expansions are convergent power series, like:<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_fe74febed2281589c514d7e406215d4b.png" title="\exp(z) = 1 + z + {z^2\over2!} + {z^3\over3!} + \cdots\qquad (|z|\rightarrow0)" style="vertical-align:-20%;" class="tex" alt="\exp(z) = 1 + z + {z^2\over2!} + {z^3\over3!} + \cdots\qquad (|z|\rightarrow0)" />.</center></p>
<p>But there could be asymptotic expansions that are not convergent power series. And with such asymptotic expansions, some curious things can happen:</p>
<ul>
<li>The series of the asymptotic expansion need not be convergent.</li>
<li>If the series does converge, its sum need not be equal to <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_57a3db9b14bded9c06fc0922f156537d.png" title="f(x)" style="vertical-align:-20%;" class="tex" alt="f(x)" /></li>
<li>It is even possible to have <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_57a3db9b14bded9c06fc0922f156537d.png" title="f(x)" style="vertical-align:-20%;" class="tex" alt="f(x)" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_696b622b47435feb569472b2e73b8e19.png" title="\phi_j(x)" style="vertical-align:-20%;" class="tex" alt="\phi_j(x)" />&#8217;s such that the sum of the series does not have the series as its own asymptotic expansion!</li>
</ul>
<p>The essential reason for these seemingly strange facts, as de Bruijn explains, is:</p>
<blockquote style="background-color: #ffffff"><p>&#8230; that convergence means something for some fixed <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_84a8809ce4927565dc0a056edf52ea49.png" title="x_0" style="vertical-align:-20%;" class="tex" alt="x_0" /> whereas the <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_2f55e2f764c899f5c8dabb45cd9338d8.png" title="O" style="vertical-align:-20%;" class="tex" alt="O" />-formulas are not concerned with <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_f1fdb243b0d5a9002b1f871e10aae976.png" title="x=x_0" style="vertical-align:-20%;" class="tex" alt="x=x_0" />, but with <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_0f1aa60bf517a5bbf13780fa564b5e69.png" title="x\rightarrow\infty" style="vertical-align:-20%;" class="tex" alt="x\rightarrow\infty" />. Convergence of the series, for all <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_32394b39aa8100258d9cd1b74aa703e2.png" title="x \,\textgreater\, 0" style="vertical-align:-20%;" class="tex" alt="x \,\textgreater\, 0" />, say, means that for every individual <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6f2ba5df4f650911e133231e13279a3a.png" title="x" style="vertical-align:-20%;" class="tex" alt="x" /> there is a statement about the case <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_cf518ba638f8d0c256339ca4a611de68.png" title="n\rightarrow\infty" style="vertical-align:-20%;" class="tex" alt="n\rightarrow\infty" />. On the other hand, the statement that the series is the asymptotic expansion of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_57a3db9b14bded9c06fc0922f156537d.png" title="f(x)" style="vertical-align:-20%;" class="tex" alt="f(x)" /> means that for every individual <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23e517569a067209bf264db2132df9e1.png" title="n" style="vertical-align:-20%;" class="tex" alt="n" /> there is a statement about the case <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_0f1aa60bf517a5bbf13780fa564b5e69.png" title="x\rightarrow\infty" style="vertical-align:-20%;" class="tex" alt="x\rightarrow\infty" />.</p></blockquote>
<p>For example, when <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_04313d2ebdcb2accb5180a12e91c213c.png" title="f(x) = \int_1^x{e^t\over t}dt" style="vertical-align:-20%;" class="tex" alt="f(x) = \int_1^x{e^t\over t}dt" />, the asymptotic expansion of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_154897c44af75233feafb0566b226f74.png" title="e^{-x}f(x)" style="vertical-align:-20%;" class="tex" alt="e^{-x}f(x)" /> is:<br />
<center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c0e321dbedda903bc13a33f6cefd4323.png" title="{1\over x} + {1!\over x^2}+ {2!\over x^3} + {3!\over x^4} + \ldots \qquad (x\rightarrow\infty)" style="vertical-align:-20%;" class="tex" alt="{1\over x} + {1!\over x^2}+ {2!\over x^3} + {3!\over x^4} + \ldots \qquad (x\rightarrow\infty)" />,</center><br />
but the series converges for no value of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6f2ba5df4f650911e133231e13279a3a.png" title="x" style="vertical-align:-20%;" class="tex" alt="x" />.</p>
<h4>So&#8230;</h4>
<p>The book covers lots of useful stuff. In particular, It talks about <a href="http://en.wikipedia.org/wiki/Lagrange_inversion_theorem">Lagrange&#8217;s inversion formula</a> (using which we can solve for the <a href="http://en.wikipedia.org/wiki/Lambert_W_function">&#8220;tree function&#8221;</a>), it has a especially thorough treatment of <a href="http://en.wikipedia.org/wiki/Method_of_steepest_descent">the saddle-point method</a>. And much much more.</p>
]]></content:encoded>
			<wfw:commentRss>http://ashutoshmehra.net/blog/2009/05/asymptotic-methods-in-analysis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Read wrote Wright&#8230; Graph Theorists playing with words</title>
		<link>http://ashutoshmehra.net/blog/2009/03/read-wrote-wright/</link>
		<comments>http://ashutoshmehra.net/blog/2009/03/read-wrote-wright/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 01:38:31 +0000</pubDate>
		<dc:creator>Ashutosh</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://ashutoshmehra.net/blog/?p=271</guid>
		<description><![CDATA[
I was going through the first chapter of the book Graphical Enumeration by Frank Harary and Edgar M. Palmer when I chanced upon this perplexing footnote:
Read wrote Wright that both Read [R2]1 and Wright [W3]2 were wrong. So Read and Wright wrote a joint erratum [RW1]3 to set things right. This may be wrong since [...]]]></description>
			<content:encoded><![CDATA[<div class="alignleft" style="margin-right: 5px;"><a href="http://owpdb.mfo.de/detail?photo_id=4390"><img src="http://ashutoshmehra.net/images/posts/readwrotewright/frank_harary_oberwolfach_1972.jpg" alt="Frank Harary, Oberwolfach (1972)" width="130px" /></a></div>
<p>I was going through the first chapter of the book <i>Graphical Enumeration</i> by <a href="http://www.cs.nmsu.edu/fnh/">Frank Harary</a> and <a href="http://genealogy.math.ndsu.nodak.edu/id.php?id=5534">Edgar M. Palmer</a> when I chanced upon this perplexing footnote:</p>
<blockquote><p>Read wrote Wright that both Read [R2]<sup>1</sup> and Wright [W3]<sup>2</sup> were wrong. So Read and Wright wrote a joint erratum [RW1]<sup>3</sup> to set things right. This may be wrong since Wright asserts that Wright wrote Read first.</p></blockquote>
<p><span id="more-271"></span><br />
It appears on Pg. 17 in reference to k-colored graphs. Read and Wright are, of course, the mathematicians <a href="http://en.wikipedia.org/wiki/Ronald_Read">Ronald C. Read</a> and <a href="http://en.wikipedia.org/wiki/E._M._Wright">Edward M. Wright</a>!</p>
<p>A quick glance at the bibliography confirms that the above footnote describes, even if humorously, a true incident. However, I can&#8217;t say what the last sentence means: <q>This may be wrong since Wright asserts that Wright wrote Read first</q>. Does it mean:</p>
<ul>
<li>There is a genuine priority dispute as to who figured the error out [I don't think this is the case]. Or,
<li>Since [RW1] paper has Read as the first author (so, in that sense, &#8220;Read wrote first&#8221;), Wright couldn&#8217;t have written first. Or,</li>
<li>Since &#8220;write&#8221; must happen before &#8220;read&#8221;, Wright wrote first. Or,</li>
<li>It doesn&#8217;t mean anything &#8212; the authors are just playing around with words!</li>
</ul>
<p>I could not find anything relevant by searching the phrase &#8220;Read wrote Wright&#8221; on Google.com. I&#8217;ll be eager to learn any other clues the reader might have as as to the meaning of the last sentence of the footnote.</p>
<p><i>Aside</i>: It is sad that the <i>Graphical Enumeration</i> book, which was published by Academic Press, New York (1973), has apparently gone <a href="http://www.amazon.com/Graphical-Enumeration-Frank-Harary/dp/0123242452">out of print</a>. I&#8217;ve added it to the <a href="http://outofprintmath.blogspot.com/">out of print math blog</a>.
<ol class="footnotes">
<li id="footnote_0_271" class="footnote">[R2] R.C. Read, The number of k-colored graphs on labelled nodes, Canad. J. Math. <b>12</b>, 409&#8211;413 (1960).</li>
<li id="footnote_1_271" class="footnote">[W3] E.M. Wright, Counting coloured graphs, Canad. J. Math. <b>13</b>, 683&#8211;693 (1961).</li>
<li id="footnote_2_271" class="footnote">[RW1] R.C. Read and E.M. Wright, Coloured graphs: A correction and extension, Canad. J. Math. <b>22</b>, 594&#8211;596 (1970).</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ashutoshmehra.net/blog/2009/03/read-wrote-wright/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analytically evaluating a limiting probability (June 2007 Ponder This)</title>
		<link>http://ashutoshmehra.net/blog/2008/12/a-limiting-probability/</link>
		<comments>http://ashutoshmehra.net/blog/2008/12/a-limiting-probability/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 06:20:40 +0000</pubDate>
		<dc:creator>Ashutosh</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[Ponder]]></category>

		<guid isPermaLink="false">http://ashutoshmehra.net/blog/?p=23</guid>
		<description><![CDATA[In this post, I&#8217;ll describe my solution to June 2007&#8217;s Ponder This. I had felt that my solution was kind of nifty, and different from the one that was published.  It had actually taken me several days to work the whole thing out.
Here&#8217;s part (2), the tougher part, of the problem: Values for a [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, I&#8217;ll describe my solution to <a href="http://domino.research.ibm.com/Comm/wwwr_ponder.nsf/Challenges/June2007.html">June 2007&#8217;s Ponder This</a>. I had felt that my solution was kind of nifty, and different from the one that was <a href="http://domino.research.ibm.com/Comm/wwwr_ponder.nsf/solutions/June2007.html">published</a>.  It had actually taken me several days to work the whole thing out.</p>
<p>Here&#8217;s part (2), the tougher part, of the problem: Values for a random variable are generated independently and uniformly over <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_8c23b3d397583438b90a390f0adf1147.png" title="\left[0,1\right)" style="vertical-align:-20%;" class="tex" alt="\left[0,1\right)" />. By accumulating these values, your job is to reach a sum between <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_e9be79e62f04cc4b913b199c5644142b.png" title="n+x" style="vertical-align:-20%;" class="tex" alt="n+x" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6dd5ce1bb087fe9aa816105476a2e764.png" title="n+1" style="vertical-align:-20%;" class="tex" alt="n+1" />, where <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23e517569a067209bf264db2132df9e1.png" title="n" style="vertical-align:-20%;" class="tex" alt="n" /> is a positive integer, and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_2ad1d29b70558316aa7d42e94c3d6749.png" title="0\,\textless\,x\,\textless\,1" style="vertical-align:-20%;" class="tex" alt="0\,\textless\,x\,\textless\,1" />. <span id="more-23"></span> You can ask for successive values of this variate as many times as you wish, but you must add each such value to the running total you maintain. If the accumulating sum exceeds <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6dd5ce1bb087fe9aa816105476a2e764.png" title="n+1" style="vertical-align:-20%;" class="tex" alt="n+1" />, you loose; if you manage to get a sum between <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_e9be79e62f04cc4b913b199c5644142b.png" title="n+x" style="vertical-align:-20%;" class="tex" alt="n+x" /> and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6dd5ce1bb087fe9aa816105476a2e764.png" title="n+1" style="vertical-align:-20%;" class="tex" alt="n+1" />, you win. What is the probability of winning as <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_fe3500a8a2c425af0aea75cd0856ec8f.png" title="n\to\infty" style="vertical-align:-20%;" class="tex" alt="n\to\infty" />?</p>
<p>Earlier that year, I had finished studying Knuth&#8217;s <a href="http://www-cs-faculty.stanford.edu/~knuth/dm.html">Selected Papers on Discrete Mathematics</a>. That is a precious collection for anyone interested in discrete structures, combinatorics, asymptotics, random structures etc. I had especially enjoyed one of the papers, <a href="http://portal.acm.org/citation.cfm?id=67827">&#8220;The first cycles in an evolving graph&#8221;</a> (with <a href="http://algo.inria.fr/flajolet/">Flajolet</a> &#038; <a href="http://www.math.ohio-state.edu/~bgp/">Pittel</a> as co-authors), not only for the neat results but also for the techniques used to get asymptotic values/bounds of certain integrals. That paper helped introduce me to, and drive home the importance of, the fascinating field I later came to know as <a href="http://en.wikipedia.org/wiki/Analytic_combinatorics">Analytic combinatorics</a> (also <a href="http://algo.inria.fr/flajolet/Publications/books.html">this</a>). That paper analyzes the evolution of a random graph, where edges are successively added to a set of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_23e517569a067209bf264db2132df9e1.png" title="n" style="vertical-align:-20%;" class="tex" alt="n" /> vertices(under different <a href="http://en.wikipedia.org/wiki/Random_graph">random graph models</a>). Among other results, it shows that expected length of the first cycle to appear is proportional to <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_abedac5cf09d0ec5cb99f0e6d7deb619.png" title="n^{1/6}" style="vertical-align:-20%;" class="tex" alt="n^{1/6}" /> and the size of the component having this cycle is <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_f2895a79ad21921b9db265027724fe02.png" title="\sim\sqrt{n}" style="vertical-align:-20%;" class="tex" alt="\sim\sqrt{n}" /> &#8212; quite fascinating stuff. At any rate, with these analytic techniques still fresh in my mind, I attacked the problem by trying to find a bound on the probability integral. Details follow (with a I-to-we switch).</p>
<p>To begin with, we use the classical <a href="http://en.wikipedia.org/wiki/Central_limit_theorem">Central Limit Theorem</a> to replace the sum of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_39b54fb569800b4de76f3a22735c0ec5.png" title="m" style="vertical-align:-20%;" class="tex" alt="m" /> independently and uniformly distributed variates (each of which had mean <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_84fd05d8198f7e5eda6fd5ce77c37d9b.png" title="1\over{2}" style="vertical-align:-20%;" class="tex" alt="1\over{2}" /> and variance <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_9a8228f8f96e9f778861f7f7c9a143e1.png" title="1\over{12}" style="vertical-align:-20%;" class="tex" alt="1\over{12}" />) with a Normal variate with mean <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_30756ac17007304d2c29512e77046d3a.png" title="m\over{2}" style="vertical-align:-20%;" class="tex" alt="m\over{2}" /> and variance <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c157181c901c839c9d1a17371e2f7a20.png" title="m\over{12}" style="vertical-align:-20%;" class="tex" alt="m\over{12}" />.</p>
<p>Now, the probability of &#8220;hitting&#8221; (i.e., achieving a sum lying within the interval) <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_06c1b7d438c5568abfe5d1d88ad0bbb3.png" title="\left[n+x,n+1\right)" style="vertical-align:-20%;" class="tex" alt="\left[n+x,n+1\right)" /> in <i>exactly</i> <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_39b54fb569800b4de76f3a22735c0ec5.png" title="m" style="vertical-align:-20%;" class="tex" alt="m" /> &#8220;moves&#8221; is <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_4a108dee71f7e0bf54957e31c157f6df.png" title="\int_{n-1+x}^{n+x}P_a(m,y) P_b(y)\,dy" style="vertical-align:-20%;" class="tex" alt="\int_{n-1+x}^{n+x}P_a(m,y) P_b(y)\,dy" />, where <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_24f3db5ede6bbc2dc5e0f081c78a8143.png" title="P_a(m,y)\,dy" style="vertical-align:-20%;" class="tex" alt="P_a(m,y)\,dy" /> is the probability of hitting <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_fb2e6bd1da6560741cb2f389adf66fb0.png" title="\left[y, y+dy\right)" style="vertical-align:-20%;" class="tex" alt="\left[y, y+dy\right)" /> in exactly <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_53892837d5d40b86ad3cfd16b2cab553.png" title="m-1" style="vertical-align:-20%;" class="tex" alt="m-1" /> moves and <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_5c33891a4360d41ccc1394cd607ca387.png" title="P_b(y)" style="vertical-align:-20%;" class="tex" alt="P_b(y)" /> is the probability of jumping from <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_fb2e6bd1da6560741cb2f389adf66fb0.png" title="\left[y, y+dy\right)" style="vertical-align:-20%;" class="tex" alt="\left[y, y+dy\right)" /> to the desired interval <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_7fc6ba65c10c3ed9de130f889e4d876f.png" title="\left[n+x, n+1\right)" style="vertical-align:-20%;" class="tex" alt="\left[n+x, n+1\right)" /> in the m<sup>th</sup>-move.</p>
<p>When <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_24b66d7843d3fa9936b8815ae9da1a72.png" title="y\in\left[n-1+x, n\right)" style="vertical-align:-20%;" class="tex" alt="y\in\left[n-1+x, n\right)" />, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_cad0e32f603525b16b55df5d28410538.png" title="P_b(y)=y-(n-1+x)" style="vertical-align:-20%;" class="tex" alt="P_b(y)=y-(n-1+x)" />; and when <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_ba098d18f6fa034de80e594a4d754438.png" title="y\in\left[n, n+x\right)" style="vertical-align:-20%;" class="tex" alt="y\in\left[n, n+x\right)" />, <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_6f1091abfcbed7571656718c0f05a0d0.png" title="P_b(y)=1-x" style="vertical-align:-20%;" class="tex" alt="P_b(y)=1-x" />. <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_088923d77af492404f106ac65999d128.png" title="P_a(m,y)" style="vertical-align:-20%;" class="tex" alt="P_a(m,y)" /> is the <a href="http://en.wikipedia.org/wiki/Probability_density_function">probability density function</a> of the aforementioned normal variate; so</p>
<p><center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_5e3c5ae9dbe51c52a040bf93d4d02198.png" title="\displaystyle P_a(m,y) = e^{-{{6(y-{m\over{}2})^2}\over m}}\sqrt{6\over{m\pi}}" style="vertical-align:-20%;" class="tex" alt="\displaystyle P_a(m,y) = e^{-{{6(y-{m\over{}2})^2}\over m}}\sqrt{6\over{m\pi}}" />.</center></p>
<p>Thus the probability of success in precisely <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_39b54fb569800b4de76f3a22735c0ec5.png" title="m" style="vertical-align:-20%;" class="tex" alt="m" /> moves is</p>
<p><center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_e366e51097b0706e13e1d0522f2348cb.png" title="\displaystyle P(m)=\int_{n-1+x}^{n} P_a(m,y) (y-(n-1+x))\,dy + \int_n^{n+x} P_a(m,y) (1-x)\,dy" style="vertical-align:-20%;" class="tex" alt="\displaystyle P(m)=\int_{n-1+x}^{n} P_a(m,y) (y-(n-1+x))\,dy + \int_n^{n+x} P_a(m,y) (1-x)\,dy" /></center></p>
<p>which simplifies to</p>
<p><center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_4ce44a215685239bfe1b3c7b23a4e962.png" title="\displaystyle (1-x)\int_{n-1+x}^{n+x} P_a(m,y)\,dy + \int_{n-1+x}^{n} P_a(m,y) (y-n)\,dy" style="vertical-align:-20%;" class="tex" alt="\displaystyle (1-x)\int_{n-1+x}^{n+x} P_a(m,y)\,dy + \int_{n-1+x}^{n} P_a(m,y) (y-n)\,dy" />.</center></p>
<p>Since we&#8217;re interested in a success in any number of moves, we must evaulate <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_c41276c5d941f22c181113ae7a46d213.png" title="\sum_{m=n+1}^{\infty}P(m)" style="vertical-align:-20%;" class="tex" alt="\sum_{m=n+1}^{\infty}P(m)" />, and finish by taking the desired limit <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_fe3500a8a2c425af0aea75cd0856ec8f.png" title="n\to\infty" style="vertical-align:-20%;" class="tex" alt="n\to\infty" />.</p>
<p>To evalutate the sum over <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_39b54fb569800b4de76f3a22735c0ec5.png" title="m" style="vertical-align:-20%;" class="tex" alt="m" />, we replace the summation by integration (see caveat below) and substitute the variable of integration from <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_39b54fb569800b4de76f3a22735c0ec5.png" title="m" style="vertical-align:-20%;" class="tex" alt="m" /> to <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_4f4a2b18cb439a6759bdc45633eb2277.png" title="2n + r\sqrt{n}" style="vertical-align:-20%;" class="tex" alt="2n + r\sqrt{n}" /> (resulting in an extra factor of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_fc601043caad9475490f58f47045a6c0.png" title="\sqrt{n}" style="vertical-align:-20%;" class="tex" alt="\sqrt{n}" />). So our final integral turs out to:</p>
<p><center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_ef3a3a8387a16dc4dbd26137f16d71ee.png" title="\displaystyle \int\limits_{-\sqrt{n}}^{\infty} \sqrt{n}\Big((1 - x)\int\limits_{-(1-x)}^{x}P_a(2n+r\sqrt{n},n+t)\,dt + \int\limits_{-(1-x)}^{0}P_a(2n+r\sqrt{n},n+t)t\,dt\Big)\,dr" style="vertical-align:-20%;" class="tex" alt="\displaystyle \int\limits_{-\sqrt{n}}^{\infty} \sqrt{n}\Big((1 - x)\int\limits_{-(1-x)}^{x}P_a(2n+r\sqrt{n},n+t)\,dt + \int\limits_{-(1-x)}^{0}P_a(2n+r\sqrt{n},n+t)t\,dt\Big)\,dr" /></center><br/></p>
<p>Expanding the integrand (of the first integral) in powers of <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_082902c6620229bf1a530f37b45cb739.png" title="1\over n" style="vertical-align:-20%;" class="tex" alt="1\over n" />, the integrand becomes:</p>
<p><center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_9f70994514936eb1d003782a8beec9d1.png" title="\displaystyle \sqrt{3\over{4\pi}}e^{-3r^2/4}(1-x^2) + O(e^{-3r^2/4}r^3n^{-1/2})" style="vertical-align:-20%;" class="tex" alt="\displaystyle \sqrt{3\over{4\pi}}e^{-3r^2/4}(1-x^2) + O(e^{-3r^2/4}r^3n^{-1/2})" /></center></p>
<p>When we integrate over <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_f95e4a9e37d3f8fee71fee03216426c8.png" title="r: [-\sqrt{n},\infty)" style="vertical-align:-20%;" class="tex" alt="r: [-\sqrt{n},\infty)" /> and take limit <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_fe3500a8a2c425af0aea75cd0856ec8f.png" title="n\to\infty" style="vertical-align:-20%;" class="tex" alt="n\to\infty" />, all terms other than the first go away. As for the first term, it yields <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_a1a2683706081112a94e400e4250251c.png" title="1-x^2" style="vertical-align:-20%;" class="tex" alt="1-x^2" /> since</p>
<p><center><img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_94d58cea0aa1badbea66a788dfd0b16b.png" title="\displaystyle \int_{-\sqrt{n}}^{\infty}\sqrt{3\over{4\pi}}e^{-3r^2/4}\,dr = {1\over{2}}(1+\mbox{erf}({1\over{2}}\sqrt{3n}))\to 1\quad \mbox{as}\,n\to\infty" style="vertical-align:-20%;" class="tex" alt="\displaystyle \int_{-\sqrt{n}}^{\infty}\sqrt{3\over{4\pi}}e^{-3r^2/4}\,dr = {1\over{2}}(1+\mbox{erf}({1\over{2}}\sqrt{3n}))\to 1\quad \mbox{as}\,n\to\infty" /></center></p>
<p>(where <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_db8f8cda989eee3d5f243afd8c0bef0d.png" title="\mbox{erf}()" style="vertical-align:-20%;" class="tex" alt="\mbox{erf}()" /> is the <a href="http://en.wikipedia.org/wiki/Error_function">Error function</a>).</p>
<p>Whew! That was heavy going. Let us catch our breath. Okay. So the answer to the original problem turns out to be <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_a1a2683706081112a94e400e4250251c.png" title="1-x^2" style="vertical-align:-20%;" class="tex" alt="1-x^2" />. As a sanity check, it&#8217;s value turns out to be 0 at <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_5b00f5ad5f9a199f675af2fb2d0ccf70.png" title="x=1" style="vertical-align:-20%;" class="tex" alt="x=1" /> and 1 at <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_cb11ae6764404172995f1dac8d1eac62.png" title="x=0" style="vertical-align:-20%;" class="tex" alt="x=0" />. Good.</p>
<p><i>Caveat</i>: The above derivation is <i>not rigorous</i> (in fact, it is somewhat sloppy) for at least the following reasons:<br/></p>
<ul>
<li>Convergence of many integrals/summations is implictly assumed</li>
<li>The error term has not been calculated when changing a summation to an integration. <a href="http://mathworld.wolfram.com/Euler-MaclaurinIntegrationFormulas.html">Euler Summation Formula</a> (also TAOCP 1.2.11.2) should have been used to bound the error terms.</li>
<li>The Central Limit approximation has been used without being demonstrated that it is being applied only close to the peak of the distribution, and not far into the tails (unless justified)</li>
</ul>
<p><i>A question:</i> If you read the <a href="http://domino.research.ibm.com/Comm/wwwr_ponder.nsf/solutions/June2007.html">publisher solution on Ponder This</a>, it says, &#8220;Values between 0 and 1 are equally likely but larger values are more likely to cause the sum to exceed <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_e9be79e62f04cc4b913b199c5644142b.png" title="n+x" style="vertical-align:-20%;" class="tex" alt="n+x" />. So as <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_fe3500a8a2c425af0aea75cd0856ec8f.png" title="n\to\infty" style="vertical-align:-20%;" class="tex" alt="n\to\infty" /> the differential probability that <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_109361a77d0b092159482d8224960bce.png" title="x_k=t" style="vertical-align:-20%;" class="tex" alt="x_k=t" /> is <img src="http://ashutoshmehra.net/blog/wp-content/plugins/easy-latex/cache/tex_41997461bba1857b03e9f3d45d7e5561.png" title="2t\,dt" style="vertical-align:-20%;" class="tex" alt="2t\,dt" />.&#8221; <i>Can the reader explain the reasoning behind this differential probability?</i></p>
]]></content:encoded>
			<wfw:commentRss>http://ashutoshmehra.net/blog/2008/12/a-limiting-probability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
