The use of knowledge in analogy and induction