Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4871
| From | Daniel Lichtblau <danl@wolfram.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: PolynomialMod |
| Date | 2011-09-12 08:20 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j4kfcl$kar$1@smc.vnet.net> (permalink) |
----- Original Message -----
> From: "Artur" <grafix@csl.pl>
> To: mathgroup@smc.vnet.net
> Sent: Sunday, September 11, 2011 6:28:34 AM
> Subject: PolynomialMod
> Dear Mathematica Gurus,
>
> Who is able help me to write Mathematica procedure which will be
> improovment of recent PolynomialMod.
>
> If we do
> PolynomialMod[ 1 + 3 #1 + 5 #1^2 + 5 #1^3 + 5 #1^4 + 3 #1^5 + #1^6, -1
> +
> 2 #1^2 + #1^3]
> result is OK
> 1 + 6 #1 + 6 #1^2
>
> But if we do
> PolynomialMod[1 + 3 #1 + 5 #1^2 + 5 #1^3 + 5 #1^4 + 3 #1^5 + #1^6, -1
> +
> (-(3/2) - (I Sqrt[23])/2) #1 + (3/2 - (I Sqrt[23])/2) #1^2 + #1^3]
> Result is wrong
> good should be
> -2 + (-(1/2) - (I Sqrt[23])/2) x + x^2
>
> Who is able to write good one procedure e.g. PolMod to automatic
> reduction of any degree polynomials by polynomial smaller degree?
>
> Best wishes
> Artur Jasinskii
Actually a correct result should be zero. PolynomialRemainder, among other functions, can be used for this.
In[256]:= p1 = (1 + 3 #1 + 5 #1^2 + 5 #1^3 + 5 #1^4 +
3 #1^5 + #1^6) &[x]
Out[256]= 1 + 3*x + 5*x^2 + 5*x^3 + 5*x^4 + 3*x^5 + x^6
In[257]:= m1 = (-1 + (-(3/2) - (I*Sqrt[23])/2)*#1 + (3/
2 - (I*Sqrt[23])/2)*#1^2 + #1^3 & )[x]
Out[257]= -1 + (-(3/2) - (I*Sqrt[23])/2)*x + (3/2 - (I*Sqrt[23])/2)*
x^2 + x^3
In[272]:= PolynomialQuotientRemainder[p1, m1, x]
Out[272]= {-1 + (-(3/2) + (I*Sqrt[23])/2)*x + (3/2 + (I*Sqrt[23])/2)*
x^2 + x^3, 0}
Daniel Lichtblau
Wolfram Research
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: PolynomialMod Daniel Lichtblau <danl@wolfram.com> - 2011-09-12 08:20 +0000
csiph-web