Some helper functions to set up the linear program