  We formulate the problem of finding the optimal entanglement swapping scheme
in a quantum repeater chain as a Markov decision process and present its
solution for different repeater's sizes. Based on this, we are able to
demonstrate that the commonly used "doubling" scheme for performing
probabilistic entanglement swapping of probabilistically distributed entangled
qubit pairs in quantum repeaters does not always produce the best possible raw
rate. Focussing on this figure of merit, without considering additional
probabilistic elements for error suppression such as entanglement distillation
on higher "nesting levels", our approach reveals that a power-of-two number of
segments has no privileged position in quantum repeater theory; the best scheme
can be constructed for any number of segments. Moreover, classical
communication can be included into our scheme, and we show how this influences
the raw waiting time for different number of segments, confirming again the
optimality of "non-doubling" in some relevant parameter regimes. Thus, our
approach provides the minimal possible waiting time of quantum repeaters in a
fairly general physical setting.
