Implements transmission_probability function passed to graph constructor