Resource Allocation in Network Function Virtualization