TITLE: How to tell two ideals belong to the same ideal class group
QUESTION [11 upvotes]: Potentially dumb question here: how can you tell if two ideals belong to the same ideal class group?
Let's say we're looking at $\textbf{Z}[\sqrt{10}]$. It has infinitely many ideals, but by the Minkowski bound we need only concern ourselves with ideals with a norm of $2$ or $3$.
My gut tells me $\langle 3, 1 - \sqrt{10} \rangle$ and $\langle 3, 1 + \sqrt{10} \rangle$ are in the same ideal class, but that could be altogether wrong.

REPLY [7 votes]: If we want to determine if two nonzero ideals $I$ and $J$ of $\mathcal{O}_K$ are in the same ideal class, first find another integral ideal $I'$ so that $II'$ is principal—i.e. $I'$ is a representative of the inverse ideal class, in the quadratic case the conjugate ideal will always do the job for this—and so the question amounts to determining if $I'J$ is principal.
In other words, rather than work with $2$ ideals and seek two elements $\alpha$ and $\beta$, the real task is to consider a single nonzero ideal $I$ of $\mathcal{O}_K$ and to determine if there exists an element $a$ in $\mathcal{O}_k$ such that $I = (a)$. By computing the norm $\text{N}(I) = \#(\mathcal{O}_K/I)$, at least we know what the value of $\text{N}_{K/\mathbb{Q}}(a)$ has to be, but that is very limited information in general—much more constraining in the quadratic case. Perhaps the "right" thing to do for a general method—as being sought here—is to let $S$ be the set of prime ideals over the primes dividing $\text{N}(I)$, so any possible element $a$ that could work must at least be an $S$-unit.
That brings us to the task of trying to make the $S$-unit theorem effective—i.e. find generators for the $S$-units, a well-studied task in lattice techniques in computational number theory—and somehow bounding where to look within that lattice. Which should not be too hard: we can bound the possible exponents of prime ideals factors of $a$, and $\mathcal{O}^*_K$-ambiguity does not matter, so it ought to come down to a finite search.
Please take a look at Henri Cohen's "A course in computational number theory". You will undoubtedly find good information about computing class groups and generators of $S$-unit groups, plus much much more on this subject.