# Rational angle bisectors on the coordinate plane
and solutions of Pell’s equations

Takashi HIROTSU

###### Abstract

On the coordinate plane, the slopes $a,$ $b$ of two straight lines and the
slope $c$ of one of their angle bisectors satisfy the equation
$(a-c)^{2}(b^{2}+1)=(b-c)^{2}(a^{2}+1).$ Recently, an explicit formula for
non-trivial integral solutions of this equation with solutions of negative
Pell’s equations was discovered by the author. In this article, for a given
square-free integer $d>1$ and a given integer $z>1,$ we describe every
integral solution $(x,y)$ of $|x^{2}-dy^{2}|=z$ such that $x,$ $dy$ are
coprime by using the fundamental unit of $\mathbb{Q}(\sqrt{d})$ and elements
of $\mathbb{Z}[\sqrt{d}]$ whose absolute value of norms are the smallest prime
powers. We also describe every non-trivial rational solution of the above
equation as one of its applications.

##  1 Introduction

On the coordinate plane, the following problem can be considered.

######  Problem 1.

For which rational numbers $a,$ $b$ are the slopes of the angle bisectors
between two straight lines with slopes $a,$ $b$ rational?

######  Remark 1.

Given two straight lines, we consider the two angles formed by them,
regardless of whether they are acute or not. The bisector of one of the angles
and that of the supplementary angle are perpendicular to each other. In the
case when they are not parallel to the coordinate axes, if one of the slopes
is rational, then so is the other, since the product of the slopes is $-1.$

Problem 1 has the meaning when the bisectors of $\angle AOB$ can be drawn by
connecting $O$ and other lattice points for given lattice points $O,$ $A,$
$B,$ which is important in drawing techniques. Furthermore, in engineering, we
can specify the radiation range and the axis of light with a ratio of integers
without error due to approximations to irrational numbers by using a solution
to this problem. Problem 1 is reduced to solving the equation

$(a-c)^{2}(b^{2}+1)=(b-c)^{2}(a^{2}+1)$ ($\star$)

in $\mathbb{Q}$ (see [4, Proposition 1]). We say that a solution $(a,b,c)$ of
($\star$ ‣ 1) is trivial if $|a|=|b|.$

######  Example 1.

The triples

$(a,b,c)=\left(\frac{3}{4},\frac{12}{5},\frac{9}{7}\right),\
\left(\frac{1}{7},\frac{23}{7},\frac{6}{7}\right),\ (1,7,2)$

satisfy ($\star$ ‣ 1), and therefore $(a,b)=(3/4,12/5),$ $(1/7,23/7),$ $(1,7)$
are solutions to Problem 1 (see the following figures).

The following proposition plays an important role in solving Problem 1.

######  Proposition 1.

Every non-trivial rational solution $(a,b,c)$ of ($\star$ ‣ 1) is given by

$\displaystyle(a,b,c)=\left(a_{1},b_{1},\frac{a_{1}b_{2}+a_{2}b_{1}}{b_{2}+a_{2}}\right),\
\left(a_{1},b_{1},\frac{a_{1}b_{2}-a_{2}b_{1}}{b_{2}-a_{2}}\right)$

for some rational solutions $(x,y)=(a_{1},a_{2}),$ $(b_{1},b_{2})$ of

$x^{2}-dy^{2}=-1,$

where $d$ is a square-free integer $\geq 1.$

The proof is given in Section 3. The following formula for integral solutions
of ($\star$ ‣ 1) was proven by using certain criteria for the divisibility of
integral solutions of Pell’s equations.

######  Theorem 1 ([4, Theorem 1]).

For each square-free integer $d>1$ such that $x^{2}-dy^{2}=-1$ has an integral
solution, we denote the $n$-th smallest positive integral solution of
$|x^{2}-dy^{2}|=1$ by $(x,y)=(f_{n}^{(d)},g_{n}^{(d)}).$ Every non-trivial
integral solution $(a,b,c)$ of ($\star$ ‣ 1) is given by

$\displaystyle(a,b,c)=$
$\displaystyle\pm\left(f_{(2m-1)(2n-1)}^{(d)},f_{(2m-1)(2n+1)}^{(d)},\frac{g_{(2m-1)\cdot
2n}^{(d)}}{g_{2m-1}^{(d)}}\right),$ (1.1)
$\displaystyle\pm(f_{2n-1}^{(2)},-f_{2n+1}^{(2)},f_{2n}^{(2)})$ (1.2)

for some integers $d,$ $m,$ $n>0,$ after switching $a$ and $b$ if necessary,
where (1.1) contains the case when $d=2.$

Conversely, every triple $(a,b,c)$ of Form (1.1) or (1.2) is an integral
solution of ($\star$ ‣ 1).

Throughout this article, we use the following definition and symbols.

######  Definition 1.

Let $d$ be a square-free integer $>1,$ and let $z$ be an integer $\geq 1.$

  1. (1)

Let $(x,y)$ be an integral solution of $|x^{2}-dy^{2}|=z.$ We say that $(x,y)$
is strictly primitive if $x,$ $dy$ are coprime.

  2. (2)

For each equation $x^{2}-dy^{2}=z,$ $x^{2}-dy^{2}=-z,$ $|x^{2}-dy^{2}|=z,$ we
call its positive integral solution $(x,y)$ with $y$ minimum its fundamental
solution.

######  Remark 2.

Suppose that $z$ is a square number, and let $(x,y)$ be an integral solution
of $|x^{2}-dy^{2}|=z.$ If $(x,y)$ is primitive, that is, $x,$ $y$ are coprime,
then $(x,y)$ is strictly primitive; otherwise, there exists a common prime
divisor of $x$ and $d$ dividing $x^{2}-dy^{2}=\pm z$ twice and also $x^{2}\mp
z=dy^{2}$ twice, which contradicts that $x,$ $y$ are coprime and $d$ is
square-free.

######  Notation 1.

Let $\mathbb{N}$ denote the additive monoid of all integers $\geq 0.$

Let $d$ be a square-free integer $>1.$ Let $\eta$ be the fundamental unit of
the real quadratic field $\mathbb{Q}(\sqrt{d}).$ Let $(x,y)=(f_{1},g_{1})$ be
the fundamental solution of $|x^{2}-dy^{2}|=1,$ and put

$\varepsilon=f_{1}+g_{1}\sqrt{d}.$

Put

$S(d)=\\{p\text{: prime number}\mid\text{$|x^{2}-dy^{2}|=p^{l}$ has a strictly
primitive integral solution for some integer $l>0$}\\}.$

For each $p\in S(d),$ put

$l_{p}=\min\\{l\text{: integer}>0\mid\text{$|x^{2}-dy^{2}|=p^{l}$ has a
strictly primitive integral solution}\\},$

and let $(x,y)=(x_{p},y_{p})$ be the fundamental solution of

$\begin{cases}x^{2}-dy^{2}=p^{l_{p}}&\text{if }x^{2}-dy^{2}=-1\text{ has a
integral solution,}\\\ |x^{2}-dy^{2}|=p^{l_{p}}&\text{otherwise},\end{cases}$

and put

$\xi_{p}=x_{p}+y_{p}\sqrt{d}.$

Put

$S(d)_{-}=\\{p\in S(d)\mid x_{p}{}^{2}-dy_{p}{}^{2}=-p^{l_{p}}\\}.$

Furthermore, for each $\alpha=a_{1}+a_{2}\sqrt{d}\in\mathbb{Q}(\sqrt{d}),$
where $a_{1},$ $a_{2}\in\mathbb{Q},$ we denote the conjugate and norm of
$\alpha$ by

$\alpha^{\prime}=a_{1}-a_{2}\sqrt{d}\quad\text{and}\quad
N(\alpha)=\alpha\alpha^{\prime}=a_{1}{}^{2}-da_{2}{}^{2},$

respectively.

The first main theorem of this article is the following formula.

######  Theorem 2.

Let $(a,b,c)$ be a non-trivial rational solution of ($\star$ ‣ 1).

Case $\mathrm{(I)}$: $a,$ $b$ are the $x$-components of rational solutions of
the equation $x^{2}-y^{2}=-1.$ Then $(a,b,c)$ is given by

$(a,b,c)=\left(\frac{l^{2}-n^{2}}{2ln},\frac{m^{2}-n^{2}}{2mn},\frac{lm-n^{2}}{(l+m)n}\right),\
\left(\frac{l^{2}-n^{2}}{2ln},\frac{m^{2}-n^{2}}{2mn},-\frac{(l+m)n}{lm-n^{2}}\right)$
(1.3)

for some $l,$ $m,$ $n\in\mathbb{Z}$ such that $|l|\neq|m|,$ $lm\neq n^{2},$
$lmn\neq 0.$

Case $\mathrm{(II)}$: $a,$ $b$ are the $x$-components of rational solutions of
a common negative Pell’s equation $x^{2}-dy^{2}=-1$ for some square-free
integer $d>1.$ Then $(a,b,c)$ is given by

$(a,b,c)=\left(\frac{\alpha+\alpha^{\prime}}{2},\frac{\beta+\beta^{\prime}}{2},\frac{\alpha\beta-(\alpha\beta)^{\prime}}{\alpha+\beta-(\alpha+\beta)^{\prime}}\right),\
\left(\frac{\alpha+\alpha^{\prime}}{2},\frac{\beta+\beta^{\prime}}{2},-\frac{\alpha+\beta-(\alpha+\beta)^{\prime}}{\alpha\beta-(\alpha\beta)^{\prime}}\right)$
(1.4)

for some $\alpha,$ $\beta\in\mathbb{Q}(\sqrt{d})$ such that
$N(\alpha)=N(\beta)=-1$ and $\beta\neq\pm\alpha.$ In addition, $\alpha,$
$\beta$ are written of the form

$\alpha=\pm\eta^{m}\prod_{p\in
S(d)}\alpha_{p}{}^{m_{p}}p^{-l_{p}m_{p}/2},\quad\beta=\pm\eta^{n}\prod_{p\in
S(d)}\beta_{p}{}^{n_{p}}p^{-l_{p}n_{p}/2}$

with some $m,$ $n\in\mathbb{Z},$ $(m_{p}),$ $(n_{p})\in\bigoplus_{p\in
S(d)}\mathbb{N},$ $\alpha_{p},$ $\beta_{p}\in\\{\xi_{p},\xi^{\prime}_{p}\\}$
$(p\in S(d))$ satisfying

$l_{p}m_{p}\equiv l_{p}n_{p}\equiv 0\pmod{2}$

and

$1\equiv\begin{cases}m\equiv n\qquad\qquad\qquad\quad\;\>\,(\mathrm{mod}\
2)&\text{if }x^{2}-dy^{2}=-1\ \text{has an integral solution},\\\
\displaystyle\sum_{p\in S(d)_{-}}m_{p}\equiv\sum_{p\in S(d)_{-}}n_{p}\
(\mathrm{mod}\ 2)&\text{otherwise}.\end{cases}$

Conversely, every triple $(a,b,c)$ of Form (1.3) or (1.4) is a rational
solution of ($\star$ ‣ 1).

The proof is given in Section 3.

######  Example 2.

  1. (1)

In (1.3), by letting $(l,m,n)=(2,3,1),$ we obtain the rational solutions

$(a,b,c)=\left(\frac{3}{4},\frac{4}{3},1\right),\
\left(\frac{3}{4},\frac{4}{3},-1\right)$

of ($\star$ ‣ 1), and by letting $(l,m,n)=(2,5,1),$ we obtain the rational
solutions

$(a,b,c)=\left(\frac{3}{4},\frac{12}{5},\frac{9}{7}\right),\
\left(\frac{3}{4},\frac{12}{5},-\frac{7}{9}\right)$

of ($\star$ ‣ 1).

  2. (2)

In (1.4), by letting $d=2,$ $\alpha=(1+5\sqrt{2})/7,$ $\beta=\eta^{2}\alpha,$
$\eta=1+\sqrt{2},$ we obtain the rational solutions

$(a,b,c)=\left(\frac{1}{7},\frac{23}{7},\frac{6}{7}\right),\
\left(\frac{1}{7},\frac{23}{7},-\frac{7}{6}\right)$

of ($\star$ ‣ 1), and by letting $d=34,$ $\alpha=(5+\sqrt{34})/3,$
$\beta=\eta\alpha,$ $\eta=35+6\sqrt{34},$ we obtain the rational solutions

$(a,b,c)=\left(\frac{5}{3},\frac{379}{3},\frac{32}{9}\right),\
\left(\frac{5}{3},\frac{379}{3},-\frac{9}{32}\right)$

of ($\star$ ‣ 1).

The result in Case (I) refines the previous result [4, Theorem 2]. For any
rational solution $(a,b,c)$ of ($\star$ ‣ 1) in Case (I), each of $a$ and $b$
is a ratio of the leg lengths of some Pythagorean triangle. We find the
rational solutions of ($\star$ ‣ 1) in Case (II) by using the following
Theorem. This is the second main theorem of this article.

