My name is Ram Rachum, and I'm a software developer based in Israel, specializing in the Python programming language.

This is my personal blog. I write about technology, programming, Python, and any other thoughts that come to my mind.

I'm sometimes available for freelance work in Python and Django. My expertise is in developing a product from scratch.

GitHub profile

Personal Website

4th September 2011

Text

Quick riddle

Here’s a quick riddle:

You owe your friend two Dollars. You have a $5 bill, but your friend has only a $1 coin for change.

What would be a fair way to settle your debt that would not require you to get more change?

Answer: You toss the coin. If you win, you don’t give your friend anything. If your friend wins, you give him the $5 and he gives you back $1, so he gets $4. His expectation is $4 * 1/2 = $2, which is exactly fair.

Thanks for all the people who posted their answers in the comments!

Comments
All content in this website is copyright © 1986-2015 Ram Rachum.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License, with attribution to "Ram Rachum at ram.rachum.com" including link to ram.rachum.com.
To view a copy of this license, visit: http://creativecommons.org/licenses/by-sa/3.0/