<?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>Xamuel.com &#187; General</title>
	<atom:link href="http://www.xamuel.com/blog/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xamuel.com/blog</link>
	<description>Articles by Sam Alexander</description>
	<lastBuildDate>Fri, 30 Jul 2010 19:16:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Undefined Behavior in C</title>
		<link>http://www.xamuel.com/undefined-behavior-in-c/</link>
		<comments>http://www.xamuel.com/undefined-behavior-in-c/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 00:30:03 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=2072</guid>
		<description><![CDATA[The C specifications are interesting because they leave many behaviors undefined. For example, if you try to use an uninitialized variable, the results are technically undefined. In some languages, the specifications might stipulate that if that ever happened, the program should gracefully halt with an error message or something. Or that all variables be initialized [...]]]></description>
			<content:encoded><![CDATA[<p>The C specifications are interesting because they leave many behaviors undefined.  For example, if you try to use an uninitialized variable, the results are technically undefined.  In some languages, the specifications might stipulate that if that ever happened, the program should gracefully halt with an error message or something.  Or that all variables be initialized with default values as soon as they&#8217;re declared.  The architects of C decided to leave it up to the compiler-makers to decide how to handle it.  The reason is optimization.  If the language&#8217;s designers required a graceful halt upon use of an uninitialized variable, then in order to be compliant, compiler-makers would have to build that into their compilers&#8230; which comes with a performance cost.</p>
<p>Given the sourcecode, determining whether or not the program ever uses an uninitialized variable, is a Turing-uncomputable feat (or at least, it would be in a computer with infinite memory).  So in some cases it would be necessary to add checks in the actual compiled machine code, machine instructions which would cost time in the finished program.  &#8220;Oh so what,&#8221; the JAVA aficionado exclaims, &#8220;who cares, that&#8217;s only like a picosecond!&#8221;</p>
<p>But here&#8217;s the thing.  Maybe a compiler-maker is really, really clever, and the hardware has a very clever CPU chip.  Maybe, through some brilliant trick I would never comprehend, the compiler-maker can make programs run a lot faster&#8211;  <i>if</i> using undefined variables results in the CD tray popping open.  Yeah, hard to imagine, but the C designers figured it&#8217;s not their place to second-guess hardware manufacturers and compiler-makers, so they leave the option there.  &#8220;Better fast than sorry&#8221; is the C motto.</p>
<p>Some other behaviors which create undefined results (hat tip Wikipedia):</p>
<ul>
<li>Trying to change a character in a string literal, i.e., one which was defined like: char *s=&#8221;Xamuel&#8221;.  It&#8217;s easy to see why this relaxed specification is nice for compiler-makers.  If &#8220;Xamuel&#8221; is hard-coded in multiple places, it needs only be physically embedded once in the final compiled product.  If the hard-coded string were liable to change, then it would have to be re-constructed every time the code calls for the original un-changed string.</li>
<li>Division by Zero.  In practice, this usually results in the program halting (possibly with a core dump), but it doesn&#8217;t have to, according to the C standards.  1/0 could be defined to be absolutely anything, and computing it might cause the computer to format its hard-drive&#8211;  that would still be C-compliant.</li>
<li>i++ += i + i++.  Assume i starts at 0&#8230;  what do <i>you</i> think i should become after this operation?  The more general rule is:  any time you try to read a variable twice within a computation in which you also write to that variable, the behavior is undefined.</li>
<li>Trying to read or write from memory which hasn&#8217;t been allocated.  Thus all the trouble with buffer overflows.</li>
</ul>
<p>A frequently asked question is, why allow the programmer to perform undefined behavior in the first place?  No coder should rely on it, unless maybe in writing for one single platform that will never change.  By nature of undefinedness, undefined behavior is inherently unportable.  So why not just make the compiler refuse to compile offending code?  The coder would be forced to fix their mistakes, and no speed would be forfeit in the finished, compiled code.</p>
<p>The problem is, detecting whether or not a program uses an uninitialized variable, is equivalent to solving the <a href="http://www.xamuel.com/the-halting-problem/">Halting Problem</a>, which is notoriously impossible.</p>
<ul>
<li><b>Theorem:</b> Detecting whether a variable is used uninitialized, based on the source code, is equivalent to solving the Halting Problem.</li>
<li><b>Proof:</b> Suppose you had a compiler which refused to compile any code which would ever use a variable uninitialized in any circumstances.  I&#8217;ll explain how to detect whether an an arbitrary function int f(void) halts.
<ul>
<li><b>Input:</b> A function, as a string, S = &#8220;int f(void) { <i>&#8230;code&#8230;.</i> }&#8221; (which is well-enough formed that it doesn&#8217;t itself cause compilers to complain).</li>
<li><b>To do:</b> Output 1 if the function f halts.  Output 0 otherwise.</li>
</ul>
<ol>
<li>Create a new string T:</p>
<ul>
<li>T = S . &#8220;int main(void){ int a, b; a = f(); a += b; }&#8221;</li>
<li>(where . means string concatenation)</li>
</ul>
</li>
<li>Feed T into our uninitialized-variable-detecting compiler.</li>
<li>If T compiles, output &#8220;0&#8243;:  f does not halt.  If T doesn&#8217;t compile, output &#8220;1&#8243;:  f does halt.</li>
</ol>
</li>
<li>This works because, if f would halt, then the line &#8220;a += b&#8221; would be reached in T.  The variable b is uninitialized, so this line causes the compiler to complain and not finish compiling T.  If f never halts, then that offending line is never reached, so the compiler should happily compile the code (we assumed f does not itself cause the compiler to complain).</li>
</ol>
</ul>
<p>So there really is no way to nicely rule out these exceptional cases short of adding special checks to the compiled code itself, which costs efficiency and time in the finished product&#8230;</p>
<p>(Though, it should be noted, the Halting Problem really is solvable in C, because all types in C are restricted to finite ranges of values and so there are only finitely many (albeit a cosmically huge number of) possible states a C program can be in.  Of course when talking about computability aspects of C, one assumes that &#8220;int&#8217;s&#8221; are allowed to take unbounded values and so on.)</p>
<p><strong>FURTHER READING</strong></p>
<p><a href="http://www.xamuel.com/computer-programming-experience/">My Experience with Computer Programming</a><br />
<a href="http://www.xamuel.com/japanese-programming-syntax/">What would Programming Syntax be like if the Japanese invented it?</a><br />
<a href="http://www.xamuel.com/busy-beaver-numbers/">Busy Beaver Numbers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/undefined-behavior-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Pool</title>
		<link>http://www.xamuel.com/the-pool/</link>
		<comments>http://www.xamuel.com/the-pool/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 16:01:39 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=1972</guid>
		<description><![CDATA[Three friends went to a pool party together. The pool was full of people splashing around and having fun, but of course the hardest part was making the initial jump. The first friend jumped in right away. The shock of the cold water quickly went away and he had fun with everybody in the pool. [...]]]></description>
			<content:encoded><![CDATA[<p>Three friends went to a pool party together.  The pool was full of people splashing around and having fun, but of course the hardest part was making the initial jump.</p>
<p>The first friend jumped in right away.  The shock of the cold water quickly went away and he had fun with everybody in the pool.</p>
<p>The second friend slowly waded in at the shallow section.  It took him longer, but eventually he made it, and was swimming and having fun with the rest.</p>
<p>The third friend was too scared of the water.  He stayed out and missed the whole party.  Eventually he got so frustrated he started running back and forth shouting at the people in the water, screaming about the evil of the water, protesting the unnaturalness of swimming pools, and lobbying the government to ban swimming pools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/the-pool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Abstract Systems of Royalty</title>
		<link>http://www.xamuel.com/abstract-systems-of-royalty/</link>
		<comments>http://www.xamuel.com/abstract-systems-of-royalty/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 01:23:58 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=1930</guid>
		<description><![CDATA[What makes a person royal? The &#8220;real&#8221; monarchies are backed by force and intrigue, making them arbitrary: if history had gone differently, Queen Elizabeth II might not be &#8220;royal&#8221;, even if the basic structure of her family were identical. In my earlier article, I defined the mathematic royalty by saying a given person is royal [...]]]></description>
			<content:encoded><![CDATA[<p>What makes a person royal?  The &#8220;real&#8221; monarchies are backed by force and intrigue, making them arbitrary: if history had gone differently, Queen Elizabeth II might not be &#8220;royal&#8221;, even if the basic structure of her family were identical.  In my earlier article, I defined the <i>mathematic royalty</i> by saying a given person is <i>royal</i> if and only if this person has infinitely many descendants.  This definition is very nice because, assuming certain basic axioms, it allows the deduction of many principles which make intuitive sense based on the intuition we have from &#8220;real&#8221; monarchies.  That these deductions are purely mathematical and logical, with no appeals to opinion or to &#8220;divine mandates&#8221;, is particularly nice.  Some readers are still skeptical: is the word &#8220;royal&#8221; really appropriate for what, ultimately, is a technical property about nodes in an infinitary graph with certain very technical properties?  In this article, I&#8217;ll give more justification for this choice of words.</p>
<p>If there is an intrinsic royalty, and it has any correlation whatsoever to our intuition about royalty, then what can we say?  If mankind descends from a single patriarch and matriarch, it&#8217;s very reasonable to say that these original humans, at least, were royal.  Call it <i>royalty by default</i>, if you like: they had no competition!  If you&#8217;re the only man on earth, it doesn&#8217;t make any sense to say you&#8217;re a commoner.</p>
<p>Throughout, I&#8217;ll work with the Adam-and-Eve origin, that mankind descends from a single human patriarch and a single human matriarch (Adam and Eve, respectively).  This is <i>not</i> an endorsement of any particular religion, it&#8217;s simply a device to simplify the communication of mathematical ideas.  The ideas would not change drastically if the assumption was relaxed to <i>finitely many</i> xatriarchs, but that would make the underlying logic much more tedious!  Anyway, it very well may be that real-world humanity does <i>not</i> have an Adam-and-Eve.  Nonetheless, any theorem we prove is true in <i>any hypothetical world</i> which does have them.</p>
<p>If anything else about monarchy is intrinsic, it&#8217;s that it has something to do with family connections.  If you&#8217;re royal, your father must be royal.  (If this is false in a particular real-world monarchy, then it&#8217;s more of a point against that monarchy than against our intuition:  apparently such a monarchy <i>really is</i> based on nothing more substantial than brute force and conspiracy!)</p>
<p>One possibility in &#8220;deducing&#8221; who&#8217;s royal is to say:  everyone with a royal parent, is royal.  But this isn&#8217;t interesting.  Combined with <i>royalty by default</i>, you get a definition of royalty where <i>everyone is royal</i>.  See, we&#8217;re assuming everybody descends from Adam and Eve.  Adam and Eve are royal, thus so are their kids, grandkids, etc., including everyone in the world.  Such a tautological definition would be pointless.  Nevertheless, for the sake of the current article, I&#8217;ll call this system Royalty 0.  Thus, in the Royalty 0 system, a person is royal if and only if (TRUE).  (I.e., everybody is royal)</p>
<p>Another possibility&#8211; one I take&#8211; is to say:  everyone with a royal child, is royal.  Call this <i>reverse inheritance</i>.  It rules out commoners rising to mathematical royalty directly by brute force or politics, which methods are arbitrary and artificial.</p>
<p>By its lonesome, this is not enough to get anything interesting:  you could define Adam and Eve to be royal, and nobody else.  Then, it would be true, in a vacuous technical sense, that everyone with a royal child is royal&#8211;  since nobody has Adam or Eve as a child, the statement is vacuously true.  To get really interesting mathematics, we must also assume the <i>converse</i> of reverse inheritance:  everyone royal has a royal child.  This is definitely the most controversial and least supported by intuition.  To provide intuitive evidence, I&#8217;ll point out that the real-world monarchies are obsessed with <i>continuing their lines</i>, and a sterile king (or a king who somehow only fathers commoners) is, in a very real sense, a failed king.  An ideal monarchy, even in the &#8220;real world&#8221;, wants to avoid these dead ends.</p>
<p>For the purposes of the current article, I&#8217;ll say that a system of royalty is Royalty 1 if it satisfies: royalty by default, reverse inheritance, and the converse of reverse inheritance.  Verbosely, a royalty is Royalty 1 if: Adam and Eve are royal, everybody royal has a royal child, and every parent of royalty is royal.</p>
<p>Royalty-by-default and converse-reverse-inheritance don&#8217;t cohere perfectly.  It could be possible, for example, that Adam and Eve are barren, and mankind ends with them.  Royalty-by-default would make them royal, while converse-reverse-inheritance would make them commoners.  Fortunately, this disagreement vanishes if we assume an Axiom of Humanism:  that mankind never goes extinct.  I&#8217;ll assume this axiom from here on; if it happens to fail in the &#8220;real world&#8221;, the theorems I prove will still hold in any hypothetical world which does satisfy it.</p>
<ul>
<li><b>Theorem:</b> In any Royalty 1 system, everyone who is royal has infinitely many descendants.</p>
<ul>
<li><b>Proof:</b> Let P be a person who is royal according to some Royalty 1 system S.  Since S satisfies converse-reverse-inheritance, S says P must have a royal child P<sub>2</sub> (since P is royal).  But then since P<sub>2</sub> is royal, there is a child P<sub>3</sub> of P<sub>2</sub>, and this process continues forever.  All these infinitely many children are descendants of P, so P has infinitely many descendants, as claimed.</li>
</ul>
</li>
<li><b>Corollary:</b> The system of royalty defined by saying, &#8220;being royal means having infinitely many descendants&#8221;, is the most-inclusive possible Royalty 1 system.</li>
</ul>
<p>The above corollary gives a pretty strong justification for defining mathematical royalty <a href="http://www.xamuel.com/mathematical-royalty/">the way I do</a>.  If any version of royalty satisfies the conditions of Royalty 1, then either it&#8217;s my version of royalty, or at worst it&#8217;s a subsystem thereof.  This maximally-inclusive (relative to Royalty 1) property gives my definition a strong &#8220;intrinsic&#8221; quality.</p>
<h2>Other Ways of Defining Royalty</h2>
<p>Royalty 0 and Royalty 1 aren&#8217;t the <i>only</i> things we could try.  Here are some other possibilities, along with reasons why I don&#8217;t think they&#8217;d be very interesting:</p>
<ul>
<li>Single out certain people as being &#8220;initial royalty&#8221;, and close royalty downward by inheritance, but not upward.  This definition would allow for &#8220;spontaneous royalty&#8221;, e.g. a commoner seizing the kingdom.  Mathematically, though, it&#8217;s not interesting.  If Adam or Eve are royal, we get Royalty 0, where everyone is royal.  Otherwise, the family tree of mankind splits into pieces: one piece for each &#8220;spontaneous king&#8221;, and one big piece for the commoners.  Thus, the study of royalty and commoners, according to this definition, is really just the story of 2-colored forest-like structures.  Not fertile for proving interesting results&#8211; or rather, forests have already been studied to death.  My Royalty 1 systems don&#8217;t trivially split like this, because if you cut out the royalty, the commoners who remain do not necessarily make a &#8220;tree&#8221; at all, since you just cut out their root.</li>
<li>Single out certain people as being &#8220;terminal royalty&#8221;, and close royalty upward by reverse-inheritance (but not necessarily the converse).  Then royalty is &#8220;only as rich as you make it&#8221;: if you single out only finitely many people, then the entire set of all royal people is <i>finite</i>, which is downright boring.  How would you single out infinitely many terminally royal figures?  There are different possible ways to do this: everyone with at least 1 child is royal; everyone is royal, period; every male is royal; none of these are particularly interesting, though.  One way would be to single out everyone with infinitely many descendants&#8230;  but then you get precisely my favorite system of royalty.</li>
</ul>
<h2>Playing with Words</h2>
<p>If I had written an article about 2-colored graphs with certain tree-like properties, satisfying certain very technical properties, I doubt it would be controversial.  It wouldn&#8217;t be particularly interesting, either.  In general, the names we give to mathematical constructions are totally arbitrary.  We endeavor to choose the names in such a way that things make intuitive sense.  In that, Mathematical Royalty is a smashing success.  I&#8217;m actually a little amazed <i>myself</i> at some of the things we can formally prove about royal bloodlines (though if rephrased in terms of infinite branches in 2-colored graphs, these theorems would only be interesting to mathematicians, and not even all that interesting to them).</p>
<p>As a side effect of the particular words I&#8217;ve chosen, the results become slightly politically charged.  The Caste System Theorem is about the most politically controversial a mathematical theorem can be, and yet its proof is pure, airtight logic, to the point that if different names were employed, it would be an obvious tautology and totally un-noteworthy.  The &#8220;highly technical properties&#8221; to which I subject my &#8220;2-colored graphs&#8221; are the Axioms of Genesis, Biology, Feebleness and Humanism; Genesis and Humanism, in particular, are <i>very</i> strange bedfellows, as far as political ideology goes!  None of this changes the basic logic behind anything.</p>
<p>If the reader prefers, the ubiquitous word &#8220;royal&#8221; could be replaced &#8220;noble&#8221;, and &#8220;royalty&#8221; by &#8220;nobility&#8221;.  Or instead of the royalty, you could refer to the &#8220;Secret Society of Infinitedescendantists&#8221;.</p>
<p><strong>FURTHER READING</strong></p>
<p><a href="http://www.xamuel.com/mathematical-royalty/">Mathematical Royalty</a><br />
<a href="http://www.xamuel.com/konigs-lemma/">Konig&#8217;s Lemma</a><br />
<a href="http://www.xamuel.com/exponential-games/">Exponential Games</a><br />
<a href="http://www.xamuel.com/science-and-leadership/">Science and Leadership</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/abstract-systems-of-royalty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoiding &#8220;him/her&#8221; in Writing</title>
		<link>http://www.xamuel.com/avoiding-him-her/</link>
		<comments>http://www.xamuel.com/avoiding-him-her/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 19:03:48 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=1918</guid>
		<description><![CDATA[&#8220;The typical scientist devotes himself tirelessly to science.&#8221; Anything wrong with this sentence? No, there is not. It&#8217;s an example of an interesting device in the English language, where we use a single member of a class to represent the entire class. (In fact, I just did it again, this time picking out a single [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;The typical scientist devotes himself tirelessly to science.&#8221;  Anything wrong with this sentence?  No, there is not.  It&#8217;s an example of an interesting device in the English language, where we use a single member of a class to represent the entire class.  (In fact, I just did it again, this time picking out a single arbitrary <i>class</i> to speak about the class of all classes!)  Some would complain that I made the typical scientist male.  Isn&#8217;t that sexist?  Ignoring the fact that, objectively, the typical scientist <i>is</i> male, what I&#8217;ve really done is assign an arbitrary gender to my arbitrary scientist.  I could just as well have written &#8220;The typical scientist devotes herself entirely to science&#8221;, the meaning would not have changed.</p>
<p>Out of (misguided) political correctness, some would write: &#8220;The typical scientist devotes him/herself tirelessly to science.&#8221;  This neutered formulation still retains gender bias, to whatever extent the original statement did, because of the <i>order</i> of the genders.  Surely &#8220;him/herself&#8221; is biased in favor of males because &#8220;him&#8221; comes first?  But &#8220;her/himself&#8221;, besides sounding strange because we&#8217;re totally unaccustomed to it, is still biased, only in favor of one gender instead of the other.  If there is bias at all, it&#8217;s unavoidable.  But I would argue &#8220;him/her&#8221; and &#8220;her/him&#8221; are <i>more</i> biased than &#8220;him&#8221; or &#8220;her&#8221;.  When a writer uses &#8220;him&#8221; or &#8220;her&#8221;, she is simply choosing an arbitrary gender as a stand-in for the class of all genders, just as the arbitrary scientist stands in for the class of all scientists.  The &#8220;him/her&#8221;/&#8221;her/him&#8221;-abuser must explicitly <i>order</i> the genders, a far more dangerous action in a world where political incorrectness results in lightning bolts from heaven.</p>
<p>And then there are the deformed ones, the hirselves and hemselves, not to mention the ximselves, who no doubt hail from some distant exotic planet.  These aren&#8217;t biased, they&#8217;re just plain bad: completely absent from the spoken language, these constructs jar the reader and disrupt the natural flow of text.  They&#8217;re subtle like a baseball bat to the face: &#8220;Look at me, I&#8217;m politically correct!!&#8221;  And of course there are the &#8220;its&#8221;, whom the reader tends to visualize as small or unborn children, hermaphrodites or eunuchs.  The typical scientist is none of these!</p>
<p>This deforming strategy can be useful for coining technical words when there really <i>is</i> a difference between the genders.  In my treatise on <a href="http://www.xamuel.com/mathematical-royalty/">Mathematical Royalty</a>, I coined the word &#8220;xatriarch&#8221; to mean &#8220;matriarch, patriarch, or ultimate ancestor of any gender whatsoever (not necessarily male or female)&#8221;.  In this case, the genders are <i>not</i> interchangeable.  In the community for the game Nethack, &#8220;foocubus&#8221; means &#8220;incubus or succubus&#8221;, which two monsters are, again, <i>not</i> interchangeable.  In the sentence, &#8220;The typical scientist devotes himself to science&#8221;, genders <i>are</i> interchangeable, since the sentence has the same meaning whichever one you use.  Also, in both cases, the modified words are more obscure&#8211; not fundamental pronouns of English!</p>
<p>If you really are worried about being politically correct, then vary which gender you pick throughout writing.  &#8220;The typical scientist concerns himself only with science, while the typical poet varies her interests across many things.&#8221;  This is more subtle and reads much more nicely.  In writing a very short passage, you might offend the holy sensibilities of gender studies, but in the long run, it&#8217;ll average out.  You could be a true maverick, and use whichever gender really is objectively appropriate:  male scientists and female nurses.  I suspect the writer who goes out of his way to neuter his writing has the idea that he&#8217;s being a maverick, but he&#8217;s half a century late.  Now it comes across as conformity in the highest degree, sterile like a hospital.</p>
<p>The nature of language in general is that by using any linguistic device, we evoke the nuance of everyone else who&#8217;s ever used it.  Using &#8220;him/her&#8221; creates the nuance of a stuffy government form.  Using &#8220;xe&#8221; and such variants, when the two genders are really interchangeable, taints the writing with the nuance of a shrill, insufferable activist.</p>
<p><strong>FURTHER READING</strong></p>
<p><a href="http://www.xamuel.com/teaching-with-pronouns/">Teaching with Pronouns</a><br />
<a href="http://www.xamuel.com/problems-in-mathematics/">&#8220;Problems&#8221; in Mathematics</a><br />
<a href="http://www.xamuel.com/prescriptive-vs-descriptive-linguistics/">Prescriptivism vs. Descriptivism</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/avoiding-him-her/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ordinal Arithmetic and Internet Surfing</title>
		<link>http://www.xamuel.com/internet-surfing-ordinals/</link>
		<comments>http://www.xamuel.com/internet-surfing-ordinals/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 21:08:02 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=1907</guid>
		<description><![CDATA[In a recent article, I showed how ordinal numbers can be used to prove some astonishing results, namely, that the Goodstein Sequences shrink to 0. I spent some time thinking what else the idea could be applied to, but I couldn&#8217;t think of anything. Then, as if my life were one big collection of cliches, [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent article, I showed how ordinal numbers can be used to prove some astonishing results, namely, that the <a href="http://www.xamuel.com/goodstein-sequences/">Goodstein Sequences shrink to 0</a>.  I spent some time thinking what else the idea could be applied to, but I couldn&#8217;t think of anything.  Then, as if my life were one big collection of cliches, the answer dawned on me while doing something totally unrelated, or at least, <i>seemingly</i> totally unrelated: internet surfing.</p>
<p>When surfing the internet, one finds links one wants to click.  In fact, it&#8217;s often the case one page will have multiple attractive links, and you can&#8217;t just click one, so you &#8220;Open Link in New Tab&#8221;.  This causes the number of pages to explode exponentially, and there&#8217;s a serious risk you&#8217;ll enter an infinite surfing loop.</p>
<p>An intuitive way to short circuit the process is to limit the number of tabs you have open, and read recursively.  So if you&#8217;re reading about Napoleon and you see a link to an article on artillery, you may open the artillery article in a separate tab, only if the current number of tabs is smaller than the preset limit.  And if you do open the artillery article, you must read it before returning to the Napoleon article.  This is recursive:  if, while reading about artillery, you see a link about cavalry, you can open it, so long as there are still slots available.  But if you do open the cavalry article, you must recursively read that, before returning to artillery, before returning to Napoleon.  Also, in this method, you <i>must</i> open links in new tabs, you can&#8217;t open them in the same tab.</p>
<p>It seems intuitively reasonable that if you follow these rules, you&#8217;ll never fall into an infinite internet surfing loop.  At least, that is, if you make some basic assumptions like finitely many links per page, and each link clicked at most once.  But how do you actually <i>prove</i> that you avoid infinite loops?  It&#8217;s reasonable to assume pages have finitely many links, but the number of links could still be arbitrarily large: the method must work, in principle, even if every page has billions or trillions of links&#8230;  I&#8217;ll give a proof using ordinal arithmetic.</p>
<p>(The mischievous reader might say:  &#8220;Hah!  There are only finitely many pages on the web&#8230; there&#8217;s nothing to prove, you&#8217;ll eventually read them all!&#8221;  That&#8217;s not true per se.  It might be&#8211; in fact, these days it almost certainly is the case&#8211; that new webpages join the net faster than we can read them.  We <i>do</i> assume that once you open a page, you keep it open, without refreshing it, until you finish reading it, so this ever-changing-internet still effectively has only finitely many links per page.)</p>
<p>Without loss of generality, we can assume that pages have no raw content, that they consist entirely of links and nothing else.  This is patently untrue, but it doesn&#8217;t actually change anything as far as we&#8217;re concerned: reading unlinked content is &#8220;free&#8221; since there&#8217;s (presumably) only finitely much of it per page and, having no links, raw content doesn&#8217;t lead to new tabs opening.</p>
<p>Also, we can assume that <i>every</i> link is one we want to click.  Again, this is blatantly false, but if we prove that the Method works in this hypothetical clickhappy world, it&#8217;ll <i>certainly</i> work in a world of greater self-discipline.  Remember, just because we want to click a link doesn&#8217;t mean we can, since we might be at our tab limit.</p>
<p>So, suppose you set yourself a limit of N tabs and stumble to a fixed start page, and begin reading recursively.  Based on the above two simplifying assumptions, &#8220;reading&#8221; means going through the list of links and (recursively) clicking them one-by-one, unless we&#8217;re already tabbed out.  If tabbed out, we gaze longingly at each link one-by-one without clicking any.  Either way, we close the tab after dealing with every link on it.</p>
<p>At any given time t, let the open tabs be Tab 1, Tab 2, &#8230;, Tab k (so k is at most N).  For every i from 1 to k, let L<sub>i</sub> be the number of links in Tab i which we still haven&#8217;t looked at.  There is an obvious way to map this sequence (L<sub>1</sub>,&#8230;,L<sub>k</sub>) into the ordinal ω<sup>N</sup>.  Namely, map it to the following ordinal, call it x<sub>t</sub>:</p>
<ul>
<li>L<sub>1</sub>ω<sup>N-1</sup>+L<sub>2</sub>ω<sup>N-2</sup>+&#8230;+L<sub>k</sub>ω<sup>N-k</sup></li>
</ul>
<p>(Note: I&#8217;m using the opposite order for ordinal multiplication, so my 2ω is what is normally written ω*2.  I find I prefer this order when doing Goodstein-Sequence-like work&#8230;)</p>
<p>Now, what happens at time t+1?  There are several cases:</p>
<ol>
<li>Maybe k&lt;N, so we can still open new tabs, and L<sub>k</sub>&gt;0, so there&#8217;s a link to open in the rightmost tab.  Then we&#8217;ll open that link.  The new configuration will have k&#8217;=k+1.  The new L<sub>k&#8217;</sub> will equal the total number of links in whatever page appears in the new tab.  The new L<sub>k</sub> will be one smaller, since there is one fewer link in the kth tab which we haven&#8217;t look at.  All the other Ls are unchanged.  The new ordinal, x<sub>t+1</sub>, will have the same first k-1 components as x<sub>t</sub> and a smaller kth component, so x<sub>t+1</sub> will be a <i>smaller</i> ordinal than x<sub>t</sub>.</li>
<li>Or maybe, k=N, so we&#8217;re all tabbed out, and L<sub>k</sub>&gt;0, so there&#8217;s a link we still must consider in the kth tab.  We can&#8217;t open it, since we&#8217;re out of tabs, so instead we&#8217;ll gaze longingly at it for a moment.  At the next time, t+1, k&#8217; will be the same as k, and all the Ls will be the same, except L<sub>k</sub> has shrunk by 1, since we looked at that link.  Then x<sub>t+1</sub> will be smaller than x<sub>t</sub>.</li>
<li>Finally, maybe L<sub>k</sub>=0, so there are no more links to look at in the kth tab.  Then we&#8217;ll close the kth tab.  If k=1, we&#8217;ve finished surfing.  Otherwise, at time t+1, the new k&#8217; will be k-1, but all the Ls up to L<sub>k-1</sub> will be unchanged, since we didn&#8217;t deal with any links.  Thus x<sub>t+1</sub> is, again, a smaller ordinal than x<sub>t</sub>.</li>
</ol>
<p>In every case, the ordinal which encodes the configuration of our browser, shrinks.  But ordinals are well-founded:  if a list of ordinals always shrinks, then it must be a finite list!  If our websurfing algorithm led us to an infinite loop of surfing, then the x<sub>t</sub> ordinal-sequence would shrink forever, which is impossible.  The only other possibility is exactly the one we want:  our surfing binge eventually ends.</p>
<p>In fact, we could alter the Method, and allow the limit N of tabs to depend on the first page.  This would correspond, for example, to setting your homepage to a webportal with a bunch of links (changed daily), and this webportal also announces what the N is for the day (always finite).  The proof that the surfing will still halt, is virtually the same as the one we just gave for the original Method.</p>
<p>The contents of this article gradually solidified in my mind while I was surfing <a href="http://tvtropes.org">tvtropes.org</a>, where links can be oddly compelling and there <i>really is</i> a grave danger of an infinite surfing loop.  The Method of limiting tabs and reading recursively can actually be a practical, not just theoretical, algorithm for browsing that site!</p>
<p><strong>FURTHER READING</strong></p>
<p><a href="http://www.xamuel.com/goodstein-sequences/">Goodstein Sequences</a><br />
<a href="http://www.xamuel.com/unlimited-register-machines/">Unlimited Register Machines</a><br />
<a href="http://www.xamuel.com/seo-superstition/">Search-Engine Optimization: The New Superstition</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/internet-surfing-ordinals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Works of Blaise Pascal</title>
		<link>http://www.xamuel.com/blaise-pascal/</link>
		<comments>http://www.xamuel.com/blaise-pascal/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 20:50:58 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=1903</guid>
		<description><![CDATA[When I was in junior high, somehow I ended up reading the works of Blaise Pascal, the 17th century mathematician, scientist, philosopher, and theologian. Yeah, I was a bit of a weird kid back then. I was really impressed with the depth and life of the work. When we read about science in textbooks, it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>When I was in junior high, somehow I ended up reading the works of Blaise Pascal, the 17th century mathematician, scientist, philosopher, and theologian.  Yeah, I was a bit of a weird kid back then.  I was really impressed with the depth and life of the work.  When we read about science in textbooks, it&#8217;s often so bland and sterile.  Completely missing is the adventure of discovering that science in the first place.  Probably the biggest influence Pascal had on me was through his treatises on air pressure.  Yeah, air pressure: seems like about the dullest subject on earth, but when Pascal was publishing his results, they were a slap to the face of the establishment, a bold and daring one-man revolution.  I&#8217;ll discuss the works as they are presented in the Encyclopedia Britannica&#8217;s &#8220;Great Books of the Western World&#8221; installment on Pascal, which is where I read him.  (Buy Pascal&#8217;s Works at <a href="http://www.amazon.com/gp/product/B000GYB3CO?ie=UTF8&#038;tag=glofacman-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B000GYB3CO">Amazon</a><img src="http://www.assoc-amazon.com/e/ir?t=glofacman-20&#038;l=as2&#038;o=1&#038;a=B000GYB3CO" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />)</p>
<h2>The Provincial Letters</h2>
<p>These Letters represent one of the world&#8217;s oldest anonymous flamewars.  Pascal took the Jesuit order of the Catholic Church to task again and again.  The way he described his infiltrations into the sect, posing as a curious student, at times the Letters read almost like a Tintin adventure:  you half expect a Bond villain to pop out and claim credit for the Jesuits&#8217; evil schemes.</p>
<p>The Letters were published anonymously, out of necessity.  Unlike the modern flamewarrior, Pascal wrote at great peril to life and limb.  He could have been burnt at the stake if his identity were revealed prehumously.  The Jesuits absolutely despised him, because not only was he a competent theologian, he was a highly talented writer, and the Letters had mass appeal at the time: he was a formidable enemy to the order.</p>
<h2>Pensées (Thoughts)</h2>
<p>Where the Provincial Letters were extroverted and controversial, the Pensees are introverted and philosophical.  The Pensées are unfinished work, notes Pascal was working on &#8217;til his death.  Officially they&#8217;re described as being entirely about God and Christianity, but the truth is, the Thoughts are a goldmine of wisdom, regardless of your religious standing.  If the Letters were the world&#8217;s first flamewar, then the Pensées were the world&#8217;s first Twitter account:  largely-self-contained &#8220;fortune cookie&#8221; type notes, many of which would indeed fit Twitter&#8217;s 140 character limit; and yet, together, they add up to much more than the sum of their parts.</p>
<p>One of the themes of the Pensées which has left the lastingest impression on me, is the theme of human distraction.  A great emperor, left to himself to contemplate himself, will soon be miserable; a pauper on the verge of losing everything, on the other hand, will be perfectly content, if only he has a ball to bounce against the wall.</p>
<h2>On The Weight Of The Mass Of The Air</h2>
<p>The most interesting of his works by far.  In Pascal&#8217;s time, it was taken as a fundamental, indisputable principle that &#8220;Nature abhors a vacuum&#8221;.  This isn&#8217;t figurative: people&#8211; including the most credentialed scientists&#8211; literally thought the universe was <i>terrified</i> of empty space, and they believed the universe would sooner suffer its own destruction than allow even a cubic millimeter of vacuum.  Arguing against this, back then, was about the same as arguing, today, that the Earth is flat.</p>
<p>Pascal didn&#8217;t directly invent the first method for creating a vacuum, but he built on it and explained it, while everybody else was busy performing the most creative acrobatics to explain it away.  The most esteemed philosophers of the time were positing imaginary new elements, such as the mythical Aether, to explain away the troublesome experiments.</p>
<p>While the Aether-mongers buried their heads in the sand, Pascal devised an entire theory of air pressure based on these vacuum-producing experiments.  Unlike the Aether-huffers, Pascal was able to make amazing empirical predictions, and confirm them with experiments.  Neither were these the experiments you performed in high school physics lab: being a pioneer in uncharted territory, our philosopher had to do everything from scratch, designing the equipment himself and generally Robinson-Crusoe-ing his way into history.  At every step of the way, he was beset with arrogant doctors, blind worshipers of Aristotle.  With a patience like Superman, our protagonist designed experiment after experiment, breaking his highly educated critics like unwashed barbarians upon the spears of a Roman phalanx.</p>
<p>Using nothing but crude observations about how water levels (or mercury levels) rose and fell in makeshift beakers and tubes, Pascal twisted his radical new theories of air pressure into an impressively good estimate of the *weight of the Earth&#8217;s atmosphere*.  Exploiting his dark and arcane theory like black magic, he invented ways of measuring altitude, methods we still use today&#8211; before Pascal, if you wanted to measure the height of a mountain, you&#8217;d need a lot of measuring tape!</p>
<h2>Pascal&#8217;s Triangle</h2>
<p>As a mathematician, you&#8217;d think Pascal&#8217;s treatise on the &#8220;arithmetical triangle&#8221; would appeal to me more than the others.  Not really:  the most interesting part of the short treatise was seeing just how cumbersome the notation was back then!  It makes me so glad I live today, in a world where mathematical notation is so much easier&#8211;  but at the same time, it makes me wonder whether, in a few centuries, people won&#8217;t look at my own works and boggle at the primitive 21st century notation.</p>
<p>For Pascal&#8217;s Triangle, there&#8217;s Wikipedia.  For everything else, there&#8217;s The Works of Blaise Pascal.</p>
<p><strong>FURTHER READING</strong></p>
<p><a href="http://www.xamuel.com/conic-sections-in-the-wild/">Conic Sections in the Wild</a><br />
<a href="http://www.xamuel.com/basic-mathematics-serge-lang/">&#8220;Basic Mathematics&#8221;, by Serge Lane (book review)</a><br />
<a href="http://www.xamuel.com/mathematical-maturity/">Mathematical Maturity</a><br />
<a href="http://www.xamuel.com/merlin-carothers/">Merlin Carothers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/blaise-pascal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Konig&#8217;s Lemma</title>
		<link>http://www.xamuel.com/konigs-lemma/</link>
		<comments>http://www.xamuel.com/konigs-lemma/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 23:03:20 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=1887</guid>
		<description><![CDATA[If you randomly start tracing down the family tree of mankind, you&#8217;ll probably reach a dead-end. But if you&#8217;re lucky you might avoid dead-ends forever and trace out an infinite chain of descendants. The likelihood of this depends on how prone humans are to spawn offspring: if everyone always has children, then you&#8217;ll get an [...]]]></description>
			<content:encoded><![CDATA[<p>If you randomly start tracing down the family tree of mankind, you&#8217;ll probably reach a dead-end.  But if you&#8217;re lucky you might avoid dead-ends forever and trace out an <i>infinite chain of descendants</i>.  The likelihood of this depends on how prone humans are to spawn offspring: if everyone always has children, then you&#8217;ll get an infinite chain guaranteed, but of course this isn&#8217;t how things are.  If mankind goes extinct then it&#8217;s impossible to get an infinite chain because after a certain generation everybody&#8217;s dead.  But what about the converse: is it possible there could be an alternate universe where mankind doesn&#8217;t go extinct, but contains no infinite chains?  The answer is no, and the proof uses a profound combinatorial result called Konig&#8217;s Lemma.</p>
<h3>Trees</h3>
<p>Mathematical trees are a bit more simplified than family trees.  A tree is a set of <i>nodes</i>.  One of the nodes is the <i>root</i>.  Every node except for the root has exactly one <i>parent</i>.  If node A is the parent of node B then node B is a <i>child</i> of node A.  The <i>descendants</i> of A are the children of A, together with their own children, and their grandchildren, and so on.  Loops are not allowed: a node is not allowed to be its own descendant.  And every node must be a descendant of the root (except for the root itself).</p>
<p>The difference between a mathematical tree and a family tree is, in the mathematical tree, people (nodes) only have one parent.  Essentially, the mathematical tree is a family tree for a species which reproduces asexually.  The reason for this is it&#8217;s a lot easier to prove things about asexual trees.  We&#8217;ll see below that the theorems we get for mathematical trees can often be tweaked for family trees, so nothing is really lost.</p>
<p>The <i>generations</i> of a tree are defined exactly how you&#8217;d think.  The first generation is the set consisting solely of the root.  The second generation is the set of children of the root; the third generation is the set of children of nodes in the second generation&#8230;  and in general, the (k+1)th generation is the set of children of nodes in the kth generation.  In the literature, a more common synonym for generation is <i>level</i>, and sometimes the counting starts at 0, so that the root is said to be at level 0 and its children at level 1.  &#8220;A rose by any other name&#8230;&#8221;</p>
<h2>Konig&#8217;s Lemma</h2>
<p>Let T be a tree.  If T is infinite but every generation is finite, then T contains an infinite descending chain of children.</p>
<p><b>Proof</b>.  We&#8217;ll construct an infinite chain n<sub>1</sub>n<sub>2</sub>n<sub>3</sub>&#8230; inductively in such a way that every n<sub>k+1</sub> is a child of n<sub>k</sub>.</p>
<p>First, let n<sub>1</sub> be the root of the tree.  Note that n<sub>1</sub> has infinitely many descendants, because the whole tree is infinite by assumption, and everything (except the root itself) is a descendant of the root.</p>
<p>Now, inductively, suppose we&#8217;ve defined n<sub>1</sub>n<sub>2</sub>&#8230;n<sub>k</sub>, each one a child of the previous, and such that n<sub>k</sub> has infinitely many descendants.  I&#8217;ll show how we can define n<sub>k+1</sub>, a child of n<sub>k</sub>, itself with infinitely many descendants.</p>
<p>Let c<sub>1</sub>,c<sub>2</sub>,&#8230;,c<sub>n</sub> be the children of n<sub>k</sub> (n<sub>k</sub> must have at least one child since it has infinitely many descendants).  I&#8217;m using the fact here that n<sub>k</sub> only has finitely many children, and that&#8217;s true by the assumption that every generation of T is finite (if n<sub>k</sub> had infinitely many children, that would make a whole infinite generation).</p>
<p>I claim that at least one of the c<sub>i</sub>&#8216;s has, itself, infinitely many descendants.  The proof is by contradiction:  assume c<sub>1</sub>,c<sub>2</sub>,&#8230;,c<sub>n</sub> each have only finitely many descendants.  Add finitely many finite numbers, and the result is finite: thus n<sub>k</sub> has only finitely many descendants-of-children.  Together with the finitely many children themselves, n<sub>k</sub> has only finitely many descendants.  But we assumed we&#8217;d chosen n<sub>k</sub> to have infinitely many descendants, so this is a contradiction, and my claim must be true.</p>
<p>So, take one of the c<sub>i</sub> with infinitely many descendants, and pick it as n<sub>k+1</sub>.</p>
<p>Inductively, this defines a whole infinite sequence n<sub>1</sub>n<sub>2</sub>&#8230; which goes on forever with each node the parent of the next.  In other words, an infinite descending chain of children. QED.</p>
<h2>Application to Family Trees</h2>
<p>In real life, people have two parents, not one.  We can convert mankind&#8217;s family tree into a mathematical tree by systematically erasing one parent from every mother-father pair.  For example, we could erase all females, and have each person count only as a descendant of their father: sort of like a medieval European throne-room.  Or we could ignore males, counting only mothers as parents, essentially treating males as anonymous protein donators: the feminist utopia.  We aren&#8217;t really erasing these people in real life, only erasing their names from the family tree, to turn it into a mathematical one.</p>
<p>Assume mankind never goes extinct: there is always an nth generation, for every n&gt;0 (see note 1).  Assume nobody has infinitely many children.</p>
<p>I claim there is an endless chain of people, each one a parent of the next: an infinite chain of progeny.</p>
<p>Proof:  Turn the family tree into a mathematical tree&#8211; say, by erasing females.  Now &#8220;parent&#8221; becomes synonymous with &#8220;father&#8221; (this might alter what generations people belong to, but the assumption that no father has infinitely many children, ensures the generations are still finite).  The &#8220;root&#8221; (which previously was the matriarch-patriarch pair) is now just the patriarch and the matriarch is banished.  The tree is infinite: otherwise, only finitely many generations would be witnessed.  By Konig&#8217;s Lemma, the tree has an infinite descending chain of children.  And this infinite chain of kids translates back into the original, non-mathematical family tree, completing the proof.</p>
<p>In fact, we proved something stronger than we needed:  not only is there an infinitely descending chain of children, but we can find such a chain which is <i>all male</i>.</p>
<p>Identical reasoning would also yield an infinite chain of children of <i>all female</i> gender:  instead of ignoring females, ignore males.</p>
<p>Here&#8217;s a challenge-question for the reader.  Is it true, that in every alternate universe where mankind never goes extinct, that you can always find an infinite chain of children which alternates male-female-male-female forever?</p>
<h2>Application to Games</h2>
<p>Suppose a game has infinitely many possible configurations&#8211; for example, a game of Chess on an infinite board.  But assume at any particular point in the game, there are only finitely many moves available&#8211; for example, infinite-board Chess with only finitely many pieces.  Then it is possible to play the game forever without ever hitting the same configuration twice.</p>
<p>(In the infinite chess game, this is obvious:  both players can simply move their rooks sideways forever and ever in the same direction.  But the application works for <i>all</i> games which meet the assumptions)</p>
<p>Proof:  Create a tree as follows.  Nodes correspond to configurations of the game.  The root is the initial configuration.  Now, inductively, for each node N we&#8217;ve already defined, N being a game configuration, and for each possible game configuration M, add M as a child of N if and only if two criteria are met:</p>
<ol>
<li>M hasn&#8217;t already been added to the tree yet</li>
<li>It&#8217;s possible to go from configuration N to configuration M in one move</li>
</ol>
<p>The fact that we assumed there are only finitely many legal moves at any given time, ensures that no node has infinitely many children; it follows that every generation is finite.  The tree itself is infinite: every one of the possible configurations can be reached by following a finite number of moves from the initial configuration&#8211; this is the definition of &#8220;possible&#8221;&#8211; and thus will be added as a child to the corresponding configuration right before it&#8211; assuming it hasn&#8217;t been added even earlier by some other series of moves.</p>
<p>By Konig&#8217;s Lemma, there is an infinite branch through this tree.  You can &#8220;play&#8221; this branch, because each configuration follows from the previous one by a legal move in the game (criteria 2).  You&#8217;ll never hit the same configuration twice, because criteria 1 ensures no configuration appears twice in the tree, hence in the infinite branch.  So the theorem is proved.</p>
<h2>The Nonconstructive Nature of Konig&#8217;s Lemma</h2>
<p>In the proof of Konig&#8217;s Lemma, we create an infinite branch inductively, using <em>reductio ad absurdum</em> at every step except the first.  A proof by contradiction, proving that some choice works, gives us no clue about <i>which</i> choice works.  In a sense, if we&#8217;re confused once by once proof by contradiction, then Konig confuses us infinitely often, and the infinite branch is <i>infinitely nonconstructive</i> (but this is handwavey and not actually a formal statement).</p>
<p>In some alternate universe, the root of mankind is named Adam and his sons are named Cain and Abel.  Konig assures us that at least <i>one</i> of Cain or Abel will have infinitely many descendants (or mankind will go extinct).  We have no idea <i>which one</i>.</p>
<p><b>Notes</b></p>
<p>1. In a non-mathematical family tree, &#8220;generation&#8221; isn&#8217;t very well-defined, because it&#8217;s possible for a person&#8217;s two parents to come from two different generations.  For the sake of making everything well-defined, you can say that a person whose mother and father are generation x and y, is generation max(x,y)+1.  Assume no John Connor time-travel paradoxes <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>2. The form I gave here is a special case of the full Konig&#8217;s Lemma, which is a statement about more general graphs which don&#8217;t have to be trees.</p>
<p><strong>FURTHER READING</strong></p>
<p><a href="http://www.xamuel.com/goodstein-sequences/">Goodstein Sequences</a><br />
<a href="http://www.xamuel.com/fixed-points-future-prediction/">Fixed Points and Future Prediction</a><br />
<a href="http://www.xamuel.com/exponential-games/">Exponential Games</a><br />
<a href="http://www.xamuel.com/guessability/">Guessability</a><br />
<a href="http://www.xamuel.com/the-higher-infinite/">The Higher Infinite</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/konigs-lemma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New:  An RSS feed for the webcomic</title>
		<link>http://www.xamuel.com/webcomic-gets-rss/</link>
		<comments>http://www.xamuel.com/webcomic-gets-rss/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 04:43:05 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=1743</guid>
		<description><![CDATA[I finally coded an RSS feed for my webcomic! The feed is here: Xamuel.com Webcomic. You can use that to subscribe in Google Reader or whatever reader you prefer In case you&#8217;ve missed them, here are the comics so far: Define The Universe (NEW! Just published it minutes before publishing this post!) Casino Naturale (Thursday, [...]]]></description>
			<content:encoded><![CDATA[<p>I finally coded an RSS feed for my webcomic!  The feed is here:  <a href="http://www.xamuel.com/comic-feed/">Xamuel.com Webcomic</a>.  You can use that to subscribe in Google Reader or whatever reader you prefer <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In case you&#8217;ve missed them, here are the comics so far:</p>
<p><a href="http://www.xamuel.com/define-the-universe/">Define The Universe</a>  (NEW!  Just published it minutes before publishing this post!)<br />
<a href="http://www.xamuel.com/casino-naturale/">Casino Naturale</a> (Thursday, March 25, 2010)<br />
<a href="http://www.xamuel.com/then-i-met-you/">Solipsism, And Then I Met You</a> (Monday, March 15, 2010)<br />
<a href="http://www.xamuel.com/emergency-webcomic-system/">A Test of the Emergency Webcomic System</a> (Sunday, March 14, 2010)</p>
<p>Could this be the beginning of the world&#8217;s next greatest webcomic??  Critics say it just might be!*</p>
<p>*Critics include the author, his girlfriend, and his mom <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>Automating the RSS Protocol</h3>
<p>Being the unscrupulous hacker that I am, I quickly decided the official RSS protocol specs were tl;dr&#8211; &#8220;Too Long, Don&#8217;t Read&#8221;.  So instead I just mimicked the article RSS feed generated by WordPress.  The process ended up being pretty easy.  I&#8217;ve been thinking about possible ways to revolutionize RSS in general.  An institution such as Xamuel.com needn&#8217;t limit the number of feeds it offers.  I could offer specialized feeds for just my math content, just my personal development content, and so on for all the other categories, in addition to the main feed which covers them all.  It&#8217;s something to think of and put on &#8220;to do, maybe&#8221; list&#8211; right next to a bajillion other projects <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Anyway, help spread the word about the webcomic <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Send me feedback and ideas for future strips <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>FURTHER READING</strong></p>
<p><a href="http://www.xamuel.com/webcomic-announcement/">Announcing: Webcomic!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/webcomic-gets-rss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Host-Switching:  From Bluehost to Linode</title>
		<link>http://www.xamuel.com/bluehost-to-linode/</link>
		<comments>http://www.xamuel.com/bluehost-to-linode/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 22:17:35 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=1682</guid>
		<description><![CDATA[During the past week, I switched hosts from Bluehost to Linode. I liked Bluehost, but I outgrew them. My Inverse Graphing Calculator was &#8220;too popular&#8221; for them. They froze it, and I had to adjust it to text-only mode before they&#8217;d unfreeze it. I can understand that&#8211; a cheap, shared host plan isn&#8217;t really intended [...]]]></description>
			<content:encoded><![CDATA[<p>During the past week, I switched hosts from Bluehost to Linode.  I liked Bluehost, but I outgrew them.  My <a href="http://www.xamuel.com/inverse-graphing-calculator.php">Inverse Graphing Calculator</a> was &#8220;too popular&#8221; for them.  They froze it, and I had to adjust it to text-only mode before they&#8217;d unfreeze it.  I can understand that&#8211;  a cheap, shared host plan isn&#8217;t really intended for the tens of thousands of visitors the calculator draws in.  What was pretty inexcusable is the fact they didn&#8217;t call me, or even e-mail me, about freezing my site.  If I hadn&#8217;t checked it, it could&#8217;ve stayed down indefinitely.</p>
<p>I bought a Virtual Private Server (VPS) from Linode.  I had to take a crash-course in setting up a Linux box.  Whereas Bluehost set everything up for me, Linode came bare-bones.  I got to choose a version of Linux&#8211; I went with Ubuntu for now&#8211; and then I was on my own.  I had to actually install and set up Apache, PHP, and MySQL.  But it&#8217;s not as bad as it sounds.  It turns out it&#8217;s extremely easy to install standard software on Linux&#8211; usually as simple as typing a single command.  I learned a <i>ton</i> about how servers and the internet work.  I was happy at Bluehost while I was there, but looking back with the knowledge I gained just this week, it seems like I was stuck in a tiny fishbowl.</p>
<p>Hosts are a lot like fish bowls.  If you stay in a goldfish bowl, you&#8217;ll never grow beyond being a goldfish.  To be a shark or a killer whale, you&#8217;ve gotta move your way toward the ocean.  I was a little uneasy about making the switch to a stronger host, because the price increased by about a factor of three.  But in a hundred years, I&#8217;ll be dead and gone&#8211; it doesn&#8217;t matter at all how much money I could save by being a miser.  If a faster box lets me create just 1% more content of enduring quality, then it&#8217;s worth the additional price.</p>
<p>This website began on Blogspot, where I had virtually no control of anything.  From Blogspot, I moved to Bluehost, which was a quantum leap at the time.  I outgrew Bluehost a lot faster than I expected, and now I&#8217;m on a VPS, installing Linux applications from scratch.  So what&#8217;s gonna be next?  At this rate, in a couple years I&#8217;m going to be programming my own operating system in raw machine code!  <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>FURTHER READING</strong></p>
<p><a href="http://www.xamuel.com/moving-from-blogspot-to-wordpress/">Moving From Blogspot To WordPress</a><br />
<a href="http://www.xamuel.com/become-more-intelligent/">Become More Intelligent by Doing New Things</a><br />
<a href="http://www.xamuel.com/computer-programming-experience/">My Experience with Computer Programming</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/bluehost-to-linode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing: The Romaji Dictionary</title>
		<link>http://www.xamuel.com/new-romaji-dictionary/</link>
		<comments>http://www.xamuel.com/new-romaji-dictionary/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:13:01 +0000</pubDate>
		<dc:creator>Sam Alexander</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.xamuel.com/blog/?p=1677</guid>
		<description><![CDATA[Announcing the newest project: The Romaji Dictionary Long term readers will recognize this project as one I started almost a year ago. Back then, I had no idea what I was doing. I wrote a giant C program from bare principles to parse the EDict&#8217;s XML file&#8211; a major case of Reinventing The Wheel! After [...]]]></description>
			<content:encoded><![CDATA[<p>Announcing the newest project:  <a href="http://romaji-dictionary.xamuel.com">The Romaji Dictionary</a></p>
<p>Long term readers will recognize this project as one I started almost a year ago.  Back then, I had no idea what I was doing.  I wrote a giant C program from bare principles to parse the EDict&#8217;s XML file&#8211; a major case of <a href="http://www.xamuel.com/reinventing-the-wheel/">Reinventing The Wheel</a>!  After all that effort, only then did I learn that web servers aren&#8217;t too thrilled about hosting hundreds of thousands of individual physical files! <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />   So then I learned about these things called &#8220;databases&#8221; and &#8220;php&#8221;, and that&#8217;s where the project died a quiet death&#8211; until now.</p>
<p>If my inner programmer today went back in time and encountered my inner programmer of one year ago, the 2010 one would beat up the 2009 one and steal all his lunch money.  This is to say, I&#8217;ve learned a lot in the past year.  Not that I&#8217;m anywhere near an expert&#8211;  I&#8217;m still discovering new things about PHP and SQL every day.  But at least now I can whip up a decent dictionary without going and making a mess of the file system <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So it&#8217;s with belated pride that I give you:  <a href="http://romaji-dictionary.xamuel.com">The Romaji Dictionary</a>.</p>
<p>But what makes this one any better than the dozens of competitors?  The answer is: attention to romanization systems.</p>
<p>Fun trivia fact of the day:  of the existing online Romaji->English dictionaries besides mine, all are missing a certain word you might&#8217;ve heard before:  &#8220;Tokyo&#8221;.  That&#8217;s because &#8220;Tokyo&#8221; is actually an irregular sort of romanization.  A more accurate transliteration would be &#8220;Toukyou&#8221; or &#8220;Tōkyō&#8221;.  The Xamuel.com Romaji Dictionary has all three, and more.  Look up &#8220;Tokyo&#8221; and you&#8217;ll see it classified as &#8220;Wapuro-Romaji (long o shortened)&#8221;.  Look up &#8220;Tōkyō&#8221; and you&#8217;ll see it classified as &#8220;Traditional or Revised Hepburn&#8221;.  Look up &#8220;bonsai&#8221; and you&#8217;ll see it classified as &#8220;All Shiki Romanization Systems&#8221;, meaning you get it using either Nihon-Shiki or Kunrei-Shiki.</p>
<p>In the future, I&#8217;m going to make it so each entry links to the entries corresponding to other transliteration systems, so that the project will effectively double as an &#8220;inter-romanization converter&#8221;.  UPDATE:  And, that&#8217;s done.  Now the dictionary serves as a fun way to see the different possible spellings of Japanese words <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Yay <img src='http://www.xamuel.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Hope you enjoy all these delicious Japanese words!!</p>
<p><a href="http://romaji-dictionary.xamuel.com">The Romaji Dictionary</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xamuel.com/new-romaji-dictionary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
