how to find irreducible factors of a polynomial
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
i have a polynomial p in binary format and i want to get all the irreducible factors of this polynomial.
p = [ 1 1 1 1 0 1 0 1 1 0 0 1];
thanks
monica
0 Kommentare
Antworten (2)
Roger Stafford
am 27 Apr. 2016
Bearbeitet: Roger Stafford
am 27 Apr. 2016
What ring or field can the coefficients of your reduced polynomials belong to? It makes a difference as to their classification as irreducible. For one field they are and another they aren't.
If the field is simply all reals, then you can use 'roots' to determine the irreducible factors. A pair of conjugate roots will together constitute a quadratic irreducible factor while real roots will give you simple first degree factors.
0 Kommentare
Walter Roberson
am 27 Apr. 2016
R = feval(symengine, 'Dom::IntegerMod', 2); %ring over binary
ps = poly2sym(p); %convert to symbolic poly
ppoly = feval(symengine, 'poly', ps, R); %convert symbolic poly to polynomial over ring
pfact = factor(ppoly, x); %factor it into irreducible terms
numfact = length(pfact);
facts = sym(zeros(1,numfact));
for idx = 1 : numfact
facts(idx) = feval(symengine, 'expr', pfact(idx)); %convert them to polynomials
end
Note: this happens to return the constant polynomial 1 as one of the factors.
There might be an easier way using http://www.mathworks.com/matlabcentral/fileexchange/32872-a-toolbox-for-simple-finite-field-operation
0 Kommentare
Siehe auch
Kategorien
Mehr zu Polynomials finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!