In general the teacher must be capable of achieving what is they want their students to achieve by undertaking the assignment, but that might not be coming up with a solution.
In the modern world where all knowledge is at our finger tips all the time, the job of an educator is much less to impart knowledge, and much more to guide and mentor students, help them learn where to find information and assess its reliability and to concentrate on the higher level cognitive skills, such as problem solving, synthesis and reflection.
This means that often coming up with the answer isn't the point of an assignment, but rather something about the journey to getting to the answer (or failing to do so).
Taking your example: It could be about taking a set of puzzles and working out what the common rules are to distinguish solvable from unsolvable problems. Or deducing if the difference between hard and easy puzzles is quantitative or qualitative. It could simply be about learning that some problems are not soluble, but there is still value in working on them.
Many of the other answer here suggest this kind of approach is only applicable at higher levels, like graduate school, but the editor in chief of the AMS' maths education blogs talks here about giving unsolved math problems as homework to undergrads, and Lior Pachter talk here about ones that you could give to K-12 students.
My own maths education started incorporating this sort of "Investigation-led" learning at 15 as part of the UK national curriculum. While the problems set were not insoluble (how many bricks do you need to build pyramids of a height n, and deriving the basic rules of differentiating polynomials empirically), they shared in common that the journey not the end point was the purpose.