I asked [this question](https://math.stackexchange.com/q/3376675/660) on Mathematics Stackexchange, but got no answer.

Let $A$ and $B$ be noetherian commutative rings with one, and let $f:A\to B$ and $g:B\to A$ be epimorphisms. 

> Are the rings $A$ and $B$ necessarily isomorphic?

(In this post "ring" means "commutative ring with one", and morphisms are required to map $1$ to $1$. By definition, a morphism of rings $f:A\to B$ is an **epimorphism** if for all pairs of morphisms $(g,h):B\rightrightarrows C$ the equality $g\circ f=h\circ f$ implies $g=h$. Surjective morphisms are epimorphic, but the converse does not always hold: for instance the inclusion $\mathbb Z\to\mathbb Q$ *is* an epimorphism. 

---

The busy reader is invited to skip the sequel.

For more details about epimorphisms see 

$\bullet$ MathOverflow thread [What do epimorphisms of (commutative) rings look like?](https://mathoverflow.net/q/109/461).

$\bullet$ Stacks Project Section [Epimorphisms of rings](https://stacks.math.columbia.edu/tag/04VM).

$\bullet$ [Samuel Seminar](http://www.numdam.org/issues/SAC_1967-1968__2_/) . See in particular Section 2 of Exposé Number 7 by Daniel Ferrand.

The answers to the following variants of the above question are known:

(1) If $f:A\to B$ and $g:B\to A$ are injective morphisms of noetherian rings, are $A$ and $B$ necessarily isomorphic? The answer is No, as shown by the following example taken from a comment of Sam Lichtenstein to [this question](https://mathoverflow.net/q/39460/461). Let $K$ be a field, $x$ an indeterminate, $f:K[x^2,x^3]\to K[x]$ the inclusion, and $g:K[x]\to K[x^2,x^3]$ the (clearly injective) morphism defined by $g(p(x))=p(x^2)$. Note that $K[x^2,x^3]$ is not isomorphic to $K[x]$ because the ideal $(x^2,x^3)$ of $K[x^2,x^3]$ is not principal. 

(2) If $f:A\to B$ and $g:B\to A$ are surjective morphisms of rings, are $A$ and $B$ necessarily isomorphic? The answer is No, as shown by the following example taken from the same comment of Sam Lichtenstein. Set 
$$
A:=\mathbb Z/(4)\times\mathbb Z/(4)\times\cdots,\quad B:=\mathbb Z/(2)\times A,
$$ 
let $f:A\to B$ be defined by $f(x_1,x_2,\dots)=(h(x_1),x_2,\dots)$, where $h$ is the unique ring morphism from $\mathbb Z/(4)$ to $\mathbb Z/(2)$, and let $g:B\to A$ be defined by $g(x_1,x_2,\dots)=(x_2,x_3,\dots)$. The rings $A$ and $B$ are not isomorphic because the equations $2x=0$ and $x^2=x$ have no nonzero simultaneous solutions in $A$, and one such solution in $B$ (namely $x=(1,0,\dots)$). 

(3) If $f:A\to B$ and $g:B\to A$ are surjective morphisms of noetherian rings, are $A$ and $B$ isomorphic? The answer is Yes, because surjective endomorphisms of noetherian rings are isomorphisms. But epimorphic endomorphisms of noetherian rings are not always isomorphisms: see [this answer of Eric Wofsey](https://math.stackexchange.com/a/3376063/660).