Problem Reduction Algorithm In Ai