<?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>Charlesgao Math Blog</title>
	<atom:link href="http://www.charlesgao.com/en/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.charlesgao.com/en</link>
	<description>Imagine a world in which the happiness of every single human being is derived from the pure persuit of truth.</description>
	<lastBuildDate>Tue, 20 Dec 2011 23:49:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Gibbs and Runge phenomenon(I)</title>
		<link>http://www.charlesgao.com/en/?p=136</link>
		<comments>http://www.charlesgao.com/en/?p=136#comments</comments>
		<pubDate>Tue, 20 Dec 2011 23:49:55 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Numeric]]></category>
		<category><![CDATA[approximation]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[Gibbs phenomenon]]></category>
		<category><![CDATA[Runge phenomenon]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=136</guid>
		<description><![CDATA[<p>Denote ，then  is an orthonormal basis for . Thus all the functions in  can be approximated by this basis in  sense. This basis is always called the Fourier basis. For a function ,</p>
<p></p>
<p>is called the Fourier series of , where 为 are the Fourier coefficients.</p>
<p>Similarly,  in ,  is an orthonormal [...]]]></description>
			<content:encoded><![CDATA[<p>Denote <img src="http://latex.codecogs.com/gif.latex?\mathbb{T}=\mathbb{R}/2\pi\mathbb{Z}" alt="" />，then <img src="http://latex.codecogs.com/gif.latex?\{e^{inx}\}/\sqrt{2\pi}, n = 0, \pm 1, \pm2, \ldots" alt="" /> is an orthonormal basis for <img src="http://latex.codecogs.com/gif.latex?L^2(\mathbb{T})" alt="" />. Thus all the functions in <img src="http://latex.codecogs.com/gif.latex?L^2(\mathbb{T})" alt="" /> can be approximated by this basis in <img src="http://latex.codecogs.com/gif.latex?L^2" alt="" /> sense. This basis is always called the Fourier basis. For a function <img src="http://latex.codecogs.com/gif.latex?f \in L^2(\mathbb{T})" alt="" />,</p>
<p><img src="http://latex.codecogs.com/gif.latex?f(x) = \frac{1}{\sqrt{2\pi}}\sum_{n=-\infty}^{\infty}\hat{f}(n)e^{inx}" alt="" /></p>
<p>is called the Fourier series of <img src="http://latex.codecogs.com/gif.latex?f" alt="" />, where <img src="http://latex.codecogs.com/gif.latex?\hat{f}(n)=\langle f(x), \frac{1}{\sqrt{2\pi}}e^{inx}\rangle" alt="" />为<img src="http://latex.codecogs.com/gif.latex?f" alt="" /> are the Fourier coefficients.</p>
<p>Similarly,  in <img src="http://latex.codecogs.com/gif.latex?L^2([0,1])" alt="" />, <img src="http://latex.codecogs.com/gif.latex?\{x^n/\sqrt{n+1}\}, n =0,1,\ldots" alt="" /> is an orthonormal basis for <img src="http://latex.codecogs.com/gif.latex?L^2([0,1])" alt="" />. Therefore any function in <img src="http://latex.codecogs.com/gif.latex?L^2([0,1])" alt="" /> can be approximated by this basis in the <img src="http://latex.codecogs.com/gif.latex?L^2" alt="" /> sense. This set of  basis is called the polynomial basis. For a function <img src="http://latex.codecogs.com/gif.latex?g \in L^2([0,1])" alt="" />,</p>
<p><img src="http://latex.codecogs.com/gif.latex?g(x) = \sum_{n=0}^{\infty}\frac{1}{\sqrt{n+1}}\hat{g}(n)x^{n}" alt="" /></p>
<p>is called the polynomial series or power series of <img src="http://latex.codecogs.com/gif.latex?g" alt="" />, where <img src="http://latex.codecogs.com/gif.latex?\hat{g}(n)=\langle g(x), \frac{1}{\sqrt{n+1}}x^{n}\rangle" alt="" /> are the polynomial coefficients of <img src="http://latex.codecogs.com/gif.latex?g" alt="" />.</p>
<p>In the first example, the period is set to <img src="http://latex.codecogs.com/gif.latex?2\pi" alt="" />. Actually any finite period will work. Consider a function defined on <img src="http://latex.codecogs.com/gif.latex?L^2([a,b])" alt="" />, we can extend it to become a function in <img src="http://latex.codecogs.com/gif.latex?L^2(\mathbb{R}/(b-a)\mathbb{Z})" alt="" />. Similarly, in the second example, the <img src="http://latex.codecogs.com/gif.latex?[0,1]" alt="" /> is chosen just for simplicity. Any function in <img src="http://latex.codecogs.com/gif.latex?L^2[a,b]" alt="" /> has a polynomial series. To sum up, all <img src="http://latex.codecogs.com/gif.latex?L^2" alt="" /> functions defined on a closed interval can be approximated by the two set of basis(Fourier &amp; polynomial) in <img src="http://latex.codecogs.com/gif.latex?L^2" alt="" /> sense.</p>
<p>Because of their nice properties, such as infinitely times differentiable, we always use the two basis to approximate a given function in real-world applications. Of course we cannot sum up to infinity. The approximation is done by finite summation of the terms in their Fourier or polynomial series. In this process, people have discovered two interesting phenomenon, namely the Gibbs phenomenon and the Runge phenomenon.<br />
<span id="more-136"></span></p>
<p>Gibbs phenomenon shows up when one tries to approximate a function that has a point of discontinuity of the first kind. Consider a function f that is constant 0 on <img src="http://latex.codecogs.com/gif.latex?[-\pi,0]" alt="" /> and value 1 on <img src="http://latex.codecogs.com/gif.latex?(0,\pi]" alt="" />. Its Fourier approximation is plotted below.</p>
<p><a class="thickbox" href="http://www.charlesgao.com/wp-content/gallery/blog/gibbs_phenomenon.jpg"><img class="ngg-singlepic ngg-none" src="http://www.charlesgao.com/wp-content/gallery/blog/gibbs_phenomenon.jpg" alt="" width="600px" /></a></p>
<p>At the point of discontinuity, as we add in more and more terms, the series doesn&#8217;t seem to be converge to the original function uniformly. Instead, high frequency oscillation is observed. In fact, when n is sufficiently large, it has been proved that the magnitude of the oscillation is approximately 9% larger than the gap of discontinuity! This phenomenon is called the Gibbs phenomenon. Note that the number 9% is independent on which function or which point of discontinuity we choose. That&#8217;s amazing! But where does the number 9% come from?</p>
<p>[<a href="http://www.charlesgao.com/?p=269">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=136</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Crux of Understanding English</title>
		<link>http://www.charlesgao.com/en/?p=117</link>
		<comments>http://www.charlesgao.com/en/?p=117#comments</comments>
		<pubDate>Fri, 25 Feb 2011 19:36:03 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Logic]]></category>
		<category><![CDATA[continuous]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=117</guid>
		<description><![CDATA[<p>Believe it or not, sometimes when you fail to understand a sentence, it is not your language skill but your math that is to blame.</p>
<p>The following sentence is quoted from Wilfrid Hodges&#8217;s Logic. Try to figure out its meaning by yourself.</p>
<p>For every person and every age, and every positive number, there is a second positive [...]]]></description>
			<content:encoded><![CDATA[<p>Believe it or not, sometimes when you fail to understand a sentence, it is not your language skill but your math that is to blame.</p>
<p>The following sentence is quoted from Wilfrid Hodges&#8217;s <em>Logic</em>. Try to figure out its meaning by yourself.</p>
<blockquote><p>For every person and every age, and every positive number, there is a second positive number such that at any age which differs from the first-mentioned age by fewer days than the latter positive number, the person&#8217;s height differs from his height at the first-mentioned age by less than the former positive number of inches.</p></blockquote>
<p><span id="more-117"></span></p>
<p>Solution:</p>
<p>Denote h(x,y) as the height of people x at age y. As usual, we use &#8220;∀&#8221; to represent &#8220;for all&#8221; and &#8220;∃&#8221; to represent &#8220;there exists&#8221;.</p>
<p>Here it goes.</p>
<p>For every person and every age, and every positive number (<span style="color: #ff0000;">∀x,a,n&gt;0</span>), there is a second positive number (<span style="color: #ff0000;">∃m&gt;0</span>) such that (<span style="color: #ff0000;">s.t.</span>) at any age (<span style="color: #ff0000;">∀b</span>) which differs from the first-mentioned age by fewer days than the latter positive number(<span style="color: #ff0000;">|b-a|&lt;m</span>), the person&#8217;s height (<span style="color: #ff0000;">h(x,b)</span>) differs from his height at the first-mentioned age (<span style="color: #ff0000;">h(x,a)</span>) by less than the former positive number of inches (<span style="color: #ff0000;">|h(x,b)-h(x,a)|&lt;n</span>).</p>
<p>Now we combine the &#8220;translated&#8221; parts together,</p>
<p><span style="color: #ff0000;">∀x,a,n&gt;0, ∃m&gt;0, s.t. ∀b. |b-a|&lt;m, |h(x,b)-h(x,a)|&lt;n</span></p>
<p>This is exactly the definition of the continuity of function h(x,y) respect to y.</p>
<p>Therefore the meaning of this sentence is:</p>
<p>A person&#8217;s height is a continuous function of his age.</p>
<p>[<a href="http://www.charlesgao.com/?p=268">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=117</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Proof of the Knaster–Tarski theorem</title>
		<link>http://www.charlesgao.com/en/?p=115</link>
		<comments>http://www.charlesgao.com/en/?p=115#comments</comments>
		<pubDate>Fri, 18 Feb 2011 14:44:40 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Set Theory]]></category>
		<category><![CDATA[Knaster]]></category>
		<category><![CDATA[proof]]></category>
		<category><![CDATA[Tarski]]></category>
		<category><![CDATA[theorem]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=115</guid>
		<description><![CDATA[<p>An useful trick of proving the equality of two sets  is to prove subsumption in both directions, i.e.and. The two proofs are typically independent of each other. Yet today I have seen a proof where the proof of one direction uses the conclusion of the other direction.</p>
<p>The theorem we are going to prove is [...]]]></description>
			<content:encoded><![CDATA[<p>An useful trick of proving the equality of two sets <img src="http://latex.codecogs.com/gif.latex?A,B" alt="" /> is to prove subsumption in both directions, i.e.<img src="http://latex.codecogs.com/gif.latex?A\supseteq B" alt="" />and<img src="http://latex.codecogs.com/gif.latex?B\supseteq A" alt="" />. The two proofs are typically independent of each other. Yet today I have seen a proof where the proof of one direction uses the conclusion of the other direction.</p>
<p>The theorem we are going to prove is called the Knaster-Tarski theorem. It states that the set of fixed points of a order-preserving function on a complete lattice is also a complete lattice. This is a very general conclusion. Since a complete lattice cannot be empty, one application of this theorem is to demonstrate the existence of a least(or maximum) fixed point. To avoid complicated mathematical definitions, we hereby consider only one of the special cases &#8212; when the complete lattice is the power set lattice. Thus a corollary of the theorem above states as follows:</p>
<p>Suppose <img src="http://latex.codecogs.com/gif.latex?f" alt="" /> is a monotone function from set <img src="http://latex.codecogs.com/gif.latex?S" alt="" /> to set <img src="http://latex.codecogs.com/gif.latex?S" alt="" />. Then <img src="http://latex.codecogs.com/gif.latex?f" alt="" /> has a least fixed point. And the fixed point is <img src="http://latex.codecogs.com/gif.latex?\bigcap \{M|f(M)\subseteq M\}" alt="" />.</p>
<p>Proof: Denote <img src="http://latex.codecogs.com/gif.latex?P=\{M|f(M)\subseteq M\},p=\bigcap P" alt="" />.<br />
We first prove that <img src="http://latex.codecogs.com/gif.latex?p" alt="" /> is a fixed point, i.e. <img src="http://latex.codecogs.com/gif.latex?f(p)=p" alt="" />. As usual, to prove set equality, we prove subsumption in both directions.<br />
1.<img src="http://latex.codecogs.com/gif.latex?f(p) \subseteq p" alt="" /><br />
Since <img src="http://latex.codecogs.com/gif.latex?p" alt="" /> is the intersection of all the sets in <img src="http://latex.codecogs.com/gif.latex?P" alt="" />, it is sufficient to prove that <img src="http://latex.codecogs.com/gif.latex?f(p)\subseteq M,\forall M\in P" alt="" />.<br />
<img src="http://latex.codecogs.com/gif.latex?M\in P \Rightarrow p\subseteq M \Rightarrow f(p) \subseteq f(M)\subseteq M" alt="" />，where the monotonicity of <img src="http://latex.codecogs.com/gif.latex?f" alt="" /> is used in the second step.<br />
2.<img src="http://latex.codecogs.com/gif.latex?p \subseteq f(p)" alt="" /><br />
Note: In this proof we used the conclusion of 1.<br />
<img src="http://latex.codecogs.com/gif.latex?f(p) \subseteq p \Rightarrow f(f(p)) \subseteq f(p) \Rightarrow f(p) \in P \Rightarrow p\subseteq f(p)" alt="" />, where the monotonicity of <img src="http://latex.codecogs.com/gif.latex?f" alt="" /> is used in the first step.<br />
According to 1 and 2, we have shown that <img src="http://latex.codecogs.com/gif.latex?p" alt="" /> is a fixed point. Now we prove that it is also the least fixed point.<br />
<img src="http://latex.codecogs.com/gif.latex?f(q) = q \Rightarrow f(q)\subseteq q \Rightarrow q\in P \Rightarrow p\subseteq q" alt="" /><br />
Q.E.D.</p>
<p>[<a href="http://www.charlesgao.com/?p=267">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=115</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>About Removable Singularity</title>
		<link>http://www.charlesgao.com/en/?p=76</link>
		<comments>http://www.charlesgao.com/en/?p=76#comments</comments>
		<pubDate>Thu, 26 Nov 2009 11:11:40 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Numeric]]></category>
		<category><![CDATA[complex variable]]></category>
		<category><![CDATA[continuous]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[interpolation]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[L’Hospital‘s rule]]></category>
		<category><![CDATA[singularity]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=76</guid>
		<description><![CDATA[<p>To estimate the error term for the nth Lagrange interpolating polynomial, an error function is defined in our course book,</p>
<p></p>
<p>where f(x) is the function to be approximated. Since there is no error at the n+1 interpolating points, the error function has at least n+1 roots. So it is supposed</p>
<p></p>
<p>where  are the interpolation points.</p>
<p>At first glance, [...]]]></description>
			<content:encoded><![CDATA[<p>To estimate the error term for the nth Lagrange interpolating polynomial, an error function is defined in our course book,</p>
<p><img src="http://latex.codecogs.com/gif.latex?R_n(x)=f(x)-L_n(x)" alt="" /></p>
<p>where f(x) is the function to be approximated. Since there is no error at the n+1 interpolating points, the error function has at least n+1 roots. So it is supposed</p>
<p><img src="http://latex.codecogs.com/gif.latex?R_n(x)=K(x)(x-x_0)(x-x_1)...(x-x_n)" alt="" /></p>
<p>where <img src="http://latex.codecogs.com/gif.latex?x_0,x_1,...,x_n" alt="" /> are the interpolation points.</p>
<p>At first glance, it seems that the supposition needs to be verified. Can all the functions, with roots <img style="border: 0px initial initial;" src="http://latex.codecogs.com/gif.latex?x_0,x_1,...,x_n" alt="" />, be written in the form? Suppose f(x) = log(x), then the error function should be log(x) minus a polynomial, which seems impossible to share that form.<span id="more-76"></span></p>
<p>Actually, the supposition is out of question. Note that</p>
<p><img src="http://latex.codecogs.com/gif.latex?K(x)=\frac{R_n(x)}{(x-x_0)(x-x_1)...(x-x_n)}" alt="" /></p>
<p>It is undefined at the points <img src="http://latex.codecogs.com/gif.latex?x_0,x_1,...,x_n" alt="" /> . However, subsequent proof should make use of the fact that K(x) is continuous. The reason why we can suppose K(x) to be of this form is that <img style="border: 0px initial initial;" src="http://latex.codecogs.com/gif.latex?x_0,x_1,...,x_n" alt="" /> can be regarded as &#8220;removable singularity&#8221;. We can define</p>
<p><img src="http://latex.codecogs.com/gif.latex?K(x_i)=\frac{R_n'(x_i)}{(x-x_0)...(x-x_{i-1})(x-x_{i+1})...(x-x_n)}" alt="" /></p>
<p>The above equation uses the L’Hospital‘s rule. Since both of the numerator and denominator has roots  <img style="border: 0px initial initial;" src="http://latex.codecogs.com/gif.latex?x_i" alt="" /> , so the limits of K(x) at points <img style="border: 0px initial initial;" src="http://latex.codecogs.com/gif.latex?x_i" alt="" /> exist.</p>
<p>Actually, in complex variable functions, there is similar notion of removable singularity. For instance, for function</p>
<p><img src="http://latex.codecogs.com/gif.latex?f(z)=\frac{sinz}{z}" alt="" /></p>
<p>the point zero (on the complex plane) is its removable singularity. That is because when we define f(0)=1, f(x) is analytical on the whole complex plane.</p>
<p>[<a href="http://www.charlesgao.com/?p=265">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=76</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discussions on the Definition of Homeomorphism</title>
		<link>http://www.charlesgao.com/en/?p=80</link>
		<comments>http://www.charlesgao.com/en/?p=80#comments</comments>
		<pubDate>Mon, 26 Oct 2009 11:17:46 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Geometry]]></category>
		<category><![CDATA[Topology]]></category>
		<category><![CDATA[continuous]]></category>
		<category><![CDATA[counterexample]]></category>
		<category><![CDATA[homeomorphism]]></category>
		<category><![CDATA[mapping]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=80</guid>
		<description><![CDATA[<p>Two metric spaces, X and Y, are homeomorphic when there exists a function f, such that
1. f is a bijection
2. f  is continuous
3. the inverse of  f is also continuous.</p>
<p>When I see this definition, I doubt that the third property is redundant. If 1 and 2 are satisfied, 3 seems to be true. Remember [...]]]></description>
			<content:encoded><![CDATA[<p>Two metric spaces, X and Y, are homeomorphic when there exists a function<em> f</em>, such that<br />
1. <em>f</em> is a bijection<br />
2. <em>f </em> is continuous<br />
3. the inverse of  <em>f</em> is also continuous.</p>
<p>When I see this definition, I doubt that the third property is redundant. If 1 and 2 are satisfied, 3 seems to be true. Remember that the continuity of <em>f</em> means that when two elements in X are close enough, their image in Y are also close enough. So it seems like the continuity of <em>f</em> and <em>f</em><sup><em>-1</em></sup> are somewhat symmetric. If given the continuity of <em>f</em>, when the distance of two elements in Y are small, then their image in X should also be near each other.</p>
<p>However I am wrong. One of my classmates, Hu Yong, shows me a counterexample.</p>
<p>Define</p>
<p>X={1, 2 , 3 , … , n , …}<br />
Y={1 , 1/2 , 1/3 , … , 1/n , …}<br />
The distance functions in X and Y are both defined as <em>d</em>(x,y) = |x &#8211; y| (That <em>d</em> is a metric is not difficult to verify.)<br />
Denote <em>f</em> as the mapping from X to Y, such that x (in X) is mapped into 1/x (in Y).<br />
For arbitrary  ε &gt; 0, let δ=1/2. When <em>d</em>(m,n)=|m-n|&lt;δ (in this case, the only possible situation is m=n), we have<br />
<em>d</em>(f(m),f(n))=|f(m)-f(n)|=|1/m &#8211; 1/n|=0&lt;ε<br />
So<em> f</em> is not only continuous, but uniformly continuous.</p>
<p>However, when considering <em>f</em><sup><em>-1</em></sup>, for arbitrary point 1/m in Y, let ε=1. Then for arbitrary δ&gt;0, we can always find 1/n in Y, such that <em>d</em>(1/m,1/n)=|1/m &#8211; 1/n|&lt;δ. Yet <em>d</em>(f<sup>-1</sup>(1/m),f<sup>-1</sup>(1/n))=|m &#8211; n|&gt;=1, which shows that <em>f</em><sup><em>-1</em></sup> is discontinuous.</p>
<p>[<a href="http://www.charlesgao.com/?p=264">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=80</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Pagerank Algorithm</title>
		<link>http://www.charlesgao.com/en/?p=84</link>
		<comments>http://www.charlesgao.com/en/?p=84#comments</comments>
		<pubDate>Thu, 30 Jul 2009 12:09:42 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Modeling]]></category>
		<category><![CDATA[Probability]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[Markov chain]]></category>
		<category><![CDATA[state space]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=84</guid>
		<description><![CDATA[<p>Using the PageRank Algorithm, Google assigns each website a number ranges from 0 to 10 to represent its degree of importance. Its results are basically determined by the internal links between pages.</p>
<p>The process of calculating a website&#8217;s PageRank can be viewed as a process of polling. For example, if my blog linked to Wikipedia, then [...]]]></description>
			<content:encoded><![CDATA[<p>Using the PageRank Algorithm, Google assigns each website a number ranges from 0 to 10 to represent its degree of importance. Its results are basically determined by the internal links between pages.</p>
<p>The process of calculating a website&#8217;s PageRank can be viewed as a process of polling. For example, if my blog linked to Wikipedia, then I voted for Wikipedia. And as a result, its PageRank will rise. Intuitively speaking, the PageRank value of a website is the sum of all the votes. Yet it&#8217;s unfair to take all the votes equally weighted. Votes from important websites should be of greater weight. But how to determine the importance of a website? PageRank! So it returns to the initial problem. That seems a contradiction, since we have to use PageRank to determine the degree of importance of a website, and the degree of importance is used to calculate PageRank.</p>
<p>It sounds like a process of recursion, or iteration. That&#8217;s exactly how PageRank works.</p>
<p>Define PR(A) as the PageRank of website A. For simplicity, we won&#8217;t use google&#8217;s 0-10 measure, instead, we use 0-1 measure. This is on a par with the range of probability. In fact, PageRank is a probability which reflects the probability of a random walker on the internet arriving at a specific site. Perhaps it is because of the preference that decimals are not welcomed by most people, so that Google changed its scale.</p>
<p>We assume that, initially, the PageRank of all the websites are equally distributed. In other words, suppose there are altogether N websites on the internet, every single website will be assigned PageRank 1/N. To make it easy, we now consider the tiny network that only consists of 4 sites, A,B,C and D. So, according to our analysis, every site has PageRank 1/4. Suppose B,C,D link and only link to A (shown in figure below), then they each contributes 0.25 PageRank to A.<br />
<img style="border: 0px initial initial;" title="bcd-a" src="http://www.charlesgao.com/wp-content/uploads/2008/12/bcd-a.jpg" alt="" width="219" height="161" /><br />
Define<br />
PR(A) = PR(B) + PR(C) + PR(D),<br />
where PR represents PageRank.<br />
Then PR(A) = 0.75.</p>
<p>Next, we suppose B also links to C, and D are linked by all of the other three sites, as shown in figure below.<br />
<img style="border: 0px initial initial;" title="graph1" src="http://www.charlesgao.com/wp-content/uploads/2008/12/graph1.jpg" alt="" width="221" height="182" /><br />
This time, A and C share B&#8217;s votes, so they both receive 0.125 PageRank. Only 1/3 of D&#8217;s votes are given to A. In this case,<br />
PR(A) = PR(B)/2 + PR(c)/1 + PR(D)/3<br />
Therefore, according to this definition, the PageRank site X contributes to site Y is equal to its original PageRank divided by the number of its external links. Note that we made an assumption here, that is, multiple links from X to Y are counted only once. The assumption is definitely reasonable, since otherwise the PageRank of my blog will not be so low if a website like <a style="color: #a50d0e; text-decoration: none; background-color: transparent;" href="http://worlds-highest-website.com/">http://worlds-highest-website.com/</a> are  full of links to my blog <img src='http://www.charlesgao.com/en/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .<br />
The general equation for calculating the PageRank of a site <em>u</em> is (copied from Wikipedia),<br />
<img style="border: 0px initial initial;" title="generalterm" src="http://www.charlesgao.com/wp-content/uploads/2008/12/generalterm.jpg" alt="" width="187" height="57" /><br />
where <img src="http://latex.codecogs.com/gif.latex?B_u" alt="" /> is the set of all the sites linked to <em>u, </em>and<em> v</em> is the total external links.</p>
<p>One thing noteworthy is that the PageRanks of all the sites are calculated simultaneously, which means that a directed graph (similar to the one drawn above) is predetermined before the calculation. Using the equation above, the PageRank of every site can be achieved. The iteration process is as follows,<br />
Setup: All the sites share equal PageRank.<br />
First Iteration: Every site gets a new PageRank.<br />
Second Iteration: Substitute in the PageRank in the First Iteration to the equation and get another set of PageRank.<br />
&#8230;</p>
<p>The thing we really care about is whether the PageRank values will converge if the iteration process continues.</p>
<p>We now turn back to the two examples mentioned at the beginning. For the first case, it is not difficult to figure out that the PageRanks of all the sites go to 0 after the second iteration:</p>
<table id="v_dk" border="1" cellspacing="0" cellpadding="3" bordercolor="#ff0000">
<tbody>
<tr>
<td width="20%"></td>
<td width="20%">PR(A)</td>
<td width="20%">PR(B)</td>
<td width="20%">PR(C)</td>
<td width="20%">PR(D)</td>
</tr>
<tr>
<td width="20%">Setup</td>
<td width="20%">0.25</td>
<td width="20%">0.25</td>
<td width="20%">0.25</td>
<td width="20%">0.25</td>
</tr>
<tr>
<td width="20%">First Iteration</td>
<td width="20%">0.75</td>
<td width="20%">0</td>
<td width="20%">0</td>
<td width="20%">0</td>
</tr>
<tr>
<td width="20%">Second Interation</td>
<td width="20%">0</td>
<td width="20%">0</td>
<td width="20%">0</td>
<td width="20%">0</td>
</tr>
</tbody>
</table>
<p>The second case lasts longer, but finally it also results in all-zeros. That is because no website links to D, so after the first iteration PR(D) = 0. And as a consequence, PR(C) goes to 0, and then PR(A):</p>
<table id="v_dk" border="1" cellspacing="0" cellpadding="3" bordercolor="#ff0000">
<tbody>
<tr>
<td width="20%"></td>
<td width="20%">PR(A)</td>
<td width="20%">PR(B)</td>
<td width="20%">PR(C)</td>
<td width="20%">PR(D)</td>
</tr>
<tr>
<td width="20%">Setup</td>
<td width="20%">0.25</td>
<td width="20%">0.25</td>
<td width="20%">0.25</td>
<td width="20%">0.25</td>
</tr>
<tr>
<td width="20%">First Iteration</td>
<td width="20%">0.4583</td>
<td width="20%">0.0833</td>
<td width="20%">0.2083</td>
<td width="20%">0</td>
</tr>
<tr>
<td width="20%">Second Iteration</td>
<td width="20%">0.25</td>
<td width="20%">0</td>
<td width="20%">0.0417</td>
<td width="20%">0</td>
</tr>
<tr>
<td width="20%">Third Iteration</td>
<td width="20%">0.0417</td>
<td width="20%">0</td>
<td width="20%">0</td>
<td width="20%">0</td>
</tr>
<tr>
<td width="20%">Fourth Iteration</td>
<td width="20%">0</td>
<td width="20%">0</td>
<td width="20%">0</td>
<td width="20%">0</td>
</tr>
</tbody>
</table>
<p>Huh? The PageRank algorithm turns out to be a failure?<span id="more-84"></span></p>
<p>To discuss the situation that finally leads to all-zeros, we now abandon the websites, and simply study directed graphs, which is an abstraction of the PageRank problem.</p>
<p>First things first, for the disconnected graphs (see figure below), we only need to study each component, since it does not influence convergence.<br />
<img style="border: 0px initial initial;" title="notconnected" src="http://www.charlesgao.com/wp-content/uploads/2008/12/notconnected.jpg" alt="" width="277" height="167" /></p>
<p>Suppose the vertex set of a directed Graph G is V={V<sub>1</sub>,V<sub>2</sub>,…,V<sub>n</sub>}, the edge set is E={E<sub>ij</sub>}. Every vertex is assigned a weight P(V<sub>i</sub>) representing its PR value. The weight of Directed edge AB is defined as the PageRank A contributes to B. Thus, for a single vertex, if its outdegree is greater than 0, then its total outdegree is 1.</p>
<p>A direct result is that, if one of the vertexes in the directed graph has outdegree zero, then after finite iterations all of the PRs will turn to zero. Intuitively speaking, the vertex is like a black hole, absorbing the whole PR of the system. Since it does not contribute any PR value to others, the total PR will decrease during each iteration, and finally down to zero.</p>
<p>So how does Google prevent this kind of graph? After all, it is quite possible that a website does not link to any other site. Here is a possible solution (Huh, who knows how Google did it). If a website has no external links, it is assumed that it links to all the other sites. Using this approach, we are able to avoid the problem.</p>
<p>When the outdegree of every vertex is greater than 0, the PR value circulates inside the graph, which indicates that the total PR is conservative. Some might ask, &#8220;What if there is a vertex with indegree 0?&#8221;. In this case, its PR becomes 0 after the first iteration, and its original PR is contributed to the rest vertexes of the graph. Eventually, all the vertexes with indegree 0 will be 0. However, the whole PR of the system is also conservative.</p>
<p>Does the conservation of PR guarantee the convergence?</p>
<p>Look at the following example,<br />
<img style="border: 0px initial initial;" title="div_ex" src="http://www.charlesgao.com/wp-content/uploads/2009/07/div_ex.png" alt="" width="157" height="172" /></p>
<p>The iteration process is as follow,</p>
<table id="v_dk" border="1" cellspacing="0" cellpadding="3" bordercolor="#ff0000">
<tbody>
<tr>
<td width="20%"></td>
<td width="20%">PR(A)</td>
<td width="20%">PR(B)</td>
<td width="20%">PR(C)</td>
<td width="20%">PR(D)</td>
</tr>
<tr>
<td width="20%">Setup</td>
<td width="20%">0.25</td>
<td width="20%">0.25</td>
<td width="20%">0.25</td>
<td width="20%">0.25</td>
</tr>
<tr>
<td width="20%">First Iteration</td>
<td width="20%">0</td>
<td width="20%">0.375</td>
<td width="20%">0.25</td>
<td width="20%">0.375</td>
</tr>
<tr>
<td width="20%">Second Iteration</td>
<td width="20%">0</td>
<td width="20%">0.375</td>
<td width="20%">0.375</td>
<td width="20%">0.25</td>
</tr>
<tr>
<td width="20%">Third Iteration</td>
<td width="20%">0</td>
<td width="20%">0.25</td>
<td width="20%">0.375</td>
<td width="20%">0.375</td>
</tr>
<tr>
<td width="20%">Fourth Iteration</td>
<td width="20%">0</td>
<td width="20%">0.375</td>
<td width="20%">0.25</td>
<td width="20%">0.375</td>
</tr>
<tr>
<td width="20%">Fifth Iteration</td>
<td width="20%">0</td>
<td width="20%">…</td>
<td width="20%">…</td>
<td width="20%">…</td>
</tr>
</tbody>
</table>
<p>The iteration will continue infinitely and will never converge.</p>
<p>In fact, we can also use matrix to represent the problem. That is because, essentially, a directed graph can be transformed to a equivalent matrix, and vice versa. Denote A<sub>ij</sub> as the PageRank percent vertex i contributes to j, the above graph is equivalent to the following matrix,</p>
<p><img style="border: 0px initial initial;" title="ex_mat" src="http://www.charlesgao.com/wp-content/uploads/2009/07/ex_mat.png" alt="" width="149" height="130" /><br />
Given the initial vector,<br />
<img style="border: 0px initial initial;" title="initial_vector" src="http://www.charlesgao.com/wp-content/uploads/2009/07/initial_vector.png" alt="" width="155" height="36" />.</p>
<p>The first iteration, in the matrix representation, is to multiply the matrix by the initial vector. The second iteration, similarly, is to multiply the matrix by the resulting matrix of the first iteration. And this goes on and on &#8230; . Actually, the above matrix is called &#8216;&#8217;state transition matrix&#8221; in stochastic process theory. The iteration process is called Markov chain. Denote the state transition matrix as P. If there is a positive integer N, such that P<sup>N</sup>&gt;0 (a matrix is positive is defined as every element in the matrix is positive), the Markov chain is called regular chain. It has a unique limit state independent of the initial state. In our problem, it means that the PageRanks will converge. (For more, please reference to books on stochastic process.)</p>
<p>In this post, we only take a glimpse at the principle of PageRank algorithm. To form the final algorithm, far more things are to be considered, such as domain data, quality of the content, customer data, and the set-up time of the website. I think the most interesting point is that Google can calculate the PR values of almost all the websites in the internet in a limited time, given the extremely huge amount of data and the real-time changes of the sites. Really unbelievable, isn&#8217;t it?</p>
<p>Reference:<br />
<a style="color: #a50d0e; text-decoration: none; background-color: transparent;" href="http://en.wikipedia.org/wiki/PageRank">http://en.wikipedia.org/wiki/PageRank<br />
</a><a style="color: #a50d0e; text-decoration: none; background-color: transparent;" href="http://en.wikipedia.org/wiki/Markov_chain">http://en.wikipedia.org/wiki/Markov_chain<br />
</a> Mathematical Modeling(3rd edition), Qiyuan Jiang, Jinxing Xie, JunBian Ye, Higher Education Press</p>
<p>[<a href="http://www.charlesgao.com/?p=157">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=84</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Proof of the Levi&#8217;s Theorem</title>
		<link>http://www.charlesgao.com/en/?p=89</link>
		<comments>http://www.charlesgao.com/en/?p=89#comments</comments>
		<pubDate>Mon, 08 Jun 2009 08:53:32 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[levi]]></category>
		<category><![CDATA[measurable]]></category>
		<category><![CDATA[proof]]></category>
		<category><![CDATA[real variable]]></category>
		<category><![CDATA[simple function]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=89</guid>
		<description><![CDATA[<p>The Levi&#8217;s Theorem, also known as Levi&#8217;s monotone convergence theorem, shows that for a non-negative measurable function, the order of the limit operator and integral operator can be rearranged. It is stated as follows:</p>
<p style="text-align: left; ">Suppose  and  are non-negative measurable functions on measurable set D. And for almost all , is a monotone increasing sequence [...]]]></description>
			<content:encoded><![CDATA[<p>The Levi&#8217;s Theorem, also known as Levi&#8217;s monotone convergence theorem, shows that for a non-negative measurable function, the order of the limit operator and integral operator can be rearranged. It is stated as follows:</p>
<p style="text-align: left; ">Suppose <img style="border: 0px initial initial;" title="f" src="http://www.charlesgao.com/wp-content/uploads/2009/05/f.jpg" alt="" width="14" height="20" /> and <img style="border: 0px initial initial;" title="fn" src="http://www.charlesgao.com/wp-content/uploads/2009/05/fn.jpg" alt="" width="58" height="23" /> are non-negative measurable functions on measurable set D. And for almost all <img style="border: 0px initial initial;" title="xbltd" src="http://www.charlesgao.com/wp-content/uploads/2009/05/xbltd.jpg" alt="" width="37" height="18" />,<img style="border: 0px initial initial;" title="fnx_" src="http://www.charlesgao.com/wp-content/uploads/2009/05/fnx_.jpg" alt="" width="49" height="24" /> is a monotone increasing sequence that converges to <img style="border: 0px initial initial;" title="fx" src="http://www.charlesgao.com/wp-content/uploads/2009/05/fx.jpg" alt="" width="36" height="22" />, then<br />
<img class="aligncenter" style="border: 0px initial initial;" title="rest" src="http://www.charlesgao.com/wp-content/uploads/2009/05/rest.jpg" alt="" width="89" height="41" /></p>
<p style="text-align: left; ">In <em>Real Variable Funtions</em>, a book written by Xingwei, Zhou, the proof of the theorem is beautiful. Let me show you how it is done. Since the Lebesgue integral of a non-negative measurable function is defined by the limit of the integral of a monotone increasing sequence of non-negative simple functions. Every <img style="border: 0px initial initial;" title="fn1" src="http://www.charlesgao.com/wp-content/uploads/2009/05/fn1.jpg" alt="" width="15" height="22" /> can be approximated by a monotone increasing sequence of non-negative simple functions, which are denoted as <img style="border: 0px initial initial;" title="faikn" src="http://www.charlesgao.com/wp-content/uploads/2009/05/faikn.jpg" alt="" width="38" height="29" />. The next step is to construct a new function series <img style="border: 0px initial initial;" title="kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg" alt="" width="18" height="22" /> like this:</p>
<p><img style="border: 0px initial initial;" title="old_levi" src="http://www.charlesgao.com/wp-content/uploads/2009/05/old_levi.jpg" alt="" width="234" height="207" /></p>
<p>To write it down,<br />
<img style="border: 0px initial initial;" title="def_kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/def_kesaik.jpg" alt="" width="179" height="29" /><br />
Therefore, the sequence <a style="color: #a50d0e; text-decoration: none; background-color: transparent;" href="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg"><img style="border: 0px initial initial;" title="kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg" alt="" width="18" height="22" /></a> have the following properties:<br />
(1)<img style="border: 0px initial initial;" title="kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg" alt="" width="18" height="22" /> is monotone increasing<br />
(2)<img style="border: 0px initial initial;" title="con2" src="http://www.charlesgao.com/wp-content/uploads/2009/05/con2.jpg" alt="" width="152" height="24" /></p>
<p>In the second property, we first let <img style="border: 0px initial initial;" title="ktoinf" src="http://www.charlesgao.com/wp-content/uploads/2009/05/ktoinf.jpg" alt="" width="45" height="18" /> , then let <img style="border: 0px initial initial;" title="ntoinf" src="http://www.charlesgao.com/wp-content/uploads/2009/05/ntoinf.jpg" alt="" width="46" height="20" />, so the limit of <img style="border: 0px initial initial;" title="kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg" alt="" width="18" height="22" /> becomes <img style="border: 0px initial initial;" title="f" src="http://www.charlesgao.com/wp-content/uploads/2009/05/f.jpg" alt="" width="14" height="20" />. Besides, according to the first property, the integral of <img style="border: 0px initial initial;" title="f" src="http://www.charlesgao.com/wp-content/uploads/2009/05/f.jpg" alt="" width="14" height="20" /> can be defined by the limit of the integrals of <img style="border: 0px initial initial;" title="kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg" alt="" width="18" height="22" />.</p>
<p>The idea behind the proof, whose key point lies in the construction of  <img style="border: 0px initial initial;" title="kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg" alt="" width="18" height="22" />, is inspiring. In fact, ways to construct <img style="border: 0px initial initial;" title="kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg" alt="" width="18" height="22" /> is not unique. It works as long as the sequence you constructed satisfies the two properties. I found another way to build the sequence:<span id="more-89"></span></p>
<p><img style="border: 0px initial initial;" title="new_levi" src="http://www.charlesgao.com/wp-content/uploads/2009/05/new_levi.jpg" alt="" width="264" height="181" /></p>
<p>Proof：<img style="border: 0px initial initial;" title="foralln1" src="http://www.charlesgao.com/wp-content/uploads/2009/05/foralln1.jpg" alt="" width="43" height="17" />, suppose the integral of <img style="border: 0px initial initial;" title="fn1" src="http://www.charlesgao.com/wp-content/uploads/2009/05/fn1.jpg" alt="" width="15" height="22" /> is defined by monotone increasing sequence of non-negative simple functions <img style="border: 0px initial initial;" title="faikn" src="http://www.charlesgao.com/wp-content/uploads/2009/05/faikn.jpg" alt="" width="38" height="29" />. Denote<br />
<img style="border: 0px initial initial;" title="kesai1" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesai1.jpg" alt="" width="56" height="24" /><br />
<img style="border: 0px initial initial;" title="kesai2" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesai2.jpg" alt="" width="132" height="27" /><br />
…<br />
<img style="border: 0px initial initial;" title="kesaikk" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaikk.jpg" alt="" width="181" height="30" /></p>
<p>Then <img style="border: 0px initial initial;" title="kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg" alt="" width="18" height="22" /> is sequence of non-negative simple functions. Besides, it satisfies,<br />
(1)<img style="border: 0px initial initial;" title="kesaik" src="http://www.charlesgao.com/wp-content/uploads/2009/05/kesaik.jpg" alt="" width="18" height="22" /> is monotone increasing<br />
(2) <img style="border: 0px initial initial;" title="newcon2" src="http://www.charlesgao.com/wp-content/uploads/2009/05/newcon2.jpg" alt="" width="241" height="24" /><br />
According to (2), we have<br />
(3) <img style="border: 0px initial initial;" title="con3" src="http://www.charlesgao.com/wp-content/uploads/2009/05/con3.jpg" alt="" width="277" height="39" /></p>
<p>In (2),(3), let<img style="border: 0px initial initial;" title="stoinf" src="http://www.charlesgao.com/wp-content/uploads/2009/05/stoinf.jpg" alt="" width="42" height="19" />( note that <img style="border: 0px initial initial;" title="ktoinf" src="http://www.charlesgao.com/wp-content/uploads/2009/05/ktoinf.jpg" alt="" width="45" height="18" /> at the same time), we get<br />
(4)<img style="border: 0px initial initial;" title="con4" src="http://www.charlesgao.com/wp-content/uploads/2009/05/con4.jpg" alt="" width="157" height="29" /><br />
(5) <img style="border: 0px initial initial;" title="con5" src="http://www.charlesgao.com/wp-content/uploads/2009/05/con5.jpg" alt="" width="208" height="38" /><br />
In (4),(5), let<img style="border: 0px initial initial;" title="ntoinf" src="http://www.charlesgao.com/wp-content/uploads/2009/05/ntoinf.jpg" alt="" width="46" height="20" />, we have<br />
<img style="border: 0px initial initial;" title="final1" src="http://www.charlesgao.com/wp-content/uploads/2009/05/final1.jpg" alt="" width="73" height="28" /><br />
<img style="border: 0px initial initial;" title="final2" src="http://www.charlesgao.com/wp-content/uploads/2009/05/final2.jpg" alt="" width="123" height="40" /><br />
Then<br />
<img style="border: 0px initial initial;" title="final" src="http://www.charlesgao.com/wp-content/uploads/2009/05/final.jpg" alt="" width="152" height="40" /></p>
<p>Reference：<em>Real Variable Functions</em>, Xingwei, Zhou, Science Press.</p>
<p>[<a href="http://www.charlesgao.com/?p=231">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=89</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Construction of the Bijection Between Positive Integers and Positive Rationals</title>
		<link>http://www.charlesgao.com/en/?p=110</link>
		<comments>http://www.charlesgao.com/en/?p=110#comments</comments>
		<pubDate>Mon, 06 Apr 2009 16:47:03 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[countable]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[integer]]></category>
		<category><![CDATA[Pierce expansion]]></category>
		<category><![CDATA[rational number]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=110</guid>
		<description><![CDATA[<p>Two sets  and  are of the same cardinality if there is a bijection between them. A set  is countable if its cardinality is the same with that of the positive numbers. In another word,  is countable iff its elements can be written as 
According to this definition, it is easily observed [...]]]></description>
			<content:encoded><![CDATA[<p>Two sets <img src="http://latex.codecogs.com/gif.latex?A" alt="" /> and <img src="http://latex.codecogs.com/gif.latex?B" alt="" /> are of the same cardinality if there is a bijection between them. A set <img src="http://latex.codecogs.com/gif.latex?A" alt="" /> is countable if its cardinality is the same with that of the positive numbers. In another word, <img src="http://latex.codecogs.com/gif.latex?A" alt="" /> is countable iff its elements can be written as <img src="http://latex.codecogs.com/gif.latex?a_1,a_2,...,a_n,..." alt="" /><br />
According to this definition, it is easily observed that <img src="http://latex.codecogs.com/gif.latex?\mathbb{Z}" alt="" /> is countable, for we can construct a bijection from <img src="http://latex.codecogs.com/gif.latex?\mathbb{Z}^+" alt="" /> to <img src="http://latex.codecogs.com/gif.latex?\mathbb{Z}" alt="" />:</p>
<p><img title="f(n)=\left\{\begin{matrix} \frac{n}{2}\ \ \ \ \ \ \ \ \ (n=2k)\\ -\frac{n-1}{2} \ \ \ \ (n=2k+1) \end{matrix}\right." src="http://latex.codecogs.com/gif.latex?f(n)=\left\{\begin{matrix} \frac{n}{2}\ \ \ \ \ \ \ \ \ (n=2k)\\ -\frac{n-1}{2} \ \ \ \ (n=2k+1) \end{matrix}\right." alt="" /></p>
<p>There is a lemma stating that a countable union of a countable set is countable. The proof is Cantor&#8217;s famous diagonal method:<br />
Proof: Suppose <img src="http://latex.codecogs.com/gif.latex?{A_m}" alt="" /> is a collection of countable sets, where <img src="http://latex.codecogs.com/gif.latex?A_m={a_{m1},a_{m2},...}" alt="" />. Arrange them as follows:<br />
<img class="alignnone" title="diagonal_method" src="http://www.charlesgao.com/wp-content/uploads/2009/03/diagonal.jpg" alt="" width="170" height="159" /></p>
<p>It is able to count <img src="http://latex.codecogs.com/gif.latex?\bigcup{A_m}" alt="" /> using the sequence showing above, therefore <img src="http://latex.codecogs.com/gif.latex?\bigcup{A_m}" alt="" /> is countable.</p>
<p>Although the proof above shows that <img src="http://latex.codecogs.com/gif.latex?\bigcup{A_m}" alt="" /> is countable, it gives no bijection from <img src="http://latex.codecogs.com/gif.latex?\bigcup{A_m}" alt="" /> to the set of positive integers. So what&#8217;s the bijection?</p>
<p>Note that for each element <img src="http://latex.codecogs.com/gif.latex?a_{mn}" alt="" /> in the diagonal, the subscript <img src="http://latex.codecogs.com/gif.latex?m+n" alt="" /> is a constant. Therefore we can get the position of <img src="http://latex.codecogs.com/gif.latex?a_{mn}" alt="" />:</p>
<p><img src="http://latex.codecogs.com/gif.latex?n+\sum_{k=1}^{m+n-2}k" alt="" /></p>
<p>where <img src="http://latex.codecogs.com/gif.latex?m+n\ge3, a_{11}=1" alt="" />.</p>
<p>So we now have a bijection from <img src="http://latex.codecogs.com/gif.latex?\bigcup{A_m}" alt="" /> to <img src="http://latex.codecogs.com/gif.latex?\mathbb{Z^+}" alt="" />:</p>
<p><img src="http://latex.codecogs.com/gif.latex?f:\bigcup{A_m}\rightarrow \mathbb{Z^+}" alt="" /></p>
<p><img src="http://latex.codecogs.com/gif.latex?a_{mn}\mapsto n+\frac{1}{2}(m+n-2)(m+n-1)" alt="" /></p>
<p>One application of this lemma is to show that the (positive) rational number is countable. This is a direct derivation because the rational number can be viewed as an ordered pair <img src="http://latex.codecogs.com/gif.latex?\left \langle p,q \right \rangle" alt="" />. But when we using the same method to arrange the positive rational numbers, we find the bijection above no longer works:</p>
<p><img src="http://www.charlesgao.com/wp-content/uploads/2009/03/rational_diagnal.jpg" alt="" height="300" /></p>
<p>(figure from Wikipedia, where it uses a &#8217;snake&#8217; scheme to count the rationals)</p>
<p>Note the rationals colored in red. There are common divisors in the denominator and numerator. They have already been counted before. That is to say, the bijection we constructed ignored the case where elements of <img src="http://latex.codecogs.com/gif.latex?a_{mn}" alt="" /> duplicate.</p>
<p>I tried to consider this duplication and reconstruct a bijection from the positive nationals to the positive integers. However, things seemed to become rather complicated and I failed to make that construction.</p>
<p>Does such a bijection exist? Indeed it does. I googled a solution<sup>[1]</sup>. His approach uses binary number system and Pierce expansions.</p>
<p>The basic idea is to construct a bijection from positive integers to n-tuples as well as a bijection from n-tuples to Pierce expansions. And every Pierce expansion corresponds a positive rational number.</p>
<p>Reference:<br />
[1]<a href="http://www.springerlink.com/content/u13v0143126t5785/">http://www.springerlink.com/content/u13v0143126t5785/</a></p>
<p>[<a href="../../?p=214">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=110</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gambler&#8217;s bankruptcy</title>
		<link>http://www.charlesgao.com/en/?p=71</link>
		<comments>http://www.charlesgao.com/en/?p=71#comments</comments>
		<pubDate>Fri, 02 May 2008 07:04:31 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Probability]]></category>
		<category><![CDATA[discrete]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[interesting problem]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=71</guid>
		<description><![CDATA[<p>If you toss a coin, it will come up a head or a tail. When it is head, the gambler will earn a dollar. When it is tail, he loses one. Suppose the gambler succeeds when he has m dollar in hand, and bankrupts when he has no dollar left. Now a gambler&#8217;s initial property is [...]]]></description>
			<content:encoded><![CDATA[<p>If you toss a coin, it will come up a head or a tail. When it is head, the gambler will earn a dollar. When it is tail, he loses one. Suppose the gambler succeeds when he has <em>m </em>dollar in hand, and bankrupts when he has no dollar left. Now a gambler&#8217;s initial property is <em>x</em> dollars, where <em>x</em> is an integer and smaller than <em>m</em>. Show the probability that he will become a bankrupt.</p>
<p><span id="more-71"></span></p>
<p><strong>Solution</strong>: Define f(x) be the probability of bankruptcy when the gambler has <em>x</em> dollars at first. Then we have f(0)=1 and f(m)=0. Now he tosses a coin. There is  equal probability that it comes up a head or a tail. So we have<br />
f(x)=0.5f(x+1)+0.5f(x-1)<br />
which is equivalent to<br />
f(x+1)-f(x)=f(x)-f(x-1)<br />
The difference of f(x) is constant at each discrete unit, so f(x) is &#8220;linear&#8221;. Given two initial values f(0)=1 and f(m)=0, it is easy to show that f(x) = 1 &#8211; x/m</p>
<p>What if the coin is not uniform? If the probability of a head is 1/3 while a tail is 2/3, then we have<br />
f(x)=1/3*f(x+1)+2/3*f(x-1)<br />
which is equivalent to<br />
f(x+1)-f(x)=2[f(x)-f(x-1)]<br />
This time f(x) is nonlinear. Together with the initial values f(0) and f(m), it can be shown that<br />
f(x)=1-(2^x-1)/(2^m-1)<br />
which is an exponential function.</p>
<p>[<a href="http://www.charlesgao.com/?p=23">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=71</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Application of the Zero-point Theorem</title>
		<link>http://www.charlesgao.com/en/?p=63</link>
		<comments>http://www.charlesgao.com/en/?p=63#comments</comments>
		<pubDate>Thu, 10 Apr 2008 13:37:12 +0000</pubDate>
		<dc:creator>Gao Yuan</dc:creator>
				<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Modeling]]></category>
		<category><![CDATA[continuous]]></category>
		<category><![CDATA[proof]]></category>
		<category><![CDATA[zero-point theorem]]></category>

		<guid isPermaLink="false">http://www.charlesgao.com/en/?p=63</guid>
		<description><![CDATA[<p>In this article, the zero-point theorem has been implemented to solve a practical problem. Here is another example.</p>
<p>Show that for arbitrary triangle in a plane, there exists a line that divides the triangle into two parts that have the same area.
In geometry, our task usually is to find such a line. However, here we will [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.charlesgao.com/en/?p=58">this article</a>, the zero-point theorem has been implemented to solve a practical problem. Here is another example.</p>
<p>Show that for arbitrary triangle in a plane, there exists a line that divides the triangle into two parts that have the same area.<br />
In geometry, our task usually is to find such a line. However, here we will prove its existence. (In most cases, the proof of existence is very important. For example, consider the statement that among all the closed curves in a plain which have the same circumference, circle has the biggest area. To prove this statement, first of all, we have to show that there exists a closed curve which has the biggest area. Then we are to prove that the curve is a circle. For this problem, the proof of existence is much more difficult than showing that the required curve it is a circle. By the way, the whole axiom set theory is based on 10 fundamental axioms, most of which are axioms of existence. For instance, the simplest empty set axiom: There exists a set with no elements. Only after asserting this axiom can we define the empty set. So we can say that existence is the prerequisite of every properties. )<br />
OK, now let&#8217;s prove this theory.<br />
<strong>Proof</strong>: Suppose ABC is a given triangle and <em>l</em> is a given direction. Denote S(x) as the shaded area drawn below.<br />
<img class="aligncenter size-full wp-image-65" title="a8_1" src="http://www.charlesgao.com/en/wp-content/uploads/2009/11/a8_1.png" alt="a8_1" width="335" height="241" />First we show that S(x) is a continuous function.<br />
In fact, for x1,x2 belongs to [a,b], since  |S(x1)-S(x2)|&lt;=|OT|*|x1-x2|,  S(x) is not only continuous, but also uniformly continuous.<br />
Denote the area of triangle ABC as M.<br />
Define function f(x) = S(x) &#8211; M/2, so f(x) is continuous. f(a)= -M/2 , f(b)=M/2. According to the zero-point theorem, there exists a point c in [a,b], such that f(c) = 0, which means that S(c) = M/2.</p>
<p>[<a href="http://www.charlesgao.com/?p=21">Chinese Version of This Post</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.charlesgao.com/en/?feed=rss2&amp;p=63</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

