Optimization Methods for Resource Allocation