Optimization in Integers and Related Extremal Problems