How did ancient astronomers predict planetary conjunctions? I know they used a system of epicycles to represent the path of planets, but finding the point and time of alignment of two planets still seems like a rather difficult problem.
Supposing just a model system of two planets each with a single epicycle (that is, they have the larger circular orbit and a smaller epicycle sub orbit), how would an ancient astronomer predict conjunctions (where their apparent positions in the sky are identical)? That is, what algorithm were they using? Are there any modern methods that make the problem easier (it doesn't seem to be a problem where a heliocentric solar system makes things easier).
I'm guessing that ancient mathematicians just had a lot of spare time to crunch numbers, and the algorithm was basically something primitive and numeric. But I wonder if there's any clever mathematics involved, since there was at least 1000 years of smart guys working on the problem.