optimization stuff for coursera discrete optimization course