Euclid algorithm for finding the inverse and generalized inverse of the permutation factor circulant matrix