The probability that a monic polynomial of degree n over a finite field F of q elements is square free AND has a factor of degree d over F, can be computed via a over partitions. An approximation for q-> infinity is as the relative size of the conjugacy classes with a sub partitions of size k in the symmetric group Sn. The first version returns the approximation. The second version returns the precise value. The last version returns the probability as function of q up to order q -ord.
i1 : probOfFactor(30,10)
o1 = .385481092947806
o1 : RR (of precision 53)
|
i2 : probOfFactor(6,3)
o2 = .3625
o2 : RR (of precision 53)
|
i3 : probOfFactor(6,3,101)
o3 = .35572340337224
o3 : RR (of precision 53)
|
i4 : q=symbol q; Q = RR[q, MonomialOrder => Lex, Inverses=>true]
o5 = Q
o5 : PolynomialRing
|
i6 : probOfFactor(6,3,Q,1)
-1
o6 = .3625 - .6875q
o6 : Q
|
i7 : probOfFactor(12,1,Q,1)
-1
o7 = .632121 - .81606q
o7 : Q
|