Optimization problems in correlated networks