PLEASE HELP --- division of polynomials C + +

Status
Not open for further replies.

mariuszprus

Newbie level 6
Joined
Dec 12, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,281
Location
poznan
Activity points
1,376
hI i am not good speeg english so sorry for error i have a problem i must have program with division of polynomials in C + +
i look some program in google but i not found program with is good for me
i must division polynomials OF DEGREE x^11 by x^4+x+1
and i dont know how can i do in algorithm of c++

in program i must write in coefficients 0 or 1 in polynomials x^11 for example

P[7] // polynomial
G[]={1,0,0,1,1}// polynomial

cin>>P[0] //0 or 1
cin>>P[1]
.
.
.
.
cin>>P[7]

for exampl P[]={1,1,0,0,1,0,1,1,0,0,0,0}// so we have polynomial x^11+x^10+x^7+x^5+x^4
g[]={1,0,0,1,1}// soo we have x^4+x+1

and we must divide P[]/G[]

in result i need 2 table one for result and rest of divide

W[7]//result of divide
R[4]//rest of divide


so

P[]/G[]=W[] , R[]

the polynomial W[] and R[] must be a table of 0 or 1 for example
W[]={0,0,1,1,0,1,1,0}
and the rest of divide
R[]={0,1,0,1,0}
P[]


PLEASE HELP!!!!!!! if some body can give me code in c++ please i am not goot in programer and in the math
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…