Optimization principles for discrete choice theory