Source: http://www.stats.ox.ac.uk/~cmcd/lp/lp.pdf