Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre math

Taxes, Game Theory, and Python (Part 1 of 2)

Be­fore I gave up on be­com­ing an ed­u­cat­ed man, I stud­ied math. And to this day it piss­es me that noone has fig­ured out how to make math in­ter­est­ing to the math­-a­verse. Here's a small at­temp­t.

Let's con­sid­er the fol­low­ing sce­nar­i­o, based com­plete­ly on things I know, not things I do ;-)

Sup­pose that in a city called San Isidro, there is a house. Hous­es in San Isidro pay a mu­nic­i­pal tax, in ex­change for the ser­vice of garbage col­lec­tion, street sweep­ing, tree trim­ming, and street light­ing.

It's a very small tax, but let's say it's $100 a month be­cause it's a nice, easy to han­dle num­ber.

Al­so, San Isidro is in a coun­try called Ar­genti­na. In that coun­try there are sev­er­al laws that af­fect the home own­er­s:

  1. You can't sell a house if you owe any tax­es.

  2. The own­er has a 1% chance of wan­t­ing to sell the house each month.

  3. Debts ex­pire af­ter 5 years.

  4. If you are sued and you lose, you pay they oth­­er guy's lawyer fees.

  5. Lawyer fees are capped to 25% of the mon­ey be­ing dis­­put­ed.

  6. Lawyers are re­luc­­tant to help you sue some­one if they get very lit­­tle mon­ey (de­fined as less than $2000)

  7. If sued by the city for owed tax­es, the own­er al­ways los­es.

  8. Un­­paid tax­es ac­crue 2% com­­pound in­­ter­est mon­th­­ly. So, if you don't pay your $100, you will owe $102, then $104.04, $106.0128 etc.

With all those el­e­ments in place, let's play a game called "Tax Golf"!

The game is played by an in­de­ter­mined num­ber of play­ers called own­ers and one spe­cial play­er called city.

The game is played to 100 "month­s" or un­til all prop­er­ty has been sol­d.

The goal of the game, for the own­er­s, is to pay as lit­tle mon­ey as they can. The score is cal­cu­lat­ed like this: amount of mon­ey you paid di­vid­ed by the time you owned the house.

The own­er with the low­est score is the win­ner.

The goal of the game for the city, is to get as much mon­ey as he can. He's not com­pet­ing against the play­er­s, for him it's a sort of soli­taire where he com­petes against his past per­for­mance.

This, my friends is math. Math is a tool that helps you (a­mong oth­er things) do the right thing in this sort of com­pli­cat­ed, ar­bi­trary, re­al life sce­nari­o.

So, what's a good strat­e­gy for a own­er, and for the city?

In a sec­ond post next wednes­day, I will give some an­swers to those ques­tion­s, us­ing python.


Contents © 2000-2024 Roberto Alsina