<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>You think this is a Game?</title>
	<atom:link href="http://thisaintnogame.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://thisaintnogame.wordpress.com</link>
	<description>Quite the contrary, this aint no game.</description>
	<lastBuildDate>Tue, 29 Mar 2011 04:24:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='thisaintnogame.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>You think this is a Game?</title>
		<link>http://thisaintnogame.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://thisaintnogame.wordpress.com/osd.xml" title="You think this is a Game?" />
	<atom:link rel='hub' href='http://thisaintnogame.wordpress.com/?pushpress=hub'/>
		<item>
		<title>March Madness and ClusterLove Alpha</title>
		<link>http://thisaintnogame.wordpress.com/2011/03/29/march-madness-and-clusterlove-alpha/</link>
		<comments>http://thisaintnogame.wordpress.com/2011/03/29/march-madness-and-clusterlove-alpha/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 04:24:37 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thisaintnogame.wordpress.com/?p=227</guid>
		<description><![CDATA[The NCAA men&#8217;s basketball tournament (lovingly called March Madness) has been great this year. There have been a ton of upsets, really great games, and one of the least likely set of Final Four teams in history (2 seed, 3 &#8230; <a href="http://thisaintnogame.wordpress.com/2011/03/29/march-madness-and-clusterlove-alpha/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=227&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The NCAA men&#8217;s basketball tournament (lovingly called March Madness) has been great this year. There have been a ton of upsets, really great games, and one of the least likely set of Final Four teams in history (2 seed, 3 seed, 8 seed, 11 seed). It has been a lot of fun to watch.</p>
<p>And adding to the fun for me is a bracket-prediction algorithms competition I have going on with two of my labmates. We downloaded a bunch of statistics that we could find for all the NCAA teams and built statistical models that would predict the outcomes of each game. Part of the fun is being able to share what we did, so here is my write-up.</p>
<p>Name: ClusterLove Alpha</p>
<p>Why the Name: Because I use a technique called clustering, a variable called alpha, and the term clusterf*ck is too obscene.</p>
<p>The idea: In my mind, the NCAA tournament presents two challenges&#8230;</p>
<p>1. Compute the probability that team A beats team B. Pretty standard.</p>
<p>2. Given those probabilities, choose some sort of &#8220;optimal&#8221; bracket.</p>
<p>To explain how I computed the probabilities, imagine the following scenario: The only two teams in the entire league are Duke and UNC. They play each other 100 times per season and Duke won 70 of those times. Based on that information, I would guess that Duke has a 70% chance of winning their next game against UNC. Sounds reasonable, right? Ideally, this is how I would compute every probability but there are problems with this idea in reality. But this is at the heart of how I get the probabilities.</p>
<p>Now what if Duke and UNC had only played once and Duke won. Would we say that Duke has a 100% chance of winning in their next game? Definitely not, the sample size is simply not large enough to draw the conclusion. And in fact, very few of the college teams that will play each other during the tournament actually played each other during the regular season. So I will need some way to expand the sample size for each match-up.</p>
<p>Now imagine that Kentucky is playing UNC in the first round but they have never played each other before. However, Duke played UNC and won 70 out of 100 games. I also know that Duke and Kentucky are extremely similar teams. They score about as many points on average, they sink as many 3 point shots on average, they block the same number of shots, etc. Since Kentucky and Duke are so similar and Duke beats UNC with a 70% chance, I will say that Kentucky will beat UNC with a 70% chance. This is the second idea that is at the heart of my algorithm. I want to know what teams are very similar to each other, label them by arbitrary types (Kentucky and Duke would both be type 1 teams, UNC a type 2 team, etc) and then with that information, I will compute the above probabilities by saying &#8220;type 1 teams beat type 2 teams 70% of the time in the regular season.&#8221;</p>
<p>I used a technique called <a href="http://en.wikipedia.org/wiki/Cluster_analysis">clustering</a> (I used k-means specifically) to sort all the teams into different types so that any two teams with the same type were very statistically similar. The statistics that I used were the 16 aggregate stats the NCAA collects for all men&#8217;s basketball teams (you can find them <a href="http://www.ncaa.com/stats/basketball-men/d1">here</a>). In my program, I ended deciding that there were 14 different types of teams. I arrived at this number through trial-and-error (by comparing how well my predictions would have done during the regular season). Once my algorithm assigned each team a label, my program would go back through the regular season and compute how many times each type beat every other type. I would then apply that type data to compute the probability of any college team beating any other college team. For example, if I wanted to see compute the probability of Gonzaga beating Wisconsin, my algorithm would see that Gonzaga was type 3 and Wisconsin was type 10 and type 3 teams only beat type 10 teams 39% of the time during the regular season. Thus I would conclude that Gonzaga only had a 39% chance of beating Wisconsin.</p>
<p>The real magic in this part is trying to get the clustering algorithm to really work right. I am far from being good at this part and there is probably a lot I don&#8217;t quite understand yet. I have a feeling that I had too many useless variables that were mucking up the results of the clustering algorithm. There is also a problem in the distance metric I was using given the different types of data. For example, say Kentucky and Kansas were similar in every way except Kansas scored 3 more points on average per game. To you and me, that is pretty insignificant. Now say Kansas and Pitt were similar in every way except Kansas shot 80% from the field and Pitt shot 50%. To you and me, that is a huge difference.  But according to my clustering algorithm, Kansas and Pitt are 10 times more similar than Kansas and Kentucky. Finally, I am looking for a better way to include strength-of-schedule. I had a lot of problems with bad teams that came from very non-competitive divisions being declared similar to really good teams that came from competitive divisions just because they scored similar points per game, etc. One way to get around that is strength-of-schedule but I still have not found a good way to add that in. One idea is to use SOS as a weighting factor for every other stat, another idea is to make another stat that I cluster by but I really have no idea which is better.</p>
<p>In fact there are problem many many more problems. But this is essentially how I computed my game probabilities.</p>
<p>&nbsp;</p>
<p>The next problem I tackled is how to actually choose a good bracket (given these probabilities). The straightforward way to go about it is to choose the team that has the better chance of winning in each game and just continue doing that until you have filled out the entire bracket. But consider the following example; Duke and Kentucky play in the first round as do Pitt and Kansas and the winners of those games play each other. Imagine Duke has a 60% chance of beating Kentucky but only a 10% chance of beating Pitt or Kansas. Meanwhile, Kentucky has a 40% shot of beating Duke but a 75% shot of eating either Pitt or Kansas. Since the later round game is worth more, I would rather choose Kentucky over Duke in this scenario because they have a better shot at winning both games. So to choose what team will win each game, I compute the average chance they have against all teams that they could possibly play in that game and then choose the team that maximizes that average times the chance that the team will make it to that round.</p>
<p>Disclaimer: I am not claiming this actually satisfies any meaningful type of optimality or that this is even a particularly good idea. I have yet to really think about this theoretically (although it is on my to-do list). I&#8217;m not sure it even makes logical sense if I really thouht about it. My only reason for following this algorithm is that I happen to like it.</p>
<p>And that about sums up the high-level overview. Last year, the previous iteration of this algorithm placed 2nd in family&#8217;s pool (out of 10 or so I believe). This year, it placed 2nd out of the three computer models that my labmates and I built and 5th amongst my family (out of 12 or 13). Technically, the tournament isn&#8217;t over yet but most people have 0 potential points left. I did manage to call the Kentucky over Ohio upset. My algorithm got pretty destroyed in the first two rounds but did manage to do well in sweet 16 round, where I picked up most of my marginal points (the points that other people didn&#8217;t get). I actually would have won the computer competition and taken 1st in my family&#8217;s pool if UNC had managed to beat Kentucky. Oh well, there is always more Madness next year.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=227&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2011/03/29/march-madness-and-clusterlove-alpha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
		<item>
		<title>Optimal Bluffing Frequency: Proof</title>
		<link>http://thisaintnogame.wordpress.com/2011/03/05/optimal-bluffing-frequency-proof/</link>
		<comments>http://thisaintnogame.wordpress.com/2011/03/05/optimal-bluffing-frequency-proof/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 03:49:52 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[game theory]]></category>
		<category><![CDATA[poker]]></category>

		<guid isPermaLink="false">http://thisaintnogame.wordpress.com/?p=206</guid>
		<description><![CDATA[The following scenario is an abridged version of the scenario that David Sklansky gives in The Theory of Poker, chapter 19. He states that your bluffing frequency should be equal to your opponent&#8217;s pot odds but he never gives a &#8230; <a href="http://thisaintnogame.wordpress.com/2011/03/05/optimal-bluffing-frequency-proof/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=206&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following scenario is an abridged version of the scenario that David Sklansky gives in <a href="http://www.amazon.com/Theory-Poker-Professional-Player-Teaches/dp/1880685000/ref=sr_1_1?ie=UTF8&amp;qid=1299288927&amp;sr=8-1">The Theory of Poker</a>, chapter 19. He states that your bluffing frequency should be equal to your opponent&#8217;s pot odds but he never gives a proof. Here is my attempt at providing such proof. Much of the following analysis will be his or based off of what he says (with the exception of the proof).</p>
<p>&#8220;You are playing heads-up poker with 1 card left to come. You will be first to act; you can either bet <img src='http://s0.wp.com/latex.php?latex=B&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='B' title='B' class='latex' /> or check. Your opponent can only call or fold. There are <img src='http://s0.wp.com/latex.php?latex=P&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='P' title='P' class='latex' /> dollars in the pot already. For the purpose of this example, assume there are <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> cards left in the deck that give you a better hand. Furthermore, if your hand improves at all, it is guaranteed to be the best hand. We lose otherwise. What should our betting strategy be? Also assume that we tell our opponent exactly what our strategy is (and we aren&#8217;t liars, so we will follow that strategy)&#8221;</p>
<p>First observation: We should bet if we improve our hand because we will definitely be winners. However, if we never bluff (and he knows we never bluff), our opponent will never call if we bet, which makes betting our value hands useless. So it makes sense that we should bluff some times. But when?</p>
<p>We will use what card we get to signal whether or not we will bluff (assuming that card is not one of the <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> cards that make our hand). So now assume that there are <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> cards that make our hand, <img src='http://s0.wp.com/latex.php?latex=Y&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Y' title='Y' class='latex' /> cards that we will bluff on, and <img src='http://s0.wp.com/latex.php?latex=Z&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Z' title='Z' class='latex' /> cards that we will just check on (if we check, we lose).</p>
<p>To recap our strategy is as follows: Bet (and win) if we receive any one of our <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> cards, bluff on the <img src='http://s0.wp.com/latex.php?latex=Y&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Y' title='Y' class='latex' /> cards, and check on <img src='http://s0.wp.com/latex.php?latex=Z&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Z' title='Z' class='latex' /> cards.</p>
<p>What is the expected value for an opponent who always calls?</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Ctext%7BEV%28always+call%29%7D+%3D+%5Cfrac%7By%7D%7Bx%2By%2Bz%7D%28p%2Bb%29+%2B+%5Cfrac%7Bx%7D%7Bx%2By%2Bz%7D%28-b%29+%2B+%5Cfrac%7Bz%7D%7Bx%2By%2Bz%7D%28p%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='&#92;text{EV(always call)} = &#92;frac{y}{x+y+z}(p+b) + &#92;frac{x}{x+y+z}(-b) + &#92;frac{z}{x+y+z}(p)' title='&#92;text{EV(always call)} = &#92;frac{y}{x+y+z}(p+b) + &#92;frac{x}{x+y+z}(-b) + &#92;frac{z}{x+y+z}(p)' class='latex' /></p>
<p>The first term represents the value our opponent gets when we bluff and get called, the second term represents when we value bet and get called, and the last represents when we check.</p>
<p>What&#8217;s the value for an opponent that always folds?</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Ctext%7BEV%28always+fold%29%7D+%3D+%5Cfrac%7Bz%7D%7Bx%2By%2Bz%7D%28p%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='&#92;text{EV(always fold)} = &#92;frac{z}{x+y+z}(p)' title='&#92;text{EV(always fold)} = &#92;frac{z}{x+y+z}(p)' class='latex' /></p>
<p>If they always fold when we bet, they only win when we check.</p>
<p>Now back to our strategy. <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' />, the cards that make our hand, is a given of the problem, so our  decision consists of deciding the value of <img src='http://s0.wp.com/latex.php?latex=Y&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Y' title='Y' class='latex' />. I will claim, and provide some intuition, that we want to set a <img src='http://s0.wp.com/latex.php?latex=Y&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Y' title='Y' class='latex' /> such that our opponent receives the same expected value from calling or folding.</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7By%7D%7Bx%2By%2Bz%7D%28p%2Bb%29+%2B+%5Cfrac%7Bx%7D%7Bx%2By%2Bz%7D%28-b%29+%2B+%5Cfrac%7Bz%7D%7Bx%2By%2Bz%7D%28p%29+%3D+%5Cfrac%7Bz%7D%7Bx%2By%2Bz%7D%28p%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='&#92;frac{y}{x+y+z}(p+b) + &#92;frac{x}{x+y+z}(-b) + &#92;frac{z}{x+y+z}(p) = &#92;frac{z}{x+y+z}(p)' title='&#92;frac{y}{x+y+z}(p+b) + &#92;frac{x}{x+y+z}(-b) + &#92;frac{z}{x+y+z}(p) = &#92;frac{z}{x+y+z}(p)' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=Y%28P%2BB%29+%3D+XB&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Y(P+B) = XB' title='Y(P+B) = XB' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=Y+%3D+X+%5Cfrac%7BB%7D%7BP%2BB%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Y = X &#92;frac{B}{P+B}' title='Y = X &#92;frac{B}{P+B}' class='latex' /></p>
<p>So boiling this down to the <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> to <img src='http://s0.wp.com/latex.php?latex=Y&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Y' title='Y' class='latex' /> format, we get that our ratio of value bets to bluffs is <img src='http://s0.wp.com/latex.php?latex=P%2BB&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='P+B' title='P+B' class='latex' /> to <img src='http://s0.wp.com/latex.php?latex=B&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='B' title='B' class='latex' />. This is precisely the formula for determining your <a href="http://en.wikipedia.org/wiki/Pot_odds">pot odds</a>.</p>
<p>Now why is it optimal to bluff such that your opponent receives the same EV from calling and folding? Well if this is the case, then any call/fold strategy your opponent employs can make at most <img src='http://s0.wp.com/latex.php?latex=V&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='V' title='V' class='latex' /> (which is the EV of calling or folding when we use our strategy). If he calls all the time, he gets <img src='http://s0.wp.com/latex.php?latex=V&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='V' title='V' class='latex' />. If he folds all the time, he gets <img src='http://s0.wp.com/latex.php?latex=V&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='V' title='V' class='latex' />. If he calls half of the time and folds the other half, he gets <img src='http://s0.wp.com/latex.php?latex=V&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='V' title='V' class='latex' />. There is nothing he can do to do better. So that is a good thing. This gives us a good intuition that this should be a good point for us to push him towards. The fact that there is no better strategy for you involves using some facts about 2 player, <a href="http://en.wikipedia.org/wiki/Zero-sum">zero-sum</a> game that are too complicated to go into here. So just trust me on it.</p>
<p>An important note: This analysis assumes our opponent is very good and will play optimally for himself (this is usually the assumption of game theory). If you notice that an opponent generally calls too much or too little, it is a good idea to deviate from this strategy a little to take advantage of that fact.</p>
<p>So how useful is this idea at the table? We made some pretty strong assumptions about the scenario in order to derive this result, so it is not directly applicable. However, if you have a good feel for the hand you are in and the players at the table, it might be possible to establish these conditions. At that point, you should consider using such a strategy.</p>
<p>It also comes with my standard poker theory caveat: It may not be directly useful but it provides you with another tool to use at the table, should you feel that it is appropriate to use it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=206&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2011/03/05/optimal-bluffing-frequency-proof/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
		<item>
		<title>Facebook Hacker Cup: Comments and Problem Analysis</title>
		<link>http://thisaintnogame.wordpress.com/2011/01/15/facebook-hacker-cup-comments-and-problem-analysis/</link>
		<comments>http://thisaintnogame.wordpress.com/2011/01/15/facebook-hacker-cup-comments-and-problem-analysis/#comments</comments>
		<pubDate>Sat, 15 Jan 2011 19:42:09 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[algorithms]]></category>

		<guid isPermaLink="false">http://www.thisaintnogame.us/blog/?p=181</guid>
		<description><![CDATA[This year, Facebook decided to run a programming contest that is, in theory, almost identical to Google&#8217;s code jam. I&#8217;m a big fan of Code Jam because I like the format (i.e. downloading input and submitting output rather than submitting &#8230; <a href="http://thisaintnogame.wordpress.com/2011/01/15/facebook-hacker-cup-comments-and-problem-analysis/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=181&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This year, Facebook decided to run a programming contest that is, in theory, almost identical to Google&#8217;s code jam. I&#8217;m a big fan of Code Jam because I like the format (i.e. downloading input and submitting output rather than submitting source code) and the questions that Google comes up with are pretty good. So I figured I would like this Facebook contest (its a programming contest and I could get a free t-shirt, what&#8217;s not to like?). Unfortunately, Facebook has failed pretty hard with this contest. First, they had a weekend long qualification round. All you had to do was answer one question within the given six minute time limit and you qualified. So what happened? Downloading input didn&#8217;t really work on some browsers, others had trouble uploading the output, and it was generally bad. Then, to top it off, they sent out emails to people saying &#8220;Congrats, you qualified for round 1&#8243; and then later had to retract a number of those emails because those people did not solve any questions. This morning was the first real round, which they had to end early because answer submission was not working correctly.  The saving grace of this contest has been the thousands of angry comments left by disgruntled competitors. They are very entertaining comments.</p>
<p>Anyway, I would now like to talk about my favorite problem from this set. Here is <a href="http://www.facebook.com/hackercup/problems.php?round=144428782277390">the link</a> but I will just state the boiled down question (or at least how I thought about it).</p>
<p>Question: You are going to be flipping N coins. Each coin has two probabilities of getting a heads <img src='http://s0.wp.com/latex.php?latex=p&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='p' title='p' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=q&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='q' title='q' class='latex' />, with <img src='http://s0.wp.com/latex.php?latex=p+%5Cleq+q&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='p &#92;leq q' title='p &#92;leq q' class='latex' /> (each of these values is unique for each coin). Before you flip a coin, you get to choose whether or not you want to use p or q. For K of these coins, you must the q (the lower probability). You would like to choose this K subset such that your probability of getting all heads is maximized. If you play optimally, what is the highest probability you can achieve?</p>
<p>Example: N = 2, K = 1. I have two coins, denote {p,q} for the respected values. One coin is {.6, .4} while the other is {.5, .1}. For one of these coins, I must use the q value instead of p. So I only have two possibilities <img src='http://s0.wp.com/latex.php?latex=p_1%2C+q_2&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='p_1, q_2' title='p_1, q_2' class='latex' /> = .6*.1   or <img src='http://s0.wp.com/latex.php?latex=q_1%2C+p_2&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='q_1, p_2' title='q_1, p_2' class='latex' /> = .4*.5. The second is better, so I choose to take the q value of the first coin.</p>
<p>The first thing that jumps out at me is that I see a recurrence. Let <img src='http://s0.wp.com/latex.php?latex=F%28n%2Ck%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(n,k)' title='F(n,k)' class='latex' /> be the best I can do using the first n coins and having to use k q-values. Then I claim the following is optimal</p>
<p><img src='http://s0.wp.com/latex.php?latex=F%28n%2Ck%29+%3D+%5Ctext%7Bmax%7D+%5C%7B+p_n%2AF%28n-1%2Ck%29%2C+q_n%2AF%28n-1%2Ck-1%29+%5C%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(n,k) = &#92;text{max} &#92;{ p_n*F(n-1,k), q_n*F(n-1,k-1) &#92;}' title='F(n,k) = &#92;text{max} &#92;{ p_n*F(n-1,k), q_n*F(n-1,k-1) &#92;}' class='latex' />.</p>
<p>Where <img src='http://s0.wp.com/latex.php?latex=p_n&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='p_n' title='p_n' class='latex' /> represents the p-value of the nth coin (same for <img src='http://s0.wp.com/latex.php?latex=q_n&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='q_n' title='q_n' class='latex' />).  The <img src='http://s0.wp.com/latex.php?latex=p_n%2AF%28n-1%2Ck%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='p_n*F(n-1,k)' title='p_n*F(n-1,k)' class='latex' /> term represents the sub-problem I would get if I chose to take the p-value of the nth coin and the <img src='http://s0.wp.com/latex.php?latex=q_n%2AF%28n-1%2Ck-1%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='q_n*F(n-1,k-1)' title='q_n*F(n-1,k-1)' class='latex' /> term represents the sub-problem if I took the q-value of the nth coin.</p>
<p>The last thing I need is a base case that makes sense. Well, if I have no more coins left to flip (n = 0) but I haven&#8217;t used enough q-values (k &gt; 0), I lose. So <img src='http://s0.wp.com/latex.php?latex=F%280%2Ck%29+%3D+0&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(0,k) = 0' title='F(0,k) = 0' class='latex' /> where $k &gt; 0$. If I have no more coins left and I have used enough q-values, I win. So <img src='http://s0.wp.com/latex.php?latex=F%280%2C0%29+%3D+1&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(0,0) = 1' title='F(0,0) = 1' class='latex' />. Now we just code it up, add in some <a href="//">memoization </a>and we have a decently fast solution.</p>
<p>But after the contest, I realized this problem might be even simpler. Perhaps we can use a <a href="http://en.wikipedia.org/wiki/Greedy_algorithm">greedy approach</a>. Why not sort things by the ratio of their q-value to p-value, i.e. <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bq%7D%7Bp%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='&#92;frac{q}{p}' title='&#92;frac{q}{p}' class='latex' /> and then take the K greatest such values to be the coins whose q values we use. The intuition behind this idea is that by taking the ratios <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bq%7D%7Bp%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='&#92;frac{q}{p}' title='&#92;frac{q}{p}' class='latex' /> that are closest to 1, we are minimizing the loss that we suffer by having to use the q values instead of p values. So, I think this is optimal, but how do I go about showing it?</p>
<p>Here I can use a proof technique called an exchange argument, which is often used to show that a greedy algorithm is correct. It is a little abstract at first, but not too bad. The idea is that you consider the optimal answer to the problem, cleverly denoted O and then show that you can somehow transform it towards the solution that your algorithm would produce (in this case, a greedy solution) without degrading the quality of the solution. That is, you take O then construct O&#8217; such that value(O&#8217;) <img src='http://s0.wp.com/latex.php?latex=%5Cgeq&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='&#92;geq' title='&#92;geq' class='latex' /> value(O) and O&#8217; looks more like the greedy solution. Now since O&#8217; is also optimal, we can do this again and again and again until we get the greedy solution. Thus, we have showed that we never lost any quality by moving towards the greedy solution, so it must be optimal.</p>
<p>What does a solution to our problem look like? It looks something like this <img src='http://s0.wp.com/latex.php?latex=p_1p_2q_3p_4q_5&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='p_1p_2q_3p_4q_5' title='p_1p_2q_3p_4q_5' class='latex' />. Then we can plug in the actual values of p and q to calculate the actual probability. Of course, its not exactly this sequence, but its going to be a product of K q-values and N-K p-values. Now to make the transformation.  The greedy algorithm chooses the q-values that have the greatest <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bq%7D%7Bp%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='&#92;frac{q}{p}' title='&#92;frac{q}{p}' class='latex' />. I can argue for that for any two coins, i and j, where <img src='http://s0.wp.com/latex.php?latex=q_i&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='q_i' title='q_i' class='latex' /> and $p_j$ are used but <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bq_j%7D%7Bp_j%7D+%3E+%5Cfrac%7Bq_i%7D%7Bp_i%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='&#92;frac{q_j}{p_j} &gt; &#92;frac{q_i}{p_i}' title='&#92;frac{q_j}{p_j} &gt; &#92;frac{q_i}{p_i}' class='latex' />, I can switch them and end up with a solution that is at least as good as it was before. If I can show that <img src='http://s0.wp.com/latex.php?latex=q_j%2Ap_i+%3E+q_i%2Ap_j&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='q_j*p_i &gt; q_i*p_j' title='q_j*p_i &gt; q_i*p_j' class='latex' />, I am done. This follows immediately. Rearranging <img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7Bq_j%7D%7Bp_j%7D+%3E+%5Cfrac%7Bq_i%7D%7Bp_i%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='&#92;frac{q_j}{p_j} &gt; &#92;frac{q_i}{p_i}' title='&#92;frac{q_j}{p_j} &gt; &#92;frac{q_i}{p_i}' class='latex' /> yields <img src='http://s0.wp.com/latex.php?latex=q_j%2Ap_i+%3E+q_i%2Ap_j&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='q_j*p_i &gt; q_i*p_j' title='q_j*p_i &gt; q_i*p_j' class='latex' />. Thus I can change any optimal solution to be more like the greedy solution without losing any value. So greedy is optimal.</p>
<p>What is interesting here is that this is very similar to the type of DP problem where you must select some optimal subset of things, but this is fundamentally easier (easier meaning faster algorithm. The recursion approach above is <img src='http://s0.wp.com/latex.php?latex=O%28n%5E2%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='O(n^2)' title='O(n^2)' class='latex' /> while this is <img src='http://s0.wp.com/latex.php?latex=O%28n+lg+n%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='O(n lg n)' title='O(n lg n)' class='latex' /> [the complexity of the sorting algorithm]). Perhaps it is because the value of not including something in our set (in this case, choosing not to use the q-value) is very well-defined where it is not so well defined in similar-looking problems. I could make more guesses as to why but I don&#8217;t really know enough to start making broad theoretical claims.</p>
<p>If I didn&#8217;t end up passing this round due to Facebook&#8217;s server problems, I probably won&#8217;t compete any more because its just not worth the hassle.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=181&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2011/01/15/facebook-hacker-cup-comments-and-problem-analysis/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
		<item>
		<title>Risk Aversion in Poker</title>
		<link>http://thisaintnogame.wordpress.com/2010/11/24/risk-aversion-in-poker/</link>
		<comments>http://thisaintnogame.wordpress.com/2010/11/24/risk-aversion-in-poker/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 19:00:46 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[game theory]]></category>
		<category><![CDATA[poker]]></category>

		<guid isPermaLink="false">http://www.thisaintnogame.us/blog/?p=159</guid>
		<description><![CDATA[So what is risk aversion? Essentially, it is people who have a higher utility for money than the expected money. Well what does &#8220;expected money&#8221; mean. Consider the following example: I could either give you a dollar, or flip a &#8230; <a href="http://thisaintnogame.wordpress.com/2010/11/24/risk-aversion-in-poker/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=159&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So what is <a href="http://en.wikipedia.org/wiki/Risk_aversion">risk aversion</a>? Essentially, it is people who have a higher utility for money than the expected money. Well what does &#8220;expected money&#8221; mean. Consider the following example: I could either give you a dollar, or flip a coin and give you two dollars if it is head (nothing for tails). If you think these two options are essentially the same, you are correct. If person A always went with the dollar and person B always went with the coin flip, then after 10000 iterations of this choice, they would almost surely have the same amount of money. But if you are risk averse, you would prefer the money in hand. At one and two dollars, that doesn&#8217;t seem to be a big deal, but if we were talking about $1,000,000 dollars and $2,000,000 dollars, almost everyone would take the 1 million and call it a day.</p>
<p>In fact, if I were to give you $2,500,000 with a 50/50 shot, most people would still take the $1,000,000, despite the fact that the coin flip now has a better expected value. That is, if we were to iterate these choices 10000 times again, the person taking the coin flip will almost surely be richer than the person taking the 1 million.</p>
<p>When I was thinking about risk aversion one day, I couldn&#8217;t help but notice that it has a relation to poker. Consider the following scenario: you are playing in a cash-game where you cannot rebuy. On the flop, you hold 4 cards to the ace high flush and two people move all in. Should you call? Of course, because you are getting the odds to do so (in this case, I&#8217;m assuming that the Ace-high flush will give you the best hand). If you hit your hand, you are rich; if not, you walk away.  Every poker player should call here (I didn&#8217;t really talk about how much money is already in the pot, but if two people are going all-in in front of you, the pot will probably be big enough). But how happy are you in this situation? How happy should you be? And what about situations where the odds aren&#8217;t quite in your favor (i.e. all-in with pocket kings preflop or something like that).</p>
<p>Observation: In poker, chips are a weird thing. They are both the thing that you are trying to win and the thing that allows you to win. In principle, with small amounts of chips, you can only win so much in any given hand (precisely the amount that you have times the number of other players). Having more chips gives you greater flexibility in play; you can bully people, you can try some riskier plays and still be OK if you lose, etc. Of course, this is only true if you are a &#8220;good&#8221; player (quoted because I don&#8217;t have a real definition of &#8220;good&#8221;). If you are a &#8220;bad&#8221; player, having more chips means that you will probably just lose more chips later in the game.</p>
<p>So back to the question of how happy you are about moving all-in on a draw. &#8220;Bad&#8221; players should be happier than &#8220;good&#8221; players because chips give less of an advantage to &#8220;bad&#8221; players than to &#8220;good&#8221; ones. If I am a good player, I might have more than a 36% chance of doubling up just through consistent long-term play, so I might not be willing to go in on this situation because if I lose, I will have to leave the table. If I am a bad player, I might have considerably less than a 36% chance of doubling up through long-term play, so this hand is a great opportunity.</p>
<p>Here is the real kicker: Is this idea really useful? Not for good players because good players need to incorporate taking chances like this into their play for two reasons. In the above example, it is just good play to take chances like that because of the overwhelming expected value of the move. The more subtle point is that if you are unwilling to take chances in places where it could go either way, opponents could exploit you by forcing those situations and having you fold all the time. So good players are forced to be less risk averse than they might like.</p>
<p>Is it useful for bad players? Yes, because their lack of skill in other scenarios hurts them, so situations where they remove skill from the hand then evens the playing field between them and the rest of the players. Of course, this is not to advocate that bad players should move all-in on every play, but they sometimes should make a play that has a close to 0 (potentially negative) expected value play. We often see &#8220;bad&#8221; players taking too much risk; this is not what I&#8217;m advocating. They should tighten their willingness to accept this risk, but not quite to the level that &#8220;good&#8221; players have tightened.</p>
<p>But then again, if a &#8220;bad&#8221; player is thinking about it to the point where they arrive at this conclusion, I don&#8217;t really think they are &#8220;bad&#8221; players.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=159&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2010/11/24/risk-aversion-in-poker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
		<item>
		<title>Popularizing Computer Science</title>
		<link>http://thisaintnogame.wordpress.com/2010/07/11/popularizing-computer-science/</link>
		<comments>http://thisaintnogame.wordpress.com/2010/07/11/popularizing-computer-science/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 16:45:06 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.thisaintnogame.us/blog/?p=151</guid>
		<description><![CDATA[Luis von Ahn writes about creating a reality show called &#8220;America&#8217;s Next Top Nerd&#8221; which features CS nerds competing from week to week in various CS challenges. Most of the post and comments focus on what could these challenges actually &#8230; <a href="http://thisaintnogame.wordpress.com/2010/07/11/popularizing-computer-science/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=151&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Luis von Ahn <a href="http://vonahn.blogspot.com/2010/06/americas-next-top-nerd.html">writes</a> about creating a reality show called &#8220;America&#8217;s Next Top Nerd&#8221; which features CS nerds competing from week to week in various CS challenges. Most of the post and comments focus on what could these challenges actually be. Of course, this is definitely the right question to ask but I think the show might be better of in a &#8220;Mythbusters&#8221; style rather than any of the &#8220;America&#8217;s Next Top [chef, model, etc]&#8220;. I&#8217;m not saying the show shouldn&#8217;t be a competition but the style of analysis of the problems should use the styles that the Mythbusters use to explain the underlying concepts of the problem. Obviously, Mythbusters gains most of its popularity by doing awesome experiments where things blow up, thrown in the air, crash, etc which is something that would probably not work too well for the CS-format. However, if the show were to use problems that people could easily grasp and care about the problem, it may do well. One example that comes to mind is the detection of spam emails. Everyone who has an email address has seen some spam text at least once. While I have no idea how state-of-the-art spam detection works, I think explaining a simple way, that is doing text classification using some sort of machine learning algorithm, would work well for this format. First, people will most likely care about this problem and second, the explanation is interesting if told in the right level of detail. It is really important that each solution have an easy-to-describe high level solution and they must solve a problem that can be easily understood. Notice that I have stayed away from using the term &#8220;practical&#8221; to describe the problems. I do not think the problems have to be practical (although, it is not bad if they are) to keep the interest of someone. I actually think that many people might watch to be able to attack some type of brain teaser or puzzle. If the show is done correctly, viewers might watch in an attempt to solve the problems along side the experts. These problems might include, Sudoku solvers, chess, game AI in general, etc. In general, I think that we could do a better way popularizing actual Computer Science and making it understood what type of problems we study, but that is large problem in general.</p>
<p>I actually got a chance to talk about this issue with (name drop time) Len Adleman while I was visiting USC for a grad school visit. We talked about how a field like physics has well-known, big questions to inspire people at a young age to get interested in it. I have known several people who pursued physics (at least for a little while) after reading one of Brian Greene&#8217;s books or the works of Feynman. In bio, you have problems like curing cancer or AIDS to inspire people. Len asked if we have any BIG questions like this and I cautiously suggested that P=NP? might have the type of fundamental importance that could inspire some people (as it did for me). The problem there is that it requires convincing somebody to understand a little bit of complexity theory to start to understand the problem. I do not know of a pop-sci book about P=NP but I think that Lance Fortnow is working on one and I&#8217;m excited to see how it turns out. Len suggested that questions of the nature of computation itself may be interesting. To demonstrate his point, he asked me if there was a fundamental difference between a piece of software computing the way that a protein folds and actually having the protein fold. In each case, the output will be identical detailed information about the final shape of the protein. Do each of these methods perform computation? Are they essentially equivalent forms of computation? Who knows.</p>
<p>When I watching a show about the the Gulf oil spill one day, I heard that one of the issues in mitigating the damage of the spill was dispatching the boats that carry the oil blocking things appropriately. Because the oil is constantly coming up from under the surface and at new points every day, they have to constantly move the few boats that they have to attempt to contain as much of the oil as possible. Granted, I don&#8217;t really understand too much of the method used to contain the spill, but it seems that there is actually a chance here for CS people to do some direct good for the world by writing some software to route the ships to maximize the containment area. This effort divides up into creating the algorithms and then writing a good UI, etc. It would seem that this problem falls under the umbrella of multi-agent systems (since you need multiple boats to contain each part of the spill and you have an entire team of boats to contain all the different spills) and also online and approximation algorithms to deal with the fact that new areas of oil develop over time (I am not exactly sure what the rate is or how much it is happening right now). For all I know, they could have a very sophisticated technique right now, but I doubt it for some reason. There may be some existing solutions that could work well, such as the software used by FedEx to route their trucks, but my intuition says that they wont work too well because a single agent can&#8217;t do anything by itself. Although it might be too little too late in this scenario, I would like to do some more research into this and find out what the current methods used are and see if there is a place for this idea.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=151&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2010/07/11/popularizing-computer-science/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
		<item>
		<title>Change Counting Problem</title>
		<link>http://thisaintnogame.wordpress.com/2010/06/27/change-counting-problem/</link>
		<comments>http://thisaintnogame.wordpress.com/2010/06/27/change-counting-problem/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 04:23:23 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[algorithms]]></category>

		<guid isPermaLink="false">http://www.thisaintnogame.us/blog/?p=94</guid>
		<description><![CDATA[Today, I want to talk about the problem of how many ways are the to make change for $1 dollar. Or, more generally, how many ways can you make change for cents (in the case of a dollar, ). I &#8230; <a href="http://thisaintnogame.wordpress.com/2010/06/27/change-counting-problem/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=94&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p>Today, I want to talk about the problem of how many ways are the to make change for $1 dollar. Or, more generally, how many ways can you make change for <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> cents (in the case of a dollar, <img src='http://s0.wp.com/latex.php?latex=X+%3D+100&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X = 100' title='X = 100' class='latex' />). I am not sure if there is some type of combinatorial, closed-form solution for this question (if there is, I would love to hear it) so I am going to tackle this one with an algorithm.</p>
<p>I have dealt with similar problems before. One that jumps out is the problem of making change for <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> cents with the minimum number of coins. That solution had a simple recurrence relation of the following form. Let <img src='http://s0.wp.com/latex.php?latex=F%28X%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(X)' title='F(X)' class='latex' /> denote the minimum number of coins needed to make change for <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> cents&#8230;</p>
<p><img src='http://s0.wp.com/latex.php?latex=F%28X%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(X)' title='F(X)' class='latex' />=1+<img src='http://s0.wp.com/latex.php?latex=min%5C%7B+F%28X-1%29%2C+F%28X-5%29%2C+F%28X-10%29%2C+F%28X-25%29%2C+F%28X-50%29+%5C%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='min&#92;{ F(X-1), F(X-5), F(X-10), F(X-25), F(X-50) &#92;}' title='min&#92;{ F(X-1), F(X-5), F(X-10), F(X-25), F(X-50) &#92;}' class='latex' /></p>
<p>And our base case would be <img src='http://s0.wp.com/latex.php?latex=F%280%29+%3D+0&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(0) = 0' title='F(0) = 0' class='latex' /> and for any negative number <img src='http://s0.wp.com/latex.php?latex=y%2C+F%28y%29+%3D+%5Cinfty&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='y, F(y) = &#92;infty' title='y, F(y) = &#92;infty' class='latex' />. I chose 1,5,10,25, and 50 here because they are the values of the US coins (1 dollar coins are obviously fake).</p>
<p>My first thought would be to use a very similar approach. Let <img src='http://s0.wp.com/latex.php?latex=G%28X%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='G(X)' title='G(X)' class='latex' /> denote the number of ways to make change for <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> cents.</p>
<p><img src='http://s0.wp.com/latex.php?latex=G%28X%29+%3D+G%28X-1%29+%2B+G%28X-5%29+%2B+G%28X-10%29+%2B+G%28X-25%29+%2B+G%28X-50%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='G(X) = G(X-1) + G(X-5) + G(X-10) + G(X-25) + G(X-50)' title='G(X) = G(X-1) + G(X-5) + G(X-10) + G(X-25) + G(X-50)' class='latex' /></p>
<p>However, this method over counts a lot of combinations. For instance, with <img src='http://s0.wp.com/latex.php?latex=X+%3D+6&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X = 6' title='X = 6' class='latex' />, it would count a penny and a nickel two different ways ( {1,5} and {5,1} are the same thing). So we need a new approach, one that somehow enforces uniqueness.</p>
<p>As a general rule of thumb, if your recursion seems too simple, add another dimension (I am half-joking about this rule), so let&#8217;s do that. First, lets label all of our coin values <img src='http://s0.wp.com/latex.php?latex=v_1%2C+v_2&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='v_1, v_2' title='v_1, v_2' class='latex' /> &#8230; <img src='http://s0.wp.com/latex.php?latex=v_N&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='v_N' title='v_N' class='latex' />. In this case, <img src='http://s0.wp.com/latex.php?latex=v_1+%3D+1%2C+v_2+%3D+5&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='v_1 = 1, v_2 = 5' title='v_1 = 1, v_2 = 5' class='latex' /> and so forth. Now, lets put this problem in a slightly different form. For any change amount <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' />, we can write it as <img src='http://s0.wp.com/latex.php?latex=X+%3D+a_1%2Av_1+%2B+a_2%2Av_2+&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X = a_1*v_1 + a_2*v_2 ' title='X = a_1*v_1 + a_2*v_2 ' class='latex' /> &#8230; <img src='http://s0.wp.com/latex.php?latex=%2B+a_N%2Av_N&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='+ a_N*v_N' title='+ a_N*v_N' class='latex' />. In this view of the problem, we are trying to find all sets of <img src='http://s0.wp.com/latex.php?latex=a_1%2C+a_2&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='a_1, a_2' title='a_1, a_2' class='latex' /> &#8230; <img src='http://s0.wp.com/latex.php?latex=a_N&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='a_N' title='a_N' class='latex' /> that satisfy this equation.</p>
<p>Now, lets choose a value for <img src='http://s0.wp.com/latex.php?latex=a_N&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='a_N' title='a_N' class='latex' />, say 2. What does that do for our equation? We now must solve <img src='http://s0.wp.com/latex.php?latex=X+-+%282%2Av_N%29+%3D+a_1%2Av_1+%2B+a_2%2Av_2&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X - (2*v_N) = a_1*v_1 + a_2*v_2' title='X - (2*v_N) = a_1*v_1 + a_2*v_2' class='latex' /> &#8230; <img src='http://s0.wp.com/latex.php?latex=%2B+a_%7BN-1%7D%2Av_%7BN-1%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='+ a_{N-1}*v_{N-1}' title='+ a_{N-1}*v_{N-1}' class='latex' />. This looks promising; we have reduced our original problem into a smaller problem; in fact it is smaller in two ways. We have reduced the amount that we are looking to make change for and we have also reduced the number of variables (or coins) that we have to do it. So here is my new recurrence formula: let <img src='http://s0.wp.com/latex.php?latex=G%28X%2Ck%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='G(X,k)' title='G(X,k)' class='latex' /> represent the number of ways to make change for <img src='http://s0.wp.com/latex.php?latex=X&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='X' title='X' class='latex' /> using the first <img src='http://s0.wp.com/latex.php?latex=k&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='k' title='k' class='latex' /> types of coins in the set.</p>
<p><img src='http://s0.wp.com/latex.php?latex=G%28X%2Ck%29+%3D+%5Csum%5E%7B%5Cfrac%7BX%7D%7Bv_k%7D%7D_%7Bi%3D0%7D+G%28X+-+v_k%2Ai%2C+k-1%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='G(X,k) = &#92;sum^{&#92;frac{X}{v_k}}_{i=0} G(X - v_k*i, k-1)' title='G(X,k) = &#92;sum^{&#92;frac{X}{v_k}}_{i=0} G(X - v_k*i, k-1)' class='latex' /></p>
<p>With the base case that <img src='http://s0.wp.com/latex.php?latex=G%280%2C0%29+%3D+1&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='G(0,0) = 1' title='G(0,0) = 1' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=G%28y%2Cx%29+%3D+0&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='G(y,x) = 0' title='G(y,x) = 0' class='latex' /> for any negative y.</p>
<p>Here, we are just trying all the possible coefficients for <img src='http://s0.wp.com/latex.php?latex=v_k&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='v_k' title='v_k' class='latex' /> and then adding up the number of ways to solve each of the resulting subproblems. Now, in terms of implementation, we just store all of the solutions of <img src='http://s0.wp.com/latex.php?latex=G%28X%2Ck%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='G(X,k)' title='G(X,k)' class='latex' /> into a two-dimensional array so that we can take advantage of computations that we have already performed. We now have a correct and efficient solution. And if that doesn&#8217;t knock your socks off, I don&#8217;t know what will.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=94&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2010/06/27/change-counting-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
		<item>
		<title>Code Jammin’</title>
		<link>http://thisaintnogame.wordpress.com/2010/06/14/code-jammin/</link>
		<comments>http://thisaintnogame.wordpress.com/2010/06/14/code-jammin/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 03:05:38 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[algorithms]]></category>

		<guid isPermaLink="false">http://www.thisaintnogame.us/blog/?p=77</guid>
		<description><![CDATA[So this year, I am one of the 500 nerds competitors to move to Round 3 of Google&#8217;s Code Jam competition. The format is very similar to all of the other coding contests I do but I like the Code &#8230; <a href="http://thisaintnogame.wordpress.com/2010/06/14/code-jammin/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=77&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So this year, I am one of the 500 <span style="text-decoration:line-through;">nerds</span> competitors to move to Round 3 of Google&#8217;s Code Jam competition. The format is very similar to all of the other coding contests I do but I like the Code Jam questions a lot more than others. In this contest, every question has a small and large dataset that have different bounds on the input. Usually, a &#8220;bad&#8221; solution will be able to pass the small input set but you will need to find a &#8220;good&#8221; solution in order to pass the large set. This is a cool mechanic because it gives people who aren&#8217;t as good at algorithms a shot in doing well but it really rewards people who know their stuff or able to find the right abstraction for the problem.</p>
<p>In this post, I wanted to talk about one of the questions that I was able to answer in the Round 2 competition. The analysis they give on their site (that is another good thing about Codejam; they give great contest analysis) is good but I wanted to share my view because I think it is slightly different and addresses a point that I believe caused many competitors to misjudge the difficulty of the problem.</p>
<p><a href="http://code.google.com/codejam/contest/dashboard?c=635102#s=p1&amp;a=3">Click here to read the problem</a></p>
<p>Readers (like I have any) who can just accept the assertion that this is a DP problem and just want to know the recurrence relation can skip down the page. For everybody else, here is a full write-up of my solution.</p>
<p>Assuming you have read the problem, we see that the task is to ensure that we miss at most <img src='http://s0.wp.com/latex.php?latex=M%5Bi%5D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='M[i]' title='M[i]' class='latex' /> of the games that team <img src='http://s0.wp.com/latex.php?latex=i&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='i' title='i' class='latex' /> plays in. A key in understanding this problem is that are looking at the games that the team may potentially play (which is equal to the number of rounds) not the expected amount of games that they are going to play or something like that. Thus, we don&#8217;t need any logic to handle the cases of which teams win which games.</p>
<p>Consider the championship game, a game which all teams could potentially play in. We can either buy the ticket for the championship game or not, but what happens in each case?  So, if we do not buy the tickets to this game, then we could potentially miss a game for each of the teams in the tournament. If we do buy it, then we do not miss the game but we incur the cost of buying the ticket. We can extend this observation to any of the games in the tournament by seeing that if we do not buy a game then we could miss a game for any of its children.</p>
<p>As a matter of notation, lets number all of the games. We can build a binary tree in the exact manner that they show in the picture from the problem statement. We can label the root node as node 1 and then for any labeled node <img src='http://s0.wp.com/latex.php?latex=i&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='i' title='i' class='latex' />, label its left child <img src='http://s0.wp.com/latex.php?latex=2i&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='2i' title='2i' class='latex' /> and its right child <img src='http://s0.wp.com/latex.php?latex=2i+%2B1&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='2i +1' title='2i +1' class='latex' />. Following the example from the picture, nodes in the tree that have label <img src='http://s0.wp.com/latex.php?latex=1&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='1' title='1' class='latex' /> to <img src='http://s0.wp.com/latex.php?latex=N&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='N' title='N' class='latex' /> represent games and nodes labeled <img src='http://s0.wp.com/latex.php?latex=N%2B1&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='N+1' title='N+1' class='latex' /> to <img src='http://s0.wp.com/latex.php?latex=2N&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='2N' title='2N' class='latex' /> represent teams.</p>
<p>Where to go from here? Our goal is to satisfy the constraints of not  missing more than <img src='http://s0.wp.com/latex.php?latex=M%5Bi%5D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='M[i]' title='M[i]' class='latex' /> games while minimizing the total cost of  all the tickets which we must buy. So now lets consider the championship  game again. If we buy the ticket, then have the cost of buying the ticket, call it <img src='http://s0.wp.com/latex.php?latex=C_1&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='C_1' title='C_1' class='latex' />, plus the cost of satisfying its two subtrees. If we do not buy the ticket, we just incur the cost of satisfying the two subtrees but given the fact that we already missed a game for all of the teams. Let <img src='http://s0.wp.com/latex.php?latex=F%28i%2Cx%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(i,x)' title='F(i,x)' class='latex' /> be the cost of satisfying the constraints of the subtree rooted at game$latex  i$ given that you have already missed <img src='http://s0.wp.com/latex.php?latex=x&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='x' title='x' class='latex' /> games.</p>
<p>So the two cases from above can be stated as:</p>
<p><img src='http://s0.wp.com/latex.php?latex=C_1+%2B+F%282%2C0%29+%2B+F%283%2C0%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='C_1 + F(2,0) + F(3,0)' title='C_1 + F(2,0) + F(3,0)' class='latex' />  and  <img src='http://s0.wp.com/latex.php?latex=F%282%2C1%29+%2B+F%283%2C1%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(2,1) + F(3,1)' title='F(2,1) + F(3,1)' class='latex' /></p>
<p>Now since we want to minimize the total cost, we just take the min of the two things. So a generalized statement is as follows&#8230;</p>
<p><img src='http://s0.wp.com/latex.php?latex=F%28i%2Cx%29+%3D+min+%5C%7BF%282i%2Cx%29+%2B+F%282i+%2B1%2C+x%29+%2B+C_i%2C+F%282i%2Cx%2B1%29+%2B+F%282i+%2B1%2C+x%2B1%29+%5C%7D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(i,x) = min &#92;{F(2i,x) + F(2i +1, x) + C_i, F(2i,x+1) + F(2i +1, x+1) &#92;}' title='F(i,x) = min &#92;{F(2i,x) + F(2i +1, x) + C_i, F(2i,x+1) + F(2i +1, x+1) &#92;}' class='latex' /></p>
<p>All we need now is the base case, which will occur when <img src='http://s0.wp.com/latex.php?latex=i&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='i' title='i' class='latex' /> is greater than <img src='http://s0.wp.com/latex.php?latex=N&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='N' title='N' class='latex' />.</p>
<p><img src='http://s0.wp.com/latex.php?latex=F%28i%2Cx%29+%3D+&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(i,x) = ' title='F(i,x) = ' class='latex' /> INF if <img src='http://s0.wp.com/latex.php?latex=x+%3E+M%5Bi-N%5D&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='x &gt; M[i-N]' title='x &gt; M[i-N]' class='latex' /> , <img src='http://s0.wp.com/latex.php?latex=0&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='0' title='0' class='latex' /> otherwise.  The <img src='http://s0.wp.com/latex.php?latex=-+N+&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='- N ' title='- N ' class='latex' /> term is just to the array indexing right.</p>
<p>This is 90% of our solution but we need one more thing in order to make it a fast solution. We can store the results to every <img src='http://s0.wp.com/latex.php?latex=F%28i%2Cx%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='F(i,x)' title='F(i,x)' class='latex' /> function call in a global array. This is known as memoization and is often used with these type of recursive solutions in order to reduce the time complexity (in this case, we reduce it from an exponential solution to an <img src='http://s0.wp.com/latex.php?latex=Nlog%28N%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='Nlog(N)' title='Nlog(N)' class='latex' /> solution. We initialize the global array to -1 to denote this <img src='http://s0.wp.com/latex.php?latex=%28i%2Cx%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='(i,x)' title='(i,x)' class='latex' /> pair has not yet been computed. Each time the function is called, we check to see if the <img src='http://s0.wp.com/latex.php?latex=%28i%2Cx%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='(i,x)' title='(i,x)' class='latex' /> pair has been computed and return that value from the array if it has. Every time the function returns, we make sure to throw the return value in the global array at element <img src='http://s0.wp.com/latex.php?latex=%28i%2Cx%29&amp;bg=ffffff&amp;fg=000&amp;s=0' alt='(i,x)' title='(i,x)' class='latex' />. Voila.</p>
<p>So that is pretty much our solution. There are a few more details but they are mostly in just reading the input.</p>
<p>I didn&#8217;t so hot in round 3 of CodeJam (in fact, I got no questions correct) but there is always next year.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=77&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2010/06/14/code-jammin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
		<item>
		<title>The Move</title>
		<link>http://thisaintnogame.wordpress.com/2010/04/22/the-move/</link>
		<comments>http://thisaintnogame.wordpress.com/2010/04/22/the-move/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 14:11:13 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thisaintnogame.wordpress.com/2010/04/22/the-move/</guid>
		<description><![CDATA[I have moved my blog to be hosted on my site. The new URL is www.thisaintnogame.us/blog I&#8217;m currently just experimenting with that site and I am not going to get rid of this site because there is a non-zero chance &#8230; <a href="http://thisaintnogame.wordpress.com/2010/04/22/the-move/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=66&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have moved my blog to be hosted on my site. The new URL is<br />
www.thisaintnogame.us/blog</p>
<p>I&#8217;m currently just experimenting with that site and I am not going to get rid of this site because there is a non-zero chance that I will return to this site after a while.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=66&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2010/04/22/the-move/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
		<item>
		<title>Network Pricing Stuff</title>
		<link>http://thisaintnogame.wordpress.com/2010/04/21/73/</link>
		<comments>http://thisaintnogame.wordpress.com/2010/04/21/73/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 15:35:56 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.thisaintnogame.us/blog/?p=73</guid>
		<description><![CDATA[While doing a (completely inane) class project related to airport infrastructure recently, a friend pointed something interesting out to me about pricing of flights from Binghamton Airport (BGM). I just ran a couple of queries of expedia for flights leave &#8230; <a href="http://thisaintnogame.wordpress.com/2010/04/21/73/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=73&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While doing a (completely inane) class project related to airport infrastructure recently, a friend pointed something interesting out to me about pricing of flights from Binghamton Airport (BGM). I just ran a couple of queries of expedia for flights leave on May 3rd and returning on May 6th to make a point:</p>
<p>Flight from Binghamton (BGM) to Dulles (IAD) (non-stop): $622</p>
<p>Flight from Dulles to LAX (non-stop): $475</p>
<p>Flight from Binghamton to LAX with a connection at Dulles: $278.</p>
<p>WTF? Here is the real kicker. The flight from Binghamton to LAX consists of the exact same individual flights as BGM to IAD and IAD to LAX.  As an aside, there were cheaper flights from Dulles to LA but they included stopovers in Atlanta. However, a flight with United (which is the carrier used in all these pricings) with 1 connection in the IAD-LAX route still costs 100 dollars more than buying the BGM-LAX flight.</p>
<p>So what exactly is going on here? I have no idea how this pricing scheme works but I suppose it could be that some agency is subsidizing the BGM to LAX route and thus reducing the overall cost  to be almost 25% of the cost if you were to buy the flights individually. This doesn&#8217;t seem particularly likely though since that would be a huge subsidy and would probably eliminate any type of profit on the BGM-LAX flight. Could it simply be a supply and demand issue? Could it be that this combination of pricing is the only way to sell 100% of the seats on both the BGM-IAD flight and the IAD-LAX flight? Perhaps the people buying the tickets for just a single hop flight (either BGM-IAD or IAD-LAX but not BGM-LAX) are providing the money to ensure that United hits the break even point and then the BGM-LAX people are only providing profit for the airline. That does not seem particularly fair to the people who are actually costing the airport less money but I suppose it works.</p>
<p>I wonder how many people are aware of this fact and use it to buy a cheaper single flight. True, it would not work if you had to check luggage because then it is always routed to your final destination. However, I hate checking luggage anyway so that wouldn&#8217;t affect me for most trips. Also, I am not sure if it is possible to enter the airport at an intermediate location. That is, if I did buy the BGM-LAX ticket, would I be able to get my boarding pass at Dulles for the return flight? I have no idea but I dont think many passengers would be willing to risk it (although, economically speaking, its not a risk at all. If it doesn&#8217;t work out, just go buy another ticket from IAD to BGM, which would still be less than the cost of buying the original BMG-IAD roundtrip).</p>
<p>Not that I know too much about algorithmic game theory yet but this does not really seem to be a truthful mechanism. Assuming that there are no problems with getting on/off at intermediary stops then passengers don&#8217;t have an incentive to actually reveal their true destination. In this example, I would definitely buy the BGM-LAX ticket even though my destination is  Washington DC. I&#8217;m going to try and work on this problem a little bit to see if I can get a model that makes sense or something like that. I will certainly post again with anything interesting (or uninteresting for that matter) that I come up with.</p>
<p>During my visit to Northwestern, the idea of working of problems with a good moral aesthetic came up. I like the idea that in some way, my work could vaguely serve some notion of &#8220;the greater good&#8221;. I am not sure what type of greater good developing better airline pricing models would serve though. Its possible that work in this area leading to the realization that airlines could charge more per ticket. That would not be good for me or almost anyone in society, except the stockholders of the airline company. Although, it could prevent an airline company from going under, in which case that would be good for everyone (the passengers could still fly, the stockholders wouldn&#8217;t lose their money, and the employees of that airline would not have a job). I suppose it might also lead to a more &#8220;fair&#8221; pricing scheme in which a passenger on one flight is not paying the costs of another passenger on another flight. That seems like a decent axiom to have in place for society.</p>
<p>I had some other things to write about but they completely elude me at the moment. I will probably be writing a post soon about things that I have learned from Binghamton or things that I wish I had known before I entered college or something along those lines.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=73&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2010/04/21/73/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
		<item>
		<title>Grad School Decision, NSF, and other happenings</title>
		<link>http://thisaintnogame.wordpress.com/2010/04/11/grad-school-decision-nsf-and-other-happenings/</link>
		<comments>http://thisaintnogame.wordpress.com/2010/04/11/grad-school-decision-nsf-and-other-happenings/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 02:24:13 +0000</pubDate>
		<dc:creator>thisaintnogame</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.thisaintnogame.us/blog/?p=65</guid>
		<description><![CDATA[Well, the graduate school decision process is finally over. I have decided to go to Northwestern and join the Econ/CS theory group there. I am very excited about it. It is a new group and there seems to be a &#8230; <a href="http://thisaintnogame.wordpress.com/2010/04/11/grad-school-decision-nsf-and-other-happenings/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=194&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well, the graduate school decision process is finally over. I have decided to go to Northwestern and join the Econ/CS theory group there. I am very excited about it. It is a new group and there seems to be a lot of steam and energy behind it. The combination of that energy, the econ coursework, and the connection with the MEDS (Managerial Economics and Decision Sciences) group, makes it seem like the place where I can do my best work and have the best time. Plus, Chicago seems about 1000 times better than LA (the competing city) if we discount weather. Even taking weather into account, Chicago is still better. Its much more of a &#8220;real city&#8221;. I don&#8217;t have an exact definition of what that term really means but it probably has something to do with density of population and proximity of things to do. I will say that choosing Northwestern over USC was not an easy to decision and both places had a lot going for it. USC would have been a great place to be also and the research there was just as exciting. The final decision came down to this intangible notion of &#8220;gut feeling&#8221; which has probably led me wrong over 100 times in the past but I think it will work out this time.</p>
<p>Just to keep the books straight, here was my final record from grad school acceptances/rejections. Accepted = USC, UCLA, UCSB, UCSD, UMaryland, UMass-Amherst, Northwestern. Rejection =MIT, CMU, Stanford, UWashington, Harvard, UPenn, Cornell. I withdrew my application from GA Tech since I had not heard from them for a long time and I didn&#8217;t really care about the result (I probably would have been rejected anyway). I took a week off from school to visit UCLA, UCSB, USC, and UCSD all in one shot. It was a lot of fun to drive around Southern California, see all these places, and meet a bunch of new people. The trip also turned out to be extremely helpful in narrowing down my choices. I am not really sure why UCSD was not a stronger contender in my ranking system but nothing about it really felt particularly right for me. I forgot about the visit to the University of Maryland which was a tad unfortunate but I figured that my subconscious was telling me that I didn&#8217;t want to go there. Overall, I am pretty happy with how the application process went. Obviously, I would have liked to get accepted to some of the top programs I applied to (particularly, Stanford and UWashington) and I was a bit surprised about getting rejected from UPenn and Harvard but that&#8217;s the breaks. A publication or two under my belt probably would have helped my application overall to serve as proof that all the research experience that I had as an undergrad was time well spent. Getting a publication out of an REU is usually more dependent on your adviser than it is on you and it just never happen to work out for me. Oh well, a good showing anyway and I am very happy about my final choice.</p>
<p>In other news, I received an honorable mention for the NSF fellowship. It would have been nice to get the fellowship and such but I am happy with HM. The NSF uses a system where you can view the comments that the reviewers had about your application which is pretty nice. I had three reviewers (I think that indicates that I made it a bit further than most applicants who only had 2 reviewers) who gave me scores of very good, very good, very good on intellectual merit and scores of good, very good, very good on broader impact. The possible categories are excellent, very good, good, fair, and poor. Most of the review was just summarizing what I wrote in my application which most people complain about but I actually think is a good thing. It shows that they actually read your application and understood what meaning you were trying to get across. The reviews mostly commented on my writing style (they thought it was good) and then said I could improve my application by expanding the broader impacts of the theoretical component of my proposed research and by having a few publications to support my research background. I agree with them in both respects and I thought my lack of publications was a pretty large deficit in my application. Unfortunately, that doesn&#8217;t seem all that likely to change before next year&#8217;s application process but we&#8217;ll see. I can certainly stand to improve on many things since not a single reviewer gave me an excellent in anything, so I will probably devote as much time next year into the application.</p>
<p>I know when I was sitting down to write my essays, I searched around a bit for some examples for inspiration. So just in case someone is looking for the same thing and by some failure of the pagerank algorithm, they end up here, I have attached my three essays from this year&#8217;s application. This is accompanied with the usual advice/disclaimer of please just use these as fuel to start the thinking process and don&#8217;t actually copy anything you read here. Essays are only effective when they actually come from you. Borrowing bits and pieces will just make your essays sound awkward and unauthentic.It should also be noted that there appears to be some type of standard formatting for the essays (or at least for the research related ones) that I did not use. No judge mentioned anything about it, so perhaps it is not that big of a deal.</p>
<p><a href="http://www.thisaintnogame.us/blog/wp-content/uploads/2010/04/ProposedResearch.pdf">ProposedResearch</a></p>
<p><a href="http://www.thisaintnogame.us/blog/wp-content/uploads/2010/04/PreviousResearch.pdf">PreviousResearch</a></p>
<p><a href="http://www.thisaintnogame.us/blog/wp-content/uploads/2010/04/PersonalStatement.pdf">PersonalStatement</a></p>
<p>While I am on the subject of essays and such, I might as well post my statement of purpose that I used for applying to grad schools. The above three essays where written about a month before my SOP, so my personal statement is largely a product of the three NSF essays. It seems that the NSF essays were designed to force people so split the traditional SOP into its three main components and elaborate on them. I feel that my SOP came out better than my NSF essays since I had more time to work on it and less space to fill with the three components.</p>
<p><a href="http://www.thisaintnogame.us/blog/wp-content/uploads/2010/04/GenericStatement.pdf">GenericStatement</a></p>
<p>I removed some names to make it generic but otherwise, its an exact copy of my SOP. Again, don&#8217;t copy it; that would just be lame.</p>
<p>Hopefully I will post a bit more regularly now. There is no reason why I should be able to do that more now as opposed to before, but hopefully it happens anyway.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thisaintnogame.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thisaintnogame.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thisaintnogame.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thisaintnogame.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thisaintnogame.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thisaintnogame.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thisaintnogame.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thisaintnogame.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thisaintnogame.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thisaintnogame.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thisaintnogame.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thisaintnogame.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thisaintnogame.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thisaintnogame.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thisaintnogame.wordpress.com&amp;blog=3925175&amp;post=194&amp;subd=thisaintnogame&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thisaintnogame.wordpress.com/2010/04/11/grad-school-decision-nsf-and-other-happenings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1975b76f92e856d344649796e3481b23?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thisaintnogame</media:title>
		</media:content>
	</item>
	</channel>
</rss>
