polynomial division issue, how to find the remainder
Afficher commentaires plus anciens
i have two polynomials like
a=X14 + X13 + X10 + X9
b=X8 + X7 + X6 + X4 + 1
i want to find a mod b using matlab pls.
3 commentaires
Walter Roberson
le 9 Déc 2013
Are these binary polynomials?
Is X14 related to X^14 ?
aya
le 9 Déc 2013
aya
le 10 Déc 2013
Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 9 Déc 2013
0 votes
Possibly x^6 + x^3 depending on what your formulae mean.
6 commentaires
aya
le 9 Déc 2013
Walter Roberson
le 9 Déc 2013
Well this gets into a bit of Math theory, which I won't explain here (because I do not remember it.)
When you have polynomials whose coefficients are all 0 or 1, then to find the mod, convert both of them into binary numbers, convert the binary into decimal (numeric) form, take the mod of the numeric form, convert the numeric form back into binary, convert that to polynomial notation.
For example,
x^5 + X^3 + X^2 + 1 maps to binary [1 0 1 1 0 1], which is decimal 45
x^3 + X maps to binary [1 0 1 0], which is decimal 10
45 mod 10 is 5
5 in binary is [1 0 1]
in polynomial form that is X^2 + 1
so (x^5 + X^3 + X^2 + 1) mod (x^3 + X) is (X^2 + 1)
aya
le 9 Déc 2013
aya
le 9 Déc 2013
Walter Roberson
le 9 Déc 2013
aa = bin2dec(char(a + '0'));
Walter Roberson
le 9 Déc 2013
To convert c='110001111101010' to -1 for 1 and 1 for 0, use
2*('0' - c) + 1
M Naeem
le 10 Août 2023
0 votes
how we divide two polynomials in Polynomial Ring (Z_2[x]) to find the remainde?... let suppose i want to divide x^113 by x^8+x^4+x^3+x^2+1
Catégories
En savoir plus sur Polynomials dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!