Energy-efficient allocation for multiple tasks in mobile edge computing