  The competition between the Kondo screening and indirect magnetic exchange in
systems with two magnetic impurities coupled to a conventional s-wave
superconductor gives rise to a nontrivial ground-state phase diagram. Here, we
utilize the density-matrix renormalization group (DMRG) method and exploit the
non-abelian spin-SU(2) symmetry to study the phase diagram for two
quantum-spin-$\frac12$ impurities locally exchange coupled to large
one-dimensional chains. The nonlocal inter-impurity exchange is treated as an
emergent Ruderman-Kittel-Kasuya-Yosida (RKKY) coupling. We find qualitatively
different phase diagrams for impurity spins coupled to sites with odd or even
distances $d$ on the chain and a partial-Kondo-screened spin-doublet phase that
extends over the whole range of local exchange couplings $J$ in the limit of
weak superconducting pairing strength $\Delta$. Our numerical studies are
complemented by exact diagonalization of small (quantum-box) systems and by
perturbative-in-$J$ computations of the $d$ and $\Delta$ dependent RKKY
interaction. It is thereby demonstrated that the specific system geometry is
essential for our understanding of magnetic impurity interactions in
superconducting hosts, and thus for insights into the control of quantum-state
properties in nanoparticle systems and topological superconductivity.
