implement infeasible puzzle detection