<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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>Mark NelsonComputer Science &#187; </title>
	<link>http://marknelson.us</link>
	<description>Programming, mostly.</description>
	<pubDate>Thu, 26 Aug 2010 13:32:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>Brute Force vs. AI</title>
		<link>http://marknelson.us/2010/08/26/brute-force-vs-ai/</link>
		<comments>http://marknelson.us/2010/08/26/brute-force-vs-ai/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 13:32:59 +0000</pubDate>
		<dc:creator>Mark Nelson</dc:creator>
		
		<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://marknelson.us/2010/08/26/brute-force-vs-ai/</guid>
		<description><![CDATA[One of the annoying things that old school Artificial Intelligence researchers have to deal with is the fact that simple brute force is such a daunting foe. Back in the dawn era of the field, attempts to replicate human thought processes used deductive reasoning, symbolic representation, and incremental learning to solve problems.
As an example, look [...]]]></description>
			<content:encoded><![CDATA[<p>One of the annoying things that old school Artificial Intelligence researchers have to deal with is the fact that simple brute force is such a daunting foe. Back in the dawn era of the field, attempts to replicate human thought processes used deductive reasoning, symbolic representation, and incremental learning to solve problems.</p>
<p>As an example, look at what the AI consensus might have been 30 years ago for championship chess programs, and compare it to the massive database searches used by Deep Blue to pummel human opponents. I think you&#8217;ll find that things haven&#8217;t worked out quite the way they were expected to.</p>
<p>The feeling of the <i>hoi polloi</i>, of course, is that Artificial Intelligence is dead, and that&#8217;s probably the best thing that could happen to what is still a pretty exciting field.  But it&#8217;s quite a rarity for the public to get a hands-on look at exciting developments in AI.</p>
<p>Unfortunately, the public beta of the Swingly search engine is not going to be the exception to this rule.<br />
 <a href="http://marknelson.us/2010/08/26/brute-force-vs-ai/#more-131" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2010/08/26/brute-force-vs-ai/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Little Knowledge Can Be a Felonious Thing</title>
		<link>http://marknelson.us/2010/08/20/a-little-knowledge-can-be-a-felonious-thing/</link>
		<comments>http://marknelson.us/2010/08/20/a-little-knowledge-can-be-a-felonious-thing/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 19:06:59 +0000</pubDate>
		<dc:creator>Mark Nelson</dc:creator>
		
		<category><![CDATA[Scams]]></category>

		<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://marknelson.us/2010/08/20/a-little-knowledge-can-be-a-felonious-thing/</guid>
		<description><![CDATA[Not understanding some basic rules of mathematics or logic can be a problem if you are a computer programmer. It can stand in the way of a good solution to a problem, or worse yet, can cause you to spend a lot of time working on a dead end.
In the case of New Zealand developer [...]]]></description>
			<content:encoded><![CDATA[<p>Not understanding some basic rules of mathematics or logic can be a problem if you are a computer programmer. It can stand in the way of a good solution to a problem, or worse yet, can cause you to spend a lot of time working on a dead end.</p>
<p>In the case of New Zealand developer Philip Whitley, not understanding the <a href="http://marknelson.us/2010/08/01/the-pigeonhole-principle/">Pigeonhole Principle</a> led to a $NZ 5.3M fine, and up to five years in jail.<br />
 <a href="http://marknelson.us/2010/08/20/a-little-knowledge-can-be-a-felonious-thing/#more-130" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2010/08/20/a-little-knowledge-can-be-a-felonious-thing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>P ≠ NP?</title>
		<link>http://marknelson.us/2010/08/10/p-%e2%89%a0-np/</link>
		<comments>http://marknelson.us/2010/08/10/p-%e2%89%a0-np/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 18:42:47 +0000</pubDate>
		<dc:creator>Mark Nelson</dc:creator>
		
		<category><![CDATA[People]]></category>

		<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://marknelson.us/2010/08/10/p-%e2%89%a0-np/</guid>
		<description><![CDATA[You may have never heard of Vinay Deolalikar, but there is a chance that he may become next year&#8217;s Turing Award winner, not to mention an overnight millionaire. It seems that Vinay dropped the news at the start of this week that he had proven that P does not equal NP. In short, this proof [...]]]></description>
			<content:encoded><![CDATA[<p>You may have never heard of <a href="http://www.hpl.hp.com/personal/Vinay_Deolalikar/">Vinay Deolalikar</a>, but there is a chance that he may become next year&#8217;s <a href="http://awards.acm.org/homepage.cfm?awd=140">Turing Award</a> winner, not to mention an overnight <a href="http://www.claymath.org/millennium/P_vs_NP/">millionaire</a>. It seems that Vinay dropped the news at the start of this week that he had proven that P does not equal NP. In short, this proof means that many problems we suspect are hard to solve are in fact provably hard to solve. Whether his proof succeeds or not, the Interwebs are abuzz with the news.<br />
 <a href="http://marknelson.us/2010/08/10/p-%e2%89%a0-np/#more-129" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2010/08/10/p-%e2%89%a0-np/feed/</wfw:commentRss>
		</item>
		<item>
		<title>5 Trillion Digits of Pi</title>
		<link>http://marknelson.us/2010/08/06/5-trillion-digits-of-pi/</link>
		<comments>http://marknelson.us/2010/08/06/5-trillion-digits-of-pi/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 18:46:27 +0000</pubDate>
		<dc:creator>Mark Nelson</dc:creator>
		
		<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://marknelson.us/2010/08/06/5-trillion-digits-of-pi/</guid>
		<description><![CDATA[Back in 1981, fresh out of school, I was awestruck by Steve Wozniak&#8217;s program that calculated over 100,000 digits of e on an Apple II. (Anyone who has a scan of his article in the June 1981 issue of Byte, please email me a copy!) Shortly after reading the article, I ported his program to [...]]]></description>
			<content:encoded><![CDATA[<p>Back in 1981, fresh out of school, I was awestruck by Steve Wozniak&#8217;s program that calculated over 100,000 digits of e on an Apple II. (Anyone who has a scan of his article in the June 1981 issue of Byte, please email me a copy!) Shortly after reading the article, I ported his program to the PDP-11 at my office and duplicated his results, down to the last digit.</p>
<p>These days the stakes are much higher when it comes to calculating the values of constants. Alexander Yee and Shigeru Kondo have just <a href="http://www.numberworld.org/misc_runs/pi-5t/details.html">announced</a> the calculation of pi to 5 trillion digits. And oddly enough, this was accomplished on a desktop machine running Windows server, not the Linux cluster I would have expected.</p>
<p>Here are some of key stats:</p>
<dl>
<dt>Operating System</dt>
<dd>Windows Server 2008 R2 Enterprise x64<//dd></p>
<dt>Software</dt>
<dd><a href="http://www.numberworld.org/y-cruncher/">y-cruncher</a></dd>
<dt>Processor</dt>
<dd>2 Intel Xeon X5680 @3.33 GHz offering 24 hyperthreaded processors</dd>
<dt>Disk Space</dt>
<dd>The computation required roughly 22TB of disk space, and the compressed result takes another 3.8TB</dd>
<dt>Time</b></dt>
<dd>The task took 90 days to complete, and 66 hours to verify</dd>
</dl>
<p>The y-cruncher software package that broke this record also holds records for several other constants, including one trillion digits of e. So in 30 years, more or less, the desktop PC has gone from constant calculations under a million digits to over a trillion digits. That growth rate of 1.7x per year maps pretty well to <a href="http://en.wikipedia.org/wiki/Moore's_law">Moore&#8217;s Law</a>, suggesting that we can expect these numbers to continue climbing for at least a few more years.</p>
<p>Kudos to Alexander Yee and Shigeru Kondo on a smashing accomplishment!</p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2010/08/06/5-trillion-digits-of-pi/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Pigeonhole Principle</title>
		<link>http://marknelson.us/2010/08/01/the-pigeonhole-principle/</link>
		<comments>http://marknelson.us/2010/08/01/the-pigeonhole-principle/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 19:01:01 +0000</pubDate>
		<dc:creator>Mark Nelson</dc:creator>
		
		<category><![CDATA[Snarkiness]]></category>

		<category><![CDATA[Computer Science]]></category>

		<category><![CDATA[Data Compression]]></category>

		<guid isPermaLink="false">http://marknelson.us/2010/08/01/the-pigeonhole-principle/</guid>
		<description><![CDATA[The Pigeonhole Principle, also referred to as the Counting Theorem, is a handy tool for mathematicians, and naturally, computer programmers.
The loose version of this principle says &#8220;After placing n pigeons into m compartments, if n is greater than m, you will find that some compartment must contain more than one pigeon.&#8221;
Seems obvious, and perhaps it [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://en.wikipedia.org/wiki/Pigeonhole_principle">Pigeonhole Principle</a>, also referred to as the Counting Theorem, is a handy tool for mathematicians, and naturally, computer programmers.</p>
<p>The loose version of this principle says &#8220;After placing n pigeons into m compartments, if n is greater than m, you will find that some compartment must contain more than one pigeon.&#8221;</p>
<p>Seems obvious, and perhaps it is, but at least in the world of data compression it must be trotted out from time to time in order to bludgeon dreams back to reality.<br />
 <a href="http://marknelson.us/2010/08/01/the-pigeonhole-principle/#more-127" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2010/08/01/the-pigeonhole-principle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Algorithms Crossword</title>
		<link>http://marknelson.us/2007/12/04/algorithms-crossword/</link>
		<comments>http://marknelson.us/2007/12/04/algorithms-crossword/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 20:57:24 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://marknelson.us/2007/12/04/algorithms-crossword/</guid>
		<description><![CDATA[For the last few months I&#8217;ve been up to my eyeballs in algorithms - school, work, writing, you name it. 
In honor of the often puzzling topics I&#8217;ve been working on, here&#8217;s a little crossword with an algorithms theme. 
The java applet that lets you solve online has a bit of lameness, but it&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few months I&#8217;ve been up to my eyeballs in algorithms - school, work, writing, you name it. </p>
<p>In honor of the often puzzling topics I&#8217;ve been working on, here&#8217;s a little crossword with an algorithms theme. </p>
<p>The java applet that lets you solve online has a bit of lameness, but it&#8217;s not mine and so it&#8217;s kind of out of my hands. I&#8217;d love to have a higher quality engine, but the free choices are limited. In particular, there doesn&#8217;t appear to be a free javascript crossword engine for the taking, so I&#8217;m stuck with Java, as are you.<br />
 <a href="http://marknelson.us/2007/12/04/algorithms-crossword/#more-115" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2007/12/04/algorithms-crossword/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yet Another Word Puzzle</title>
		<link>http://marknelson.us/2007/11/13/yet-another-word-puzzle/</link>
		<comments>http://marknelson.us/2007/11/13/yet-another-word-puzzle/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 20:58:45 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Web Articles]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://marknelson.us/2007/11/18/yet-another-word-puzzle/</guid>
		<description><![CDATA[

Dr. Dobb&#8217;s PortalNovember, 2007
         Article on DDJ site
  


As I&#8217;ve confessed in the past, I&#8217;m a sucker for word puzzles. My recent post on a Will Shortz puzzle from NPR Morning Edition ended up provoking a surprising amount of comment, much of it in the vein [...]]]></description>
			<content:encoded><![CDATA[<table border="0" width="500">
<tr>
<td width="300"><img alt="DDJ Portal Logo" src="http://marknelson.us/attachments/misc/logo_ddj.gif" /></td>
<td><strong>Dr. Dobb&#8217;s Portal</strong><br/>November, 2007<br />
         <a href="http://ddj.com/cpp/202806370" class="newpage">Article on DDJ site</a>
  </td>
</tr>
</table>
<p>As I&#8217;ve confessed in the past, I&#8217;m a sucker for word puzzles. My <a href="http://marknelson.us/2007/04/01/puzzling/" class="newpage">recent post</a> on a Will Shortz puzzle from NPR Morning Edition ended up provoking a surprising amount of <a href="http://thraxil.org/users/anders/posts/2007/10/30/A-Simple-Programming-Puzzle-Seen-Through-Three-Different-Lenses/" class="newpage">comment</a>, much of it in the vein of <i>Watch me solve it better, faster, and with more style using language XXX</i>.</p>
<p>I certainly enjoyed watching other people solve the problem, and found their solutions instructive. As the XP crowd has figured out, we programmers spend too much time working on our own problems and not enough time watching how other people work. There&#8217;s a lot to learn, both good and bad, from getting a peek inside another person&#8217;s head.</p>
<h4>Out of the Blue</h4>
<p>Which brings me to the puzzle at the center of this article.<br />
 <a href="http://marknelson.us/2007/11/13/yet-another-word-puzzle/#more-106" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2007/11/13/yet-another-word-puzzle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building the Convex Hull</title>
		<link>http://marknelson.us/2007/08/22/convex/</link>
		<comments>http://marknelson.us/2007/08/22/convex/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 19:37:50 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Web Articles]]></category>

		<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://marknelson.us/2007/08/22/convex/</guid>
		<description><![CDATA[

Dr. Dobb&#8217;s PortalSeptember, 2007
         Article on DDJ site
  


Finding the Convex Hull of a set of points is an interesting problem in computational geometry. It is useful as a building block for a diverse set of applications, including thing such as:

Collision detection in video games, providing [...]]]></description>
			<content:encoded><![CDATA[<table border="0" width="500">
<tr>
<td width="300"><img alt="DDJ Portal Logo" src="http://marknelson.us/attachments/misc/logo_ddj.gif" /></td>
<td><strong>Dr. Dobb&#8217;s Portal</strong><br/>September, 2007<br />
         <a href="http://www.ddj.com/architect/201806315" class="newpage">Article on DDJ site</a>
  </td>
</tr>
</table>
<p>Finding the <a href="http://en.wikipedia.org/wiki/Convex_hull" class="newpage">Convex Hull</a> of a set of points is an interesting problem in computational geometry. It is useful as a building block for a diverse set of applications, including thing such as:</p>
<ul>
<li/>Collision detection in video games, providing a useful replacement for bounding boxes.
<li/>Visual pattern matching/object detection
<li/>Mapping
<li/>Path determination
</ul>
<p>Just as an example, if one of the Mars rovers has to chart a path around a boulder, the convex hull can be used to provide the shortest path past the obstacle, given a map that shows the points where the boulder abuts the ground.</p>
<p>This article will go over the definition of the 2D convex hull, describe Graham&#8217;s efficient algorithm for finding the convex hull of a set of points, and present a sample C++ program that can be used to experiment with the algorithm.</p>
<h4>The Convex Hull</h4>
<p>There are many ways to draw a boundary around a set of points in a two-dimensional plane. One of the easiest to implement is a bounding-box, which is a rectangle that spans the set from its minimum and maximum points in the X and Y planes.</p>
<p>Creating a bounding-box is easy, but it doesn&#8217;t form as tight a wrapper as we might like around a set of points. Consider the bounding box around the three points shown in Figure 1.<br />
<center><br />
<img src="http://marknelson.us/attachments/2007/convex/Figure1.png"><br />
Figure 1 - A standard bounding box around three points<br />
</center><br />
We can certainly wrap those points much more tightly using easy-to-compute straight lines, and Figure 2 shows an example that is significantly more compact:<br />
<center><br />
<img src="http://marknelson.us/attachments/2007/convex/Figure2.png"><br />
Figure 2 - A convex hull around the three points from Figure 1<br />
</center><br />
As it happens, Figure 2 is a convex hull.<br />
 <a href="http://marknelson.us/2007/08/22/convex/#more-91" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2007/08/22/convex/feed/</wfw:commentRss>
		</item>
		<item>
		<title>C++ Hash Table Memoization: Simplifying Dynamic Programming</title>
		<link>http://marknelson.us/2007/08/01/memoization/</link>
		<comments>http://marknelson.us/2007/08/01/memoization/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 03:43:52 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Web Articles]]></category>

		<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://marknelson.us/2007/08/01/memoization/</guid>
		<description><![CDATA[This article discusses the use of C++ hash containers to improve storage of subproblem results when using dynamic programming (DP.) <i>Memoization</i> is a key part of dynamic programming, which is conventionally done by storing subproblem results in simple tables or lists. Using hash tables instead of these simpler structures will allow you to use dynamic programming while retaining your algorithm's natural recursive structure, simplifying design and making your code easier to follow. I'll provide a fully-developed example of an algorithm, and show how it can be adapted to use hash table memoization.]]></description>
			<content:encoded><![CDATA[<table border="0" width="500">
<tr>
<td width="300"><img alt="DDJ Portal Logo" src="http://marknelson.us/attachments/misc/logo_ddj.gif" /></td>
<td><strong>Dr. Dobb&#8217;s Portal</strong><br/>October, 2007<br />
         <a href="http://ddj.com/cpp/202405227" class="newpage">Article on DDJ site</a>
  </td>
</tr>
</table>
<p>This article discusses the use of C++ hash containers to improve storage of subproblem results when using dynamic programming (DP.) <i>Memoization</i> is a key part of dynamic programming, which is conventionally done by storing subproblem results in simple tables or lists. Using hash tables instead of these simpler structures will allow you to use dynamic programming while retaining your algorithm&#8217;s natural recursive structure, simplifying design and making your code easier to follow. I&#8217;ll provide a fully-developed example of an algorithm, and show how it can be adapted to use hash table memoization.<br />
 <a href="http://marknelson.us/2007/08/01/memoization/#more-101" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2007/08/01/memoization/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Multicore Kerfuffle and a Dose of Reality</title>
		<link>http://marknelson.us/2007/07/30/multicore-panic/</link>
		<comments>http://marknelson.us/2007/07/30/multicore-panic/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 02:31:35 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
		
		<category><![CDATA[Complaining]]></category>

		<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">/2007/07/30/multicore-panic/</guid>
		<description><![CDATA[It seems like this is the summer of multicore panic. I can&#8217;t open a technical magazine without some pundit declaring that our current programming paradigms are useless when running on new multicore CPU architectures. Venerable analyst John Dvorak, who generally actually understands what he is writing about, coughed up this mess (with minor excisions for [...]]]></description>
			<content:encoded><![CDATA[<p>It seems like this is the summer of multicore panic. I can&#8217;t open a technical magazine without some pundit declaring that our current programming paradigms are useless when running on new multicore CPU architectures. Venerable analyst John Dvorak, who generally actually understands what he is writing about, coughed up <a href="http://www.pcmag.com/article2/0,1895,2129596,00.asp">this mess</a> (with minor excisions for brevity):</p>
<blockquote><p>Nobody wants to face the fact that Linux, Mac OS X, Microsoft Windows XP, and Vista are based on OS designs that are as old as the hills &#8230;</p>
<p>Meanwhile, none of these operating systems has the power to make multicore chips work as advertised. In the end, these chips are little more than novelties. Intel actually has the gall to claim that its extra cores can save power by automatically shutting down when they&#8217;re not in use. This just means they&#8217;ll be shut down most of the time. If the software could take advantage of these extra cores, there wouldn&#8217;t be any need to shut them down&#8230;.</p>
<p>Why can&#8217;t operating systems simply dedicate extra cores to housekeeping chores and cool background tasks? It&#8217;s simple enough to work. Here are a few choice uses for core dedication. There are six of them, since we may see a six-core chip on the road ahead.
</p></blockquote>
<p>According to <a href="http://news.wired.com/dynamic/stories/T/TOO_FAST_COMPUTERS?SITE=WIRE&#038;SECTION=HOME&#038;TEMPLATE=DEFAULT">this piece</a> in Wired, things are even more dire than that:</p>
<blockquote><p>The problem is that many software applications weren&#8217;t written for chips with multiple cores, and the hardware is advancing so fast that the software runs the risk of being left behind.</p>
<p>&#8220;You can imagine a scenario where people stop buying laptops and PCs because we can&#8217;t figure this out,&#8221; said David Patterson, a computer-architecture expert and computer science professor at the University of California, Berkeley.</p></blockquote>
<p>People are going to stop buying computers? Panic indeed!<br />
 <a href="http://marknelson.us/2007/07/30/multicore-panic/#more-85" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://marknelson.us/2007/07/30/multicore-panic/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
