Optimal Multi-robot Perimeter Defense using Flow Networks