How does a professor know when a research project will get expected results?
The interaction between student and professor should not be a one-shot set-a-problem. Instead, they should be talking frequently, often once a week, and adjusting the nature and direction of the project based on what is being learned during it.

The project starts with some idea, from either the professor or the student, that the professor thinks likely to lead to an appropriate outcome within the available time. 

As time goes on, the student should come to learn more about the project than the professor, and be reporting progress or lack of progress. The professor should be continuously evaluating whether the current line will lead to a good result, and encouraging redirection if not.

I am sure my doctoral dissertation was not at all what my advisor would have expected when I started on the project - it was a result of things I learned during it.