12/16/2004

12-16-04 - 1

12-16-04

Every day in life, with almost every action, I consider mathematical optimization of the outcomes. Of course mathematics is the basis of everything - math is just abstract expression and formalism for dealing with things. The most obvious cases are if you're making decisions about investing - how do you maximize your return? But that's even getting complicated, because in life your overall goal is maximizing your happiness (with uneven weighting factors - eg. it's not a pure EV, but more on that later). Of course you can optimize with things like route planning on your drive to work; if you turn one way or another, what's the expected time? You have to consider the probability of hitting red lights, the probability of hitting traffic; eg. one path might take roughly 15 minutes always, another way might be 10 minutes 75% of the time, but it crosses a train track, so it takes 30 minutes 25% of the time, so the average time there is also 15 minutes. But now we also remember that our overall goal is optimizing happiness, and that's not a straight weight. Let's say the 15 minute path is the baseline, so that's the 0 happiness point. If you go the other way and get a 10 minute trip, that might be a +1 happiness score (that sets the scaling factor). If you go that way and hit traffic and get a 30 minute trip, that might give you a -5 happiness (the value here depends on your exact personality - how much do you enjoy being in your car? how angry does traffic make you? how much do you need those 15 minutes on that day?). One thing I always think about is the idea of pipelining, latency, parallelization. These are software optimization ideas, but anyone who's good at time management (like a chef) thinks about them. Let's say I want to make a meal - how long will it take? Well, if I have lots of people to help, then the limitting factor is the longest serial path - eg. any things that can be done simultaneously without dependencies, I split out to a lot of people (of course then there's also the overhead of the splitting and bringing back together). Even the longest serial path may have long steps that are low bandwidth (eg. not much work) but high latency (won't be done for a long time), like waiting for something to bake. During that time I can divert my processor (myself) to other tasks without slowing down the longest serial path. This stuff is all sort of very obvious, but hardly anyone thinks about these things and uses them in their daily life. When I wake up in the morning - I need to get to work as quickly as possible and still do some things. First I start the water boiling, then that has long latency, so I prep everything for the coffee, get my toast out (but don't push it down), by that time the water has boiled so I start dripping the coffee; while it's dripping I can usually run around and get my brief case together and ready to go, then push down the toast (again, latency) so it will finish about the same time as the coffee; start sipping the coffee and check the morning emails (I turned on the computer earlier so it would be all ready to go when I'm ready for it); deal with the mails, then hop over to the shower, turn it on so it starts warming (more latency), and while that's going assemble my clothes and put the brief case next to them; hop in the shower, throw on the clothes and run out the door. How can you be in a rush and yet sit around and wait for long latency operations to finish? There are two things that makes all this optimization even more interesting in real life. First of all, there's the non-even weighting. The exact rating of various possibilities depends on your personality. For example, let's say you have one job offer for $100k/year. You have another job offer for $300k/year, but it's all in stock options, so there's a 50% chance the company goes under and it's worth nothing. Now, in the second case, your EV is $150k/year, so with straight rating, that's the obvious choice. For most people, the first choice is better, because the rating for income is very uneven - eg. for most people it's very important to make at least $30k , then pretty important to make $50k, then each dollar after that is less important - eg. it's something like a log scale. However, if you don't mind being broke, then maybe the second choice is right for you. The other thing that really makes this optimization interesting in real life is that the process of doing the optimization is part of your life, and your overall goal is to maximize your happiness. For example, things like picking up pennies are generally bad for you financially if you make much money at all (the time spent is not worth the money made), but if you enjoy picking up pennies, then by all means, do it. If you really don't enjoy thinking about optimization, then it may be optimal for you to make poor decisions in an absolute sense, because you improve your happiness by not thinking about the decisions. For me personally, I usually enjoy doing correct optimization, but I like to be able to do things like go out on the town and just not think about it. Note that this is seperate from counting your contemplation time as part of the optimization problem - eg. you could just buy a video card at best buy for $300 , or you could probably find it online for $200 , but the time wasted searching for the best deal and going through the ordering, etc. is not worth the savings (or even if it's still a win, it's a much smaller win that it seems on paper). That's just part of what you should consider when optimizing, and actually if you consider that and decide not to do further contemplation, you have in fact optimized.

No comments:

old rants