Integrated synthesis of process and heat exchanger networks: algorithmic approach