Optimal Synthesis Of Sensor Networks