Friday, August 14, 2009

Truely Awesome Code!


TcT sent me a tiny-c program which simulates the truel problem. Check it out!

(Problem discussion and analytic solution)
truel-solution.html

(Sample run and tiny-c source code)
truel.txt

He signed it with the "Graffiti" counterpart to his avatar






Drawn by Aoife Doyle

Thursday, August 13, 2009

Zee and Toby don't do Algeebra but we do

I'm Mouzie and I'm TcT's friend and he's asked me to solve the following Algeebra problem.

Zee shoots a paint ball at Toby and hits him with a probability of 1/3. If not hit, Toby shoots a paint ball back at Zee and hits him with a probability of 2/3. What's the probability Zee will win if they go back and forth till somebody gets hit?

Answer: 3/7

Here's why:

Let p stand for the probability Zee survives.

Important observation: Zee's probability of survival is the same at "round 0" as it is at "round 1" (or any future round).

The probability Zee survives at round 0 = prob. he hits Toby + (prob. he misses Toby)*(prob. Toby misses him)*(prob. he survives round 1)

From Important observation above and probabilities for Zee and Toby given above

Note: If Zee hits with prob. 1/3, he misses with prob. 2/3. If Toby hits with prob. 2/3, he misses with prob. 1/3.

p=1/3+2/3*1/3*p

This is that stupid Algeebra thingee. OK. Let's hit it.

p=1/3+2/9*p cuz 2/3*1/3=2/9
p-2/9*p=1/3 cuz you can bring that 2/9*p over to the other side
7/9*p=1/3 cuz 1-2/9=9/9-2/9=7/9
p=9/7*1/3 cuz 9/7*7/9=1
p=9/21 even Zee knows how to multiply fractions
p=3/7 and then reduce them

QED (Quit Elongated Derivations)