Can I close the valve? This app will tell you using Dijkstra's algorithm.