Okay here is a puzzle I come across a lot of times- Given a set of 12 balls , one of which is defective (it weighs either less or more) . You are allow to weigh 3 times to f
You could use a general planning algorithm: http://www.inf.ed.ac.uk/teaching/courses/plan/