June 8th, 2009 | Categories: Programming

Last week I finished reading Kernighan & Plauger’s beautiful book The Elements of Programming Style, the classic that pioneered the term programming style. I’ve excerpted below some rules of style from that book. I hope these get you excited to reading the book too!

Read more…

May 8th, 2009 | Categories: Math, TAOCP

For the past several days, I’ve been working my way through Prof. N.G. de Bruijn’s book Asymptotic Methods in Analysis; and I want to share some of the fun I’ve had reading it.

This post is not a review or anything (here’s an image of the back cover with some reviews). Below are just fragments of what I’ve read so far and found fascinating. Read more…

April 10th, 2009 | Categories: Emacs

Emacs Logo
Some days ago I migrated to the emacs 23 pretest (23.0.92 Windows binaries and 23.0.91 Cocoa Mac binaries). In this post I’ll give brief notes of several of the cool features I found in emacs 23.

First, the good news: My zillions of customizations, installed packages and hooks all worked without a glitch and my most frequently used modes have been working great Read more…

March 10th, 2009 | Categories: Humor, Math
Frank Harary, Oberwolfach (1972)

I was going through the first chapter of the book Graphical Enumeration by Frank Harary and Edgar M. Palmer when I chanced upon this perplexing footnote:

Read wrote Wright that both Read [R2]1 and Wright [W3]2 were wrong. So Read and Wright wrote a joint erratum [RW1]3 to set things right. This may be wrong since Wright asserts that Wright wrote Read first.

Read more…

  1. [R2] R.C. Read, The number of k-colored graphs on labelled nodes, Canad. J. Math. 12, 409–413 (1960).
  2. [W3] E.M. Wright, Counting coloured graphs, Canad. J. Math. 13, 683–693 (1961).
  3. [RW1] R.C. Read and E.M. Wright, Coloured graphs: A correction and extension, Canad. J. Math. 22, 594–596 (1970).
March 8th, 2009 | Categories: Programming, Project Euler, TAOCP

Some months ago, I was re-introduced to Project Euler (PE) through the blogosphere. I had visited that site before, but had been left unmotivated by the first dozen or so problem statements that I read — neither the programming nor the math involved anything new or challenging. Only in the past few months, when I attempted to crack some of the harder nuts, did I realize how interesting many PE problems could be — requiring a neat algorithm (or invoking a crucial theorem) for an efficient solution. Read more…

December 14th, 2008 | Categories: TAOCP
Don Knuth

In this entry, I’ll attempt to record the important ideas Knuth presented in his 14th Annual Christmas Tree Lecture, part of his regular Computer Musings.

While I wasn’t fortunate enough to attend the lecture in person, I did go through the recording that, thankfully, was quite well done. Like all other “musings”, this one included some fascinating anecdotal bits (no pun intended) and Knuth’s good sense of humor was sprinkled throughout; but most noticeable was his infectious enthusiasm for the topics he spoke about. Read more…

December 8th, 2008 | Categories: Math, Ponder

In this post, I’ll describe my solution to June 2007’s Ponder This. I had felt that my solution was kind of nifty, and different from the one that was published. It had actually taken me several days to work the whole thing out.

Here’s part (2), the tougher part, of the problem: Values for a random variable are generated independently and uniformly over \left[0,1\right). By accumulating these values, your job is to reach a sum between n+x and n+1, where n is a positive integer, and 0<x<1. Read more…

December 6th, 2008 | Categories: Humor


The auto-podal-tow

Some time back, I had read a hilarious piece by Shashank, a friend of mine from the days at BITS, Pilani. The auto-podal-tow phenomena that he describes has to be seen to be believed: an autorickshaw towing another with one of the drivers using his leg as a connection! A good soul captured the moment and licensed it under Creative Commons Attribution-Noncommercial 2.0 Generic. Read more…

December 5th, 2008 | Categories: Uncategorized

In this blog, I plan to write about the fascinating/curious stuff that I come across. My plan, for the moment, is to stick to topics I have some familiarity with: CS/math, programming, tools. I’ve a deep interest in certain areas of mathematics and computer science — analysis, combinatorics, probability theory, design & analysis of algorithms, graph theory & network effects, computational problems. Many of my posts would be on these topics. Some would be about EMACS, the one true editor. The remainder would be on programming languages, performance hacks, bitwise tricks… Read more…