TITLE: Comparing two numbers given their factorization
QUESTION [11 upvotes]: I'm not an expert, but given the integer factorization of two numbers $a,b$:
$$a = p_{i_1}^{a_1}...p_{i_n}^{a_n}, \quad b = p_{j_1}^{b_1}...p_{j_m}^{b_m}$$

What is the time and space compexity of checking if $a > b$ ?

Suppose that the factors and the exponents are given in binary and the whole input over alphabet $\{0,1,\wedge,;,*\}$ looks like:
$$p_{i_1}\wedge{a_1}*...*p_{i_n}\wedge{a_n};p_{j_1}\wedge{b_1}*...*p_{j_m}\wedge{b_m}$$
What algorithms can be used?

REPLY [9 votes]: According to this paper from 2013 by Etessami, Stewart, and Yannakakis, the time complexity of the [a priori] harder problem where the $p_k$ are not required to be prime is still open.  In that paper the authors show that certain conjectures in number theory would imply that the simple algorithm ("compute enough bits of the logs") runs in polynomial time.  The authors also observe that unconditional on any conjectures the algorithm runs in polynomial time for fixed $m$ and $n$ by Baker's Theorem.  Of course, it is possible that the version of the problem with $p_k$ prime is strictly easier than the more general one.