Error in pivot selection algorithm for merge phase [Sorting]
The &quot;Algorithm 1 Pivot selection&quot; of that paper is rather sloppy. The critical mistake is, as you have noted, &quot;the while loop in the algorithm is exited too early due to the stride being reduced down to zero before the correct pivot element has been found&quot;.
There are two other drawbacks.

The condition, a[len(a) − pivot − 2] &lt; b[pivot + 1] is superfluous since it is implied by a[len(a) − pivot − 1] &lt; b[pivot].
It does not handle the situation where there are equal elements in the array.

To address that critical mistake, make sure that the stride is always greater than 0. To prevent out-of-bounds exceptions, extreme boundary cases should be specially handled beforehand. To handle equal elements, equal signs can be included at some comparisons.
Here is a correct algorithm in C++ that selects the desired pivot, following the pseudocode in the paper with the aforementioned modifications.
// Return a pivot so that a[size-pivot:size] and b[0:pivot] should
// be swapped. If 0 is returned, no elements should be swapped.
// It is assumed that vector a and b are sorted of the same size.
size_t SelectPivot(const std::vector&lt;int&gt; &amp;a, const std::vector&lt;int&gt; &amp;b) {
  size_t size = a.size();

  if (b[0] &gt;= a[size - 1]) return 0;
  if (a[0] &gt;= b[size - 1]) return size;

  size_t pivot = size / 2;
  size_t stride = std::max(1, pivot / 2);
  while (true) {
      if (a[size - pivot - 1] &lt;= b[pivot]) {
          if (a[size - pivot] &gt; b[pivot - 1]) return pivot;
          else pivot = pivot - stride;
      } else {
          pivot = pivot + stride;
      }

      stride = (stride + 1) / 2;
  }

  return pivot;
}

Note that the method above requires the size of a is equal to that of b. Otherwise, a few more lines of code are needed.
If you are not required to stick to the pseudocode in that paper, which is not very good anyway, please check another version of my answer, where I use my preferred version of binary search to select the desired pivot.