Archive for May, 2007


Think more, get less

May 30, 2007

There’s an article in the June 2007 episode of Scientific American, also published on their site.It is written by Kaushik Basu.
It’s about the curse of rational choices when playing the “Traveler’s Dillemma” game:

“Lucy and Pete, returning from a remote Pacific island, find that the airline has damaged the identical antiques that each had purchased. An airline manager says that he is happy to compensate them but is handicapped by being clueless about the value of these strange objects. Simply asking the travelers for the price is hopeless, he figures, for they will inflate it.Instead he devises a more complicated scheme. He asks each of them to write down the price of the antique as any dollar integer between 2 and 100 without conferring together. If both write the same number, he will take that to be the true price, and he will pay each of them that amount. But if they write different numbers, he will assume that the lower one is the actual price and that the person writing the higher number is cheating. In that case, he will pay both of them the lower number along with a bonus and a penalty–the person who wrote the lower number will get $2 more as a reward for honesty and the one who wrote the higher number will get $2 less as a punishment. For instance, if Lucy writes 46 and Pete writes 100, Lucy will get $48 and Pete will get $44.

What numbers will Lucy and Pete write? What number would you write?”The point is, when you don’t think much about it, you’d choose $100. However, when you start thinking more, you’d write down $99: because if you write down $99, and the other person will write down $100, you will get $101, while the other only gets $99. Then you start wondering if the other person thinks the same… and you obviously don’t want the other person to have more money. So you reduce your amount to $98 (thinking the other person will write down $99), so you’ll get $100, and the other person only $96. And so on. In the end, you’ll arrive at $2. In this way, you earn a lot less then the naively chosen $100.

This problem is the same, the article explains, as the Prisoner’s Dilemma: “… in which two suspects who have been arrested for a serious crime are interrogated separately and each has the choice of incriminating the other (in return for leniency by the authorities) or maintaining silence (which will leave the police with inadequate evidence for a case, if the other prisoner also stays silent).”

A Nash equilibrium, is when there’s no benefit (put simply) to change your strategy: in this case the equilibrium is at $2 (the absolute minimum of choices). This is what Game theory predicts; but it conflicts with our intuition.

In experiments, the choice people make depends on the reward: when the reward is low, the choice will on average be higher. On the other hand, when the reward is high, the choice will be lower. This makes sense, because when the reward is high relative to the choice, it’s more advantageous to lower your choice. For example, if the reward is not $2, but $50, you wouldn’t want your choice to be too high: the penalty you’d get would severely impact your profits.

Then why do we make these choices, based on our expectations that the other person will choose a high number? The article suggests:
“Perhaps altruism is hardwired into our psyches alongside selfishness, and our behavior results from a tussle between the two. We know that the airline manager will pay out the largest amount of money if we both choose 100. Many of us do not feel like “letting down our fellow traveler to try to earn only an additional dollar, and so we choose 100 even though we fully understand that, rationally, 99 is a better choice for us as individuals.”

The moral: sometimes it’s good not to think too extensively about seemingly simple questions.


Calculating Pi for fun and profit

May 19, 2007

This one is for my grandchildren :P. I found a nice intuitive way of calculating Pi. The only thing you need to understand is the Pythagoras Theorem. Consider the figure below:


To calculate the area of the circle, we take small steps.

  • First we calculate the area of the grey part. It’s simple to see that this area is 0.5(1×1).
  • Then the area of the red part. This is a little more tricky. To calculate the area, we first want to know the length of S. We see that the length from A to B equals 2S. With the use of Pythagoras, we find that 2S equals the square root of 2. So we know S: 0.5*sqrt(2). If we would also know T (and hence 1-T), then we could find the red area. But T is equal to S. A different way of finding T, is using Pythagoras again; we know OA=1, and we know S, hence we know T: the square root of 0.5. Thus the area of the red part equals: 0.5*0.5*sqrt(2)*(1-sqrt(0.5))=0.104.
  • Now the green area. Well, we know (1-T) and S. So we know V. And W is 0.5*V. Now we only need to know the small side of the green triangle. This is where it gets tricky. (And messy). If we know O-fi then we’re all set. But OA=1, and we know Afi=W! Using Pythagoras (remember him?) we find filambda=1-fiO=1-sqrt(OA^2-Afi^2)=0.0439. So the area is approximately 0.0439*W=0.0439*0.29289=0.01286.

Note: wordpress doesn’t allow Greek symbols. So that explains “fi” and “lambda”
The only thing that needs to be mentioned, is that we have to multiply the grey are with 4 for a complete circle (we only considered 1 quadrant), the red area with 8, the green area with 16, etc.

Of course it’s possible to make a small script for this. I did all the fun for you, and coded it in Matlab. The code is a mess, but it’s posted here as a reference. If you understood the above (or if you came to this point without weeping), the code shouldn’t be hard to follow.

The real Pi is 3.1415926535897932384626433832795
# of iterations             found value

1                                    2.0000000000000000000000000000000
2                                    2.4142135623730949234300169337075
3                                   3.0614674589207182551770244842800
4                                   3.1214451522580524351896677430859
5                                   3.1365484905459392823695871570607
10                                 3.1415877252771597505203060598746
25                                 3.1415926535897902256560013790759
30                                 3.1415926535897951086718985911613
50                                 3.1415926535897951086718985911613

