--- author: '' category: '' date: 2012/09/05 10:13:39 description: '' link: '' priority: '' slug: taxes-game-theory-and-python tags: math,python title: Taxes, Game Theory, and Python (Part 1 of 2) type: text updated: 2012/09/05 10:13:39 url_type: '' --- Before I gave up on becoming an educated man, I studied math. And to this day it pisses me that noone has figured out how to make math interesting to the math-averse. Here's a small attempt. Let's consider the following scenario, based completely on things I know, not things I *do* ;-) Suppose that in a city called San Isidro, there is a house. Houses in San Isidro pay a municipal tax, in exchange for the service of garbage collection, street sweeping, tree trimming, and street lighting. It's a very small tax, but let's say it's $100 a month because it's a nice, easy to handle number. Also, San Isidro is in a country called Argentina. In that country there are several laws that affect the home owners: #) You can't sell a house if you owe any taxes. #) The owner has a 1% chance of wanting to sell the house each month. #) Debts expire after 5 years. #) If you are sued and you lose, you pay they other guy's lawyer fees. #) Lawyer fees are capped to 25% of the money being disputed. #) Lawyers are reluctant to help you sue someone if they get very little money (defined as less than $2000) #) If sued by the city for owed taxes, the owner always loses. #) Unpaid taxes accrue 2% compound interest monthly. So, if you don't pay your $100, you will owe $102, then $104.04, $106.0128 etc. With all those elements in place, let's play a game called "Tax Golf"! The game is played by an indetermined number of players called owners and one special player called city. The game is played to 100 "months" or until all property has been sold. The goal of the game, for the owners, is to pay as little money as they can. The score is calculated like this: amount of money you paid divided by the time you owned the house. The owner with the lowest score is the winner. The goal of the game for the city, is to get as much money as he can. He's not competing against the players, for him it's a sort of solitaire where he competes against his past performance. This, my friends is math. Math is a tool that helps you (among other things) do the right thing in this sort of complicated, arbitrary, real life scenario. So, what's a good strategy for a owner, and for the city? In a second post next wednesday, I will give some answers to those questions, using python.