# Prove a function $g: \mathbb{ Z}^{+} \times \mathbb{ Z}^{+} \to \mathbb {Z}^{+}$ is one-to-one

I'm given $g: (m,n) = 3^m 9^n, where (m,n)\in \mathbb{Z}^{+} \times \mathbb{Z}^{+}$ how do I prove this function is one-to-one?
All I've figured out so far is that
$g((m_1,n_1)) = g((m_2,n_2))$
$3^{m1} =3^{m2}$ and $9^{n1}=9^{n2}$ by dividing both sides by 3 and 9 $m_1= m_2$ and $n_1=n_2$ Therefore $g$ is one-to-one.

• This function is not one-to-one. – nivekgnay Oct 6 '15 at 5:06
• Isn't $g(3,1)=g(1,2)$? – user1337 Oct 6 '15 at 5:06
• No wonder I find that there is something wrong with my prove. Thanks! – christinaqwer Oct 6 '15 at 5:07
• Why $g(m_1,n_1)=g(m_2,n_2)$ implies $3^{m_1}=3^{m_2}$? (Apply that to the counter-example above) – Quang Hoang Oct 6 '15 at 6:11

As mentioned in the comments, the function is not one-to-one. For instance $g(2,0)=g(0,1)$.
The standard functions from $\mathbb{Z}^+\times \mathbb{Z}^+\rightarrow\mathbb{Z}^+$ that are one-to-one are given by $g(m,n)=p^mq^n$ for some distinct primes $p$ and $q$. Injectivity in this case follows from the uniqueness of prime decomposition.
• No, it never is. You can for instance not reach any prime different from $p$ and $q$ with this function. – This Is Me Oct 6 '15 at 5:34
• Like I said, if you take a prime $p'$ different from $p$ and $q$, then by unique factorization into prime factors, you cannot write $p'$ as a product of powers of $p$ and $q$. For instance, for $g(m,n)=2^m3^n$ you cannot find $m,n$ such that $g(m,n)=5$ since 5 is not divisible by 2 or 3. – This Is Me Oct 6 '15 at 18:45