Gapplet

Given a shift polynomial s Z[X] of degree n-1, compute the minimum polynomial and the period of the transition matrix.

Input s,  e.g., X^2+X+1 
</COMMENT>
 
Input a prime p,  e.g., 5 
</COMMENT>
 
</COMMENT>
 
The minimum polynomial f of the transition matrix A and its order m. Observe that we must have f | Xm-1.   
</COMMENT>