Application Center - Maplesoft

App Preview:

Alternating Polynomials by Maple

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application




 

 

 

 

 

 

"  Alternating Polynomials by Maple"

 

Kahtan*H.Alzubaidy

NULL

Key*Words; Symmetric*Polynomial, `and`(Alternating*Polynomial, Groebner*Basis)

 

 

"Introduction."

 

"A multivariate polynomial  f(x[1],...,x[n]) is  alternating  if  f(x[`ε`(1)],..,x[`ε`(n)])=sgn(`ε`)f(x[1],...,x[n]) ,where  sgn(`ε`)=1 if  `ε` is even and =-1 if `ε` is odd. for any permutation `ε` of degree  n."

The polynomial is called symmetric, if   
"f(x[`ε`(1)],..,x[`ε`(n)])=f(x[1],...,x[n]) for any permutation `ε` of degree  n. For more details on symmetric polynomials see [1]."

"We confine ourselves to the polynomials over the field of complex numbers."

 

 The basic example of alternating polynomials is the Vandermonde polynomial which is defined as follows :

   ν"(x[1],...,x[n])=(∏)(x[i]-x[j]) . This  contains    (n(n-1))/(2)  brackets."

 

 

  ν(x[1], () .. (), x[n]) = (-1)^((1/2)*n(n-1))*det(V(x[1], () .. (), x[n])), whereV(x[1], () .. (), x[n])= "[[[1,x[1],.....,(x[1])^(n-1)],[1,x[2],.....,(x[2])^(n-1)],[...,...,...,...],[1,x[n],.....,(x[n])^(n-1)]]] ,  the Vandermonde  matrix."

 

Fundamental*Theoremof*Alternating*Polynomials

 Any alternating polynomial is a product of the Vandermonde polynomial and a symmetric polynomial.

 

Fundamental Theorem of Symmetric Polynomials

 Any symmetric polynomial is a polynomial in elementary symmetric polynomials.

 

References

 [1]  K.H.Alzubaidy, Symmetric Polynomials by Maple, Maple Application Center, Abstract Algebra, June 8, 2105.

"[2]  C.David Cox,John Little,Donal O'Shea, Ideals,Varieties,And Algorithms. 3 rd edition Springer 2007."

"[3]  David S. Dummit,Richard M. Foote, ABSTRACT ALGEBRA. 2nd edition Prentice-Hall 1999."

 

``

 

restart

with(LinearAlgebra)

with(Groebner)

with(combinat)

``

 

To generate power sum polynomials

 

arguments : list of variables L and power  r.

 

psp:=proc(L,r);

add((L[i])^r,i=1..nops(L));

end proc;

proc (L, r) add(L[i]^r, i = 1 .. nops(L)) end proc

(1)

Example

 

psp([x, y, z, w, u, v], 7)

x^7+y^7+z^7+w^7+u^7+v^7

(2)

NULL

To generate elementary symmetric polynomials

 

 Elementary symmetric polynomials  in  x[1], x[2], () .. (), x[n]*are*defined*as*follows

"  sigma[1]=(∑)x[i] ,  sigma[2]=(∑)x[i]x[j]  ,  sigma[3]=(∑)x[i]x[j]x[k] , ...,  sigma[n]=x[1]x[2]...x[n].   "

 

 arguments : list of variables L and index  r.

 

esp:=proc(L,r)local f,i;

f:=product((x_-L[i]),i=1..nops(L));

simplify(coeff(f,x_,nops(L)-r))*(-1)^r;

end proc;

proc (L, r) local f, i; f := product(x_-L[i], i = 1 .. nops(L)); simplify(coeff(f, x_, nops(L)-r))*(-1)^r end proc

(3)

 

Examples

 

esp([x, y, z], 0)

1

(4)

esp([x, y, z], 1)

x+y+z

(5)

esp([x, y, z], 2)

x*y+z*x+z*y

(6)

esp([x, y, z], 3)

x*y*z

(7)

esp([x, y, z], 4)

0

(8)

``

esp([x, y], 1)

x+y

(9)

