Monthly Archives: September 2009

Dennis Ritchie Home Page

Using Stumble Upon!, I, well, stumbled upon Dennis Ritchie’s page. He’s famous as the creator of C and an early influential developer of Unix. Back when I was in school, we all learned C by reading Kernighan and Ritchie’s The C Programming Language. His homepage has some nice papers about the history of Unix, as well as some others on topics like cryptography and programming language design. Great stuff.

Dennis Ritchie Home Page.

Nomograms

For some reason, I found myself looking at a rather pedestrian page about slide rules today, and it once again rekindled my interest in the closely related nomograms and nomography. I’ve mentioned them once or twice on this blog in the past, but in case you don’t know, nomograms are a computational aid from the past which were used for computation. In their most common form, they are a diagram with three separate scales, and by connecting a line between two variables, you can read off the third. They are an interesting and mostly forgotten relic from the past.

Now, I’ve particularly when interested in old technology, I imediately surf over to archive.org and see if they have any books for downoad about the subject. And, of course, they do!

Internet Archive: A first course in nomography.

You could also surf over to the PyNomo website and get their software for designing and printing nomograms.

Another interesting question of probability…

I was reading Kraitchik’s Mathematical Recreations book (a very nice little Dover volume) and ran across this interesting puzzle on pg. 140:

21, A man stakes 1/m of his fortune on each play of a game whose probability is 1/2. He tries again and again, each time staking 1/m of what he possesses. After 2n games, he has won n times, and lost n times. What is his result?

This isn’t very hard to analyze. Let’s assume that n = 1 to try to gain some insight. There are two ways we can win 1 and lose 1 game, but both end up with the same: (1 – 1/m2) times our original stake. A tiny bit more head scratching will (maybe) convince you that for n > 1, we get (1 – (1/m2))n. It should be obvious that both of these expressions are strictly less than one (you lose money, and the greater the fraction you bet, the quicker you lose). The only way to preserve your bankroll in this game, well, not to play it.

There are a couple of interesting things about this puzzle which Kraitchik didn’t elaborate, but which I think are interesting.

Somewhat trivially, the payout of this puzzle actually doesn’t depend at all on what the probability of winning an individual round is. When the game is fair (probability of winning is 1/2) then the most likely outcome (although as n gets larger, an increasingly unlikely one) is for an even number of wins and losses to occur. In some sense, this outcome is the “fairest” of all fair outcomes: it is the most likely to occur, you bet a constant fraction of your total bankroll, and you get the fairest outcome: the same number of heads and tails. And yet, you lose money every time. Guaranteed.

This obviously has something to do with fractional betting. If, instead of betting a fraction of your total bankroll, you instead bet a constant amount (say 1 unit), then after n losses and n wins, you’d be even.

Ponder it some more.

Addendum: Think of this another way. Consider this game to be a drunkards walk, where you win and lose with equal probability. Each step, you wager a fraction of your bankroll, and if you win, collect your money and take a step to the right. If you lose, you pay out and take a step to the left. You can read more about random walks here on Wikipedia. In these one dimensional random walks, you will cross the start point (and in fact any other point as well) an infinite number of times as you repeatedly play the game. And yet, every time you pass your start point, you will have won and lost the same number of games, and you will always be behind. Similarly, no matter what you bankroll, if you bet a constant amount, you will always be ruined playing a fair game if you play long enough.

These results are counter to many of the intuitions that we have about gambling, where one might imagine that in a “fair” game, if we have a large enough stake we might think we could play forever.

Anyway, just fun to think about.

Kelly most famously studied fractional betting systems. They hold a few surprises.