Sheep Master Problem