esp([x, y], 2)

x*y

(10)

esp([x, y, z, w], 4)

x*y*z*w

(11)

esp([x, y, z, w], 3)

x*y*z+w*x*y+w*z*x+w*z*y

(12)

``

esp([x, y, z, w, u], 4)

x*y*z*w+u*x*y*z+u*w*x*y+u*w*z*x+u*w*z*y

(13)

T*o*` generate homogenous products`

 

   It is  the sum of all productsor r variables selected from n variables ( r≤ n) allowing repitition. It is a homogenous polynomial of degree  r.

   It contans "((n+r-1) ? (r-1))  terms."

 

  arguments : list of vaiables L and degree r

 

hp:=proc(V,n)local p,L,M,C,K,N;

p:=expand((add(h,h=V))^n);

L := [seq(op(i, p), i = 1 .. numbcomb(n+nops(V)-1,nops(V)-1))];

M := 2*Vector[row](L);

C := [seq(op(1, g), g = M)];

K := map(proc (x) options operator, arrow; 1/x end proc, C);

N := Vector[row](K);

sort(DotProduct(M, N),order=tdeg(V[]));

end proc;

 

proc (V, n) local p, L, M, C, K, N; p := expand(add(h, h = V)^n); L := [seq(op(i, p), i = 1 .. combinat:-numbcomb(n+nops(V)-1, nops(V)-1))]; M := 2*Vector[row](L); C := [seq(op(1, g), g = M)]; K := map(proc (x) options operator, arrow; 1/x end proc, C); N := Vector[row](K); sort(LinearAlgebra:-DotProduct(M, N), order = tdeg(V[])) end proc

(14)

 

Examples

 

hp([x, y], 5)

x^5+x^4*y+x^3*y^2+x^2*y^3+x*y^4+y^5

(15)

hp([x, y, z], 4)

x^4+x^3*y+x^2*y^2+x*y^3+y^4+x^3*z+x^2*y*z+x*y^2*z+y^3*z+x^2*z^2+x*y*z^2+y^2*z^2+x*z^3+y*z^3+z^4

(16)

hp([x, y, z, w], 3)

x^3+x^2*y+x*y^2+y^3+x^2*z+x*y*z+y^2*z+x*z^2+y*z^2+z^3+x^2*w+x*y*w+y^2*w+x*z*w+y*z*w+z^2*w+x*w^2+y*w^2+z*w^2+w^3

(17)

``

 To generate Vandermonde's polynomials

 

 argument : list of variables L

 

van:=proc(L);

sort((-1)^(nops(L)*(nops(L)-1)/2)* Determinant(VandermondeMatrix(L)),order=tdeg(L[]));  

end proc;

proc (L) sort((-1)^((1/2)*nops(L)*(nops(L)-1))*LinearAlgebra:-Determinant(LinearAlgebra:-VandermondeMatrix(L)), order = tdeg(L[])) end proc

(18)

``

Examples

 

van([x, y])

x-y

(19)

g := van([x, y, z])

x^2*y-x*y^2-x^2*z+y^2*z+x*z^2-y*z^2

(20)

factor(g)

(y-z)*(-z+x)*(x-y)

(21)

``

factor(van([x, y, z, w]))

-(y-z)*(-z+x)*(x-y)*(-z+w)*(w-y)*(w-x)

(22)

 To generate alternating polynomials

 

  A product of Vandermonde polynomial and symmetric polynomial

 

Examples

 

van([x, y, z])*esp([x, y, z], 2)

(x^2*y-x*y^2-x^2*z+y^2*z+x*z^2-y*z^2)*(x*y+z*x+z*y)

(23)

sort(expand(%), order = tdeg(x, y, z))

x^3*y^2-x^2*y^3-x^3*z^2+y^3*z^2+x^2*z^3-y^2*z^3

