Optimization Methods For Resource Allocation And Machine Learning Applications