Optimal Resource Allocation for Competitive Spreading Processes on Bilayer Networks