Uverst of Nebraska - Lcol DgtalCommos@Uverst of Nebraska - Lcol MAT Exam Expostor Papers Math the Mddle Isttute Partershp 7-7 Evaluatg Polomals Thomas J. Harrgto Uverst of Nebraska-Lcol Follow ths ad addtoal works at: http://dgtalcommos.ul.edu/mathmdexppap Part of the Scece ad Mathematcs Educato Commos Harrgto, Thomas J., "Evaluatg Polomals" (7). MAT Exam Expostor Papers. 33. http://dgtalcommos.ul.edu/mathmdexppap/33 Ths Artcle s brought to ou for free ad ope access b the Math the Mddle Isttute Partershp at DgtalCommos@Uverst of Nebraska - Lcol. It has bee accepted for cluso MAT Exam Expostor Papers b a authorzed admstrator of DgtalCommos@Uverst of Nebraska - Lcol.
Master of Arts Teachg (MAT) Masters Exam Thomas J. Harrgto I partal fulfllmet of the requremets for the Master of Arts Teachg wth a Specalzato the Teachg of Mddle Level Mathematcs the Departmet of Mathematcs. Jm Lews, Advsor Jul 7
Harrgto Evaluatg Polomals Thomas J. Harrgto Jul 7
Harrgto Evaluatg Polomals Computers use algorthms to evaluate polomals. Ths paper wll stud the effcec of varous algorthms for evaluatg polomals. We do ths b coutg the umber of basc operatos eeded; sce multplcato takes much more tme to perform o a computer, we wll cout ol multplcatos. Ths paper addresses the followg: a) How ma multplcatos does t take to evaluate the oe-varable polomal, a + ax + ax +... + a x whe the operatos are performed as dcated? (Remember that powers are repeated multplcatos ad must be couted as such.) Wrte ths umber of multplcatos as a fucto of. b) Use mathematcal ducto to prove that our aswer s correct. c) Fd aother wa to evaluate ths polomal b dog the operatos a dfferet order so that fewer multplcatos are eeded. Ht: Thk of was to termx addto ad multplcato ad expermet wth polomals of lower degree. Wrte the umber of multplcatos as a ew fucto of. The best algorthm wll use ol multplcatos. Expla the algorthm ou wll use. d) How ma multplcatos does t take to evaluate the two-varable polomal, = j= a j x whe the operatos are performed as dcated? Wrte ths umber of multplcatos as aother fucto of. e) Use mathematcal ducto to prove that our aswer s correct. f) Fd aother wa to evaluate the two-varable polomal b dog the operatos a dfferet order so that fewer multplcatos are requred. Wrte dow the assocated fucto of. Do ou thk that ths s the most effcet algorthm? If ot hut for a better algorthm. j = = a x Solvg complex problems wth has alwas bee a tme cosumg process. Whle the veto of computers has greatl sped up the process, t has also opeed the door for more complex problems. The tme eeded to solve complex problems wth or wthout a computer s based o the effcec of the algorthm. Curretl oe of the most tme cosumg mathematcal problems, where a effcet algorthm does ot et exst, s the factorzato of
Harrgto 3 tegers, a feature of RSA publc ke crptograph whch esures ts securt (wkpeda: Iteger factorzato). I Ma of 5 a Germa Federal Agec for Iformato Techolog was able to factor a RSA-, the RSA ecrpto algorthm based o a -dgt umber determed b the product of two, dstct prmes. The Agec s computer took eghtee moths to factor the -dgt umber to ts prme factors. I computer tme ths s equvalet to sevet-fve ears of work (wkpeda: RSA-). Ths paper wll explore two dfferet algorthms for evaluatg two dstct polomals order to fd a more effcet wa to evaluate them. Because the amout of tme eeded to compute addto does ot sgfcatl crease the tme eeded to evaluate a problem, ol the umber of multplcatos wll be cosdered. The most basc algorthm for evaluatg a polomal s to evaluate each moomal dvduall ad add the result. Let F() represet the umber of multplcatos eeded to evaluate the polomal: a + ax + ax +... + a x = a x usg ths method. = As a frst example we cosder the case whe = 3. Ths elds the polomal a + a x + a x + a 3 x 3. To cout the umber of multplcatos requred to evaluate the polomal, we cosder each term. The frst term, a, would requre o multplcatos because t s a costat that wll be added to the fal product. The secod term, a x, would requre oe multplcato; the thrd term, a x, would requre two multplcatos. The fourth term a 3 x 3 would requre three multplcatos. Addg the multplcatos eeded to evaluate a + a x + a x + a 3 x 3 would be gve b ++3=6. Now suppose =. The the umber of multplcatos eeded to evaluate the polomal a a x would be + + 3 + 4 + 5 + 6 + 7 + 8 + 9 + = 55. =
Harrgto 4 Cotug ths patter suggests that F(), the umber of multplcatos eeded to evaluate a polomal of degree, s equal to the sum of the umbers to. The sum of the umbers to ( +) s gve b the expresso. Therefore F() = ( +). We prove that ths formula holds true b mathematcal ducto: Frst ote that whe =, we have the polomal a + a x ( + ), so that F() = = s true b ( +) specto. Next we assume that F() = + + 3 + 4 + + = s also true. We the eed to prove that the formula holds for F(+); amel that + + + + (+) = ( + )( + + ). The left had sde of ths last equato ca be rewrtte as ( + + + ) + (+). B the ducto assumpto ( + + + ) s equal to ( +). The ( + + + ) + (+) = ( +) +(+) = ( + ) + ( + ). After factorg out (+) from the umerator we have ++ ++(+) = ( + )( + ), whch was what we wated to show. Therefore b mathematcal ducto, F() = ( +). Next, I eed to fd a more effcet wa to evaluate a + ax + ax +... + a x = a x. Below we descrbe a more creatve approach to evaluatg ths polomal. Let G() = umber of multplcatos eeded to evaluate the polomal usg ths more effcet method. We aga beg wth the case whe = 3 ad ol cosder the umber of multplcatos eeded to evaluate ths polomal (recall that a does ot affect the umber of multplcatos). Ths =
Harrgto 5 meas I ol eed to cout the multplcatos eeded to evaluate a x +a x +a 3 x 3. Factorg out x from the polomal creates a ew polomal of the form x(a + a x + a 3 x ). Wth the paretheses, factorg out aother x from ths polomal creates a ew polomal of the form x(a +x(a +x(a 3 ))). Whe the polomal for =3 s wrtte ths form the er most term has oe multplcato x*a 3, wth the secod er most parethess the secod term has oe multplcato x*(a +x(a 3 )), ad the fal parethess also ol has oe multplcato x*(a +x(a +x(a 3 ))). Factorg the polomal ths fasho would ol eed three multplcatos to evaluate the etre polomal. Usg ths approach for arbtrar, we cout the umber of multplcatos eeded to evaluate our polomal after factorg t the form: x(a +x(a +x(a 3 +x(a 4 +x(a 5 + +x(a (- )+x(a )) ). Note that t would requre multplcatos; oe multplcato for ever coeffcet a, =,. Therefore G() =. Ths s the most effcet algorthm, sce ax would requre multplcatos ad a x caot have fewer multplcatos tha ths. = Suppose we have aother polomal two varables, aj x = j= j, ad we aga wat to fd the umber of multplcatos eeded to evaluate ths polomal. Let P() equal the umber of multplcatos eeded f we evaluate each moomal dvduall ad add the result. For ths polomal I wll aga beg b coutg the umber of multplcatos eeded to evaluate each term the case whe = 3. The polomal would be of the form x x x 3 3x x x x 3 3x x x x 3 3x 3 3x 3 3x 3 3 a x. 3 3x 33
Harrgto 6 The umber of multplcatos eeded to evaluate each term s show the followg table. For example, the etr a x ; 3 meas that the term a would requre three x multplcatos order to be evaluated. a ; x a ; x a ; x a ; 3 3 3x a ; x a ; x a ; 3 x a ; 4 3 3x a ; x a ; 3 x a ; 4 x a ; 5 3 3x a ; 3 3 3x a ; 4 3 3x a ; 5 3 3x a ; 6 3 3 33x Rewrtg the table wth ol the umber of multplcatos allows us to cocetrate o these values. 3 3 4 3 4 5 3 4 5 6 I order to fd the total umber of multplcatos for all the terms, add all the values the table. Sce +++++3+3+3+3+4+4+4+5+5+6 = 48, the umber of dvdual multplcatos eeded to evaluate the polomal s 48;.e. P(3) = 48. Cotug the patter for a arbtrar elds the followg table: 3 4 5 3 4 5 6 + 3 4 5 6 7 3 4 5 6 7 8
Harrgto 7 4 5 6 7 8 9 5 6 7 8 9 - - - + - - Therefore, summg these etres we obta P() = () + 3() + 4(3) +... + ( + )( ) + ( )( + ) + ( )( + ) +... + 4( 3) + 3( ) + ( ) + (). The total umber of dvdual multplcatos for P(5) ca be see the followg table for = to 5. P() 4 8 3 48 4 5 8 Usg these values, I created a dfferece table order of fd the power of the polomal fucto. P () Δ P( ) Δ P( ) Δ P( ) - - - 4 4 - - 8 4-3
Harrgto 8 3 48 3 6 6 4 5 6 5 8 8 8 6 6???? After the thrd dfferece there s a costat dfferece value of sx. Ths tells me that P() s a cubc fucto. Usg a calculator I etered the data pots for (, P()) ad ra a cubc regresso. The coeffcets for the stadard cubc formula 3 = ax + bx + cx + d, were a =, b =, c =, ad d =, wth R =. Sce R = dcates a perfect correlato, we kow that 3 P ( ) = + + s the exact formula for the umber of multplcatos eeded to 3 evaluate the polomal. We test the case where = 6. If P ( ) = + +, the 3 P (6) = (6) + (6) + 6 = 6 + 7 + 6 = 94. Accordg to the above table Δ 3 f = 6 so that Δ f 6 = 6 + 8 = 34. The f6 Δ = 34 + 8 = 4, ad fall f 6 = 4 + 8 = 94. It checks. If P() = 3 + +, from here we ca factor out a from the polomal ad rewrte t the form ( + + ) or ( +). Therefore P() = ( +). Aother opto for evaluatg ths polomal requres us to look back at P() = () + 3() + 4(3) +... + ( + )( ) + ( )( + ) + ( )( + ) +... + 4( 3) + 3( ) + ( ) + (). The frst part () + 3() + 4(3) +... +(+)() ca be wrtte as ( + ). The rest ( )( + ) + ( )( + ) + =
Harrgto 9... + 4( 3) + 3( ) + ( ) + () ca be wrtte as ( + ). Addg these two summatos together gves us = = + = ( + ) ( + + ) = ( + ) = ( + ) = ( + We prove ths b mathematcal ducto. 3 Frst observe that P() = () + () + () = + + = 4 s true. Next assume that P() = () + 3() + 4(3) +... + ( + )( ) + ( )( + ) + ( )( + ) + )... + 4( 3) + 3( ) + ( ) + () = ( +) s also true (the ducto hpothess). To assst the fal step of the ducto proof, refer to the chart below: ZONE represets P() ZONE,3,4 represets the umber of multplcatos added b P(+) above ad beod the umber of multplcatos couted b P(). ZONE ZONE 3 (+) (+)... + ZONE ZONE 4 (+) + + I eed to prove that P(+) = the umber of multplcatos : ZONE + ZONE + ZONE 3 + ZONE 4 = () + 3() + 4(3) +... + ( + )( ) + ( )( + ) + ( )( + ) +... + 4( 3) + 3( ) + ( ) + () +{[(+)+ ++]+(+)}= ( + + )( + ). O the rght had sde of the equato ( + + )( + ) = ( + )( + + 4) = + 5 + 8 3 + 4. O the left had sde of the equato, ZONE = (+). The umber of multplcatos for ZONE ca be foud b fdg the sum of the umbers from to (+) ad subtractg the sum of the umbers from to. Represeted b
Harrgto + = = ( + )( + + ) ( + ) =. ZONE 3 has the same umber of multplcatos of ZONE. Fall, ZONE 4 has ol ( + ) multplcatos. The P(+) = [(+) ] + ( + )( + + ) ( + ) ( + )( + + ) ( + ) [ ] + [ ] + [+] 3 ( + )( + + ) ( + ) = + + + [ ] + + = 3 3 + + + + [ 4 + 4 + + ( + ) ] = 3 3 + + + + 4 + 4 + + = 3 + 5 + 8 + 4. Ths was what we wated. Therefore b mathematcal ducto, P() = ( +). Fall we seek a more effcet wa to evaluate ths polomal as well. Below we descrbe a approach to factorg our polomal before evaluatg t. The method s smlar to the oe used to evaluate a oe varable polomal. Let Q() = Number of multplcatos eeded f ou use ths more creatve approach to evaluatg the polomal. I wll beg b factorg out the values a maer smlar to the prevous example [x(a + x(a + x(a 3 + x(a 4 + x(a 5 + + x(a (-) + x(a )) ) ]. Let G (x) equal the umber of multplcatos eeded to evaluate ( a x +... + a o x ). The G (x) would equal the umber of multplcatos eeded to evaluate ( a x +... + a o x ) ad so o. The rewrtg the polomal the form (G (x) + (G (x) + (G (x) + + (G (x)) ). G (x) to G (x) s + dvdual polomals that have to be evaluated sce G (x) adds oe more polomal. I addto, each G(x) has multplcatos ad sce there are + of them, (+) represets the umber of multplcatos eeded to evaluate G (x) to G (x). Fall each G(x), except G (x), s multpled b whch adds aother multplcatos to the total. Therefore Q() = (+) + = +.
Harrgto If we compare the umber of operatos eeded to evaluatg the expresso usg ths method to that of the prevous method, we see that ths algorthm s much faster. Suppose we wat to evaluate the polomal whe =, wth the frst algorthm I eed cout ever dvdual multplcato operato, t would have () 3 +() + = operatos. Wth ths ew algorthm the umber of multplcatos decreases to () + () =. Whe =, ths ew algorthm would save the evaluator 9 multplcato operatos. After trg dfferet methods for factorg ths polomal ad because t was foud wth a smlar procedure for a x, I feel that ths s the most effcet evaluato algorthm avalable for aj x = j= effcet s uavalable. j =. However at ths tme, a proof showg that t s fact the most
Harrgto Referece Cohe, M., Gaugha, E. D., Koebel, A., Kurtz, D. S., & Pegelle, D. (99) Studet research projects calculus. USA: The Mathematcal Assocato of Amerca. http://e.wkpeda.org/wk/computatoal_complext http://e.wkpeda.org/wk/expoetal_tme http://e.wkpeda.org/wk/iteger_factorzato http://e.wkpeda.org/wk/polomal_tme http://e.wkpeda.org/wk/rsa- Ackowledgmets I would lke to thak Mr. Davd Mla from the Math Departmet at the Uverst of Nebraska-Lcol for proofg m work.