Algorithms for the matrix p-th root