(24)

 

 To check symmetric polynomials

 

 This procedure is based on the following

 Theorem

  Let f 2C[
"x[1],...,x[n] ] and  I=<sigma[1]-a[1],sigma[2]-a[2],...,sigma[n]-a[n] >, where  a[1],a[2],...,a[n]  are  new parameters. Suppose  that G is a Groebner's basis  for  I and g is the reminder of f  by dividing   "

  by G. Then f is symmetric if g depends only on   "a[1],a[2],...,a[n]."

 

 arguments : polynomial f and list of variables  V.

 

NULL

symchk:=proc(f,V)local A,L,GL,B;

A:=[seq(a[i],i=1..nops(V))];

L:=[seq(esp(V, i), i = 1 .. nops(V))]-A;

GL:=Basis(L,tdeg(V[]));

B:=NormalForm(f,GL,tdeg(V[]));

if is (indets(B)subset convert(A,set)) then true;else false;fi;

 

end proc;

proc (f, V) local A, L, GL, B; A := [seq(a[i], i = 1 .. nops(V))]; L := [seq(esp(V, i), i = 1 .. nops(V))]-A; GL := Groebner:-Basis(L, tdeg(V[])); B := Groebner:-NormalForm(f, GL, tdeg(V[])); if is(`subset`(indets(B), convert(A, set))) then true else false end if end proc

(25)

 

Examples

 

symchk(x^3+x^2*y+x*y^2+y^3+8, [x, y])

true

(26)

symchk(3*(x^3*y^3+x^3*z^3+y^3*z^3), [x, y, z])

true

(27)

f := (x^2+y^2)*(y^2+z^2)*(x^2+z^2)

(x^2+y^2)*(y^2+z^2)*(z^2+x^2)

(28)

symchk(f, [x, y, z])

true

(29)

f := w^6+x^6+2*y^6+z^6

x^6+2*y^6+z^6+w^6

(30)

symchk(f, [x, y, z, w])

false

(31)

symchk(1, [x, y])

true

(32)

 

To check alternating polynomials

f(x[1], () .. (), x[n])   is alternating if   νx[1], () .. (), x[n]"  divdes   f(x[1],...,x[n])    and     (f(x[1],...,x[n]))/(nu(x[1],...,x[n]))   is  symmetric."

 

  arguments : polynomial  f and  list of variables  V

``

NULL

altchk:=proc(f,V) local A,g,r;

g:=van(V);

r := NormalForm(f, [g], tdeg(V[]), 'Q');

Q;

if is(r,0)and is(symchk(Q[], V))then true;else false;fi;

end proc;

proc (f, V) local A, g, r; g := van(V); r := Groebner:-NormalForm(f, [g], tdeg(V[]), 'Q'); Q; if is(r, 0) and is(symchk(Q[], V)) then true else false end if end proc

(33)

 

Examples

 

f := x^4*y-x^4*z-x^3*y^2+x^3*z^2+x^2*y^3-x^2*z^3-x*y^4+x*z^4+y^4*z-y^3*z^2+y^2*z^3-y*z^4

x^4*y-x^3*y^2+x^2*y^3-x*y^4-x^4*z+y^4*z+x^3*z^2-y^3*z^2-x^2*z^3+y^2*z^3+z^4*x-y*z^4

(34)

altchk(f, [x, y, z])

true

(35)

NULL

altchk(x+y, [x, y])

false

(36)

q := hp([x, y, z], 3)

x^3+x^2*y+x*y^2+y^3+x^2*z+x*y*z+y^2*z+x*z^2+y*z^2+z^3

(37)

NULL

altchk(q, [x, y, z])

false

(38)

``

altchk(z^4+y^3+x^2, [x, y, z])

false

(39)

altchk(2*(x-y)^3, [x, y], [a, b])

true

(40)

altchk(x-y, [x, y])

true

(41)

altchk(1, [x, y])

false

(42)

NULL

altchk((x^2*y-x^2*z-x*y^2+x*z^2+y^2*z-y*z^2)^3, [x, y, z])

true

(43)

NULL

altchk((x-y)^5, [x, y])

true

(44)

t := factor(van([x, y, z, w]))

-(y-z)*(-z+x)*(x-y)*(-z+w)*(w-y)*(w-x)

(45)

altchk(t, [x, y, z, w])

true

(46)

altchk(t^2, [x, y, z, w])

false

(47)

To express a symmetric polynomial in terms of elementary symmetric polynomials

 

  arguments : symmetric polynomial f, list of variables  V and  list of constants A representing elementary symmetric polynomials.

 

rep:=proc(f,V,A)local L,G,GL;

L:=[seq(esp(V, i), i = 1 .. nops(V))]-A;

 

GL:=Basis(L,tdeg(V[]));

NormalForm(f,GL,tdeg(V[]));

 

end proc;

proc (f, V, A) local L, G, GL; L := [seq(esp(V, i), i = 1 .. nops(V))]-A; GL := Groebner:-Basis(L, tdeg(V[])); Groebner:-NormalForm(f, GL, tdeg(V[])) end proc

(48)

``

Examples

 

rep(x^3*y^3+x^3*z^3+y^3*z^3, [x, y, z], [a, b, c])

b^3-3*a*b*c+3*c^2

(49)

f := 2*(x-y)^4+2*(y-z)^4+2*(z-x)^4

2*(x-y)^4+2*(y-z)^4+2*(z-x)^4

(50)

rep(f, [x, y, z], [a, b, c])

4*a^4-24*a^2*b+36*b^2

(51)

factor(%)

4*(-3*b+a^2)^2

(52)

 

To find the discriminant  of a univariate polynomial(equation)

 

 The  discriminant of  
"a[0]x^(n)+a[1]x^(n-1)+...+a[n]  is defined  by  Delta= (a[0])^(2 n-2)(&prod;)(alpha[i]-alpha[j])^(2),  where  alpha[1],..,alpha[n]  are  the roots of  the  polynomial."

 

 

  argument : list of the coefficients C = ["a[0], a[1],..., a[n]]"

 

disc:=proc(C) local n,E,V,L,f,GL;

n:=nops(C);

E:=[seq((-1)^(i-1)*C[i]/C[1],i=2..n)];

V:=[seq(x[i],i=1..n-1)];

L:=[seq(esp(V,i),i=1..n-1)]-E;

f:=(C[1])^(2*n-4)*(van(V))^2;

GL:=Basis(L,tdeg(V[]));

NormalForm(f,GL,tdeg(V[]));

 

end proc;

proc (C) local n, E, V, L, f, GL; n := nops(C); E := [seq((-1)^(i-1)*C[i]/C[1], i = 2 .. n)]; V := [seq(x[i], i = 1 .. n-1)]; L := [seq(esp(V, i), i = 1 .. n-1)]-E; f := C[1]^(2*n-4)*van(V)^2; GL := Groebner:-Basis(L, tdeg(V[])); Groebner:-NormalForm(f, GL, tdeg(V[])) end proc

(53)

 Examples

 

Linear equation  ax+b=0

 

disc([a, b])

1

(54)

``

Quadratic equation  ax^2+bx+c = 0

 

disc([a, b, c])

b^2-4*c*a

(55)

Cubic equation ab*x^2+x^3+cx+d = 0

 

disc([a, b, c, d])

18*a*b*c*d-4*b^3*d-27*d^2*a^2+b^2*c^2-4*c^3*a

(56)

NULL

Cubic equation  x^3+ax+b = 0 

 

disc([1, 0, a, b])

-4*a^3-27*b^2

(57)

Quartic equation  x^4+b*x^2+cx+d = 0

 

disc([1, 0, b, c, d])

256*d^3-27*c^4-128*b^2*d^2+16*b^4*d-4*b^3*c^2+144*b*c^2*d

(58)

 

 

`in`(To*express*Vandermonde*polynomial, terms*of*elementary*symmetric*polynomial)

 

 discriminant = a^(2*n-2)*Vandermode*polynomial

 

  Vandermonde polynomial =  "a^(1-n)*sqrt(discriminant) ,  where  a  is the leading coefficient of  the polynomial."

 

 

 

E-mail; `@`(kahtanalzubaidy, yahoo).com

Department*of*Mathematics, Faculty*of*Science, University*of*Benghazi, Libya

 

 

``