I originally posted this on the Gamma forum, where it was somewhat on-topic, but it really would [del]make more sense[/del] be more appropriate here.
An answer without a problem:
Now, I may as well solve the more difficult problem of making that problem unsolveable, but still allowing the line to hit edges of the cube. The naive answer is to change the 5 or the 7 to Pi, thus making the light only hit four vertices. And in fact, that is the only answer, because in order to hit an edge, two elements of the vector...
Ah, I'd better explain the vector. The light beam's direction is [12,5,7] - the distance the line travels in each direction.
...must be multiplied by the same number X (rational or irrational) to become divisible by 12. Any such number X can be converted to any other such number X by multiplication by a rational number. Thus, given any such number for one pair of edges X and any such number for the other pair of edges Y, both X and Y will be divisible by the same real number Z, and multiplying the vector by the value X*Y/Z will cause it to reach a vertex. Thus, if the light ray cannot reach a vertex, it cannot reach more than four edges of the cube (proof by contradiction).
A problem without an answer:
Given a cactus farm in Minnesota guarded by a horde of rabid beagles, how would you go about rescuing a mule trapped in said cactus farm?