Optimal Petri Net Monitor Design