Theory of Inventive Problem Solving