Random polynomial of degree 1
Having defined
- the finite field
K
of size 4 ina
- a polynomial ring
R1
overK
one can ask for a random element using the random_element
method.
The random polynomial I obtained that way was of degree two:
sage: K.<a> = FiniteField(4)
sage: R1 = PolynomialRing(K, ['z%s' % p for p in range(1, 3)])
sage: R1.random_element()
(a)*z1*z2 + (a + 1)*z2^2 + z1 + (a)*z2
If I only want a random linear polynomial from this ring, how can I get one?
add a comment