######  Theorem 3.

  1. (1)

Let $z$ be an integer $>1.$

     * •

Suppose that $d\equiv 1\ (\mathrm{mod}\ 8)$ or “ $d\equiv 5\ (\mathrm{mod}\
8)$ and $\eta\notin\mathbb{Z}[\sqrt{d}]$” or $d\equiv 2,$ $3$ $(\mathrm{mod}\
4).$ Then $|x^{2}-dy^{2}|=z$ has a strictly primitive integral solution if and
only if

$\mathrm{ord}_{p}(z)=\begin{cases}l_{p}n_{p}&\text{in Case
}(\mathrm{A}1)\;:\text{``}\,p=2\in S(d)\text{ and
}\eta\in\mathbb{Z}[\sqrt{d}]\text{'' or }2\neq p\in S(d),\\\
l_{2}n_{2}+2m&\text{in Case }(\mathrm{A}1)^{\prime}:\;\>\,p=2\in S(d)\text{
and }\eta\notin\mathbb{Z}[\sqrt{d}],\\\ 0&\text{in Case
}(\mathrm{A}2)\;:\text{``}\,p=2\notin S(d)\text{ and
}\eta\in\mathbb{Z}[\sqrt{d}]\text{'' or }2\neq p\notin S(d),\\\ 2m&\text{in
Case }(\mathrm{A}2)^{\prime}:\;\>\,p=2\notin S(d)\text{ and
}\eta\notin\mathbb{Z}[\sqrt{d}]\end{cases}$ (1.5)

for some $n_{p}\in\mathbb{N}$ for each prime number $p,$ where
$m\in\\{0,1\\}.$

     * •

Suppose that $d\equiv 5\ (\mathrm{mod}\ 8)$ and $\eta\in\mathbb{Z}[\sqrt{d}].$
Then $|x^{2}-dy^{2}|=z$ has a strictly primitive integral solution if and only
if

$\mathrm{ord}_{p}(z)=\begin{cases}l_{p}n_{p}&\text{in Case }(\mathrm{B}1):\
p\in S(d)\text{ and }p\neq 2,\\\ 0&\text{in Case }(\mathrm{B}2):\ p\notin
S(d)\text{ or \ \;}p=2\end{cases}$ (1.6)

for some $n_{p}\in\mathbb{N}$ for each prime number $p.$

In these cases, its strictly primitive integral solution $(x,y)$ satisfies

$x+y\sqrt{d}=\pm 2^{m}\eta^{n}\prod_{p\in S(d)}\xi_{p}^{*}{}^{n_{p}}$ (1.7)

for some $n\in\mathbb{Z}$ such that

$n\equiv\begin{cases}0,\ \pm 1\pmod{3}&\text{if
}\eta\in\mathbb{Z}[\sqrt{d}]\text{ or \ \;}z\equiv 0\ (\mathrm{mod}\ 2),\\\
0\qquad\>\\!\pmod{3}&\text{if }\eta\notin\mathbb{Z}[\sqrt{d}]\text{ and
}z\equiv 1\ (\mathrm{mod}\ 2)\end{cases}$ (1.8)

and $\xi_{p}^{*}\in\\{\xi_{p},\xi^{\prime}_{p}\\}$ $(p\in S(d)),$ where $m=0$
in the latter case.

  2. (2)

Let $z$ be an integer $>1.$ Then every integral solution $(x,y)$ of
$|x^{2}-dy^{2}|=z^{2}$ satisfies

$x+y\sqrt{d}=\pm\eta^{n}\prod_{p\in
S(d)}\xi_{p}^{*}{}^{n_{p}}p^{\mathrm{ord}_{p}(z)-l_{p}n_{p}/2}\prod_{p\notin
S(d)}p^{\mathrm{ord}_{p}(z)}$ (1.9)

for some $n\in\mathbb{Z},$ $(n_{p})\in\bigoplus_{p\in S(d)}\mathbb{N},$
$\xi_{p}^{*}\in\\{\xi_{p},\xi^{\prime}_{p}\\}$ $(p\in S(d)),$ where (1.8) and

$l_{p}n_{p}\equiv 0\pmod{2},\quad
n_{p}\leq\begin{cases}\mathrm{ord}_{2}(z)-1&\text{if }p=2\in S(d)\text{ and
}\eta^{n}\notin\mathbb{Z}[\sqrt{d}],\\\
2\,\mathrm{ord}_{p}(z)/l_{p}&\text{otherwise}.\end{cases}$

The proof is given in Section 2.

##  2 Rational solutions of Pell’s equations

In this section, we prove Theorem 3. Throughout the section, let $d$ be a
square-free integer $>1,$ and use the symbols in Notation 1. We recall the
following classical theorem.

######  Theorem 4.

  1. (1)

The positive Pell’s equation $x^{2}-dy^{2}=1$ has a non-trivial integral
solution independently of the value of $d.$

  2. (2)

The negative Pell’s equation $x^{2}-dy^{2}=-1$ has a rational solution, if and
only if $d$ has no prime factors congruent to $3$ modulo $4.$

######  Remark 3.

If $x^{2}-dy^{2}=-1$ has an integral solution, then $d$ has no prime factors
congruent to $3$ modulo $4;$ however, the converse is false. For example,
$x^{2}-34y^{2}=-1$ has a rational solution $(x,y)=(5/3,1/3)$ but no integral
solutions.

Let $z,$ $w\in\mathbb{Z}\setminus\\{0\\}.$ If $x^{2}-dy^{2}=z,$
$x^{2}-dy^{2}=w$ have integral solutions $(x,y)=(a_{1},a_{2}),$
$(b_{1},b_{2}),$ respectively, then $x^{2}-dy^{2}=zw$ has an integral solution

$(x,y)=(a_{1}b_{1}+da_{2}b_{2},a_{1}b_{2}+a_{2}b_{1}),$

since the norm map $N:\mathbb{Q}(\sqrt{d})^{\times}\to\mathbb{Q}^{\times}$ is
a group homomorphism. In the case when $w=1,$ such a solution is called a Pell
multiple.

######  Theorem 5 ([3, Corollary 3.5]).

Let $z\in\mathbb{Z}\setminus\\{0\\}.$ If $x^{2}-dy^{2}=z$ has an integral
solution, then there exists a finite number of its integral solutions
$(x,y)=(a_{1,1},a_{1,2}),$ $\ldots,$ $(a_{r,1},a_{r,2})$ such that its every
integral solution $(x,y)$ satisfies

$x+y\sqrt{d}=\pm\varepsilon{}^{n}(a_{i,1}+a_{i,2}\sqrt{d})$

for some $n\in\mathbb{Z}$ and $i\in\\{1,\dots,r\\}.$

In this article, we generalize the concept of Pell multiples. The following
propositions are fundamental.

######  Proposition 2.

  1. (1)

Let $p_{1},$ $\ldots,$ $p_{r}$ be distinct prime numbers, and let $n_{1},$
$\ldots,$ $n_{r}\in\mathbb{N}.$ If $|x^{2}-dy^{2}|=p_{i}{}^{n_{i}}$ has a
strictly primitive integral solution $(x,y)=(a_{i,1},a_{i,2})$ for each
$i\in\\{1,\dots,r\\},$ then $(x,y)\in\mathbb{Z}^{2}$ defined by

$x+y\sqrt{d}=\pm\prod_{i=1}^{r}(a_{i,1}+a_{i,2}\sqrt{d})$ (2.1)

is a strictly primitive integral solution of
$|x^{2}-dy^{2}|=p_{1}{}^{n_{1}}\cdots p_{r}{}^{n_{r}}.$

  2. (2)

Let $p$ be a prime number, and let $m,$ $n$ be integers $>0.$ If
$|x^{2}-dy^{2}|=p^{m}$ has a strictly primitive integral solution
$(x,y)=(a_{1},a_{2}),$ then $(x,y)\in\mathbb{Z}^{2}$ defined by

$x+y\sqrt{d}=\pm(a_{1}+a_{2}\sqrt{d})^{n}$ (2.2)

is a strictly primitive integral solution of $|x^{2}-dy^{2}|=p^{mn}.$

###### Proof.

We prove the contrapositions.

  1. (1)

For each $i\in\\{1,\dots,r\\},$ let $(x,y)=(a_{i,1},a_{i,2})$ be an integral
solution of $|x^{2}-dy^{2}|=p_{i}{}^{n_{i}},$ and put
$\alpha_{i}=a_{i,1}+a_{i,2}\sqrt{d}.$ Suppose that the integral solution
$(x,y)$ of $|x^{2}-dy^{2}|=p_{1}{}^{n_{1}}\cdots p_{r}{}^{n_{r}}$ defined by
(2.1) is not strictly primitive. Then $p_{j}\mid x,$ $p_{j}\mid dy$ for some
$j\in\\{1,\dots,r\\}.$

     * •

Case: $p_{j}\mid d.$ Then $p_{j}\mid da_{j,2}{}^{2}\pm
p_{j}{}^{n_{j}}=a_{j,1}{}^{2},$ and therefore $p_{j}\mid a_{j,1}.$

     * •

Case: $p_{j}\nmid d.$ Then $p_{j}\mid y,$ and therefore $p_{j}$ divides

$(x+y\sqrt{d})\prod_{i\neq j}\alpha_{i}^{\prime}=\pm\alpha_{j}\prod_{i\neq
j}\alpha_{i}\alpha_{i}^{\prime}=\pm\alpha_{j}\prod_{i\neq j}p_{i}{}^{n_{i}}.$

This implies $p_{j}\mid\alpha_{j},$ and therefore $p_{j}\mid a_{j,1},$
$p_{j}\mid a_{j,2}.$

Thus $p_{j}\mid a_{j,1},$ $p_{j}\mid da_{j,2},$ and therefore the solution
$(x,y)=(a_{j,1},a_{j,2})$ is not strictly primitive.

  2. (2)

Let $(x,y)=(a_{1},a_{2})$ be an integral solution of $|x^{2}-dy^{2}|=p^{m}.$
Suppose that the solution $(x,y)$ of $|x^{2}-dy^{2}|=p^{mn}$ defined by (2.2)
is not strictly primitive. Then $p\mid x,$ $p\mid dy.$

     * •

Case: $p\mid d.$ Then $p\mid da_{2}{}^{2}\pm p^{m}=a_{1}{}^{2},$ and therefore
$p\mid a_{1}.$

     * •

Case: $p\nmid d.$ Then $p\mid y,$ and therefore $p\mid x+y\sqrt{d}.$ With
respect to an extension $v$ of the $p$-adic additive valuation to
$\mathbb{Q}(\sqrt{d}),$ this implies

$v(a_{1}+a_{2}\sqrt{d})=\frac{1}{n}v(x+y\sqrt{d})>0.$

Hence $p\mid a_{1},$ $p\mid a_{2}.$

Thus $p\mid a_{1},$ $p\mid da_{2},$ and therefore the solution
$(x,y)=(a_{1},a_{2})$ is not strictly primitive.∎

######  Corollary 1.

Let $z\in\mathbb{Z}\setminus\\{0\\}.$ Suppose that $x^{2}-dy^{2}=-1$ has an
integral solution. If $x^{2}-dy^{2}=z$ has a strictly primitive integral
solution, then so does $x^{2}-dy^{2}=-z.$

###### Proof.

If $x^{2}-dy^{2}=z$ has a strictly primitive integral solution
$(x,y)=(a_{1},a_{2}),$ then $(x,y)\in\mathbb{Z}^{2}$ defined by
$x+y\sqrt{d}=\varepsilon(a_{1}+a_{2}\sqrt{d})$ is a strictly primitive
integral solution of $x^{2}-dy^{2}=-z.$ ∎

We say that an ideal $\mathfrak{a}\neq(0)$ in $\mathbb{Z}[\sqrt{d}]$ or the
integer ring $O_{K}$ of a quadratic field $K$ is primitive if $\mathfrak{a}$
is not divisible by $(p)$ for any prime number $p.$

######  Theorem 6.

  1. (1)

Let $p$ be a prime number. Suppose that $d\not\equiv 5\ (\mathrm{mod}\ 8)$ or
$p\neq 2.$ Then $|x^{2}-dy^{2}|=z$ has a strictly primitive integral solution
for some multiple $z$ of $p,$ if and only if $p$ splits in
$\mathbb{Q}(\sqrt{d}).$

  2. (2)

Suppose that $d\equiv 1\ (\mathrm{mod}\ 4).$

    1. (a)

If $2\in S(d),$ then $l_{2}\geq 2.$

    2. (b)

Both $2\in S(d)$ and $l_{2}=2$ hold if and only if
$\eta\notin\mathbb{Z}[\sqrt{d}].$ In this case, $\xi_{2}=2\eta$ holds.

    3. (c)

If $d\equiv 5\ (\mathrm{mod}\ 8)$ and $z$ is a multiple of $8,$ then every
integral solution of $x^{2}-dy^{2}=z$ is a pair of even numbers, and not
strictly primitive.

  3. (3)

