Text this: Minimized Cost Gateway Deployment in Cyber-Physical Systems