Complexity and the emergence of novelty