This means there’s a difference of 1.7764e-015=0.0000000000000017764, or a percentage of 0.5953e-13%=0.0000000000005953%. Not bad.

After about 30 iterations, we don’t see any change in the calculated Pi anymore. This is due to my coding skills, and the precision of the script. But I think it’s clear it does what it needs to do; the method works.


Experimental art – Part II

May 17, 2007

I made some very similar pictures some time ago, but I liked the idea and made some more. I know there’s some noise in one of them, but I don’t think it spoils the picture. Rather, it enhances it … maybe. ;)

abstract_2.jpg  abstract_3.jpg  abstract_4.jpg  abstract_52.jpg

Comments welcome.


Apple+Customer Service=Apple

May 15, 2007

Today I mailed Apple about my iPod Nano. I got it in december 2005, and recently (about a month ago), it didn’t function anymore. I couldn’t put any music on it, making it largely useless. When I went to the Apple store, they basicallly told me: “Bad luck. Buy a new one.”. It was out of warranty, and they refused to do anything. Yes, the could send it in for repair, but then the cost would simply be higher than a new one (they didn’t know what was wrong though). That’s what Apple thinks about customer service.

However, civil law in Holland gave me some help; it basically states that the apparatus should function as a consumer (and manufacturer) expect, otherwise the manufacturer needs to help you. Together with a law (directive) from the EU, which basically states that the consumer has at least 2 years of support on products, made me write the letter. I gave them 4 weeks to come up with a solution. It became a fairly long letter, and I’m curious about what Apple will say. Will they deny civil law, or will they comply?

I hope they’ll do something about it; it’s too expensive to throw it away after 1.5 years.


Do Make Say Think

May 9, 2007

Previous saturday, May 5th, we went to a concert of Do Make Say Think in Paradiso. They performed really great on the small stage; it had barely enough room for the artists and instruments. Then again, there were 8 members on stage:

  • 2 drummers
  • 1 guitarist (electric/bass) / saxophone
  • 1 saxophone
  • 1 violinist
  • 1 guitarist
  • 1 guitarist / keyboard / strange thingy
  • 1 trumpetist

The sound was earthshattering, and hope to find a bootleg of the concert soon.

I also made some pictures; actually, I made about 100 of them, but these were the best ones:

do-make-say-think-008-1.jpg do-make-say-think-033-1.jpg do-make-say-think-013-1.jpg do-make-say-think-061-1.jpg

 do-make-say-think-064-1.jpg do-make-say-think-076-1.jpg do-make-say-think-095-1.jpg

Some pictures are quite dark; but I already had to shoot with high ISO, so some noise reduction was necessary :'(

I’m already saving for a SLR camera to replace my Powershot A95.


Huntington’s disease

May 6, 2007

In the April/May 2006 (Yes, it’s an oldie, but I’m just catching up) edition of Scientific American Mind, there’s an interesting article written by Juergen Andrich and Joerg T. Epplen about Huntington’s disease.

It starts with simple incidents, such as forgetting a familiar address, or dropping a cup. But they are not incidents. Not clumsiness, forgetfulness or overreaction either. At least, when you have Huntington’s disease, an inherited disease of which the mutating gene was discovered in 1993. It leads to “progressive destruction of the brain, crippling muscles and mental function“. This mutation wreaks havoc inside the brain.

A single gene on chromosome 4 (the huntingtin gene (no misspelling)) is the cause. DNA consists of 4 bases: Cytosine, Adenine, Guanine and Thymine. If the CAG sequence on this gene occurs more than 35 to 40 times (instead of the regular 28 times), this chain becomes too long and causes trouble. The longer the chain of CAG-sequences, the earlier the disease starts showing, and the more severe it gets.

The symptoms usually show up when at age 35-45, but this also depends on the length of the chain.

Saint Vitus dance, an “involuntary movement disorder“, is characterized by “brief, irregular contractions that are not repetitive or rhythmic, but appear to flow from one muscle to the next. These ‘dance-like’ movements of chorea (from the same root word as “choreography”) often occur with athetosis, which adds twisting and writhing movements.” This is also seen in Huntington’s disease. But mental symptoms often occur before the physical problems, which also leads to social problems (relatives, friends, etc.), and even suicide. Before 1993 (when the responsible gene was discovered) people were often misdiagnosed as “mentally ill or alcoholic”.

What follows is something I don’t fully understand and therefore may not be very clear, but I’ve included it nonetheless:
When the elongated protein starts binding with other proteins, the function of those proteins is in danger.
Glutamate is a neurotransmitter, a chemical which helps a neuron “talk” with another cell. Synapses allow the neurons to form a network and communicate, and function as a system.
Via some complex process, some neurotransmitters won’t be removed “such as glutamate from the synapses“, resulting in “adjacent neurons continually excited” which will damage the cell.
Because of some other difficult process, it’s inpossible for the huntingtin protein to bind to the HIP-1 protein: “the neurons are driven to kill themselves.”