Tuesday, July 08, 2008

My math is not that rusty yet =)

My math and problem analytic skill are not that rusty yet. This is proven by what happened today. So, in short, Chatrin sent an email about a math problem.
Egg $0.10
Chicken $6
Watermelon $3

Question:
How many of above items to get the total 100 items of $100 dollar?
OR If from software point of view, how to calculate it by algorithm?
If you are not interested in knowing how it is solved, it doesn't matter. The answer is
70 eggs, 10 chicken, and 1 watermelon

This is the algorithm that I derived. I eliminate the basic steps so you can find it out yourselves.
For w=0 till w=31
.... c=(900-29w)/59
.... if c is a positive integer then
.... .... e = 100 - c - w
.... ....if e is a positive integer, then
.... .... .... return value of e, c, w (solved)
.... .... .... endif
.... endif
end for
return false (cannot be solved)
w = watermelons, e = eggs, c = chicken.

My math is not that rusty yet, hahaha....

Labels: ,


Sunday, November 11, 2007

Predicting the unpredictable

One thing about predicting the unpredictable: It's tough!

Just like today when I played a board game with a bunch of friends. I thought I've planned my moves perfectly, but one factor blocked my moves to progress, which was the behaviour of the other player that didn't go with the logic that I've had in mind. I asked her in the end of the game. She said some of the moves she made were random. I think she was tired and wanted to take a rest.

If randomness is unpredictable, how should we cope with that? Shall we just take a chance and live with it? or shall our actions based on what's the most beneficial thing for us and forget about how the other players will think?

An individual will take an action which is best for him. That's Adam Smith.

While I was thinking about John Nash. An individual will take an action which is best for him, and for the group.

Clearly, in the game that I had and to the other player that I was talking about in the paragraph above, Nash's theory didn't work. So, Nash has to consider this in his theory:
"A person will think about what's the best for himself, and for the group. Provided that he understands and has resources to think about what is the best for the group."

Labels: , , ,


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]