If $d\equiv 1\ (\mathrm{mod}\ 8)$ or “ $d\equiv 5\ (\mathrm{mod}\ 8)$ and
$\eta\in\mathbb{Z}[\sqrt{d}]$” or $d\equiv 2,$ $3\ (\mathrm{mod}\ 4),$ then

$S(d)=\\{p\text{: prime number}\mid p\text{ splits in
}\mathbb{Q}(\sqrt{d})\\}.$

If $d\equiv 5\ (\mathrm{mod}\ 8)$ and $\eta\notin\mathbb{Z}[\sqrt{d}],$ then

$S(d)=\\{p\text{: prime number}\mid p\text{ splits in
}\mathbb{Q}(\sqrt{d})\\}\cup\\{2\\}.$

Unless “ $d\equiv 5\ (\mathrm{mod}\ 8)$ and $\eta\notin\mathbb{Z}[\sqrt{d}]$
and $p=2,$” then $l_{p}$ is not greater than the ideal class number of
$\mathbb{Q}(\sqrt{d})$ for each $p\in S(d).$

###### Proof.

Put $K=\mathbb{Q}(\sqrt{d}).$ Recall that the integer ring $O_{K}$ of $K$ is

$O_{K}=\begin{cases}\mathbb{Z}\left[\dfrac{1+\sqrt{d}}{2}\right]&\text{if
}d\equiv 1\quad\ \;(\mathrm{mod}\ 4),\\\ \mathbb{Z}[\sqrt{d}]&\text{if
}d\equiv 2,\ 3\ (\mathrm{mod}\ 4).\end{cases}$

Let $I$ be the monoid of all ideals in $\mathbb{Z}[\sqrt{d}],$ and let $\sim$
be the equivalence relation on $I$ defined by

$\mathfrak{a}\sim\mathfrak{b}\iff\mathfrak{b}=(\lambda)\mathfrak{a}\text{ or
}\mathfrak{a}=(\lambda)\mathfrak{b}\text{ for some
}\lambda\in\mathbb{Z}[\sqrt{d}]\setminus\\{0\\},$

which is compatible with the multiplication. Since the ideal class group
$Cl_{K}$ of $K$ is finite, and so is the quotient monoid $I/\sim$ which can be
regarded as its submonoid. Furthermore, $2$ splits in $K$ if $d\equiv 1\
(\mathrm{mod}\ 8),$ and $2$ is unramified in $K$ if $d\equiv 5\ (\mathrm{mod}\
8).$

  1. (1)

Suppose that a prime number $p$ splits into prime ideals $\mathfrak{p}$ and
$\mathfrak{p}^{\prime}=\\{\alpha^{\prime}\mid\alpha\in\mathfrak{p}\\}$ in
$O_{K},$ that is, $(p)=\mathfrak{p}\mathfrak{p}^{\prime}\neq\mathfrak{p}^{2}.$
Then there exist $l,$ $x,$ $y\in\mathbb{Z}$ such that

$(\mathfrak{p}\cap\mathbb{Z}[\sqrt{d}])^{l}=(x+y\sqrt{d}),\quad
0<l\leq\\#Cl_{K}$

by the finiteness of $I/\\!\sim,$ where $x,$ $y$ are coprime since
$(\mathfrak{p}\cap\mathbb{Z}[\sqrt{d}])^{l}$ is primitive. Furthermore, $x,$
$d$ are coprime, since $x^{2}-dy^{2}=\pm p^{l}$ and $p\nmid d.$ These imply
that $|x^{2}-dy^{2}|=p^{l}$ has a strictly primitive integral solution.

To prove the converse, suppose that an integer $z>1$ has a prime factor $p$
which does not split in $K.$ Let $(x,y)$ be an integral solution of
$|x^{2}-dy^{2}|=z.$

     * •

Case: $p\neq 2$ is unramified in $K$ or “$d\equiv 3\ (\mathrm{mod}\ 4)$ and
$p=2$ is unramified in $K.$” In $O_{K},$ the principal ideal $(z)$ is
decomposed as

$(z)=(x+y\sqrt{d})(x-y\sqrt{d}),$

where both sides are divisible by $(p).$ Therefore $(x+y\sqrt{d})$ and
$(x-y\sqrt{d})$ are divisible by $(p)$ in $O_{K},$ since the prime ideal $(p)$
divides one of these ideals and also the other because of its self-conjugacy.
This implies that $(x+y\sqrt{d})$ and $(x-y\sqrt{d})$ are divisible by $(p)$
in $\mathbb{Z}[\sqrt{d}],$ since

$p\,O_{K}\cap\mathbb{Z}[\sqrt{d}]=p\,\mathbb{Z}[\sqrt{d}]$ (2.3)

by the assumption. Hence $p\mid x+y\sqrt{d},$ and therefore $p\mid x,$ $p\mid
y.$

     * •

Case: $p$ ramifies in $K.$ Then $p\mid d,$ and therefore $p$ divides
$dy^{2}\pm z=x^{2},$ which implies $p\mid x.$

In these cases, $(x,y)$ is not strictly primitive. Thus the assertion of (1)
holds.

  2. (2)

    1. (a)

Suppose that $d\equiv 1\ (\mathrm{mod}\ 4).$ Then $|x^{2}-dy^{2}|=2$ has no
integral solutions, since

$x^{2}-dy^{2}\equiv x^{2}-y^{2}\not\equiv 2\pmod{4}.$

This implies that $l_{2}\geq 2$ if $2\in S(d).$

    2. (b)

Suppose that $\eta\notin\mathbb{Z}[\sqrt{d}].$ Then the pair $(x,y)$ of odd
integers defined by $\eta=(x+y\sqrt{d})/2$ satisfies $|x^{2}-dy^{2}|=2^{2}.$
This implies that $x,$ $dy$ are coprime, and therefore $2\in S(d)$ and
$l_{2}=2.$ In this case, $\xi_{2}=2\eta$ holds by the minimality of $\eta.$

Conversely, if $2\in S(d)$ and $l_{2}=2,$ then a strictly primitive integral
solution $(x,y)$ of $|x^{2}-dy^{2}|=2^{2}$ satisfies

$\frac{x+y\sqrt{d}}{2}\in
O_{K}^{\times}\setminus\mathbb{Z}[\sqrt{d}]^{\times},$

which implies $\eta\notin\mathbb{Z}[\sqrt{d}]$ since

$O_{K}^{\times}=\\{\pm\eta^{n}\mid n\in\mathbb{Z}\\}.$

    3. (c)

If $d\equiv 5\ (\mathrm{mod}\ 8),$ then

$(\pm 1)^{2}-d\cdot(\pm 1)^{2}\equiv(\pm 1)^{2}-d\cdot(\pm 3)^{2}\equiv(\pm
3)^{2}-d\cdot(\pm 1)^{2}\equiv(\pm 3)^{2}-d\cdot(\pm 3)^{2}\equiv 4\pmod{8},$

which imply that every integral solution $(x,y)$ of $x^{2}-dy^{2}=z$ is a pair
of even numbers for each multiple $z$ of $8.$

  3. (3)

If $d\equiv 5\ (\mathrm{mod}\ 8)$ and $\eta\in\mathbb{Z}[\sqrt{d}],$ then
$2\notin S(d),$ since $|x^{2}-dy^{2}|=2^{l}$ has no strictly primitive
integral solutions for each integer $l>0$ by (2). Combining this fact with (1)
and (2), we obtain the desired result. ∎

######  Theorem 7.

Let $\mathfrak{a}_{1},$ $\dots,$ $\mathfrak{a}_{r}$ be pairwise coprime ideals
in the integer ring $O_{K}$ of a quadratic field $K.$ Then
$\prod_{i=1}^{r}\mathfrak{a}_{i}$ is primitive if and only if
$\mathfrak{a}_{1},$ $\dots,$ $\mathfrak{a}_{r}$ are primitive.

###### Proof.

For any ideal $\mathfrak{a}\neq(0)$ in $O_{K},$ $\mathfrak{a}$ is primitive if
and only if the residue group $O_{K}/\mathfrak{a}$ is cyclic (see [1,
Corollary 6.30]). Combining this fact with the Chinese remainder theorem, we
obtain the desired assertion. ∎

Now we are ready to prove Theorem 3.

###### Proof of Theorem 3.

  1. (1)

Put $K=\mathbb{Q}(\sqrt{d}),$ and let $O_{K}$ denote the integer ring of $K.$
For each prime number $p$ which splits in $K,$ we take a prime ideal
$\mathfrak{p}$ in $O_{K}$ lying over $(p)$ in $\mathbb{Z},$ and put
$\mathfrak{p}{}^{\prime}=\\{\alpha^{\prime}\mid\alpha\in\mathfrak{p}\\}.$ Note
that $\mathfrak{p}{}^{r},$ $\mathfrak{p}{}^{\prime r}$ are primitive for such
a prime ideal $\mathfrak{p}$ in $O_{K}$ and any $r\in\mathbb{N}.$ Let
$(x,y)=(a_{1},a_{2})$ be a strictly primitive integral solution of
$|x^{2}-dy^{2}|=z.$ Let $T$ be the set of all prime factors of $z,$ and put
$T(d)=T\cap S(d).$ For each $p\in T(d),$ let $q_{p}$ and $r_{p}$ be the
quotient and remainder, respectively, when dividing $\mathrm{ord}_{p}(z)$ by
$l_{p}.$ For each $p\in T\setminus T(d),$ put $r_{p}=\mathrm{ord}_{p}(z).$ The
equality $|a_{1}{}^{2}-da_{2}{}^{2}|=z$ can be expressed as
$(a_{1}{}^{2}-da_{2}{}^{2})=(z)$ with ideals in $O_{K},$ which implies

$\displaystyle(a_{1}+a_{2}\sqrt{d})(a_{1}-a_{2}\sqrt{d})$
$\displaystyle=\prod_{p\in T(d)}(p)^{l_{p}q_{p}+r_{p}}\prod_{p\in T\setminus
T(d)}(p)^{r_{p}}$ $\displaystyle=\prod_{p\in
T(d)}(\xi_{p})^{q_{p}}(\xi_{p}^{\prime})^{q_{p}}\prod_{p\in T}(p)^{r_{p}},$

since $(\xi_{p})(\xi_{p}^{\prime})=(p)^{l_{p}}$ for each $p\in T(d).$ For each
$p\in T,$ if $d\equiv 2,$ $3\ (\mathrm{mod}\ 4)$ or $p\neq 2,$ then $(p)$ is
decomposed as

$(p)=\mathfrak{p}\mathfrak{p}{}^{\prime}\neq\mathfrak{p}^{2}$

in $O_{K}$ by Theorem 6 (1), and therefore the ideal $(a_{1}+a_{2}\sqrt{d})$
is divisible by either $\mathfrak{p}$ or $\mathfrak{p}{}^{\prime}$; otherwise,
$(p)=\mathfrak{p}\mathfrak{p}{}^{\prime}\mid(a_{1}+a_{2}\sqrt{d})$ in $O_{K}$
and also $\mathbb{Z}[\sqrt{d}]$ by (2.3), and therefore $p\mid a_{1},$ $p\mid
a_{2},$ which contradicts that $a_{1},$ $da_{2}$ are coprime. For each $p\in
T(d),$ if $d\equiv 2,$ $3\ (\mathrm{mod}\ 4)$ or $p\neq 2,$ we can see that
$(\xi_{p})$ is divisible by either $\mathfrak{p}$ or $\mathfrak{p}{}^{\prime}$
by the same argument, which implies

$\\{(\xi_{p}),(\xi_{p}^{\prime})\\}=\\{\mathfrak{p}{}^{l_{p}},\mathfrak{p}{}^{\prime
l_{p}}\\}.$

     * (i)

Case: $d\equiv 2,\ 3\ (\mathrm{mod}\ 4)$ or $2\notin T.$ Then $T=T(d)$ and the
ideal $(a_{1}+a_{2}\sqrt{d})$ is decomposed as

$(a_{1}+a_{2}\sqrt{d})=\left(\prod_{p\in
T(d)}\xi_{p}^{*}{}^{q_{p}}\right)\prod_{p\in T(d)}\mathfrak{p}^{*}{}^{r_{p}}$

with $\xi_{p}^{*}\in\\{\xi_{p},\xi_{p}^{\prime}\\},$
$\mathfrak{p}^{*}\in\\{\mathfrak{p},\mathfrak{p}{}^{\prime}\\}$ in $O_{K}.$
The ideal

$\left(\frac{a_{1}+a_{2}\sqrt{d}}{\prod_{p\in
T(d)}\xi_{p}^{*}{}^{q_{p}}}\right)=\prod_{p\in
T(d)}\mathfrak{p}^{*}{}^{r_{p}}$

is principal and primitive by Theorem 7, and therefore equal to $O_{K},$ which
implies that $r_{p}=0$ for each $p\in T(d).$ Hence there exists
$n\in\mathbb{Z}$ such that

