What is the purpose of having repeated knots in a B spline? A primer on the cpr package in R (page 2 of https://arxiv.org/pdf/1705.04756.pdf) writes the following about B-splines.
A  B-spline  basis  matrix  is  defined  by  a  polynomial  order $k$ and  knot  sequence $\xi$ with  the common construction of $k$-fold knots  [my emphasis] on the boundaries, set to the minimum and maximum of the support, $l \geq 0$ interior knots, and sorted in a non-decreasing order.
Indeed, when I apply the algorithm on a particular set of points, an optimal sequence of knots is as follows
$$ 0, 0, 0 ,0, 2.45, \dots 597.273, 597.273, 597.273, 597.273$$
That is, there are $4-$fold knots on the boundaries. What is the point in repeating knots?
 A: Your B-Spline is cubic so each basis is determined by $k+1=5$ knots.
If you have the knots $\{0,2,4,6,8,10\}$, then there are 2 basis functions.
One is determined by the knots $\{0,2,4,6,8\}$ and another by $\{2,4,6,8,10\}$.
Each basis function is (piecewise) polynomial and the polynomial changes at each knot, but only as many of the highest non-zero derivative as the multiplicity of each knot. This implies $C^{k-m-1}$ continuity at a knot with multiplicity $m$.
The basis function from $\{0,2,4,6,8\}$ vanishes outside $[0,8]$, and when it reaches $t=0$ only the highest derivate (the 3rd) is allowed to chance because the knot $0$ has multiplicity $1$. Hence the basis starts out like $t^3$ and so you can't interpolate a non-zero value at $t=0$ with this basis.
If your first basis is instead $\{0,0,0,0,2\}$, then all derivatives and the basis function value will change at $t=0$. You can use the coefficient of this basis function to adjust your interpolants function value at $t=0$.
A: Having 4 repeated knots at the start and end of the knot sequence of a cubic B-spline curve is to make the curve's start point coincident with the first control point and the curve's end point coincident with the last control point.
