Optimal Network Function Virtualization Realizing End-to-End Requests