$a_{1}+a_{2}\sqrt{d}=\pm\eta^{n}\prod_{p\in T(d)}\xi_{p}^{*}{}^{q_{p}}.$

Letting $n_{p}=q_{p},$ we obtain (1.7).

     * (ii)

Case: $d\equiv 1\ (\mathrm{mod}\ 4)$ and $2\in T\setminus T(d).$ Then
$T\setminus\\{2\\}=T(d),$ $2$ is unramified in $K,$
$\eta\in\mathbb{Z}[\sqrt{d}],$ and $\mathrm{ord}_{2}(z)=2$ by Theorem 6. The
prime ideal $(2)$ divides both $(a_{1}+a_{2}\sqrt{d})$ and
$(a_{1}-a_{2}\sqrt{d})$ only once by its self-conjugacy; otherwise,
$(2)^{2}\mid(a_{1}+a_{2}\sqrt{d})$ in $O_{K},$ and therefore
$(2)\mid(a_{1}+a_{2}\sqrt{d})$ in $\mathbb{Z}[\sqrt{d}]$ since

$2^{2}O_{K}\cap\mathbb{Z}[\sqrt{d}]\subset 2\,\mathbb{Z}[\sqrt{d}],$ (2.4)

which contradicts that $a_{1},$ $da_{2}$ are coprime. The ideal
$((a_{1}+a_{2}\sqrt{d})/2)$ is decomposed as

$\left(\frac{a_{1}+a_{2}\sqrt{d}}{2}\right)=\left(\prod_{p\in
T(d)}\xi_{p}^{*}{}^{q_{p}}\right)\prod_{p\in T(d)}\mathfrak{p}^{*}{}^{r_{p}}$

with $\xi_{p}^{*}\in\\{\xi_{p},\xi_{p}^{\prime}\\},$
$\mathfrak{p}^{*}\in\\{\mathfrak{p},\mathfrak{p}{}^{\prime}\\}$ in $O_{K}.$
The ideal

$\left(\frac{a_{1}+a_{2}\sqrt{d}}{2\prod_{p\in
T(d)}\xi_{p}^{*}{}^{q_{p}}}\right)=\prod_{p\in
T(d)}\mathfrak{p}^{*}{}^{r_{p}}$

is principal and primitive by Theorem 7, and therefore equal to $O_{K},$ which
implies that $r_{p}=0$ for each $p\in T(d).$ Hence there exists
$n\in\mathbb{Z}$ such that

$a_{1}+a_{2}\sqrt{d}=\pm 2\eta^{n}\prod_{p\in T(d)}\xi_{p}^{*}{}^{q_{p}}.$

Letting $n_{p}=q_{p},$ we obtain (1.7).

     * (iii)

Case: $d\equiv 1\ (\mathrm{mod}\ 4),$ $2\in T(d)$ and
$\eta\in\mathbb{Z}[\sqrt{d}].$ Then $T=T(d),$ $l_{2}\geq 3,$ and $2$ splits in
$K$ by Theorem 6. These imply

$\\{(\xi_{2}),(\xi_{2}^{\prime})\\}=\\{\mathfrak{p}{}^{l_{2}},\mathfrak{p}{}^{\prime
l_{2}}\\},\ \\{(2)\mathfrak{p}{}^{l_{2}-2},(2)\mathfrak{p}{}^{\prime
l_{2}-2}\\}$

for a prime ideal $\mathfrak{p}$ in $O_{K}$ lying over $(2)$ in $\mathbb{Z};$
otherwise, $(2)^{2}=\mathfrak{p}{}^{2}\mathfrak{p}{}^{\prime 2}\mid(\xi_{2})$
in $O_{K},$ and therefore $(2)\mid(\xi_{2})$ in $\mathbb{Z}[\sqrt{d}]$ by
(2.4), which contradicts that the fundamental solution of
$|x^{2}-dy^{2}|=2^{l_{2}}$ is strictly primitive. Using the same argument as
in Case (i) and letting $n_{p}=q_{p},$ we obtain (1.7).

     * (iv)

Case: $d\equiv 1\ (\mathrm{mod}\ 4),$ $2\in T(d)$ and
$\eta\notin\mathbb{Z}[\sqrt{d}].$ Then $T=T(d),$ $l_{2}=2,$ $\xi_{2}=2\eta,$
and $|x^{2}-dy^{2}|=z$ has no strictly primitive integral solutions for each
multiple $z$ of $8$ by Theorem 6, which implies $r_{2}=0.$ The ideal
$((a_{1}+a_{2}\sqrt{d})/2)$ is decomposed as

$\left(\frac{a_{1}+a_{2}\sqrt{d}}{2}\right)=(\xi_{2}^{*})^{q_{2}-1}\left(\prod_{p\in
T(d)\setminus\\{2\\}}\xi_{p}^{*}{}^{q_{p}}\right)\prod_{p\in
T(d)\setminus\\{2\\}}\mathfrak{p}^{*}{}^{r_{p}}$

with $\xi_{p}^{*}\in\\{\xi_{p},\xi_{p}^{\prime}\\},$
$\mathfrak{p}^{*}\in\\{\mathfrak{p},\mathfrak{p}{}^{\prime}\\}$ in $O_{K}.$
The ideal

$\left(\frac{a_{1}+a_{2}\sqrt{d}}{2\xi_{2}^{*}{}^{q_{2}-1}\prod_{p\in
T(d)\setminus\\{2\\}}\xi_{p}^{*}{}^{q_{p}}}\right)=\prod_{p\in
T(d)\setminus\\{2\\}}\mathfrak{p}^{*}{}^{r_{p}}$

is principal and primitive by Theorem 7, and therefore equal to $O_{K},$ which
implies that $r_{p}=0$ for each $p\in T(d)\setminus\\{2\\}.$ Hence there
exists $n_{0}\in\mathbb{Z}$ such that

$a_{1}+a_{2}\sqrt{d}=\pm 2\eta^{n_{0}}\xi_{2}^{*}{}^{q_{2}-1}\prod_{p\in
T(d)\setminus\\{2\\}}\xi_{p}^{*}{}^{q_{p}}.$

Letting

$n_{p}=\begin{cases}q_{2}-1&\text{if }p=2\text{ and
}\eta^{n_{0}}\notin\mathbb{Z}[\sqrt{d}],\\\ q_{p}&\text{otherwise}\end{cases}$

and defining $n\in\mathbb{Z}$ by

$\begin{cases}\pm\eta^{n}=\pm 2\eta^{n_{0}}\xi_{2}^{*}{}^{-1}&\text{if
}\eta^{n_{0}}\in\mathbb{Z}[\sqrt{d}],\\\ n=n_{0}&\text{otherwise},\end{cases}$

where the first double sign is not necessarily the same as the second, we
obtain (1.7).

The exponent $n$ satisfies (1.8), since $2\eta^{n}\in\mathbb{Z}[\sqrt{d}]$ for
each $n\in\mathbb{Z}$ and

$\mathbb{Z}[\sqrt{d}]^{\times}=\begin{cases}\\{\eta^{n}\mid
n\in\mathbb{Z}\\}&\text{if }\eta\in\mathbb{Z}[\sqrt{d}],\\\ \\{\eta^{n}\mid
n\in\mathbb{Z},\ n\equiv 0\ (\mathrm{mod}\ 3)\\}&\text{if
}\eta\notin\mathbb{Z}[\sqrt{d}]\end{cases}$

by $\eta^{3}\in\mathbb{Z}[\sqrt{d}]$ (see [6, Theorem 2.1.4]). Thus the
assertion of (1) holds.

  2. (2)

Let $(x,y)$ be an integral solution of $|x^{2}-dy^{2}|=z^{2},$ and let $g$ be
the greatest common divisor of $x$ and $y.$ Let $T$ be the set of all prime
factors of $zg^{-1},$ and put $T(d)=T\cap S(d)$. Put

$a_{1}=\frac{x}{g},\quad a_{2}=\frac{y}{g}.$

Then $(a_{1},a_{2})$ is a strictly primitive integral solution of
$|x^{2}-dy^{2}|=z^{2}g^{-2},$ and satisfies

$a_{1}+a_{2}\sqrt{d}=\pm 2^{m}\eta^{n}\prod_{p\in S(d)}\xi_{p}^{*}{}^{n_{p}}$
(2.5)

for some $m\in\\{0,1\\},$ $n\in\mathbb{Z},$ $(n_{p})\in\bigoplus_{p\in
S(d)}\mathbb{N}$ satisfying (1.5), (1.6), (1.8) by (1). Put

$i_{p}=\begin{cases}\mathrm{ord}_{2}(z)-m&\text{in Case
}(\mathrm{A}1)^{\prime}\text{ or }(\mathrm{A}2)^{\prime},\\\
\mathrm{ord}_{p}(z)&\text{otherwise}.\end{cases}$

     * •

Case $(\mathrm{A}1)$ or $(\mathrm{B}1)$. Then $l_{p}n_{p}\equiv 0\
(\mathrm{mod}\ 2)$ and $n_{p}\leq 2\,\mathrm{ord}_{p}(z)/l_{p},$ since

$\mathrm{ord}_{p}(g)=\mathrm{ord}_{p}(z)-l_{p}n_{p}/2\geq 0.$

     * •

Case $(\mathrm{A}1)^{\prime}$. Then $l_{2}n_{2}\equiv 0\ (\mathrm{mod}\ 2)$
and $n_{2}\leq i_{2},$ since $l_{2}=2$ and

$\mathrm{ord}_{2}(g)=\mathrm{ord}_{2}(z)-m-l_{2}n_{2}/2=i_{2}-n_{2}\geq 0.$

     * •

Case $(\mathrm{A}2)$ or $(\mathrm{B}2)$. Then
$\mathrm{ord}_{p}(g)=\mathrm{ord}_{p}(z)=i_{p}.$

     * •

Case $(\mathrm{A}2)^{\prime}$. Then
$\mathrm{ord}_{2}(g)=\mathrm{ord}_{2}(z)-m=i_{2}.$

Multiplying both sides of (2.5) by

$g=\prod_{p\in T(d)}p^{i_{p}-l_{p}n_{p}/2}\prod_{p\in T\setminus
T(d)}p^{i_{p}},$

we obtain (1.9).∎

######  Remark 4.

By Theorem 3, it is impossible for both $x^{2}-dy^{2}=p^{n}$ and
$x^{2}-dy^{2}=-p^{n}$ to have strictly primitive integral solutions, if
$x^{2}-dy^{2}=-1$ has no integral solutions.

######  Example 3.

The equation $x^{2}-34y^{2}=1$ has the fundamental solution $(x,y)=(35,6);$
however, $x^{2}-34y^{2}=-1$ has no integral solutions. The fundamental unit of
$\mathbb{Q}(\sqrt{34})$ is $\eta=35+6\sqrt{34}.$ The equations
$x^{2}-34y^{2}=-3^{2},$ $x^{2}-34y^{2}=-5^{2},$ $x^{2}-34y^{2}=-11^{2}$ have
the fundamental solutions $(x,y)=(5,1),$ $(3,1),$ $(27,5),$ respectively.
Every integral solution $(x,y)$ of $x^{2}-34y^{2}=-(3\cdot 5\cdot 11)^{2}$
satisfies one of the following conditions for some $n\in\mathbb{Z}.$

  * •

$x+y\sqrt{d}=\pm\eta^{n}\cdot(5\pm\sqrt{34})\cdot 5\cdot 11.$

  * •

$x+y\sqrt{d}=\pm\eta^{n}\cdot 3\cdot(3\pm\sqrt{34})\cdot 11.$

  * •

$x+y\sqrt{d}=\pm\eta^{n}\cdot 3\cdot 5\cdot(27\pm 5\sqrt{34}).$

  * •

$x+y\sqrt{d}=\pm\eta^{n}\cdot(5\pm\sqrt{34})\cdot(3\pm\sqrt{34})\cdot(27\pm
5\sqrt{34}).$

Theorem 3 implies the following formula for rational solutions of Pell’s
equations.

######  Theorem 8.

Let $r\in\\{0,1\\}.$ Every rational solution $(x,y)$ of
$x^{2}-dy^{2}=(-1)^{r}$ satisfies

$x+y\sqrt{d}=\pm\eta^{n}\prod_{p\in
S(d)}\xi_{p}^{*}{}^{n_{p}}p^{-l_{p}n_{p}/2}$ (2.6)

for some $n\in\mathbb{Z},$ $(n_{p})\in\bigoplus_{p\in S(d)}\mathbb{N},$
$\xi_{p}^{*}\in\\{\xi_{p},\xi_{p}^{\prime}\\}$ $(p\in S(d))$ such that

$l_{p}n_{p}\equiv 0\pmod{2}$

and

$r\equiv\begin{cases}n\qquad\quad\>\>\>\pmod{2}&\text{if }x^{2}-dy^{2}=-1\
\text{has an integral solution},\\\ \displaystyle\sum_{p\in
S(d)_{-}}n_{p}\pmod{2}&\text{otherwise}.\end{cases}$ (2.7)

