Optimization Problems Related to Zigzag Pocket Machining