ravishankar_v said:
I am using the matrix to generate more polynomials with same special properties as the source polynomial from which the matrix was derived.
What special properties?
The matrix should also have its characteristic polynomial same as the source polynomial. My requirement has polynomials with binary coefficients, and the converted matrices should also have binary entries only.
This won't always be exactly possible. If you take any 2x2 matrix A, then it's characterisitc polynomial is:
x² - Tr(A)x + Det(A)
If the matrix has binary entries, then Tr(A) is either 0, 1, or 2, therefore the x term in the polynomial will either be 0, -x, or -2x. So you if have a polynomial like x² + x + 1, where the x term is +x, then you won't be able to get it unless you are okay to treat +x and -x as equivalent. Similarly, if you have a 3x3 matrix, your cubic term will be -x³, so the polynomial x³ is impossible unless you treat the two as equivalent. So if a given polynomial has 0 as the coefficient for one of it's terms, then the char. poly. should have a zero for that term, and if the given polynomial has a 1, then the char. poly. should have either -1 or 1 there. I'm guessing this is what you want to do because the matrix you gave for x
5 + x
4 + x
3 + x
2 + 1 has characteristic polynomial -x
5 + x
4 + x
3 + x
2 + 1.
Anyways, this might help a little. If you want to get an nth degree polynomial that does not have a 1 at the end, then it can be put into the form x(P
n-1(x)) where P
n-1(x) is an n-1
th degree polynomial. If you know the matrix for P
n-1, then the matrix for x(P
n-1(x)) is just the matrix for P
n-1 with a row of zeroes added above and a column of zeroes added to the left.