###### Proof.

Every integral solution $(x,y)$ of $x^{2}-dy^{2}=(-1)^{r}$ satisfies

$x+y\sqrt{d}=\pm\eta^{n}$

for some $n\in\mathbb{Z}.$

Let $(x,y)=(X/Z,Y/Z)$ be a rational solution of $x^{2}-dy^{2}=(-1)^{r},$ where
$X,$ $Y,$ $Z$ are coprime integers and $Z>1.$ Then $(X,Y)$ is an integral
solution of $X^{2}-dY^{2}=(-1)^{r}Z^{2},$ and satisfies

$X+Y\sqrt{d}=\pm\eta^{n}\prod_{p\in
S(d)}\xi_{p}^{*}{}^{n_{p}}p^{\mathrm{ord}_{p}(Z)-l_{p}n_{p}/2}\prod_{p\notin
S(d)}p^{\mathrm{ord}_{p}(Z)}$

for some $n\in\mathbb{Z},$ $(n_{p})\in\bigoplus_{p\in S(d)}\mathbb{N},$
$\xi_{p}^{*}\in\\{\xi_{p},\xi^{\prime}_{p}\\}$ $(p\in S(d)),$ where

$n\equiv\begin{cases}0,\ \pm 1\pmod{3}&\text{if
}\eta\in\mathbb{Z}[\sqrt{d}]\text{ or \ \>\,}Z\equiv 0\ (\mathrm{mod}\ 2),\\\
0\qquad\>\\!\pmod{3}&\text{if }\eta\notin\mathbb{Z}[\sqrt{d}]\text{ and
}Z\equiv 1\ (\mathrm{mod}\ 2)\end{cases}$ (2.8)

and

$l_{p}n_{p}\equiv 0\pmod{2},\quad
n_{p}\leq\begin{cases}\mathrm{ord}_{2}(Z)-1&\text{if }p=2\in S(d)\text{ and
}\eta^{n}\notin\mathbb{Z}[\sqrt{d}],\\\
2\,\mathrm{ord}_{p}(Z)/l_{p}&\text{otherwise}\end{cases}$

by Theorem 3. Dividing both sides by $Z,$ we obtain (2.6). Condition (2.7)
follows from

$\begin{cases}N(\xi_{p}^{*})<0&\text{if }p\in S(d)_{-},\\\
N(\xi_{p}^{*})>0&\text{if }p\in S(d)\setminus S(d)_{-}\end{cases}$

and

$\begin{cases}N(\eta)<0&\text{if }x^{2}-dy^{2}=-1\ \text{has an integral
solution},\\\ N(\eta)>0&\text{otherwise}.\end{cases}$

We can remove Condition (2.8), since $x,$ $y\in\mathbb{Q}$ and
$\eta^{n}\in\mathbb{Z}[(1+\sqrt{d})/2]$ for each $n\in\mathbb{Z}.$ Thus the
assertion of the theorem holds. ∎

##  3 Rational angle bisectors

In this section, we prove Proposition 1 and Theorem 2.

###### Proof of Proposition 1.

Let $(a,b,c)=(a_{1},b_{1},c_{1})$ be a non-trivial rational solution of
($\star$ ‣ 1), and let

$a_{1}=\dfrac{A_{1}}{Z},\quad b_{1}=\dfrac{B_{1}}{Z},\quad
c_{1}=\dfrac{C_{1}}{Z}$

with $A_{1},$ $B_{1},$ $C_{1},$ $Z\in\mathbb{Z},$ $Z\neq 0.$ Substituting
these into ($\star$ ‣ 1) and multiplying both sides by $Z^{4},$ we obtain

$(A_{1}-C_{1})^{2}(B_{1}{}^{2}+Z^{2})=(B_{1}-C_{1})^{2}(A_{1}{}^{2}+Z^{2}).$
(3.1)

The combinations of prime factors of $A_{1}{}^{2}+Z^{2},$ $B_{1}{}^{2}+Z^{2}$
which divide odd times coincide with each other, since $(A_{1}-C_{1})^{2},$
$(B_{1}-C_{1})^{2}$ are square numbers. Let $d$ be the product of these prime
factors (define $d=1$ if there are no such prime factors). Then there exist
$A_{2},$ $B_{2}\in\mathbb{Z}$ such that

$A_{1}{}^{2}+Z^{2}=dA_{2}{}^{2},\quad B_{1}{}^{2}+Z^{2}=dB_{2}{}^{2},$ (3.2)

where $A_{1},$ $B_{1}$ are the $X$-components of the integral solutions
$(X,Y)=(A_{1},A_{2}),$ $(B_{1},B_{2})$ of $X^{2}-dY^{2}=-Z^{2},$ and $a_{1},$
$b_{1}$ are the $x$-components of the rational solutions
$(x,y)=(a_{1},a_{2}),$ $(b_{1},b_{2})$ of $x^{2}-dy^{2}=-1$ with
$a_{2}=A_{2}/Z,$ $b_{2}=B_{2}/Z.$ Substituting (3.2) into (3.1) and dividing
both sides by $d,$ we obtain

$(A_{1}-C_{1})^{2}B_{2}{}^{2}=(B_{1}-C_{1})^{2}A_{2}{}^{2},$

or equivalently

$(A_{1}-C_{1})B_{2}=\pm(B_{1}-C_{1})A_{2}.$

Solving for $C_{1},$ we obtain

$C_{1}=\frac{A_{1}B_{2}+A_{2}B_{1}}{B_{2}+A_{2}},\frac{A_{1}B_{2}-A_{2}B_{1}}{B_{2}-A_{2}},$

since
$B_{2}{}^{2}-A_{2}{}^{2}=(B_{1}{}^{2}-A_{1}{}^{2})/d=(b_{1}{}^{2}-a_{1}{}^{2})Z^{2}/d\neq
0,$ and therefore

$c_{1}=\frac{a_{1}b_{2}+a_{2}b_{1}}{b_{2}+a_{2}},\frac{a_{1}b_{2}-a_{2}b_{1}}{b_{2}-a_{2}}.\qed$

###### Proof of Theorem 2.

Case $\mathrm{(I)}$: $a,$ $b$ are the $x$-components of rational solutions
$(x,y)=(a_{1},a_{2}),$ $(b_{1},b_{2})$ of $x^{2}-y^{2}=-1,$ respectively. Let

$a_{1}=\frac{A_{1}}{n},\quad a_{2}=\frac{A_{2}}{n},\quad
b_{1}=\frac{B_{1}}{n},\quad b_{2}=\frac{B_{2}}{n}$

with $A_{1},$ $A_{2},$ $B_{1},$ $B_{2},$ $n\in\mathbb{Z},$ $n\neq 0.$ Then we
have

$A_{2}{}^{2}-A_{1}{}^{2}=B_{2}{}^{2}-B_{1}{}^{2}=n^{2}.$

Furthermore, put

$A_{2}+A_{1}=l,\quad B_{2}+B_{1}=m.$

Then we have

$A_{2}-A_{1}=\frac{n^{2}}{l},\quad B_{2}-B_{1}=\frac{n^{2}}{m}.$

These imply

$\displaystyle a_{1}$
$\displaystyle=\frac{l-n^{2}/l}{2n}=\frac{l^{2}-n^{2}}{2ln},$ $\displaystyle
a_{2}$ $\displaystyle=\frac{l+n^{2}/l}{2n}=\frac{l^{2}+n^{2}}{2ln},$
$\displaystyle b_{1}$
$\displaystyle=\frac{m-n^{2}/m}{2n}=\frac{m^{2}-n^{2}}{2mn},$ $\displaystyle
b_{2}$ $\displaystyle=\frac{m+n^{2}/m}{2n}=\frac{m^{2}+n^{2}}{2mn},$

and therefore

$\displaystyle\frac{a_{1}b_{2}+a_{2}b_{1}}{b_{2}+a_{2}}$
$\displaystyle=\frac{1}{2}\cdot\frac{(l^{2}-n^{2})(m^{2}+n^{2})+(l^{2}+n^{2})(m^{2}-n^{2})}{ln(m^{2}+n^{2})+mn(l^{2}+n^{2})}=\frac{1}{2}\cdot\frac{2(l^{2}m^{2}-n^{4})}{n(lm+n^{2})(l+m)}=\frac{lm-n^{2}}{(l+m)n},$
$\displaystyle\frac{a_{1}b_{2}-a_{2}b_{1}}{b_{2}-a_{2}}$
$\displaystyle=-\left(\frac{a_{1}b_{2}+a_{2}b_{1}}{b_{2}+a_{2}}\right)^{-1}=-\frac{(l+m)n}{lm-n^{2}}.$

Case $\mathrm{(II)}$: $a,$ $b$ are the $x$-components of rational solutions
$(x,y)=(a_{1},a_{2}),$ $(b_{1},b_{2})$ of $x^{2}-dy^{2}=-1$ for some square-
free integer $d>1,$ respectively. In general, if $\alpha=a_{1}+a_{2}\sqrt{d},$
$\beta=b_{1}+b_{2}\sqrt{d}$ and $a_{1},$ $a_{2},$ $b_{1},$
$b_{2}\in\mathbb{Z},$ then

$\displaystyle a_{1}$ $\displaystyle=\frac{\alpha+\alpha^{\prime}}{2},$
$\displaystyle b_{1}$ $\displaystyle=\frac{\beta+\beta^{\prime}}{2},$
$\displaystyle a_{1}b_{2}+a_{2}b_{1}$
$\displaystyle=\frac{\alpha\beta-(\alpha\beta)^{\prime}}{2\sqrt{d}},$
$\displaystyle a_{2}+b_{2}$
$\displaystyle=\frac{(\alpha+\beta)-(\alpha+\beta)^{\prime}}{2\sqrt{d}}.$

Combining these identities with Theorem 8, we obtain the desired assertion.∎

##  4 Appendix

In Theorem 2, for $d\leq 34$ such that $x^{2}-dy^{2}=-1$ has a rational
solution and $p\leq 97,$ the values of $\xi_{p}$ are summarized in the
following table. For reference, we add the values of the ideal class number
$h,$ the fundamental unit $\eta$ of $\mathbb{Q}(\sqrt{d}),$ and $N(\eta),$
$N(\xi_{p})$ below the values of $\eta,$ $\xi_{p},$ respectively.

