Please see http://www.cs.dartmouth.edu/~akapadia/