<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.2" -->
<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/"
>

<channel>
	<title>bit-player</title>
	<link>http://bit-player.org</link>
	<description>An amateur's outlook on computation and mathematics.</description>
	<image>
	<link>http://bit-player.org/</link>
	<url>http://bit-player.org/wp-content/spongeicon.gif</url>
	<title>bit-player</title>
	</image>
	<pubDate>Thu, 15 May 2008 06:36:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>
	<language>en</language>

		<item>
		<title>Electoral rehex</title>
		<link>http://bit-player.org/2008/electoral-rehex</link>
		<comments>http://bit-player.org/2008/electoral-rehex#comments</comments>
		<pubDate>Thu, 15 May 2008 06:36:39 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>games</category>
		<guid>http://bit-player.org/2008/electoral-rehex</guid>
		<description><![CDATA[	A few weeks ago I playfully suggested that the Democratic nominee for POTUS might be selected this year by a game of hex played on the map of the lower 48 states. I emphasize the word &#8220;playfully.&#8221; This was not a serious suggestion. But life has a way of overtaking us, even in our most [...]]]></description>
			<content:encoded><![CDATA[	<p>A few weeks ago I <a href="http://bit-player.org/2008/electoral-hex">playfully suggested</a> that the Democratic nominee for POTUS might be selected this year by a game of hex played on the map of the <a href="http://bit-player.org/2008/the-lower-48-graph">lower 48 states</a>. I emphasize the word &#8220;playfully.&#8221; This was <em>not</em> a serious suggestion. But life has a way of overtaking us, even in our most frivolous moments. As the primary season now spirals down to the last bitter dregs, the nomination remains undecided, and so does the game of electoral hex.</p>
	<p>The goal in this version of hex is to assemble a continuous chain of states that spans the country either east to west or north to south (or both). As the map below shows, both candidates are tantalizingly close to this goal, but neither has actually achieved it. The recent round of voting in North Carolina and Indiana, and then yesterday&#8217;s result in West Virginia, failed to clinch it.</p>
	<div style="text-align:center;"><img src="/wp-content//primarymapmay.png" alt="primarymapmay.png" border="0" width="450" height="296" /></div>
	<p>But it will all be over soon. Kentucky is the key. The nomination may or may not be settled after that state&#8217;s primary election next Tuesday, but the game of hex will surely be decided, one way or the other. Whichever candidate wins Kentucky will form both east-west and north-south chains, and his or her opponent will be shut out from creating either kind of chain.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/electoral-rehex/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>The problem of describing trees</title>
		<link>http://bit-player.org/2008/the-problem-of-describing-trees</link>
		<comments>http://bit-player.org/2008/the-problem-of-describing-trees#comments</comments>
		<pubDate>Thu, 01 May 2008 01:03:57 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>mathematics</category>
	<category>computing</category>
		<guid>http://bit-player.org/2008/the-problem-of-describing-trees</guid>
		<description><![CDATA[	When I finished writing about the Zeno wagering game recently, I had some trees left over, so I thought I would try planting them here. 
	In the Zeno article I was trying to understand and explain the structure of this peculiar-looking tree, which I&#8217;ll call the tangled tree:
	
	As a warmup exercise, I started out with [...]]]></description>
			<content:encoded><![CDATA[	<p>When I finished writing about the <a href="http://www.americanscientist.org/AssetDetail/assetid/57038">Zeno wagering game</a> recently, I had some trees left over, so I thought I would try planting them here. </p>
	<p>In the Zeno article I was trying to understand and explain the structure of this peculiar-looking tree, which I&#8217;ll call the tangled tree:</p>
	<div style="text-align:center;"><img src="/wp-content//zenotree.jpg" alt="zenotree.jpg" border="0" width="450" height="232" /></div>
	<p>As a warmup exercise, I started out with this simpler example, the combed tree:</p>
	<div style="text-align:center;"><img src="/wp-content//binarytree.jpg" alt="binarytree.jpg" border="0" width="450" height="232" /></div>
	<p>These are both binary trees: Each node has exactly two descendants. And the trees also share a basic internal symmetry. In both structures, if a node has horizontal coordinate <em>x</em>, the two descendant nodes are symmetrically arrayed at <em>x-d</em> and <em>x+d</em>. The difference between the two trees is all in how the displacement distance <em>d</em> is calculated. In the combed tree, <em>d</em> has the initial value 1/4 at the root node, and it is reduced by half at each lower level of the tree. In the tangled tree, the formula is <em>d</em> = 1/2 min(<em>x</em>, 1-<em>x</em>). In other words, <em>d</em> is half the distance to the nearer boundary of the interval [0,1].</p>
	<p>There was a third tree I didn&#8217;t have room to include in the article. I had stumbled upon it when I made a programming error. This rogue structure looks like this, and I&#8217;m calling it the braided tree:</p>
	<div style="text-align:center;"><img src="/wp-content//crosstree.jpg" alt="crosstree.jpg" border="0" width="450" height="236" /></div>
	<p>The nature of my programming error is not hard to see. Intending to generate the tangled tree, I had meant to calculate the positions of the child nodes as follows:</p>
	<pre>
      left = x - 1/2 min(x, 1 - x)
      right = x + 1/2 min(x, 1 - x)</pre>
	<p>But instead I carelessly wrote:</p>
	<pre>
      left = x - 1/2 x
      right = x + 1/2 (1 - x)</pre>
	<p>Stupid goof, but the result is visually intriguing. And although the braided tree is a botched version of the tangled tree, it actually has a lot in common with the combed tree. In particular, both the combed and the braided trees have exactly the same set of nodes; the difference is that those nodes are wired differently.</p>
	<p>One way to understand the difference is to look at the paths leading from the root to any given node. Each such path is a sequence of left and right turns. For example, in the combed tree you can get from the root to the node at x = 3/16 by turning left at the root, then left again at 1/4 and finally right at 1/8. In the braided tree the path to 3/16 goes right to 3/4 then left to 3/8 and left to 3/16. Paths of this kind can be encoded as binary numerals, letting a 0 stand for each left turn and a 1 for each right turn. In this scheme the two paths described above are 001 and 100. </p>
	<p>In essence, the braided tree is a permutation of the combed tree. If you list all the nodes at some fixed level in the combed tree (say those three levels below the root, where all denominators are 16), then the corresponding paths are in numerical order:</p>
	<pre>
    1/16    000    (0)
    3/16    001    (1)
    5/16    010    (2)
    7/16    011    (3)
    9/16    100    (4)
   11/16    101    (5)
   13/16    110    (6)
   15/16    111    (7)
</pre>
	<p>Here&#8217;s the corresponding tabulation for the braided tree:</p>
	<pre>
    1/16    000    (0)
    3/16    100    (4)
    5/16    010    (2)
    7/16    110    (6)
    9/16    001    (1)
   11/16    101    (5)
   13/16    011    (3)
   15/16    111    (7)
</pre>
	<p>The order is &#8220;counting from the left,&#8221; incrementing the most significant bit first. I wonder what other permutations give interesting-looking trees.</p>
	<p>Turning back to the tangled tree that began this whole investigation, I would argue that it looks tangled and unruly not so much because lots of edges cross (there are even more crossings in the braided tree) but because of many near collisions and coincidences. For example, just below the root of the tangled tree, the mirror-image paths &lt;left-right-right&gt; and &lt;right-left-left&gt; almost converge on the same value, but they miss by just a bit. We can fix this! All it takes is an adjustment in the formula for the displacement <em>d</em>. In the tangled tree that displacement is 1/2 min(<em>x</em>, 1-<em>x</em>). The constant 1/2 in this expression is quite arbitrary, and we can substitute any other value <em>a</em>, with 0 &lt; <em>a</em> &lt; 1. </p>
	<p>So what is the magic value of <em>a</em> in the following tree, which I am inclined to call the crocheted tree?</p>
	<div style="text-align:center;"><img src="/wp-content//phitree.jpg" alt="phitree.jpg" border="0" width="450" height="235" /></div>
	<p>Note: If the title of this post fails to ring a bell, see <a href="http://dphddt.eebloggers.net/?p=23">the poem by Robert Hass</a>:</p>
	<blockquote><p>The gene pool threw up a wobbly stem<br />
And the tree danced. No.<br />
The tree capitalized.<br />
No. There are limits to saying,<br />
In language, what the tree did.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/the-problem-of-describing-trees/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>The temblor forecast</title>
		<link>http://bit-player.org/2008/the-temblor-forecast</link>
		<comments>http://bit-player.org/2008/the-temblor-forecast#comments</comments>
		<pubDate>Tue, 15 Apr 2008 16:13:46 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>science</category>
	<category>statistics</category>
		<guid>http://bit-player.org/2008/the-temblor-forecast</guid>
		<description><![CDATA[	From the Associated Press, via the New York Times:
	
LOS ANGELES (AP) &#8212; California faces an almost certain risk of being rocked by a strong earthquake by 2037, scientists said in the first statewide temblor forecast.
	New calculations reveal there is a 99.7 percent chance a magnitude 6.7 quake or larger will strike in the next 30 [...]]]></description>
			<content:encoded><![CDATA[	<p>From <a href="http://www.nytimes.com/aponline/us/AP-California-Quakes.html">the Associated Press</a>, via the <em>New York Times</em>:</p>
	<blockquote><p>
LOS ANGELES (AP) &#8212; California faces an almost certain risk of being rocked by a strong earthquake by 2037, scientists said in the first statewide temblor forecast.</p>
	<p>New calculations reveal there is a 99.7 percent chance a magnitude 6.7 quake or larger will strike in the next 30 years. The odds of such an event are higher in Southern California than Northern California, 97 percent versus 93 percent.
</p></blockquote>
	<p><img class="alignright" src="/wp-content//caquake.jpg" alt="caquake.jpg" border="0" width="200" height="239" /></p>
	<p>I read this report with a certain sense of wonder. What impressed me was not the prediction itself; it&#8217;s not the first time I&#8217;ve heard that the Big One is coming. What took me by surprise was the level of mathematical sophistication that we can now take for granted in readers of the morning newspaper. No more do we have to worry that people will add up 97 percent and 93 percent to get 190 percent. Evidently, we&#8217;ve reached a state of universal numeracy, where everyone knows how to combine probabilities, and there&#8217;s no need to explain the calculation. We don&#8217;t even need to remind anyone that when we compute 1 &ndash; (1 &ndash; <em>p</em>)(1 &ndash; <em>q</em>), or <em>p</em> + <em>q</em> &ndash; <em>pq</em>, we are assuming that <em>p</em> and <em>q</em> represent probabilities of <em>statistically independent</em> events; everybody knows that. And everybody understands that in this context &#8220;a chance of a quake&#8221; really means &#8220;a chance of at least one quake.&#8221;</p>
	<p>I guess the only place where we might still stumble is in actually doing the arithmetic. My calculator tells me the number is 99.8 percent, not 99.7.</p>
	<p>A further note: The <a href="http://pubs.usgs.gov/of/2007/1437/">original report</a> on which the news item is based leaves me even more perplexed. The probability model adopted in the forecast is explained as follows:</p>
	<blockquote><p>
The simplest assumption is that earthquakes occur randomly in time at a constant rate; i.e., they obey Poisson statistics. This model, which is used in constructing the national seismic hazard maps, is &ldquo;time independent&rdquo; in the sense that the probability of each earthquake rupture is completely independent of the timing of all others. Here we depart from the&#8230; conventions by considering &#8220;time-dependent&#8221; earthquake rupture forecasts that condition the event probabilities&#8230; on the date of the last major rupture. Such models&#8230; are motivated by the elastic rebound theory of the earthquake cycle&#8230;; they are based on stress-renewal models, in which probabilities drop immediately after a large earthquake releases tectonic stress on a fault and rise as the stress re-accumulates due to constant tectonic loading of the fault.
</p></blockquote>
	<p>In other words, it doesn&#8217;t sound as though the assumption of independence is even approximately satisfied. I must be missing something. The 99.7 percent combined probability is mentioned in the executive summary of the report, but I found no explanation of how that number was calculated. </p>
	<p>Perhaps I shouldn&#8217;t worry so much. I live thousands of kilometers away in a zone of seismic serenity.</p>
	<p><strong>Update, several hours later</strong>: After reading a little more carefully, I think the report <em>does</em> assume that all possible earthquake sites are independent. At each site the probability of an event is a function of time, but it is independent of probabilities at other sites. Thus calculating a joint probability for the northern and southern parts of the state does seem to be a valid operation. And the distinction between &#8220;exactly one&#8221; and &#8220;at least one&#8221; doesn&#8217;t really enter into the matter either. That&#8217;s because the model is only valid until the next major earthquake occurs; after that, all bets are off, since the time-dependent probabilities have to be recalculated.</p>
	<p>If this interpretation of the model is correct, I think the way the result is expressed is somewhat misleading. To say there&#8217;s a 97 percent chance in Socal and a 93-percent chance in Nocal implies there&#8217;s a high probability (90.2 percent) of seeing <em>both</em> events in the course of the 30-year period. But the model is no longer valid after the first quake.</p>
	<p>I wonder if there isn&#8217;t a better way to express the concept at the heart of this story. Qualitatively, it&#8217;s easy enough to grasp: In the next 30 years there will almost certainly be a major earthquake somewhere in California, and the event is more likely to happen in the southern part of the state than in the northern part. Putting this into numbers is somewhat tricky&mdash;or at least I&#8217;ve had a lot of trouble with it. Having finally surrendered to the computer and performed a Monte Carlo simulation, I come up with this statement: There&#8217;s a 99.8 percent chance that the next major California earthquake will happen by 2037. If indeed such a quake occurs, the odds are about 57 to 43 it will hit in Southern California.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/the-temblor-forecast/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>In Zeno&#8217;s footsteps</title>
		<link>http://bit-player.org/2008/in-zenos-footsteps</link>
		<comments>http://bit-player.org/2008/in-zenos-footsteps#comments</comments>
		<pubDate>Thu, 10 Apr 2008 22:01:12 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>mathematics</category>
	<category>computing</category>
		<guid>http://bit-player.org/2008/in-zenos-footsteps</guid>
		<description><![CDATA[	The latest issue of American Scientist is just out, both on the newsstand and on the web. My &#8220;Computing Science&#8221; column is titled &#8220;Wagering with Zeno&#8221;; it returns to a subject mentioned briefly in an earlier column, &#8220;Follow the Money.&#8221; 
	Consider a random walk on the interval (0,1), where the walker moves according to these [...]]]></description>
			<content:encoded><![CDATA[	<p>The latest issue of <em>American Scientist</em> is just out, both on the newsstand and <a href="http://www.americanscientist.org/IssueTOC/issue/1081">on the web</a>. My <a href="http://www.americanscientist.org/AssetDetail/assetid/57038">&#8220;Computing Science&#8221; column</a> is titled &#8220;Wagering with Zeno&#8221;; it returns to a subject mentioned briefly in an earlier column, &#8220;<a href="http://www.americanscientist.org/AssetDetail/assetid/14769">Follow the Money</a>.&#8221; </p>
	<p>Consider a random walk on the interval (0,1), where the walker moves according to these rules:</p>
	<ul>
	<li>The walker begins at <em>x</em> = 1/2.</li>
	<li>At each step the walker moves either left (toward 0) or right (toward 1) with equal probability.</li>
	<li>The length of each step is one-half the distance to 0 or to 1, whichever is nearer. In other words, the distance moved is 1/2 <em>min</em>(<em>x</em>, 1&ndash;<em>x</em>).</li>
	</ul>
	<p>If you want to know more about this process and why I bothered to write about it, please see the column. Here I just want to say a few words about visual aids that might be helpful in understanding how the random walk evolves and where the walker is likely to wind up.</p>
	<p>Here is one of the illustrations that appears in the column:</p>
	<p><img src="/wp-content//Zenopaths450.jpg" alt="four trajectories of the Zeno walk, each plotted for 10 steps" border="0" width="450" height="233" /></p>
	<p>We see four trajectories, each lasting 10 steps. Although the walk is actually one-dimensional&mdash;moving back and forth along an interval of the <em>x</em> axis&mdash;the trajectories are plotted in two dimensions for clarity, moving down the page so that the illustration becomes a kind of discrete spacetime diagram. Even with this device, though, some of the paths overlap for part of their course. If I tried to crowd more trajectories into the figure, the overlaps would make it hard to sort out one walk from another.</p>
	<p>In making pictures like this, the issue is not just how you explain an experiment to other people; it&#8217;s also a matter of how you come to understand the process yourself. While I was trying to make sense of the Zeno walk, I plotted lots of trajectories like these, initially by hand and then with a program that generated Postscript files. Some important features were quickly apparent. In particular, I noticed that the walker takes much bigger strides in the middle of the space than near the edges. (Of course this fact follows directly from the definition of the walk, but it doesn&#8217;t hurt to see a picture.) I also observed that most of the walks seem to spend most of their time hugging one edge or the other, seldom venturing back across the midline of the space. Even after looking at a few hundred examples, however, I didn&#8217;t feel like I had a really secure sense of how a &#8220;typical&#8221; walk would proceed.</p>
	<p>As with many processes that evolve over time, the illustrative possibilities are much richer if we can escape the static bounds of ink on paper. And thus I was led to try creating a more dynamic and interactive display.</p>
	<p><img src="/wp-content//appletscreen.png" alt="screen image of zenowalk applet" border="0" width="450" height="489" /></p>
	<p>What you see above is <em>not</em> dynamic; it&#8217;s merely static pixels on glass. But you can see it all in action in this <strong><a href="http://bit-player.org/wp-content/Zenowalk/zenowalk.html">Java applet</a></strong>. Feel free to click on the link and go play, but do come back here afterward so we can continue the conversation.</p>
	<p>Hello again.</p>
	<p>Does this program succeed in conveying an intuitive sense of how the Zeno walker walks? Personally, I&#8217;ve found it helpful, although it still comes up far short of ideal. Adjusting the number of steps in each walk gives a sense of how the walker&#8217;s apparent attraction to the edges gets more extreme over time. And adjusting the rate at which paths fade into the background allows for a degree of balance between clutter and evanescence. But there may well be a better way to go about visualizing these concepts. I&#8217;d be interested in hearing suggestions.</p>
	<p>A note on the implementation: The applet was created with the programming language called <a href="http://processing.org/">Processing</a>, invented by Ben Fry and Casey Reas. I&#8217;ve just <a href="http://www.americanscientist.org/BookReviewTypeDetail/assetid/57119">reviewed two books</a> on Processing, and so this project was undertaken partly to try out the language and its programming environment. I found it very slick, and mostly trouble-free. The source code of the zenowalk program is available  through a link on the applet page. (Most of the code for the buttons and sliders was cribbed from the book by Fry and Reas.)</p>
	<p>Of course there&#8217;s always <em>something</em> lacking in any programming language. In this case what I missed most acutely was the exact rational arithmetic I rely on in Lisp. Processing has only single-precision floating-point numbers. In the Zeno walk, these numbers begin running out of significant digits after about 150 steps (which is why I limited the program to 145 steps). As far as I can tell, no one has yet written a Processing library for bignums and exact rationals. I guess that&#8217;s my job.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/in-zenos-footsteps/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Hard covers</title>
		<link>http://bit-player.org/2008/hard-covers</link>
		<comments>http://bit-player.org/2008/hard-covers#comments</comments>
		<pubDate>Fri, 04 Apr 2008 01:14:11 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>books</category>
		<guid>http://bit-player.org/2008/hard-covers</guid>
		<description><![CDATA[	My new book has come out this week: Group Theory in the Bedroom, and Other Mathematical Diversions, Hill and Wang, xi+269 pages, $25. ISBN-10: 0-8090-5219-9, ISBN-13: 978-0-8090-5219-9, Library of Congress Call Number: T185.H39 2008. 
	This is a collection of essays on themes that will be familiar to many readers of bit-player.org. Indeed, the essays themselves [...]]]></description>
			<content:encoded><![CDATA[	<p>My new book has come out this week: <em>Group Theory in the Bedroom, and Other Mathematical Diversions</em>, Hill and Wang, xi+269 pages, $25. ISBN-10: 0-8090-5219-9, ISBN-13: 978-0-8090-5219-9, Library of Congress Call Number: T185.H39 2008. </p>
	<p><img class="alignright" src="/wp-content//GTiBcover200.jpg" alt="GTiBcover200.jpg" border="0" width="200" height="295" />This is a collection of essays on themes that will be familiar to many readers of bit-player.org. Indeed, the essays themselves may be familiar! Eleven of the twelve essays appeared earlier as &#8220;Computing Science&#8221; columns in <em>American Scientist</em>; the twelfth was published in <em>The Sciences</em>. But there is <em>some</em> new material: Appended to each chapter is an &#8220;Afterthoughts&#8221; section where I confess to errors, castigate critics, bring outmoded notions up to date, and generally try to offer readers some excuse for selling them a $25 book, when they could find most of the content free on the web.</p>
	<p>The book has its <a href="http://grouptheoryinthebedroom.com">own handsome web site</a> (I was lucky to snap up the domain name &#8220;grouptheoryinthebedroom.com&#8221; before some speculator squatted on it). I cordially invite all of you to go over there and have a look around. Meanwhile, back here at bit-player HQ, I&#8217;m going to throw myself a little party. See you in a day or two.</p>
	<pre>
<div class=\"poetry\">
   &rsquo;Tis pleasant, sure, to see one&rsquo;s name in print;
    A book&rsquo;s a book, although there&rsquo;s nothing in&rsquo;t.
                                      &mdash;Lord Byron
	</div>
	</pre>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/hard-covers/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>The Lower 48 graph</title>
		<link>http://bit-player.org/2008/the-lower-48-graph</link>
		<comments>http://bit-player.org/2008/the-lower-48-graph#comments</comments>
		<pubDate>Sat, 15 Mar 2008 00:27:56 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>mathematics</category>
	<category>games</category>
		<guid>http://bit-player.org/2008/the-lower-48-graph</guid>
		<description><![CDATA[	The interesting thread of comments on Wednesday&#8217;s post about &#8220;electoral hex&#8221; led me to look more closely at the graph for the Lower 48 states:
	
	I&#8217;ve constructed the graph&#8212;and it wasn&#8217;t easy, by the way&#8212;on the rule that two states are linked by an edge if they share a common boundary of more than one point. [...]]]></description>
			<content:encoded><![CDATA[	<p>The interesting thread of comments on <a href="http://bit-player.org/2008/electoral-hex">Wednesday&#8217;s post about &#8220;electoral hex&#8221;</a> led me to look more closely at the graph for the Lower 48 states:</p>
	<div style="text-align:center;"><img src="/wp-content//lower48.png" alt="lower48.png" border="0" width="434" height="337" /></div>
	<p>I&#8217;ve constructed the graph&mdash;and it wasn&#8217;t easy, by the way&mdash;on the rule that two states are linked by an edge if they share a common boundary of more than one point. National boundaries are determined in the same way. Nodes half-shaded orange are east coast or west coast states; those half-shaded blue are north coast or south coast states. Underwater boundaries count in this scheme. Thus, for example, Illinois is adjacent to Michigan because there&#8217;s a section of boundary line between them in the middle of Lake Michigan. Similarly, Wisconsin is <em>not</em> a north coast state, even though it abuts Lake Superior, because it has no shared boundary with Canada.</p>
	<p>Some properties of the graph:</p>
	<ul>
	<li>It has 48 vertices (no surprise!), 107 edges, and 60 faces (excluding the outer, embedding, face).</li>
	<li>It&#8217;s a planar graph (again no surprise).</li>
	<li>All but one of the faces are triangles. The exception is a quadrilateral formed by the Four Corners states.</li>
	<li>The degree sequence runs: 8 8 7 6 6 6 6 6 6 6 6 6 6 5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 2 2 2 2 1. (The two octopus states are Missouri and Tennessee. The singleton is Maine.)</li>
	<li>The diameter is 11, and the characteristic path length (the length of the shortest path between two vertices, averaged over all pairs of vertices) is 4.1.</li>
	</ul>
	<p>What about playing hex on this graph? In standard hex, one player tries to connect east to west, and the other player has to find a path from north to south. Those rules would hardly be fair with such an asymmetrical graph. So let&#8217;s adopt a modified version of the rules that I suggested for the political primaries: The players take turns, and the first to create a pathway either from north to south or from east to west is the winner. (Barry Cipra suggested that we call this the game of pox.)</p>
	<p>Is the game a sure win for either the first or the second player (assuming correct play on both sides)? If so, what&#8217;s the right opening move?</p>
	<p>It&#8217;s easy to find some really <em>bad</em> moves. As Paul Zorn noted, the New England states are not worth bothering with, because they&#8217;re sealed off by New York. But it turns out New York is not a very smart choice either. (If you take New York, I take Pennsylvania; then, if you want to get anywhere, you have to win all three of New Jersey, Delaware and Maryland, which gives me three chances to block you.)</p>
	<p>The shortest bridging paths are along the I-5 and I-15 corridors, out west. In particular, there are five ways to construct a path of length 3 from north-to-south with the states WA, OR, CA, ID, NV, UT, AZ. But I don&#8217;t believe there&#8217;s any way a player can <em>force</em> a win using these states alone.</p>
	<p>In hex, the best opening moves are generally near the middle of the board. The analogous pox strategy would choose one of the central and highly connected states such as MO, TN or KY. This seems sensible, but the games are too complicated to work out by hand.</p>
	<p>On a regular 7 &times; 7 board, hex has been fully solved: The entire game tree is known for every possible opening move, so that each cell of the board is classified as a win or a loss for the first player. (This <a href="http://www.cs.ualberta.ca/~hayward/hex7trees/">impressive feat</a> of analysis and computation was done by R. Hayward, Y. Bj&ouml;rnsson, M. Johanson, M. Kan, N. Po and J. van Rijswijck of the University of Alberta.) The Lower 48 graph is roughly the same size as the 7 &times; 7 hex board, so a similar method would presumably be feasible. Feasible but not easy.</p>
	<p>Another question is whether the game can end without a winner. Jim Ward asked about this in the comments to the previous post, but I didn&#8217;t really understand the full force of the question. In the game of presidential primaries&mdash;where elections can occur simultaneously in multiple states&mdash;two or more winning paths could be created at the same time. Enforcing a strict alternating-turns policy, as I&#8217;m assuming here, eliminates that problem. But there&#8217;s another way the game might possibly fail to yield a winner, namely if all the states are chosen but there&#8217;s still no path along either axis. </p>
	<p>In hex it&#8217;s easy to show that no such drawn game is possible. You can block the progress of a north-south path only by completing an east-west path. Hex is played on a regular and symmetrical lattice whose structure is equivalent to this graph:</p>
	<div style="text-align:center;"><img src="/wp-content//hexfrag.png" alt="hexfrag.png" border="0" width="100" height="107" /></div>
	<p>The graph of the Lower 48 is not quite so uniform. The diagonals don&#8217;t all go the same way, and there&#8217;s that quadrilateral with <em>no</em> diagonal at the Four Corners. Does that feature (or some other oddity of the graph) allow all the states to be divided into two categories without creating either a north-south or an east-west path? I don&#8217;t think so; I haven&#8217;t been able to find such an assignment. But I&#8217;m not quite sure it can&#8217;t exist.</p>
	<p><strong>Update 2008-03-17</strong>: By popular request, I&#8217;ve posted a <a href="http://bit-player.org/wp-content/Lower48/lower48.pdf">PDF version</a> of the lower-48 graph and a <a href="http://bit-player.org/wp-content/Lower48/lower48.txt">text file</a> with the vertex list and edge list. The vertex and edge lists actually take the form of a Scheme definition, but the semantics should be obvious and translation to other formats should be straightforward.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/the-lower-48-graph/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Electoral hex</title>
		<link>http://bit-player.org/2008/electoral-hex</link>
		<comments>http://bit-player.org/2008/electoral-hex#comments</comments>
		<pubDate>Wed, 12 Mar 2008 05:10:33 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>games</category>
		<guid>http://bit-player.org/2008/electoral-hex</guid>
		<description><![CDATA[	Democrats here in the U.S. are having quite a primary season. With high hopes of winning the general election in November, we are deadlocked over which candidate to nominate. Should we just wait to let the delegates slug it out at the convention in August? Should the trailing candidate withdraw in the interest of party [...]]]></description>
			<content:encoded><![CDATA[	<p>Democrats here in the U.S. are having quite a primary season. With high hopes of winning the general election in November, we are deadlocked over which candidate to nominate. Should we just wait to let the delegates slug it out at the convention in August? Should the trailing candidate withdraw in the interest of party unity? Could the two contenders flip a coin to decide who gets to head the ticket and who gets to drink the <a href="http://en.wikipedia.org/wiki/John_Nance_Garner">bucket of warm piss</a>?</p>
	<p>I have a proposal. Here&#8217;s the geography of the current situation, following Obama&#8217;s victory in Mississippi yesterday (map brazenly swiped from the <a href="http://politics.nytimes.com/election-guide/2008/results/demmap/index.html">New York Times</a>):</p>
	<div style="text-align:center;"><img src="/wp-content//primarymap.png" alt="primarymap.png" border="0" width="450" height="295" /></div>
	<p>The solution is obvious, no? We follow the rules of the <a href="http://mathworld.wolfram.com/GameofHex.html">game of hex</a>: The nomination goes to the first candidate to form a continuous chain of states either east to west (Atlantic to Pacific) or north to south (from the Canadian border to Mexico or the Gulf Coast). Thus the three key states are Pennsylvania (which votes April 22), North Carolina (May 6) and Kentucky (May 20). Clinton could create an east-west chain by taking North Carolina, or a north-south path by winning Kentucky. For Obama, Kentucky creates an east-west link; to construct a north-south chain, Obama would have to win both North Carolina and either Kentucky or Pennsylvania.</p>
	<p>I get to cast my ballot on May 6 in North Carolina. All I&#8217;m saying for now is that I&#8217;m not voting for Ralph Nader.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/electoral-hex/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>How many Sudokus?</title>
		<link>http://bit-player.org/2008/how-many-sudokus</link>
		<comments>http://bit-player.org/2008/how-many-sudokus#comments</comments>
		<pubDate>Thu, 28 Feb 2008 21:44:14 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>mathematics</category>
	<category>games</category>
		<guid>http://bit-player.org/2008/how-many-sudokus</guid>
		<description><![CDATA[	The answer to the question in the headline is: Too many. After I wrote about Sudoku a couple a years ago, I thought I had cured my addiction; but I&#8217;ve been a shameless backslider. 
	I return to the subject now, in this public confessional mode, to correct an error in my 2006 column. Citing a [...]]]></description>
			<content:encoded><![CDATA[	<p>The answer to the question in the headline is: Too many. After I <a href="http://www.americanscientist.org/AssetDetail/assetid/48550">wrote about Sudoku</a> a couple a years ago, I thought I had cured my addiction; but I&#8217;ve been a shameless backslider. </p>
	<p>I return to the subject now, in this public confessional mode, to correct an error in my 2006 column. Citing a paper by Bertram Felgenhauer and Fraser Jarvis (<a href="http://www.afjarvis.staff.shef.ac.uk/sudoku/sudoku.pdf">pdf</a>), I stated that there are 6,670,903,752,021,072,936,960 Sudoku solutions. This is simply the number of ways of filling in the 81 squares without violating the no-two-alike constraints in rows, columns and blocks. I then went on to discuss the symmetries of the Sudoku grid, and noted:</p>
	<blockquote><p>When all these symmetries are taken into account, the number of essentially different Sudoku patterns is reduced substantially&#8230;. although [the reduction] still leaves an impressive number of genuinely different solutions: 3,546,146,300,288, or 4&#215;10<sup>12</sup>.</p></blockquote>
	<p>The latter number also comes from Felgenhauer and Jarvis, but I misinterpreted it. Contrary to my statement, it takes into account only a few of the simplest symmetries. The true number of essentially distinct Sudoku solutions is reported in a <a href="http://www.afjarvis.staff.shef.ac.uk/sudoku/sudgroup.html">slightly later publication</a> by Ed Russell and Jarvis. The correct tally is smaller by three orders of magnitude: 5,472,730,538.</p>
	<p>Thanks to Richard E. Dickerson for pointing out my error.</p>
	<p>It needs to be emphasized that both of these calculations count the number of <em>solutions</em>, not the number of <em>puzzles</em>. For any given solution, there are many possible puzzles, each created by erasing a different subset of the entries in the solution. How many puzzles per solution? Does anyone know? An exact count seems beyond reckoning, but random sampling ought to yield a rough estimate. For example, consider just those puzzles that have 17 initial clues (the apparent minimum). For any given solution grid, there are (81 choose 17) ways of forming a 17-clue puzzle; this works out to 128,447,994,798,305,325. Most of those puzzles will not have a unique solution, and so they are disqualified as proper Sudokus. The random sampling is needed to estimate how many of the potential puzzles are admissible.</p>
	<p>I&#8217;d try doing the calculation myself, but I&#8217;m too busy solving Sudokus.</p>
	<p><strong>Update 2008-04-05</strong>: Richard E. Dickerson discovered the error mentioned above in the course of preparing his own discourse on Sudoku-solving strategies. That work now has its own web site, <a href="http://www.sudoku-strategies.net">The Sudokerson Matrix</a>, where you can download the 61-page PDF file and an accompanying spreadsheet. Dickerson also mentions some other resources on Sudoku strategy, including a <a href="http://www.sudoku.org.uk/logicofsudoku.asp">recent book</a> by Andrew C. Stuart that I haven&#8217;t yet seen. Dickerson comments:</p>
	<blockquote><p>Few books on Sudoku go into strategies in any depth. Stuart&#8217;s <em>The Logic of Sudoku</em> (Michael Mepham, 2007) is a wonderful exception. But his book and mine represent the two opposite poles of Sudoku-solving strategy. I regard many of his methods as superfluous, and I am sure that he regards most of my strategies as heretical. You need to have a close look at both.</p></blockquote>
	<p>What I find intriguing in all this is the very idea that we could have contending doctrines of Sudoku strategy. But before the talk of &#8220;heresy&#8221; gets out of hand and leads to Sudoku holy wars, I&#8217;d like to remind everyone that there&#8217;s another view of Sudoku in which <em>all</em> strategies become superfluous. Give me a computer and a program for solving constraint-satisfaction problems, and every 9&times;9 Sudoku yields in milliseconds.</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/how-many-sudokus/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Veliagate</title>
		<link>http://bit-player.org/2008/veliagate</link>
		<comments>http://bit-player.org/2008/veliagate#comments</comments>
		<pubDate>Thu, 28 Feb 2008 19:57:24 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>mathematics</category>
		<guid>http://bit-player.org/2008/veliagate</guid>
		<description><![CDATA[	
	Zeno of Elea&#8212;the philosopher of footraces that never end and arrows that never reach their target&#8212;seems a figure so lost in abstractions and infinities that it&#8217;s hard to imagine him living in some particular place and time. But Elea was a real town, a sixth-century B.C.E. Greek settlement on the Tyrrhenian coast of Italy. The [...]]]></description>
			<content:encoded><![CDATA[	<div style="text-align:center;"><img src="/wp-content//Veliagatewide450.jpg" alt="Veliagatewide450.jpg" border="0" width="450" height="300" /></div>
	<p>Zeno of Elea&mdash;the philosopher of footraces that never end and arrows that never reach their target&mdash;seems a figure so lost in abstractions and infinities that it&#8217;s hard to imagine him living in some particular place and time. But Elea was a real town, a sixth-century B.C.E. Greek settlement on the Tyrrhenian coast of Italy. The site is now the Italian village of Velia, about 100 kilometers south of Naples.</p>
	<p>The massive stonework wall and gate shown above, known as the Porta Rosa, lies atop a ridge separating two neighborhoods of ancient Elea. I visited several years ago, and ever since then I&#8217;ve been perplexed by that gate. I&#8217;m now going to be writing about Zeno&#8217;s hometown for an upcoming <em>American Scientist</em> column, and so I thought I would ask the world for help in resolving the mystery of Veliagate.</p>
	<p>What puzzles me, of course, is the eyebrow above the arch. It looks as if the gate was originally built a meter higher, and then lowered. Why would anyone do that? I can imagine how erosion of the ridge and the roadway might have made the opening taller than it was at the outset&mdash;but what&#8217;s the harm of that? And if the city engineers <em>did</em> want to maintain the original headroom, wouldn&#8217;t it be much easier to build up the roadway than to lower the arch?</p>
	<p>Or am I wrong that the two arches represent two stages in the history of the gate? Maybe the &#8220;eyebrow&#8221; is really some sort of reinforcement? </p>
	<p>I should mention that the Porta Rosa also has a bit of topological interest. It is built at a saddle point in the ridge. The lower passage (seen in the photograph) connects two valleys, while the roadway crossing above the arch links two hilltops.</p>
	<p>Finally, I have another question about Greek mathematics. The big literary figures of ancient Greece were mostly Athenians, and so were the historians and political writers and the major philosophers. But when it comes to the nerdy Greeks, they seem to have been scattered all over the Mediterranean world. Euclid, Diophantus and Hypatia were Alexandrians; Pythagoras came from the island of Samos; Archimedes lived in Syracuse, on Sicily; and Zeno, as already noted, was Italian. Coincidence, or shall we speculate about the different intellectual environments of the center and the periphery?
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/veliagate/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>The linguistic arrow of time</title>
		<link>http://bit-player.org/2008/the-linguistic-arrow-of-time</link>
		<comments>http://bit-player.org/2008/the-linguistic-arrow-of-time#comments</comments>
		<pubDate>Mon, 25 Feb 2008 01:51:41 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>social science</category>
		<guid>http://bit-player.org/2008/the-linguistic-arrow-of-time</guid>
		<description><![CDATA[	Two recent notes on the Language Log, by Sally Thomason and Mark Liberman, discuss a nutty book, The Secret History of the English Language, by M. J. Harper. I haven&#8217;t read the book, but according to the Language Loggers, Harper contends that everybody has the history of European languages totally backwards. We&#8217;ve been taught that [...]]]></description>
			<content:encoded><![CDATA[	<p>Two recent notes on the Language Log, by <a href="http://itre.cis.upenn.edu/~myl/languagelog/archives/005394.html">Sally Thomason</a> and <a href="http://itre.cis.upenn.edu/~myl/languagelog/archives/005396.html">Mark Liberman</a>, discuss a nutty book, <em>The Secret History of the English Language</em>, by M. J. Harper. I haven&#8217;t read the book, but according to the Language Loggers, Harper contends that everybody has the history of European languages totally backwards. We&#8217;ve been taught that Latin gave rise to Italian, French, Spanish and the other Romance languages, and that English comes from Germanic roots with an important dash of Romance. The real chronology is just the opposite, Harper says. Liberman gives this precis:</p>
	<blockquote><p>[T]he history, according to Harper, is that English developed into French, which developed into Proven&ccedil;al, which developed into Italian; and then at some point, say around 400 B.C., some Italian merchants invented Latin as a form of shorthand.</p></blockquote>
	<p>I mention this curious thesis not because I believe anyone should take it seriously, or even because I want to defend it under the constitution&#8217;s Freedom of Wiftiness clause. But there&#8217;s an interesting mental exercise here: Can we refute this notion without resorting to mere dull historical facts? Suppose we had no documentary evidence bearing on the history of languages, and we ignored giveaways such as vocabulary items that betray their time of origin. From internal clues alone, could we deduce that Latin came before French or English? Without the labels, how would we know that Old English is older than Middle English, which in turn is older than modern English?</p>
	<p>The challenge is rather like that of doing evolutionary biology without the fossil record. Could we look at the fishes, amphibians, reptiles, birds and mammals, and from their anatomy and physiology alone determine which groups arose earlier and which later? For the biological case, there&#8217;s a widely accepted premise that a trend toward increasing complexity defines the arrow of time. The vertebrate heart, for example, has two chambers in fishes, then three in amphibians and reptiles, and four in birds and mammals. Although there are exceptional cases where this kind of reasoning will lead you astray, it seems to work more often than not.</p>
	<p>If there&#8217;s a similar principle in linguistics, however, I don&#8217;t know what it is. When it comes to grammatical complexity, the arrow of time seems to point the other way. Latin, for example, had a more elaborate system of inflection in nouns and adjectives than the languages descended from it. English went through a similar decline in declensions, losing case and gender markers on adjectives and abandoning its <em>thee</em>&#8217;s and <em>thou</em>&#8217;s. So maybe the rule is that simpler languages come later? But that can&#8217;t be universally true, unless we accept the implausible assumption that the very first languages were immensely complicated. Furthermore, if there is a monotonic trend toward simpler syntax, where are we headed?</p>
	<p>Many linguists would dispute the assertion that languages show a consistent tendency to become either simpler or more complex. Yes, English has lost the word endings that once marked nouns as accusative, dative, instrumental, etc.; but in compensation it has acquired a more nuanced system of prepositions and stricter rules about word order. In this view languages do not evolve from some primitive state toward greater sophistication; nor, contrary to Miss Thistlebottom&#8217;s dire predictions, do languages degenerate into brutish grunts whenever someone splits an infinitive or dangles a participle. Changes in grammatical structure could be nothing more than a random walk through the space of all possible linguistic features. But if that&#8217;s the case, then there&#8217;s not much hope of finding an intrinsic marker of priority between pairs of languages. And so Latin really could have been invented by a bunch of Italian-speaking merchants.</p>
	<p>Even if pairwise comparisons are problematic, though, perhaps we could find a &#8220;thermodynamic&#8221; arrow of time in the overall evolutionary pattern of a large family of languages. In biology, speciation is generally a one-way process: lines that diverge almost never reconverge. Fishes and finches have a common ancestor but they will have no common descendants. Thus the graph of relations among species is a <em>tree</em>, with a suppositional single root (the progenitor of all living things) and lots of leaves and branches, but no closed loops. If languages evolve in roughly the same way as living organisms, then we should be able to orient ourselves along the time axis by observing whether branches split or merge. By this argument, it&#8217;s far more likely that Latin underwent fission to produce Italian, Spanish, Catalan, French, etc., than that a dozen closely related Romance languages underwent fusion to create Latin.</p>
	<p>There are at least two problems with this line of reasoning. First, although measures of lexical or grammatical similarity yield a tree of language relations, they don&#8217;t provide a sure-fire method of identifying the <em>root</em> of that tree. If you gather various words for &#8216;100&#8242;, you might construct a tree that includes this fragment:</p>
	<div style="text-align:center;"><img src="/wp-content//kemtree.png" alt="kemtree.png" border="0" width="198" height="151" /></div>
	<p>The conjectural <em>k&#8217;mtom</em> form is the reconstructed Proto-Indo-European root from which all the other terms&mdash;and many more&mdash;are thought to derive. The pattern of connections in the tree is based on judgments of lexical similarity: <em>hundred</em> is closer to <em>hundert</em> than it is to <em>cento</em> or <em>cent</em>. This linkage pattern is an invariant of the topology: It survives intact no matter how you choose to present the tree geometrically. But the identification of <em>k&#8217;mtom</em> as the root of the tree is <em>not</em> something that follows directly from a comparison of the words themselves. The diagram below shows exactly the same tree:</p>
	<div style="text-align:center;"><img src="/wp-content//huntree.png" alt="huntree.png" border="0" width="180" height="182" /></div>
	<p>It has the same nodes and the same pattern of connections between them; the only thing that has changed is the choice of which node to designate as root. And if we knew nothing else about the chronology of the languages, there would be no obvious reason for preferring one layout over the other. (But notice that we can&#8217;t produce any arbitrary tree without doing violence to the network structure. In particular, Harper&#8217;s fantasy of going from English to French to Italian to Latin doesn&#8217;t work.)</p>
	<p>The second problem with trying to derive a chronology from the language tree is that <a href="http://bit-player.org/2007/the-family-tree">the tree isn&#8217;t a tree</a>; it&#8217;s a DAG, a directed acyclic graph. Languages drift apart, but then they merge again. English is a prime example: Its deepest roots are in the West Germanic languages of the Angles, the Saxons and the Frisians, but English also received important later contributions from the Danish and the Norman French. Thus if we took seriously the idea that languages undergo fission but never fusion, we would have to conclude that English was the source of all those other languages rather than the product of their merger.</p>
	<p>Perhaps I&#8217;m missing something important. Maybe there really is some intrinsic clue to the direction of language evolution&mdash;some way of looking at the internal structure of Latin and English and saying which came first. Even if not, though, I&#8217;m not buying the idea of English as Ursprache and Latin as shorthand Italian.
</p>
	<p><strong>Update 2008-02-28:</strong> Richard E. Dickerson of UCLA alerts me to an earlier and perhaps even more florid bit of nuttery in the same genre. It&#8217;s a book published in 1883 by Charles Lassalle: <em>Origin of the Western Nations &#038; Languages Showing the Construction and Aim of Punic; Recovery of the Universal Language; Reconstruction of Phoenician Geography; Asiatic Source of the Dialects of Britain; Principal Emigrations from Asia; and Description of Scythian Society.  With an Appendix, Upon the Connection of Assyrian with the Languages of Western Europe and Gaelic with the Languages of Scythia.</em> This is one of those works where the title tells all (and then some), but the complete volume is <a href="http://books.google.com/books?id=oDcQAAAAIAAJ">available through Google Books</a>, and I couldn&#8217;t resist having a look. Here&#8217;s how Lassalle begins his story (I would quote briefly if that were possible, but&#8230;):</p>
	<blockquote><p>HAVING made scientific discoveries which, on account of their great importance and extent, have not been accomplished without heavy sacrifices&mdash;having, in fact, abandoned my business to follow up with more freedom, ardour and unity of action, the <em>Scents</em> that had offered themselves to me when following in literary leisure certain historical and linguistic researches which seemed and have turned out to be of the utmost significancy; having also recognised that I must, for a time, entirely give myself up to the study of my discoveries, or I might never arrive at the solution that was looming before me at a distance; not knowing even where my task was leading me, and, therefore, not at liberty to form an opinion whether my work would occupy me a longer or a shorter time; having arrived at the conclusion of the task I had imposed upon myself, and been successful far beyond my ambition and expectations; having, moreover, been several times stimulated and sent to seek deeper into the channels of science by the incredulity I met from many, that a commercial man could be successful upon subjects which, until now, had baffled all the efforts of learned professors, though their common sense should have told them, that upon topics <em>so simple and technical</em> as those of history, geography, and languages, <em>a travelled commercial man,</em> acquainted with most of the Western languages and some of the old ones, had, at least, as much chance to arrive at a linguistic discovery, and enlarge it upon geographical and historical bearings which his personal experience permitted him to grasp, as a sedentary professor, who, though much versed in Greek and Latin, was generally not familiar with many of our commercial Western languages, and had not the opportunity of comparing the various customs and dialects which so often meet the eye and ear of a mercantile man.</p></blockquote>
	<p>HAVING now reached a period, though not yet a full sentence, I stop.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/the-linguistic-arrow-of-time/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>EATCS award to Valiant</title>
		<link>http://bit-player.org/2008/eatcs-award-to-valiant</link>
		<comments>http://bit-player.org/2008/eatcs-award-to-valiant#comments</comments>
		<pubDate>Fri, 15 Feb 2008 20:47:09 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>computing</category>
		<guid>http://bit-player.org/2008/eatcs-award-to-valiant</guid>
		<description><![CDATA[	Leslie G. Valiant, whose work on holographic algorithms was the subject of a recent column in American Scientist and a brief note here on bit-player, has won the 2008 EATCS Award of the European Association for Theoretical Computer Science. In addition to the work on holographic algorithms, the EATCS cites Valiant&#8217;s contributions of computational learning [...]]]></description>
			<content:encoded><![CDATA[	<p>Leslie G. Valiant, whose work on holographic algorithms was the subject of a <a href="http://www.americanscientist.org/AssetDetail/assetid/56452">recent column</a> in <em>American Scientist</em> and a <a href="http://bit-player.org/2007/to-p-or-np-that-is-the-question">brief note</a> here on bit-player, has won the <a href="https://www.eatcs.org/activities/leslie_valiant_motivation.html">2008 EATCS Award</a> of the European Association for Theoretical Computer Science. In addition to the work on holographic algorithms, the EATCS cites Valiant&#8217;s contributions of computational learning theory, neuroscience, and several areas of complexity theory, including the study of enumeration problems.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/eatcs-award-to-valiant/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Get on board</title>
		<link>http://bit-player.org/2008/get-on-board</link>
		<comments>http://bit-player.org/2008/get-on-board#comments</comments>
		<pubDate>Tue, 12 Feb 2008 22:56:32 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>computing</category>
	<category>modern life</category>
		<guid>http://bit-player.org/2008/get-on-board</guid>
		<description><![CDATA[	Ages ago (in blog years) I mentioned some algorithmic ideas for getting passengers aboard airplanes faster, based on a 2005 paper by Steven Skiena and others. Since then, the queue at the departure gate has only gotten longer. Now another preprint on the same theme has landed in the arXiv. This one is by Jason [...]]]></description>
			<content:encoded><![CDATA[	<p><a href="http://bit-player.org/2006/now-boarding-row-n">Ages ago (in blog years)</a> I mentioned some algorithmic ideas for getting passengers aboard airplanes faster, based on a 2005 <a href="http://arxiv.org/abs/physics/0512020">paper</a> by Steven Skiena and others. Since then, the queue at the departure gate has only gotten longer. Now <a href="http://arxiv.org/abs/0802.0733">another preprint</a> on the same theme has landed in the arXiv. This one is by Jason H. Steffen, a postdoc at Fermilab. </p>
	<p>Steffen assumes that the main impediment to speedy boarding is the time passengers need for stowing their carry-on luggage. He argues that the loading process will go faster if we make sure everyone has plenty of elbow room for cramming their wheely-bag into the overhead bin. Thus he favors boarding-line sequences generated by the following rule: If two passengers are seated near each other in the aircraft (in the same row or in adjacent rows), then they should <em>not</em> be adjacent in the queue.</p>
	<p>I don&#8217;t necessarily agree with Steffen&#8217;s premise or his conclusion, but I have no evidence of my own to report, so let&#8217;s set that issue aside. I&#8217;m intrigued by a related, subsidiary question. If we assume that there is <em>some</em> optimal ordering for passengers as they enter the airplane, how do we organize the unruly and impatient mob at the departure gate so that everyone enters the plane in the specified order? Here are a few ideas.</p>
	<p><strong>Boarding Hats.</strong> Most airlines now use some kind of zone system, where the passengers are divided into several groups. As boarding time approaches, people mill around near the gate asking, &#8220;Have they called Group 2?&#8221; or &#8220;Is this the line for Group 4?&#8221; To achieve finer-grain control over boarding order, we would need larger numbers of smaller groups, which would make the process of finding the right group even more cumbersome. In the limiting case, each passenger would be assigned an individual boarding-sequence number, and the passengers would have to sort themselves into the correct sequence. People are actually rather good at this task, given enough information. When I was a schoolboy, my classmates and I could quickly line ourselves up in order of height, relying on an efficient parallel sorting algorithm. But that method works so well mainly because height is a visible trait. To bring to same efficiency to sorting passengers at the departure gate, the boarding sequence number must be as readily discernible as height. Thus I propose replacing the traditional boarding pass with the <em>boarding hat</em>, which has your number prominently printed on all sides. This innovation would be a special treat for the mathematical community, given the well-known genre of puzzles about mathematicians who can see the number on everyone else&#8217;s forehead but not their own.</p>
	<p><strong>The Boarding Buzzer.</strong> If you think a numbered paper hat is too undignified for airline passengers, here&#8217;s another replacement for the boarding pass. When you check in for a flight, suppose you get an electronic gadget like one of those buzzers that restaurants hand to customers who are waiting for a table. As I imagine the boarding buzzer, it has various blinking lights and sound effects and a display screen that counts down the minutes remaining until you are due to report to the gate. The time shown on the display is different for each passenger and is calculated to get everyone on board at just the right moment. When I first thought of this scheme, I dismissed it as preposterous technological excess. But when I told a friend about it, she said I shouldn&#8217;t blog it; I should patent it. Obviously I haven&#8217;t taken my friend&#8217;s advice, and so when I check in at an airport a few years from now and the agent hands me one of these contraptions, I&#8217;m going to be mightily annoyed to see that someone else has cashed in on my idea. Still, the device could have certain charms. It would allow you to wander throughout the airport rather than remain tethered to the departure lounge. If a flight were delayed or shifted to a different gate, the airline could notify you right away. Likewise, if you were on standby, you could be paged when a seat opened up.</p>
	<p><strong>Out-of-Order Execution.</strong> The problem of dealing with suboptimal sequences of events is familiar to designers of computer hardware. Many modern microprocessors analyze the stream of instructions awaiting execution and reorder them to improve throughput. If the next instruction in the stream can&#8217;t be executed immediately because its operands aren&#8217;t yet available, then maybe some other instruction can take its place. This principle could also be applied to airplane boarding. As passengers enter the jetway, their boarding passes are scanned, and so their actual order in the queue is known from that point forward. Suppose there were a small buffer area at the other end of the jetway, near the aircraft door, along with a display screen where passenger names could be listed. This scheme would allow groups of passengers to be rearranged at the last minute to avoid bottlenecks. The overall boarding order might not be ideal, but it could be locally optimized.</p>
	<p><strong>First Come, First Served.</strong> A few airlines have abolished seat assignments altogether: You line up at the gate, file onto the airplane, and take any unoccupied seat you choose. In my experience, the boarding process on open-seating flights is generally quick and efficient. But the protocol creates an incentive to be at the head of the queue, and so people start lining up at the gate quite early. Thus the airline gets the benefit of faster loading, but the passengers likely spend more time waiting in line.</p>
	<p><strong>The Worst of Both Worlds.</strong> Here&#8217;s an idea so bad I hesitate even to mention it, lest some airline decide to try it. Suppose all seats are assigned, but you don&#8217;t receive your assignment when you book a flight or when you check in at the airport. Instead the assignment is made as you hand in your boarding pass at the gate. This allows the airline to parcel out the seats in whatever order will optimize the boarding process, but it leaves the passengers with little or no control over where they sit. (After long observation you might figure out something about the assignment algorithm and thereby learn where not to stand in line.)</p>
	<p>A final thought about luggage: If Steffen is right that carry-on baggage is the main cause of delay, some other tactics might be considered. What if passengers without carry-on bags were allowed to board first? By assumption they would board quickly, relieving congestion for the heavily laden crowd to follow. The policy might also induce some passengers to carry less luggage.</p>
	<p>Then there&#8217;s the Russian-made aircraft I flew on once, many years ago. You reached the passenger cabin by walking through a lower deck lined with luggage racks, dropping off your bag on the way in and grabbing it on the way out. Probably preferable to wearing a numbered hat or carrying a buzzer.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/get-on-board/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>The end of the number line</title>
		<link>http://bit-player.org/2008/the-end-of-the-number-line</link>
		<comments>http://bit-player.org/2008/the-end-of-the-number-line#comments</comments>
		<pubDate>Tue, 05 Feb 2008 18:21:21 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>mathematics</category>
	<category>computing</category>
		<guid>http://bit-player.org/2008/the-end-of-the-number-line</guid>
		<description><![CDATA[	Very likely you already know how to count, but let&#8217;s review anyway. The usual counting sequence for the natural numbers starts 1, 2, 3, 4, 5, &#8230; and goes on for quite some time. Some people prefer to start 0, 1, 2, 3, 4, 5, &#8230;,  but they wind up in the same place [...]]]></description>
			<content:encoded><![CDATA[	<p>Very likely you already know how to count, but let&#8217;s review anyway. The usual counting sequence for the natural numbers starts 1, 2, 3, 4, 5, &#8230; and goes on for quite some time. Some people prefer to start 0, 1, 2, 3, 4, 5, &#8230;,  but they wind up in the same place at the end. (In general I side with the nullists who count from nothing, but today I find it convenient to join the unitarians: In what follows the least natural number is 1.)</p>
	<p>Here&#8217;s a computer program for counting out the numbers in their standard sequence:</p>
	<pre>
n = 1
do forever
   print n
   n = n + 1
</pre>
	<p>The last line of this program defines a <em>successor function</em>: For every possible value of <em>n</em>, it names the next <em>n</em>. Since the program starts with <em>n</em>=1 and iterates the successor function forever, every natural number appears exactly once in the output.</p>
	<p>What if we want to arrange the natural numbers in some other order, perhaps starting with a value other than 1? For example, we might want to count 2, 1, 4, 3, 6, 5, 8, 7, &#8230;. Altering the program to generate this sequence requires only minor adjustments:</p>
	<pre>
n = 2
do forever
   print n
   if even(n)
      then n = n &#8211; 1
      else n = n + 3
</pre>
	<p>How about listing all the odd numbers first, followed by all the even numbers: 1, 3, 5, &#8230;, 2, 4, 6, &#8230;? That seems to be a valid permutation of the natural numbers, but there&#8217;s something strange and troubling about the idea of counting this way. When we begin ticking off 1, 3, 5, &#8230;, it&#8217;s not at all clear how we&#8217;re ever going to finish the odd numbers so that we can get started on the even ones. I don&#8217;t know how to write a program to generate this complete series. On the other hand, the successor function for such a program is easy enough to describe: It&#8217;s just <code>n = n + 2</code>. (Do you doubt this statement? Well, I admit it makes me queasy too. But show me a value of <em>n</em> for which the function fails to produce the correct successor.)</p>
	<p>Here&#8217;s another ordering of the natural numbers, which looks even weirder:</p>
	<p class="centered">3, 5, 7, 9, &#8230;, 6, 10, 14, 18, &#8230;, 12, 20, 28, 36, &#8230;, &#8230;, 8, 4, 2, 1</p>
	<p>There&#8217;s a pattern in this series, which emerges when you poke at it a little. For the moment, ignore the final &#8220;&#8230;, 8, 4, 2, 1&#8243; segment. We start out with the number 3 and then list all the odd numbers greater than 3 in order of increasing magnitude; when this first part of the sequence is finished, we take each of its elements in turn and double it, concatenating the results to form the next segment of the sequence; then in the third phase we take the same odd elements again and multiply each of them by four; the process continues in the obvious way. Thus the successive segments have the following structure:</p>
	<p class="centered">
3&times;2<sup>0</sup>, 5&times;2<sup>0</sup>, 7&times;2<sup>0</sup>, 9&times;2<sup>0</sup>, &#8230;<br />
3&times;2<sup>1</sup>, 5&times;2<sup>1</sup>, 7&times;2<sup>1</sup>, 9&times;2<sup>1</sup>, &#8230;<br />
3&times;2<sup>2</sup>, 5&times;2<sup>2</sup>, 7&times;2<sup>2</sup>, 9&times;2<sup>2</sup>, &#8230;<br />
3&times;2<sup>3</sup>, 5&times;2<sup>3</sup>, 7&times;2<sup>3</sup>, 9&times;2<sup>3</sup>, &#8230;
</p>
	<p>The only natural numbers missing from this infinite sequence of infinite sequences are the powers of 2 (including 2<sup>0</sup>=1). Those missing values make up the final segment of the sequence. The <em>really</em> weird part is that the powers of 2 are listed in reverse order, from largest to smallest: &#8230;, 2<sup>4</sup>, 2<sup>3</sup>, 2<sup>2</sup>, 2<sup>1</sup>, 2<sup>0</sup>. Because of this inversion, we have an inside-out sequence, solidly anchored at both ends but all puffed up with infinities throughout the middle.</p>
	<p>What inspires me to write about this curious counting sequence is an article in the latest issue of <em>The American Mathematical Monthly</em>, which landed in my mailbox over the weekend. The article, titled &#8220;On ordering the natural numbers, or the Sharkovski theorem,&#8221; is by Krzysztof Ciesielski and Zdzis&#322;aw Pogoda of the Jagiellonian University in Krakow. They explain that the sequence was invented (discovered?) in 1964 by the Ukrainian mathematician Alexandr Nicolaevich Sharkovski. It arose in the context of dynamical systems and chaos theory. I&#8217;m not going to get into those topics, but I highly recommend reading Ciesielski and Pogoda&#8217;s article. What I want to talk about here is the process of counting in this strange order.</p>
	<p>I certainly can&#8217;t exhibit a complete counting program for the Sharkovski sequence&mdash;a program that would begin with 3 and end with 1 and in between visit all the other natural numbers. After some thought and a bit of trial and error, however, I realized that I <em>can</em> write a successor function for the sequence. It&#8217;s a surprisingly sweet little function, concise and simple, which suggests that maybe the sequence is not quite as weird as it looks.</p>
	<p>My first instinct in the search for a successor function was to do a case analysis, in effect supplying a separate function for each segment of the series. Each of the segments (except the last one, which I shall again ignore for the nonce) consists of numbers in a certain congruence class: 3, 5, 7, 9 are all of the form 2<em>x</em>+1 (where <em>x</em> ranges over the natural numbers); 6, 10, 14, 18 have the form 4<em>x</em>+2; 12, 20, 28, 36 follow the pattern 8<em>x</em>+4, and so forth. Thus the successor function would be a long series of clauses, one for each possible congruence class. The problem, of course, is that I&#8217;d need infinitely many clauses.</p>
	<p>There&#8217;s a better way. For the first segment of the series&mdash;the part made up of odd numbers 3 or greater&mdash;the successor function is simple and obvious: <code>n = n + 2</code>. All the numbers of the second segment (3&times;2, 5&times;2, 7&times;2, 9&times;2) can be reduced to the corresponding odd numbers of the first segment; we just need to divide each of them by 2. For any number in the second segment we can find the correct successor by applying a series of three operations: divide by 2, add 2, multiply by 2. The formula is <code>2 &times; (2 + (n/2))</code>. The later segments can be treated similarly, repeatedly dividing <em>n</em> by 2 until we reach an odd number, then adding 2, and finally multiplying by 2 as many times as we divided. This suggests a recursive formulation of the successor function:</p>
	<pre>
function s(n)
  if odd(n)
     then return n + 2
     else return 2 * s(n/2)
</pre>
	<p>That&#8217;s all there is to it, and it actually works most of the time! Specifically, it works for all values of <em>n</em> except powers of 2. Consider what happens for <em>n</em>=20. The predicate <code>odd(20)</code> fails, and so we take the <code>else</code> branch of the <code>if</code> statement. There we evaluate the expression <code>2 * s(20/2)</code>, which leads to a recursive invocation of <code>s(10)</code>. Again the predicate <code>odd(10)</code> fails, and so we evaluate <code>2 * s(10/2)</code>. This time the recursive call is <code>s(5)</code>; the predicate <code>odd(5)</code> succeeds, and so the <code>then</code> clause is selected, returning a value of 5+2=7. Now the two pending multiplications are completed, producing a final value of 2&times;2&times;7=28, which is indeed the correct successor of 20. Nothing to it!</p>
	<p>I was surprised that so much of the structure of the Sharkovski sequence could be captured in just a few lines of code. But we still have to deal with the final segment of the series, the descending powers of 2&mdash;&#8230;, 2<sup>4</sup>, 2<sup>3</sup>, 2<sup>2</sup>, 2<sup>1</sup>, 2<sup>0</sup>. Can it be done without making too much of a mess?</p>
	<p>Suppose we had on hand a predicate function <code>twopower(n)</code>, which returns a value of <em>true</em> if <em>n</em> has no prime factors other than 2, and returns <em>false</em> otherwise. Then we could add an extra <code>if</code> clause to the successor function:</p>
	<pre>
function s(n)
  if twopower(n)
     then return n/2
     elseif odd(n)
       then return n + 2
       else return 2 * s(n/2)
</pre>
	<p>This function now gives the correct Sharkovski successor for every natural number with one exception. It works as before for odd numbers and for even numbers that are not powers of 2; and, given a power of 2, it returns the next lower power of 2. For example, if the argument <em>n</em> is equal to 4, <em>s(n)</em> returns a result of 2; for <em>n</em>=2, <em>s(n)</em> = 1. The remaining problem case is <em>n</em>=1. I&#8217;ll return to that issue below; in the meantime, let&#8217;s see how the auxiliary function <code>twopower(n)</code> might be implemented. Here&#8217;s how I would do it:</p>
	<pre>
function twopower(n)
  if n==1
     then return true
     elseif odd(n)
       then return false
       else return twopower(n/2)
</pre>
	<p>The logic here begins with the easy cases: If <em>n</em> is equal to 1 then it definitely <em>is</em> a power of 2, and if <em>n</em> is an odd number other than 1 then it definitely <em>is not</em> a power of 2. If neither of these descriptions apply, then <em>n</em> must be an even number. So we divide it by 2 and start over. The rules of the recursion ensure that any power of 2 will eventually be reduced to 1 (so that the function returns <em>true</em>) and any other natural number will eventually expose an odd factor other than 1 (so that the function returns <em>false</em>).</p>
	<p>There&#8217;s something curious about this procedure. In its structure and its action the <code>twopower</code> predicate is remarkably similar to the successor function itself. Both procedures involve a recursion on <em>n</em>/2, which terminates only when all the factors of 2 have been divided out. Indeed, every time a successor is calculated, this sequence of divisions is performed twice, first in the <code>twopower</code> predicate and then in the main body of <code>s(n)</code>. Surely we ought to be able to avoid this wasteful duplication. Can&#8217;t we just do a test at the bottom of the main recursion to find out whether or not we&#8217;re dealing with a power of 2?</p>
	<p>Yes, we can. And the change to the <code>s(n)</code> program is tiny. We just replace the <code>twopower(n)</code> predicate with the predicate <code>n==1</code>.</p>
	<pre>
function s(n)
  if n==1
     then return n/2
     elseif odd(n)
       then return n + 2
       else return 2 * s(n/2)
</pre>
	<p>For odd numbers greater than or equal to 3, and for even numbers that are not powers of 2, this procedure again works exactly like the earlier versions. To see how powers of 2 are handled, we can trace the execution of <code>s(4)</code>. Neither the <code>n==1</code> nor the <code>odd(n)</code> predicates are satisfied, and so we fall through to the last line, generating a recursive call <code>s(2)</code>. Again the value of <code>n</code> is neither equal to 1 nor odd, so the last line of the definition is activated once more, generating the procedure call <code>s(1)</code>. Now the <code>n==1</code> test is <em>true</em>, and so the value is <code>n/2</code>, or 1/2. Climbing back up through the chain of pending multiplications produces the final value <code>s(4) = 2 * 2 * 1/2 = 2</code>. We get the right answer, and we&#8217;ve eliminated the duplicated recursion when testing for powers of two.</p>
	<p>Very nice. But there&#8217;s still that pesky exception: What happens if you ask the Sharkovski successor function for the successor of 1?</p>
	<p>Well, what&#8217;s <em>supposed</em> to happen? As the series is presented to us in the Ciesielski and Pogoda article, 1 has no successor. This makes sense in the context where the sequence was originally defined, but if you look at the sequence merely as a counting order, that abrupt end point is very strange. When Giuseppe Peano set out to define the natural numbers, one of the axioms was that every natural number has a successor.</p>
	<p>I can think of four ways of dealing with this situation.</p>
	<p><strong>Option 1:</strong> Ignore it and it will go away. If we start counting through the Sharkovski sequence at <em>n</em>=3, we&#8217;re never going to reach <em>n</em>=1 anyway, so why worry about it? But by this argument we could just use <code>n = n + 2</code> as the successor function, which takes all the fun out of the game.</p>
	<p><strong>Option 2:</strong> Abide by the rule that 1 has no successor. If the program is asked to provide such a nonexistent result, it halts and prints an error message: &#8220;Sorry, but you have fallen off the end of the number line.&#8221; This behavior may be the right choice, but I resist it strenuously, on aesthetic grounds. The problem is that the value <em>n</em>=1 can be generated internally, during the recursive processing of a higher power of 2, or it can be presented from the outside, as the initial argument to <em>s(n)</em>. These two cases have to be treated differently. It&#8217;s entirely possible to do that, but the resulting program is ugly and artificial.</p>
	<p><strong>Option 3:</strong> Accept what the program tells us, and run with it. In other words, don&#8217;t adapt the code to the mathematics; bend the math to suit the code. According to the last version of <code>s(n)</code> given above, what is the next Sharkovski number after 1? Why it&#8217;s 1/2 of course! I&#8217;ll concede that 1/2 is a fairly strange-looking natural number, but maybe the idea is not totally indefensible. We got to this point by counting down &#8230;, 2<sup>4</sup>, 2<sup>3</sup>, 2<sup>2</sup>, 2<sup>1</sup>, 2<sup>0</sup>. It&#8217;s not so bizarre to suggest continuing with 2<sup>&#8211;1</sup>. Indeed, we could take a step further. Changing the expression <code>n==1</code> to <code>n&lt;=1</code> will ensure that 1/2 also has a successor, namely 1/4, which is followed by 1/8, etc. Now the sequence is infinite at the top, which makes me feel less claustrophobic. (Note that this decision does not change the domain of the function to cover all the rationals. We still can&#8217;t calculate the successor of 1/3 or 3/2. We&#8217;ve extended the definition of a natural number rather modestly. Previously, natural numbers of the form 2<sup>k</sup> required <em>k</em> to be a nonnegative integer; now it can be any integer.)</p>
	<p><strong>Option 4:</strong> Let the successor of 1 be 3. This choice has the effect of  turning the Sharkovski sequence into a giant cycle (with a lot of infinities in the middle) and acknowledges the unique role of 1 as the only odd number that&#8217;s a power of 2. The code is not very different from what we&#8217;ve already seen:</p>
	<pre>
function s(n)
  if odd(n)
     then return n + 2
     elseif (n==2)
       then return 1
       else return 2 * s(n/2)
</pre>
	<p>In this version we don&#8217;t need a special case to deal with <em>n</em>=1; it is treated the same as all the other odd numbers. But now we <em>do</em> need special handling for <em>n</em>=2. In this respect the two solutions seem roughly equal by standard measures of kludginess. The cyclic version might deserve extra credit because it never dabbles in nonintegral values of <em>n</em>.</p>
	<p>I have a closing thought. What happens if we try to simplify the successor function even further? Starting from either of the two final versions of <code>s(n)</code> given above, and eliminating the special cases, we wind up with this variant:</p>
	<pre>
function s(n)
  if odd(n)
     then return n + 2
     else return 2 * s(n/2)
</pre>
	<p>But that&#8217;s exactly where we began! It&#8217;s our first approximation to a successor function, derived by ignoring the problem of those annoying descending powers of 2 at the end of the Sharkovski sequence. This version has an appealing symmetry and simplicity. Odd numbers are treated one way, even numbers another. No other distinctions are necessary. </p>
	<p>What does this oversimplified function produce? It yields this:</p>
	<p class="centered">1, 3, 5, 7, &#8230;, 2, 6, 10, 14, &#8230;, 4, 12, 20, 28, &#8230;, 8, 24, 40, 56, &#8230;</p>
	<p>That&#8217;s rather pretty, and indeed seems more orderly&mdash;more &#8220;sequential&#8221;&mdash;than the Sharkovsky sequence itself. At the same time, it leads me to wonder whether we&#8217;re really dealing with a sequence at all, rather than a collection of disjoint sequences. What do the dots between those segments really mean? How do we know that the segments should be assembled in the given order? There&#8217;s nothing in the successor function to favor that arrangement over, say,</p>
	<p class="centered">4, 12, 20, 28, &#8230;, 1, 3, 5, 7, &#8230;, 8, 24, 40, 56, &#8230;, 2, 6, 10, 14, &#8230;.</p>
	<p>In the case of the Sharkovski sequence, there&#8217;s an extrinsic reason for imposing a total order, having to do with the origin of the sequence in the study of dynamical systems. The elements of the sequence correspond to the fundamental periods of periodic points in such systems. Sharkovski proved that if a dynamical system has a point with period <em>n</em>, then it also has at least one point with period <em>m</em> for every <em>m</em> that comes later than <em>n</em> in the Sharkovski sequence. (In particular, this means that a period-3 point must be accompanied by points of all other periods: deterministic chaos.) </p>
	<p>Unfortunately, there&#8217;s no such justification if we look upon a sequence as just an arbitrary arrangement of numbers, ordered according to its own internal logic. I&#8217;m not sure such a logic exists in this case.</p>
	<p><strong>Notes:</strong> Neil J. A. Sloane, who is never out of sequence, already has a reference to Ciesielski and Pogoda, but the sequence is indexed under <a href="http://www.research.att.com/~njas/sequences/A005408">A005408</a>, the odd numbers. Getting the full Sharkovski sequence into Sloane&#8217;s index would be as challenging as writing a program to generate it.</p>
	<p>The article by Ciesielski and Pogoda is a translation (from the Polish, by Abe Shenitzer) of a chapter from their book, <em>Mathematical Diamonds</em>, published in Warsaw in 1997. I&#8217;m curious about the rest of the chapters. Perhaps some enterprising mathematical publisher will bring out the whole book in English.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/the-end-of-the-number-line/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Computing graphics</title>
		<link>http://bit-player.org/2008/computing-graphics</link>
		<comments>http://bit-player.org/2008/computing-graphics#comments</comments>
		<pubDate>Wed, 30 Jan 2008 19:20:24 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>computing</category>
		<guid>http://bit-player.org/2008/computing-graphics</guid>
		<description><![CDATA[	I often use a computer to create graphics, but there was a time when I used graphics to compute. That era came back to me the other day in the library. I was browsing among dusty volumes in the folio section when I came upon this: 
	
The Design of Diagrams
for Engineering Formulas
and
The Theory of Nomography
	by
	Laurence [...]]]></description>
			<content:encoded><![CDATA[	<p>I often use a computer to create graphics, but there was a time when I used graphics to compute. That era came back to me the other day in the library. I was browsing among dusty volumes in the folio section when I came upon this: </p>
	<p class="centered">
The Design of Diagrams<br />
for Engineering Formulas<br />
and<br />
The Theory of Nomography</p>
	<p class="centered">by</p>
	<p class="centered">Laurence I. Hewes, B. Sc., Ph. D.<br />
and<br />
Herbert L. Seward, Ph. B., M. E.</p>
	<p class="centered">McGraw-Hill Book Company, Inc.<br />
1923</p>
	<p>The clerk at the circulation desk observed that there was no record anyone had ever borrowed this book. Although the records don&#8217;t go all the way back to 1923, I wouldn&#8217;t be surprised if I&#8217;m the first reader of this volume in 30 or 40 years.</p>
	<p>It&#8217;s a book full of nomograms and similar graphic devices, with instructions on how to create them. Here&#8217;s a simple example for calculating the volume of a torus:</p>
	<p><img src="/wp-content//torus450.jpg" alt="nomogram for calculating V=2.4674d^2D" border="0" width="450" height="682" /></p>
	<p>If you know any two of <em>d, V</em> and <em>D</em>, you can find the third quantity by laying a straightedge across the scales. (Quick quiz: What&#8217;s that constant in the formula V = 2.4674<em>d<sup>2</sup>D</em>?)</p>
	<p>I used to see computational aids like this all the time. Some magazine I read in the seventies (I&#8217;m not sure which one&mdash;maybe <em>Electronics</em>?) published a new nomogram every month. But now such diagrams have a decidedly fusty look. They&#8217;re like tools you might find in an old blacksmith shop or a tannery; it&#8217;s a challenge just to figure out how they worked and what they were used for. You find yourself admiring the workers who created useful products with such implements. </p>
	<p>The graphic device below is for calculating the strength of a metal plate pierced by rivet holes:</p>
	<p><img src="/wp-content//rivets450.jpg" alt="graph of 'Per Cent of Strength of Plate' vs. 'Greatest Pitch of Rivets in Inches'" border="0" width="450" height="531" /></p>
	<p>Did the engineers who specified the half-inch gusset plates for certain joints on the I-35W bridge in Minneapolis rely on such aids? The preliminary report from the National Transportation Safety Board (<a href="http://www.dot.state.mn.us/i35wbridge/pdfs/ntsb_design_adequacy_report.pdf">.pdf</a>) doesn&#8217;t comment on the computational methods that might have been used when the bridge was designed in the early 1960s. In any case, it&#8217;s not at all obvious which is more error-prone&mdash;pencil and paper, slide rule, nomogram, CAD software.</p>
	<p>The Theory of Nomography&mdash;as Hewes and Seward term their art&mdash;could hardly be more distant from modern computing practice. For one thing, it converts arithmetic into geometry; nowadays, we&#8217;re more likely to go the opposite way. A nomogram also emphasizes a static, declarative style of representing knowledge: A single diagram embodies all the relations of several variables, and one method solves for any unknown. Most digital computing is procedural rather than declarative; the emphasis is on step-by-step algorithms to go from givens to answers.</p>
	<p>I&#8217;m not about to give up silicon in favor of paper computers, but I do find some of these diagrams both beautiful and illuminating. Here&#8217;s a nomogram for solving the quadratic equation <em>z</em><sup>2</sup>+<em>pz</em>+<em>q</em>=0:</p>
	<p><img src="/wp-content//quadratic450.jpg" alt="nomogram for solution of quadratic equation" border="0" width="450" height="708" /></p>
	<p>Instead of three straight-line scales, as in the formula for the volume of a torus, we have two linear scales and a hyperbola. A moment&#8217;s thought reveals why the diagram must have this form: For any combination of the coefficients <em>p</em> and <em>q</em>, the equation must have either two roots or no (real) root. One branch of the hyperbola carries all the positive roots and the other all the negative values of <em>z</em>. Poking around in the diagram brings various properties of the equation into sharp focus. For example, if you lay a straightedge across the diagram in such a way that it passes through the point <em>p</em>=0, then it will either cut the two branches of the hyperbola symmetrically (if <em>q</em> is negative) or it will miss both branches (if <em>q</em> is positive). This is no surprise&mdash;the roots of <em>z</em><sup>2</sup>+<em>q</em>=0 had better be plus and minus the square root of <em>q</em>&mdash;but the graphic presentation carries a lot of explanatory force.</p>
	<p>Hewes and Seward give an even more elaborate tableau for solving a cubic equation:</p>
	<p><img src="/wp-content//cubic450.jpg" alt="cubic450.jpg" border="0" width="450" height="711" /></p>
	<p>The dashed line drawn across this diagram represents a straightedge placed so as to solve the particular instance <em>z</em><sup>3</sup>+4<em>z</em><sup>2</sup>-4<em>z</em>+0.5=0. The straightedge is set to the points 4 and &#8211;4 on the left and right scales, and then the roots are read off by projecting vertically from the intersections of this line with the curve labeled 0.50. Working by eye, the roots appear to lie at about 0.15 and 0.7. Newton&#8217;s method&mdash;the archetype of iterative, step-by-step computations&mdash;gives 0.14758497342482376768480 and 0.69902089681305967783231. (On the <a href="http://www.sagemath.org/">SAGE</a> server at the University of Washington, finding each of those roots took a couple of hundredths of a second.)</p>
	<p>Note: Ask Dr. Math has an <a href="http://mathforum.org/library/drmath/view/63338.html">informative article</a> on nomograms (or nomographs) with lots of references. One of the references led me to a 1999 lecture by Thomas Hankins, published in <em>Isis</em> (Hankins, Thomas L. 1999. Blood, dirt, and nomograms: A particular history of graphs. <em>Isis</em> 90(1):50&#8211;80). Hankins traces the origin and early history of the nomogram, which I had never known. Both the name and the concept came from Maurice d&#8217;Ocagne of the &Eacute;cole des Ponts et Chauss&eacute;es in Paris toward the end of the 19th century. Their first uses were in calculations needed for railroad construction.</p>
	<p><strong>Update 2008-03-05:</strong> Ron Doerfler, in a blog called <a href="http://myreckonings.com/wordpress/">Dead Reckonings</a>, has several illuminating and thorough essays on the construction of nomographs, including a very fishy example laid out on an elliptic curve. The rest of the blog is also worth reading. Thanks to Mitch Burrill for the pointer.</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/computing-graphics/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Snowfakes</title>
		<link>http://bit-player.org/2008/snowfakes</link>
		<comments>http://bit-player.org/2008/snowfakes#comments</comments>
		<pubDate>Thu, 24 Jan 2008 16:54:33 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
	<category>physics</category>
		<guid>http://bit-player.org/2008/snowfakes</guid>
		<description><![CDATA[	My friends up north tell me they have quite enough snowflakes already, thank you. Nevertheless, Janko Gravner and David Griffeath are making more. Or, rather, they&#8217;re making snowfakes (the word is theirs, not mine):
	
	In case there&#8217;s any doubt, the image above is not a photograph of a real snowflake; it&#8217;s an incredible simulation. 
	Mathematical and [...]]]></description>
			<content:encoded><![CDATA[	<p>My friends up north tell me they have quite enough snowflakes already, thank you. Nevertheless, <a href="http://www.math.ucdavis.edu/~gravner/">Janko Gravner</a> and <a href="http://psoup.math.wisc.edu/cook.html">David Griffeath</a> are making more. Or, rather, they&#8217;re making <em>snowfakes</em> (the word is theirs, not mine):</p>
	<p><img src="/wp-content//snowfake15.jpg" alt="Image 15 from the Gravner-Griffeath snowfake slideshow at psoup.math.wisc.edu/pub/Snowfakes.pdf" border="0" width="450" height="480" /></p>
	<p>In case there&#8217;s any doubt, the image above is not a photograph of a real snowflake; it&#8217;s an incredible simulation. </p>
	<p>Mathematical and computational models of snowflakes have a long history, perhaps going back to the <a href="http://mathworld.wolfram.com/KochSnowflake.html">snowflake curve</a> of Helge von Koch. I say &#8220;perhaps&#8221; because Koch, a Swede, seems not to have been much interested in snow; his 1904 paper on the subject was all about nowhere-differentiable everywhere-continuous curves. By the 1970s and 80s, however, there was a serious search for simple rules that would give rise to realistic snowflake patterns. </p>
	<p>In a series of three long and detailed papers, all written over the course of little more than a year, Gravner and Griffeath recapitulate the entire history of this effort, and then they advance the state of the art. They begin with cellular automata, especially a model first discussed in 1984 by Norman H. Packard. They go on to two-dimensional models based on the idea of diffusion-limited aggregation (which is also the process that generated the banner atop the bit-player.org page). Finally they develop the three-dimensional model that produced the image above. They write:</p>
	<blockquote><p>The key features of our model are <em>diffusion</em> of vapor, anisotropic <em>attachment</em> of water molecules, and a narrow <em>semi-liquid layer</em> at the boundary. All three ingredients seems to be essential for faithful emulation of the morphology observed in nature.
</p></blockquote>
	<p>All three papers and much more (movies, a slide show, even source code if you want your own snowfaking machine) are available at the <a href="http://psoup.math.wisc.edu/Snowfakes.htm">Snowfake site</a>. The first of the papers has also been published in <a href="http://www.expmath.org/expmath/volumes/15/15.html#GravnerGriffeath">Experimental Mathematics</a>.</p>
	<p>How much can these artificial snowflakes tell us about the formation of real ones? In modeling there always seems to be an interesting tension between simplicity and realism. Choose too crude an approximation and you never make contact with the real world; but a model that&#8217;s too complicated can be as hard to understand as nature itself. In this case, though, all three of the Gravner-Griffeath approaches seem to have something to teach us. Even the most abstract model, the cellular automaton, offers a hint of where those feathery patterns come from: an essential element of the automaton rules is that cells become active only if some but not all of their neighbors are active, favoring the growth of a structure that&#8217;s connected but not solid. The diffusion-limited aggregation models derive from a similar underlying principle but add a lot more physics, since the simulated water molecules can move through space. The 3D models include still more details and simulate the crystal-growth process in a way that begins to illuminate physical concepts such as the phase diagram.</p>
	<p>For those who insist on real snowflakes, there&#8217;s the impressive work of <a href="http://www.its.caltech.edu/~atomic/">Kenneth G. Libbrecht</a> on exhibit at <a href="http://www.its.caltech.edu/~atomic/snowcrystals/">snowccrystals.com</a>. (Don&#8217;t be put off by the sales pitch for the Snowflake Store; there&#8217;s good physics here.) Libbrecht has also written on snowflakes for my own magazine, <em>American Scientist</em>, but I&#8217;m not going to include a link because, sadly, the article is being held for ransom behind a paywall.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://bit-player.org/2008/snowfakes/feed/</wfw:commentRSS>
	</item>
	</channel>
</rss>
