example of logic puzzle in math