On the Complexity of Teaching