$\begin{array}[]{|c||c|c|c|c|c|c|c|c|}\hline\cr d&2&5&10&13&17&26&29&34\\\
\hline\cr\hline\cr h&1&1&2&1&1&2&1&2\\\
\hline\cr\eta&1+\sqrt{2}&(1+\sqrt{5})/2&3+\sqrt{10}&(3+\sqrt{13})/2&4+\sqrt{17}&5+\sqrt{26}&(5+\sqrt{29})/2&35+6\sqrt{34}\\\
{}\hfil&-1&-1&-1&-1&-1&-1&-1&1\\\
\hline\cr\xi_{2}&{}\hfil&3+\sqrt{5}&{}\hfil&11+3\sqrt{13}&5+\sqrt{17}&{}\hfil&27+5\sqrt{29}&{}\hfil\\\
{}\hfil&{}\hfil&2^{2}&{}\hfil&2^{2}&2^{3}&{}\hfil&2^{2}&{}\hfil\\\
\hline\cr\xi_{3}&{}\hfil&{}\hfil&7+2\sqrt{10}&4+\sqrt{13}&{}\hfil&{}\hfil&{}\hfil&5+\sqrt{34}\\\
{}\hfil&{}\hfil&{}\hfil&3^{2}&3&{}\hfil&{}\hfil&{}\hfil&-3^{2}\\\
\hline\cr\xi_{5}&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&21+4\sqrt{26}&11+2\sqrt{29}&3+\sqrt{34}\\\
{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&5^{2}&5&-5^{2}\\\
\hline\cr\xi_{7}&3+\sqrt{2}&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&6+\sqrt{29}&{}\hfil\\\
{}\hfil&7&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&7&{}\hfil\\\
\hline\cr\xi_{11}&{}\hfil&4+\sqrt{5}&{}\hfil&{}\hfil&{}\hfil&15+2\sqrt{26}&{}\hfil&27+5\sqrt{34}\\\
{}\hfil&{}\hfil&11&{}\hfil&{}\hfil&{}\hfil&11^{2}&{}\hfil&-11^{2}\\\
\hline\cr\xi_{13}&{}\hfil&{}\hfil&23+6\sqrt{10}&{}\hfil&9+2\sqrt{17}&{}\hfil&97+18\sqrt{29}&{}\hfil\\\
{}\hfil&{}\hfil&{}\hfil&13^{2}&{}\hfil&13&{}\hfil&13&{}\hfil\\\
\hline\cr\xi_{17}&5+2\sqrt{2}&{}\hfil&{}\hfil&15+4\sqrt{13}&{}\hfil&11+2\sqrt{26}&{}\hfil&{}\hfil\\\
{}\hfil&17&{}\hfil&{}\hfil&17&{}\hfil&17&{}\hfil&{}\hfil\\\
\hline\cr\xi_{19}&{}\hfil&8+3\sqrt{5}&{}\hfil&{}\hfil&6+\sqrt{17}&45+8\sqrt{26}&{}\hfil&{}\hfil\\\
{}\hfil&{}\hfil&19&{}\hfil&{}\hfil&19&19^{2}&{}\hfil&{}\hfil\\\
\hline\cr\xi_{23}&5+\sqrt{2}&{}\hfil&{}\hfil&6+\sqrt{13}&{}\hfil&7+\sqrt{26}&38+7\sqrt{29}&{}\hfil\\\
{}\hfil&23&{}\hfil&{}\hfil&23&{}\hfil&23&23&{}\hfil\\\
\hline\cr\xi_{29}&{}\hfil&7+2\sqrt{5}&{}\hfil&9+2\sqrt{13}&{}\hfil&{}\hfil&{}\hfil&3+5\sqrt{34}\\\
{}\hfil&{}\hfil&29&{}\hfil&29&{}\hfil&{}\hfil&{}\hfil&-29^{2}\\\
\hline\cr\xi_{31}&7+3\sqrt{2}&6+\sqrt{5}&11+3\sqrt{10}&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\\\
{}\hfil&31&31&31&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\\\
\hline\cr\xi_{37}&{}\hfil&{}\hfil&53+12\sqrt{10}&{}\hfil&{}\hfil&63+10\sqrt{26}&{}\hfil&141+25\sqrt{34}\\\
{}\hfil&{}\hfil&{}\hfil&37^{2}&{}\hfil&{}\hfil&37^{2}&{}\hfil&-37^{2}\\\
\hline\cr\xi_{41}&7+2\sqrt{2}&11+4\sqrt{5}&9+2\sqrt{10}&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\\\
{}\hfil&41&41&41&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\\\
\hline\cr\xi_{43}&{}\hfil&{}\hfil&47+6\sqrt{10}&76+21\sqrt{13}&14+3\sqrt{17}&{}\hfil&{}\hfil&{}\hfil\\\
{}\hfil&{}\hfil&{}\hfil&43^{2}&43&43&{}\hfil&{}\hfil&{}\hfil\\\
\hline\cr\xi_{47}&7+\sqrt{2}&{}\hfil&{}\hfil&{}\hfil&8+\sqrt{17}&{}\hfil&{}\hfil&9+\sqrt{34}\\\
{}\hfil&47&{}\hfil&{}\hfil&{}\hfil&47&{}\hfil&{}\hfil&47\\\
\hline\cr\xi_{53}&{}\hfil&{}\hfil&143+42\sqrt{10}&51+14\sqrt{13}&11+2\sqrt{17}&{}\hfil&13+2\sqrt{29}&{}\hfil\\\
{}\hfil&{}\hfil&{}\hfil&53^{2}&53&53&{}\hfil&53&{}\hfil\\\
\hline\cr\xi_{59}&{}\hfil&8+\sqrt{5}&{}\hfil&{}\hfil&22+5\sqrt{17}&85+12\sqrt{26}&28+5\sqrt{29}&{}\hfil\\\
{}\hfil&{}\hfil&59&{}\hfil&{}\hfil&59&59^{2}&59&{}\hfil\\\
\hline\cr\xi_{61}&{}\hfil&9+2\sqrt{5}&{}\hfil&23+6\sqrt{13}&{}\hfil&{}\hfil&{}\hfil&45+13\sqrt{34}\\\
{}\hfil&{}\hfil&61&{}\hfil&61&{}\hfil&{}\hfil&{}\hfil&-61^{2}\\\
\hline\cr\xi_{67}&{}\hfil&{}\hfil&77+12\sqrt{10}&{}\hfil&30+7\sqrt{17}&167+30\sqrt{26}&264+49\sqrt{29}&{}\hfil\\\
{}\hfil&{}\hfil&{}\hfil&67^{2}&{}\hfil&67&67^{2}&67&{}\hfil\\\
\hline\cr\xi_{71}&11+5\sqrt{2}&14+5\sqrt{5}&9+\sqrt{10}&{}\hfil&{}\hfil&{}\hfil&10+\sqrt{29}&{}\hfil\\\
{}\hfil&71&71&71&{}\hfil&{}\hfil&{}\hfil&71&{}\hfil\\\
\hline\cr\xi_{73}&9+2\sqrt{2}&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\\\
{}\hfil&73&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\\\
\hline\cr\xi_{79}&9+\sqrt{2}&18+7\sqrt{5}&13+3\sqrt{10}&14+3\sqrt{13}&{}\hfil&27+5\sqrt{26}&{}\hfil&{}\hfil\\\
{}\hfil&79&79&79&79&{}\hfil&79&{}\hfil&{}\hfil\\\
\hline\cr\xi_{83}&{}\hfil&{}\hfil&173+48\sqrt{10}&{}\hfil&10+\sqrt{17}&317+60\sqrt{26}&92+17\sqrt{29}&{}\hfil\\\
{}\hfil&{}\hfil&{}\hfil&83^{2}&{}\hfil&83&83^{2}&83&{}\hfil\\\
\hline\cr\xi_{89}&11+4\sqrt{2}&13+4\sqrt{5}&27+8\sqrt{10}&{}\hfil&19+4\sqrt{17}&{}\hfil&{}\hfil&15+2\sqrt{34}\\\
{}\hfil&89&89&89&{}\hfil&89&{}\hfil&{}\hfil&89\\\
\hline\cr\xi_{97}&13+6\sqrt{2}&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\\\
{}\hfil&97&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\\\
\hline\cr\end{array}$

## References

  * [1] N. Aoki, Number Theory of Prime Numbers and Quadratic Fields, Kyoritsu Publ., Tokyo, 2012, in Japanese.
  * [2] R. D. Carmichael, On the numerical factors of the arithmetic forms $\alpha^{n}\pm\beta^{n},$ Ann. of Math., 15 (1913–1914), no. 1/4, 30–48.
  * [3] K. Conrad, Pell’s equation, II, https://api.semanticscholar.org/CorpusID:14314437 (Retrieved November 15, 2023).
  * [4] T. Hirotsu, Diophantine equation related to angle bisectors and solutions of Pell’s equations, https://arxiv.org/abs/2209.10434
  * [5] T. Koshy, Pell and Pell–Lucas Numbers with Applications, Springer, New York, 2014.
  * [6] R. A. Mollin, Quadratics, CRC Press, Boca Raton, FL, 1996.


# Embedding-based Recommender System for Job to Candidate Matching on Scale

Jing Zhao, Jingya Wang, Madhav Sigdel, Bopeng Zhang, Phuong Hoang,
Mengshu Liu and Mohammed Korayem  CareerBuilderPeachtree CornersGeorgia,
US30092 jing.zhao, jingya.wang, madhav.sigdel, bopeng.zhang, phuong.hoang,
mengshu.liu<EMAIL_ADDRESS>
(2021)

###### Abstract.

The online recruitment matching system has been the core technology and
service platform in CareerBuilder. One of the major challenges in an online
recruitment scenario is to provide good matches between job posts and
candidates using a recommender system on the scale. In this paper, we
discussed the techniques for applying an embedding-based recommender system
for the large scale of job to candidates matching. To learn the comprehensive
and effective embedding for job posts and candidates, we have constructed a
fused-embedding via different levels of representation learning from raw text,
semantic entities and location information. The clusters of fused-embedding of
job and candidates are then used to build and train the Faiss index that
supports runtime approximate nearest neighbor search for candidate retrieval.
After the first stage of candidate retrieval, a second stage reranking model
that utilizes other contextual information was used to generate the final
matching result. Both offline and online evaluation results indicate a
significant improvement of our proposed two-staged embedding-based system in
terms of click-through rate (CTR), quality and normalized discounted
accumulated gain (nDCG), compared to those obtained from our baseline system.
We further described the deployment of the system that supports the million-
scale job and candidate matching process at CareerBuilder. The overall
improvement of our job to candidate matching system has demonstrated its
feasibility and scalability at a major online recruitment site.

recommender system, job to candidate matching, deep learning,
text embedding, approximate nearest neighbor index.

††copyright: none††copyright: acmcopyright††conference: The 27th ACM SIGKDD
Conference on Knowledge Discovery and Data Mining; August 14-16, 2021;
Singapore††isbn: ††ccs: Information systems Recommender systems

##  1\. Introduction

Efficient and real-time job candidate matching service is not only highly
desirable between employers and job seekers, but is also beneficial to the
long-term socioeconomic well-being (b1, ). The number of both job postings and
hiring events through online recruitment platforms has grown rapidly in recent
years (b2, ). Especially because of the impact of the COVID-19 pandemic,
millions of employers and job seekers would prefer to conduct their hiring or
job-seeking through the online recruitment platform (b3, ). Careerbuilder is
the company that possesses the largest online job boards and provides
varieties of online recruitment services in the human capital domain.
Therefore, the online recruitment matching system has been one of the key
services that support CareerBuilder’s core business as well as serve millions
of customers and users globally. Figure 1 has illustrated a typical job to
candidate recommendation scenario that takes place at Careerbuilder every day.
The red boxes highlight the posted jobs from the employer and the blue boxes
highlight the matched candidates recommended by the algorithm.

Figure 1. Snapshot of CareerBuilder’s online recruitment panel and user
interface.

With millions of job postings and resumes submitted or updated at
CareerBuilder every day, the most critical challenge is to build a recommender
system that allows employers to target their fitting candidates and allow the
job seeker to find their desired jobs in real-time. To address this challenge,
we have proposed a two-staged recommendation system using an embedding-based
approach (Figure 3). A fused embedding strategy that applies deep learning
(b4, ; b5, ), representation learning with job-skill information graph (b6, )
and geolocation calculator (b7, ) techniques are used for both job and
candidate. We have also implemented Faiss index for clustering and compressing
the embeddings, which also allows us to conduct the approximate nearest
neighbor search for candidate retrieval on runtime (b8, ; b9, ). There are
several advantages of using embedding-based recommendation with embeddings.

  1. (1)

Scalability: Easy to scale on the industrial level with embeddings for
millions to billions of items with Faiss.

  2. (2)

Sparsity/Similarity: Content-based embedding provides an alternative way to
measure user-item interaction. The pairwise similarity can be easily computed
using $l_{2}$ distance or cosine similarity.

  3. (3)

Cold-Start: Mitigate the cold-start issue as this content-based approach does
not rely on individual user behavior data.

Figure 2. Contextual mapping between job and candidate.

As for designing the recommender system for online recruitment, a major
characteristic that distinguishes it from e-commerce, stream media and social
network recommendation scenarios is that the contexts of user and item are
likely to be symmetrical. Figure 2 illustrates such symmetric structure in
terms of the context mapping between job and candidate. Active candidates have
the motivation to provide full-profile information as it raises their chances
to be discovered by the recruiter by search and platform recommendation. At
the core of our recommender system, we have taken advantage of such a
symmetric structure of contextual mapping to construct a fused embedding using
a combination of different strategies. We have applied a convolution neural
network (CNN)-based end-to-end approach to learn the effective embedding of
the raw text. This deep learning embedding model is equipped with the domain-
specific vocabulary to process the text paragraphs from the resume, job
description and job requirement. However, deep learning-based models are
typically more effective for generalized natural language processing instead
of conducting the contextual enrichment for the semantic entity extraction.
Therefore, we have also implemented a representation learning model based on
the job-skill information graph to parse job title and skill, which includes
implicit information of job transition and job-skill co-occurrence that is
crucial for the job to candidate matching. Moreover, a geolocation calculator
that converts longitude and latitude to three-dimensional Cartesian
coordinates is used to construct the location vector. With these three
embeddings, we construct a fused embedded representation for both job and
candidate by concatenated them together after a weight factor is empirically
assigned to each component.

Figure 3. The Architecture of the two-stage online recruitment recommender
system.

##  2\. Related Works

###  2.1. Recommender System

Content-based recommender system has the inherent advantages in generalization
and mitigating cold-start problems. The content-based embedding strategy
allows an easy multi-feature convolution to achieve efficient and reliable
item retrieval. Dates back to the classical matrix factorization framework,
the content-based features have been incorporated in the recommendation model
(b10, ). The Factorized Machine can be used as a more generalized model for
any content-based feature embeddings (b11, ). The rapid development of deep
neural networks(DNN) in recent years has opened a new racetrack for developing
recommender system. Researchers at YouTube have proposed a recommender system
with a Wide & Deep neural networks architecture (b12, ). He _et al_ have
proposed a neural network based collaborative filtering architecture (NCF) for
modeling user-item interactions (b13, ). Although Rendle et al. argue that
simple dot-product substantially outperforms NCF learned similarities (b14, ).
The success of recommender system in e-commerce, media and social network has
promoted the development of new technologies in this field. For example,
knowledge graph has been utilized to build the billion-scale commodity
embedding in Alibaba (b15, ). Wang _et al_. have also suggested propagating
user preferences on the knowledge graph for the recommender system (b16, ). As
for developing a more dynamical recommender system that also addresses the
often delayed logged user feedback, researchers at Google have implemented a
policy-gradient-based algorithm that adopted reinforcement learning to build a
recommender system (b17, ). On the basis of that, a more sophisticated off-
policy learning with a two-stage recommendation system is proposed by Ma _et
al_ (b18, ).

Figure 4. Fused-embedding model with vectors from deep learning embedding
model (DLEM), skill-job information graph and geolocation calculator.

###  2.2. Recommender System in the Online Recruitment Domain

Job and recruitment recommendations in the human capital domain are the
particular applications of recommender system that involves text mining,
semantic analysis, skill/job title normalization and other NLP techniques.
Diaby _et al_ proposed a content-based job recommender system along with
user’s interaction and connection data (b19, ). Rafter _et al_ proposed a
user-based collaborative filtering (CF) system that utilizes the overlapping
of interacted jobs as the similarity measure between two users. They have also
applied a nearest neighbor search approach to generate recommendations (b20,
). To overcome the sparsity and cold-start problems of the classical CF
method, Shalaby _et al_ has a scalable item-based recommendation system by
leveraging a directed graph of job connection to represent the user behavior
and contextual similarity (b21, ). Bian _et al_ has proposed a deep global
match network for capturing the global semantic interactions between job
posting and candidate resume at both sentence and global levels (b22, ). Jiang
_et al_ proposed using deep learning and LSTM to learn the explicit and
implicit interaction between job and candidate to get a more comprehensive and
effective representation for the matching (b23, ).

##  3\. Candidate Matching System and Architecture

The proposed architecture of the two-staged recommendation system consists of
two major components (Figure 4):

  1. (1)

First stage retrieval component that utilizes two-tower embedding structure to
find hundreds of potential candidates from the pool of millions.

  2. (2)

Second stage rerank component that takes advantage of various contextual
features allows the narrow down to a few dozen of candidates after the fine-
tune scoring.

At the core of the first component, we have proposed a fused embedding
strategy to learn the representations from raw text, parsed text and
geolocation for both candidate and job.

Figure 5. Architecture of the deep learning embedding model (DLEM).

###  3.1. Deep Learning Embedding Model

We have trained an end-to-end Deep Learning Embedding Model (DLEM) on a
supervised learning task that utilizes our job application data. This allows
the DLEM model not only learns the context embedding from an NLP perspective
but also being able to capture the job application behavior from the users.
The DLEM consists of an input layer, a convolutional neural network (CNN)
layer and an attention layer as illustrated in Figure 5. At the data
generation stage, a pair of job and candidate’s raw text documents (e.g. job
posts and resume) are generated for the input layer. The positive pairs are
particularly selected from our job application logs in which the candidate is
paired with the job that he/she applied for. The negative pair is generated
using random samples but the results are filtered with additional rules to
remove the false negative signals. For example, the job and candidate pair
that belong to the same SOC domain are removed from the negative samples. The
pairwise raw text inputs are then encoded using word2vec using a domain-
specific vocabulary with a focus on the human resource and job domain. With
this domain-specific encoding of the word index, we are able to construct a
more space-efficient index-based representation. The input text encoding is
then sent to the convolutional layer, which consists of six stacked blocks
with different kernel sizes, ranged from 1 to 10. Each stacked block contains
three consecutive convolutional blocks, in which a pipeline of 1D-convolution,
batch normalization and max-pooling is considered as a unit processing. The
stacked blocks with different kernel sizes are aimed to construct the
distributed representations of the sentence instead of just the lexical
features. An attention layer is built from the outputs from the stacked blocks
and their saliency, inspired by the recent progress of the Transformer
architecture (b24, ). The output context vector of the attention layer is then
sent to the fully-connected layers (FC layers) with RELU activation. FC layers
also determine the desired output dimension of the embedding vector based on
the need. As for training the DLEM, we have chosen a relevance-based binary
cross-entropy as the loss function.

$C$ and $J$ represents the sets of candidates and jobs. The application
mapping $A$ is defined as $A:C\rightarrow 2^{J}$, and relevancy mapping $R$ is
defined as $R:C\times J\rightarrow\\{0,1\\}$

$\displaystyle\text{such that}\quad R(c,j)$
$\displaystyle=\begin{cases}1,&\text{if}~{}c~{}\text{is relevant to}~{}j\\\
0,&\text{otherwise}\end{cases}.$

$g(x)$ is defined as the embedding from DLEM model and $[g(c);g(j)]$
represents the concatenation of candidate embedding vector $g(c)$ and job
embedding vector $g(j)$.

$\displaystyle Loss(C,J)=$ $\displaystyle\sum_{c\in C}\sum_{j\in
A(c)}-R(c,j)\log(p)+(1-R(c,j))\log(1-p)$
$\displaystyle\textrm{where}\;\;\;p=\sigma\left(w^{T}[g(c);g(j)]+b\right)$

Figure 6 illustrates the t-distributed stochastic neighbor embedding (t-SNE)
plots of 10,000 sample jobs’ embeddings obtained from (a) DLEM and (b)
distilBERT pre-trained model (b22, ). Each job is also color labeled with 23
major job categories and one unknown category based on the Standard
Occupational Classification System (SOC). The t-SNE plot shows that our DLEM
is very effective in job classification as the job cohorts with different
colors are clearly clustered in different regions. For example, job category
29-0000, Healthcare Practitioners and Technical Occupations and 13-0000
Business and Financial Operation Occupations have their distinguished
clustering circled on the plot. For comparison, we cannot observe a structural
clustering of the embeddings obtained from the pre-trained distilBERT model.
This might due to the lack of a specific domain dictionary and labeled
training data for the distilBERT model.

Figure 6. t-SNE plot of job embedding vectors from (a) DLEM and (b) distilBERT
that are color labeled with 24 SOC categories.

###  3.2. Representation Learning with Job-Skill Information Graph

Job title and skill are considered the most important semantic entities as
they are (semi-)structured fields and contain enriched information in the job-
related documents. Traditionally, semantic matching using job title and skill
entities has been the focuses for job classification and job recommendation
tasks. Herein, we have taken advantage of a representation learning model that
utilizes the information graph from job transition network, job-skill network
and skill co-occurrence network (b6, ). The model used both Bayesian
personalized ranking and margin-based loss functions to learn the vector
representation for the semantic entities and allow us to encode the local
neighborhood structures captured by the information graphs. The following
three objective functions are used to learn the representation for $W$ and
$W^{\prime}$, which correspond to the representation of job title and skill,
respectively.

$\displaystyle O^{jj}$
$\displaystyle=\min_{W}-\sum_{(x,y,z)\in\mathcal{D}^{jj}}\ln\sigma\big{(}\langle\mathbf{w_{x}}\cdot\mathbf{w_{y}}\rangle-\langle\mathbf{w_{x}}\cdot\mathbf{w_{z}}\rangle\big{)}$
$\displaystyle O^{ss}$
$\displaystyle=\min_{W^{\prime}}-\sum_{(x,y,z)\in\mathcal{D}^{ss}}\ln\sigma\big{(}\langle\mathbf{w_{x}^{\prime}}\cdot\mathbf{w_{y}^{\prime}}\rangle-\langle\mathbf{w_{x}^{\prime}}\cdot\mathbf{w_{z}^{\prime}}\rangle\big{)}$
$\displaystyle O^{js}$
$\displaystyle=\min_{W,W^{\prime}}-\sum_{(x^{j},y^{s},z^{s})\in\mathcal{D}^{js}}\ln\sigma\big{(}\langle\mathbf{w_{x^{j}}}\cdot\mathbf{w_{y^{s}}^{\prime}}\rangle-\langle\mathbf{w_{x^{j}}}\cdot\mathbf{w_{z^{s}}^{\prime}}\rangle\big{)}$

Where $\mathcal{D}^{jj}$ represents the transition relationship of job
triplets $(x,y,z)$, $\mathcal{D}^{ss}$ represents the co-occurrence of skill
triplets and $\mathcal{D}^{js}$ represents the relationship between (job,
skill, skill) triplets. $\langle\mathbf{w_{x}}\cdot\mathbf{w_{y}}\rangle$ is
the dot product of two embeddings, which is then used as the input for the
sigmoid function $\sigma(x)$ to calculate the probability.

$O\left(\mathbf{W},\mathbf{W^{\prime}}\right)=\min_{W,W^{\prime}}O^{jj}+O^{js}+O^{ss}+\lambda\left(\|\mathbf{W}\|_{F}^{2}+\|\mathbf{W^{\prime}}\|_{F}^{2}\right)$

To unify these three types of networks between job and skill, the joint
objective function with $l_{2}$ normalization is applied to avoid the over-
fitting of representation $W$ and $W^{\prime}$.

###  3.3. Geolocation Calculator

In the geolocation part, we have calculated the spherical coordinates
representation of latitude $\theta$ and longitude $\phi$ to the Cartesian
coordinates $[x,y,z]$ using the following equations:

$\displaystyle x=\cos(\theta)\cos(\phi)$ $\displaystyle
y=\cos(\theta)\sin(\phi)$ $\displaystyle z=\sin(\theta)$

The Cartesian coordinates location vector $c=[x,y,z]$ has a straightforward
advantage for conducting dot product operations between two vectors. The
larger dot product $\langle\mathbf{c_{1}}\cdot\mathbf{c_{2}}\big{\rangle}$
between the location vectors, the shorter distance between these two
locations. This relationship is revealed by the following equation:

$d=2r\cdot\arcsin\left(\frac{\sqrt{r^{2}-2\big{\langle}\mathbf{c_{1}}\cdot\mathbf{c_{2}}\big{\rangle}}}{2}\right)$

in which $r$ is the radius of the earth and $d$ is the great-circle distance
between two locations on the earth. Therefore, it has the same property as the
content-based embeddings when compares to the pair-wise similarity using dot
product operation. So the Cartesian location vector is incorporated in the
fused embeddings as well.

###  3.4. Approximate Nearest Neighbor Search

The embeddings from DLEM $\mathbf{v_{dlem}}$, job-skill information graph
$\mathbf{v_{ig}}$ and geolocation calculator $\mathbf{v_{geo}}$ are
concatenated together with a set of empirically assigned weights for with each
component. The concatenated embedding $\mathbf{v_{fused}}$ are defined as:

$\left[\mathbf{w_{1}\cdot v_{dlem}^{\intercal}};\mathbf{w_{2}\cdot
v_{ig}^{\intercal}};\mathbf{w_{3}\cdot
v_{geo}^{\intercal}}\right]\rightarrow\mathbf{v_{fused}^{\intercal}}$

After constructing the fused embedding vectors, we employed the Faiss index to
store all of our item embeddings for search and retrieval. This brings several
advantages:

  1. (1)

Faiss index requires less space for storage due to product quantization of the
embedding vectors (b23, ), which is essential for both our offline spark
pipeline and online services that possess tight memory restriction.

  2. (2)

It is easy to be integrated into the system for item retrieval. The inverted
file index (IVF) allows a runtime approximate nearest neighbor search from
millions or even billions of items.

  3. (3)

We can easily evaluate the similarity score between job and retrieved
candidates using the inner product or $l_{2}$ metric from the index.

There are several factors we have considered during the customization of the
Faiss index. 1. We have chosen IVF algorithms and carefully tune the number of
coarse clusters during the coarse quantization, which typically works through
the K-means clustering; 2. As for the fine-grained quantization, we have
applied OPQ to transform data prior to the product quantization, which is
recommended by Huang _et al_ (b9, ); 3. We have also tuned the _nprobe_
parameter that decides how many coarse clusters will be scanned during the
query, which may affect the retrieval’s performance and recall. Overall, the
architecture of both job and candidate index resembles the two-tower model,
which has demonstrated its effectiveness in text-based information retrieval
in large-scale recommender system (b24, ; b25, ).

###  3.5. Reranking with Contextual Features

After the first stage candidate retrieval, the final ranking score for each
candidate is calculated by a weighted linear equation that aggregates the
scores we obtained from the first-stage relevancy score as well scores from
contextual features of job and candidates. These context-based scores include
skill matching, location restriction, year of experience and education level.
The weights representing the importance of each score and are tuned
empirically. The final ranking score is then used for reranking to generate
the second-stage recommendation result. The fine-tuning in the reranking stage
also allows us to implement some specialization for a certain type of job.
Since the pandemic, there is a significant increase amount of Work From Home
(WFH) or remote jobs that appeared in the job posts (b29, ). This type of job
typically has very little or no location restriction, which is distinguished
from a lot of front-line occupations. To reflect such distinction in our
recommendation result, we can adjust the location weight during the reranking,
which resulted in a more suited and robust candidate recommendation overall.

Table 1. Case Study of Job to Candidate Matching Scenarios Case | Job | Candidate
---|---|---
| Title |  Database Developer | Previous Title |  Sr. Database Developer
1 | Requirement |  BS in Computer Science, 5+ years of experience working with Microsoft SQL Server, database code development, data modeling with ER/Studio or ERWin, data warehouse design, SSIS | Skills |  Web development and database architecture, Microsoft SQL Servers, Java, C#, Visual Basic, Microsoft Access
| Description |  Design and development of database objects, populate and maintain the data in the data warehouse, creation of ETL programs in a Microsoft SQL Server environment. | Work Experience |  • Sr. Database Software Developer (13 - 20) • Sr. Database Developer (09 - 13) • Sr. Web Program Developer (02 - 09)
| Location |  San Diego, CA | Location |  Beaumont, CA
| Title |  Licensed Practical Nurse (LPN) | Previous Title |  Licensed Practice Nurse
2 | Requirement |  Current LPN license in good standing, CPR certification, Minimum 1 year clinical experience. | Skills |  LPN, CPR BLS certified, nursing care practice, physical examination, IV drug therapy management, EMR systems
| Description |  Client assessment, administration of prescribed medication, treatment and therapy, clinical works, supply management, emergency Management. | Work Experience |  • Licensed Practical Nurse Endoscopy (19 - 20) • LPN Charge Nurse (16 - 19) • State-tested Nurse Assistant (09 - 15)
| Location |  Carnegie, PA | Location |  Bulter, PA
| Title |  Regional Sales Representative | Previous Title |  Regional Sales Representative
3 | Requirement |  Require 5+ years of outside sales experience, ability to travel up to 50% of the time, interpersonal communication skills, experience with CRM platforms, proficient in Microsoft Office | Skills |  Client relationship management, communication and negotiation, proficient in salesforce and other CRM platforms, analytical skills, Microsoft Office
| Description |  Generate, develop, and maintain a robust pipeline of qualified opportunities, actively conduct cold and warm calling to prospective leads, manage sales process. | Work Experience |  • Regional Sales Representative (19-20) • Business Development Specialist (18 - 19) • Account Manager II (14-18)
| Location |  North America | Location |  Bedford, TX

###  3.6. System Implementation

The job and candidate data are stored in our in-house Hadoop clusters which
allows distributed processing using Spark. The deep learning model is served
in the spark jobs to create document embeddings. The fused-embeddings are then
used to train the Faiss index with coarse quantization and product
quantization (PQ). The published inverted file (IVF) Faiss index is then
served for the candidate retrieval in the batch offline mode. All the spark
jobs are scheduled by the Oozie coordinator that runs periodically. At the end
of the workflow, the generated recommendation results are delivered to the
production database.

##  4\. Experiment And Result

The test and evaluation of our job to candidate matching system has taken
advantage of a rich corpus of job and candidate data at CareerBuiler.com.
CareerBuilder operates the largest job posting board in the U.S. and has
quickly expanded its global presence in recent years. On the daily routine,
millions of job postings and more than 60 million actively searchable resume
needs to be processed for the online recruitment service. In this section, we
described the details of the case study, testing and evaluation of our system.

###  4.1. Case Study of Matching Scenarios

The two-stage job-to-candidate matching system has achieved impressive
matching quality which is showcased in the table. Table 1 has presented 3
cases with jobs and their top candidates. Each job has its job title, job
requirement, job description and location information. The corresponding
information from the candidate, such as most recent title, skills, work
experience and location are provided as well. As for case 1, the database
developer job, the top candidate has shown matching for all four aspects. As
for case 2, the licensed practical nurse (LPN) job. We noticed that top
candidates meet the requirement for LPN license and other required
certificates. Case 3 regional sales representatives job does not have a
specific location but north American region, therefore a broader spectrum of
candidates can be selected as long as it meets the location requirement. This
case also applies to work from home job scenario in which the candidate’s
working location is not restricted. Overall, our job-to-candidate matching
system has provided satisfied matching results from title, description,
requirement and location perspectives, which indicates the success of our two-
staged model and fused-embedding strategy.

###  4.2. Offline Evaluation

The DLEM cutoff parameter $\gamma$, fused embedding weight parameters $w_{1}$,
$w_{2}$, $w_{3}$ and score aggregation parameters during the heuristic re-
ranking were all tuned empirically through multiples rounds of test and
evaluation. QA team and professional recruiters at CareerBuilder also
participated in the qualitative evaluations for several rounds. They are asked
to validate the list of recommended candidates from both jobs in specific
domains and randomly sampled jobs. They give the qualitative score and leave
comments for each job-candidate pair. The feedback has been used as the
empirical signal for us to better tweak the parameters and search for the
optimal parameter combinations for our system. After the fine-tuning of the
parameters, we compared the quality score and nDCG between our baseline model
and our two-staged matching model. For background information, our baseline
model is a solr-powered recommendation engine that utilizes hierarchical
classification and a content-based approach to retrieve relevant candidate
profiles. As for the offline evaluation, 150 jobs that spanning over multiple
job categories with 3k matching candidates are manually examined. The overall
quality score of recommendation has improved $\sim$19%, the nDCG has improved
$\sim$18% (Figure 7).

###  4.3. Online Evaluation

As for the online evaluation, we have compared the traffics over 4 months
between the baseline model and two-stage matching system. Over 120k user’s
impression and click events have been used to calculate the nDCG and click
through rate (CTR) for comparison. The CTR and nDCG have both shown
significant improvement over three months period of time. The CTR has
increased $\sim$104%, and nDCG has increased $\sim$37%. These results have
also been summarized in Figure 7. In summary, both offline and online
evaluation results suggest that our two-stage matching system has
significantly improved the matching quality, resulted in higher traffic and
CTR from our users.

Figure 7. Offline and online evaluation results between baseline model and
two-stage matching system.

##  5\. Conclusion

The online recommender system has gained considerable attention in both
academia and industry in recent years as quickly evolved technology plays a
key role in bringing an enormous amount of commercial and social values. The
online recruitment service at CareerBuilder has also taken advantage of such
progress to serve millions of job applicants and employers. To bring the full
potential of the recommender system for online recruitment, we have proposed a
two-stage embedding-based recommender system for job to candidates matching.
The architecture of this system consists of a two-stage recommendation
procedure, a fused-embedding component for candidate retrieval and a fine-
tuning reranking module. The successful deployment of embedding-based job to
candidate matching system in production creates the avenue to optimize the
system end to end through the users’ feedback. We also introduced valuable
experience in architecture design, serving algorithms parameter tuning and
later-stage optimization. Overall, our two-stage job to candidate matching
system has shown a significant improvement over the baseline model by measures
of CTR and nDCG in real world production environment, which provides an
excellent example for deploying an embedding-based recommender system for
applications of job to candidate matching on the scale.

## Acknowledgments

The authors would like to pay special tribute to Bopeng, who has sadly passed
away during the drafting of this paper. We would also like to dedicate this
paper to Bopeng to recognize his crucial contribution and achievement during
his days at CareerBuilder.

## References

  * (1) Pologeorgis, N. Employability, the Labor Force, and the Economy. 2019. https://www.investopedia.com.
  * (2) LinkedIn Workforce Report Janurary 2021 United States.
  * (3) Columbus, L. Remote Recruiting In A Post COVID-19 World. 2020. https://www.forbes.com.
  * (4) Yuan, J., Shalaby, W., Korayem, M., Lin, D., Aljadda, K. & Luo, J. 2016. Solving cold-start problem in large-scale recommendation engines: A deep learning approach. 2016 IEEE International Conference on Big Data (Big Data).
  * (5) Wang, J., Abdelfatah, K., Korayem, M. & Balaji, J. 2019. DeepCarotene -Job Title Classification with Multi-stream Convolutional Neural Network. 2019 IEEE International Conference on Big Data (Big Data).
  * (6) Dave, V. S., Zhang, B., Hasan, M. A., Aljadda, K. & Korayem, M. 2018. A Combined Representation Learning Approach for Better Job and Skill Recommendation. Proceedings of the 27th ACM International Conference on Information and Knowledge Management.
  * (7) Liu, M., Wang, J., Abdelfatah, K. & Korayem, M. 2019. Tripartite Vector Representations for Better Job Recommendation. Retrieve from https://arxiv.org/abs/1907.12379v1
  * (8) Johnson, J., Douze, M. & Jegou, H. 2019. Billion-scale similarity search with GPUs. IEEE Transactions on Big Data.
  * (9) Huang, J., Sharma, A., Sun, S., Xia, L., Zhang, D., Pronin, P., … Yang, L. 2020. Embedding-based retrieval in Facebook search. Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. doi:10.1145/3394486.3403305
  * (10) Y. Hu, Y. Koren, and C. Volinsky. 2008. Collaborative Filtering for Implicit Feedback Datasets. In 2008 Eighth IEEE International Conference on Data Mining. 263–272.
  * (11) S. Rendle. 2010. Factorization Machines. In 2010 IEEE International Conference on Data Mining. 995–1000.
  * (12) H.-T. Cheng, L. Koc, J. Harmsen, T. Shaked, T. Chandra, H. Aradhye, G. Anderson, G. Corrado, W. Chai, M. Ispir, et al. Wide & deep learning for recommender systems. 2016. Technical report.
  * (13) X. He, L. Liao, H. Zhang, L. Nie, X. Hu, and T.S. Chua. 2017. Neural Collaborative Filtering. In Proceedings of the 26th International Conference on World Wide Web (WWW ’17). International World Wide Web Conferences Steering Committee, Republic and Canton of Geneva, Switzerland, 173–182.
  * (14) Rendle, S., Krichene, W., Zhang, L. & Anderson, J. 2020. Neural Collaborative Filtering vs. Matrix Factorization Revisited.
  * (15) Wang, J., Huang, P., Zhao, H., Zhang, Z., Zhao, B. & Lee, D. L. 2018. Billion-scale Commodity Embedding for E-commerce Recommendation in Alibaba. Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining.
  * (16) Wang, H., Zhang, F., Wang, J., Zhao, M., Li, W., Xie, X. & Guo, M. 2018. RippleNet. Proceedings of the 27th ACM International Conference on Information and Knowledge.
  * (17) Chen, M., Beutel, A., Covington, P., Jain, S., Belletti, F., & Chi, E. H. 2019. Top-K Off-Policy Correction for a REINFORCE Recommender System. Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining.
  * (18) Ma, J., Zhao, Z., Yi, X., Yang, J., Chen, M., Tang, J., Chi, E. H. 2020. Off-policy Learning in Two-stage Recommender Systems. Proceedings of The Web Conference 2020.
  * (19) Diaby, M., Viennet, E. & Launay, T. 2013. Toward the next generation of recruitment tools. Proceedings of the 2013 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining - ASONAM ’13.
  * (20) Rafter, R., Bradley, K. & Smyth, B. 2000. Automated Collaborative Filtering Applications for Online Recruitment Services. Lecture Notes in Computer Science Adaptive Hypermedia and Adaptive Web-Based Systems, 363-368.
  * (21) Shalaby, W., Alaila, B., Korayem, M., Pournajaf, L., Aljadda, K., Quinn, S. & Zadrozny, W. 2017. Help me find a job: A graph-based approach for job recommendation at scale. 2017 IEEE International Conference on Big Data (Big Data).
  * (22) Bian, S., Zhao, W. X., Song, Y., Zhang, T. & Wen, J. 2019. Domain Adaptation for Person-Job Fit with Transferable Deep Global Match Network. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP).
  * (23) Jiang, J., Ye, S., Wang, W., Xu, J. & Luo, X. 2020. Learning Effective Representations for Person-Job Fit by Feature Fusion. https://arxiv.org/abs/2006.07017v1
  * (24) Brain, A., Vaswani, A., Brain, G., Profile, G., Brain, N., Shazeer, N., et al, 2017, Attention is all you need. Advances in Neural Information Processing Systems 30 (NIPS 2017).
  * (25) Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A. & Rush, A. 2020. HuggingFace’s Transformers: State-of-the-art Natural Language Processing. https://arxiv.org/abs/1910.03771
  * (26) Jégou, H., Douze, M., & Schmid, C. 2011. Product quantization for nearest neighbor search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(1), 117-128.
  * (27) Paul Neculoiu, Maarten Versteegh, and Mihai Rotaru. 2016. Learning Text Similarity with Siamese Recurrent Networks. In Rep4NLP@ACL.
  * (28) Guo, M., Yan, N., Cui, X., Wu, S. H., Ahsan, U., West, R. & Jadda, K. A. 2020. Deep Learning-based Online Alternative Product Recommendations at Scale. Proceedings of The 3rd Workshop on E-Commerce and NLP.
  * (29) Ability to work from HOME: Evidence from two surveys and implications for the labor market in the COVID-19 PANDEMIC : Monthly Labor Review. 2020. https://www.bls.gov/opub/mlr/2020/article/ability-to-work-from-home.htm