Randpoly - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Randpoly

random polynomial over a finite field

Randprime

random monic prime polynomial over a finite field

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Randpoly(n, x) mod p

Randpoly(n, x, alpha) mod p

Randprime(n, x) mod p

Randprime(n, x, alpha) mod p

Parameters

n

-

non-negative integer

x

-

name

alpha

-

RootOf

p

-

integer

Description

• 

Randpoly(n, x) mod p returns a polynomial of degree n in the variable x whose coefficients are selected at random from the integers mod p.

• 

Randprime(n, x) mod p returns a random monic irreducible polynomial of degree 0<n in the variable x over the integers mod p where p must be a prime integer.

• 

The optional third argument alpha specifies a representation for the finite field GF⁡pk.  The field extension alpha is specified by a RootOf a monic univariate polynomial of degree k which must be irreducible.

• 

Thus Randprime(n, x, alpha) mod p creates a random monic irreducible polynomial of degree 0<n in the variable x over GF⁡pk.

Examples

> 

Randpoly⁡4&comma;xmod2

x4+x

(1)
> 

Randprime⁡4&comma;xmod2

x4+x+1

(2)
> 

alias⁡α=RootOf⁡y2+y+1&colon;

> 

f≔Randpoly⁡2&comma;x&comma;αmod2

f≔x2+α+x

(3)
> 

Factor⁡fmod2

x2+α+x

(4)
> 

g≔Randprime⁡2&comma;x&comma;αmod2

g≔α⁢x+x2+1

(5)
> 

Irreduc⁡gmod2

true

(6)

See Also

alias

Factor

Irreduc

Nextpoly

Nextprime

RootOf