ebook img

ERIC EJ1064359: The Recurrence Relations in Teaching Students of Informatics PDF

2010·0.11 MB·English
by  ERIC
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview ERIC EJ1064359: The Recurrence Relations in Teaching Students of Informatics

InformaticsinEducation,2010,Vol.9,No.2,159–170 159 ©2010InstituteofMathematicsandInformatics,Vilnius The Recurrence Relations in Teaching Students of Informatics ValentinP. BAKOEV DepartmentofMathematicsandInformatics,VelikoTarnovoUniversity 2TheodosiTarnovskiStr.,5000VelikoTarnovo,Bulgaria e-mail:[email protected] Received:December2009 Abstract.Thetopic“Recurrencerelations”anditsplaceinteachingstudentsofInformaticsisdis- cussed in this paper. We represent many arguments about the importance, the necessity and the benefitofstudyingthissubjectbyInformaticsstudents.Theyarebasedoninvestigationofsome fundamentalbooksandtextbooksonDiscreteMathematics,AlgorithmsandDataStructures,Com- binatorics,etc.Somemethodologicalaspectsoftrainingtosolveproblemswithapplyingrecurrence relations are also given. We hope that the considered topics concern also the school teachers in MathematicsandInformaticsandthepaperwillbeusefultothem. Keywords:recurrencerelations,solvingrecurrences,teachingrecurrences,studyingrecurrences, applicationsofrecurrences 1. Introduction The topic of recurrence relations (RR) and their solving has not commonly taken place in teaching students of Informatics in many universities. The same is valid for its pres- ence in textbooks on Discrete Mathematics and Algorithms and Data Structures. If we look at the Discrete Mathematics textbooks which are more than 25–30 years old – for example(Denevetal.,1984;KuznetsovandAdelson-Velskii,1980;Yablonski,1979)– we shall see that they do not include RR. Almost the same is true for the classic text- bookson AlgorithmsandDataStructures by Knuth(1969),Aho,HopcroftandUllman (1974), Sedgewick (1983, with Pascal; 1998, with C; 2002, with Java programming). Knuth(1969,Chapter1–BasicConcepts,Part1.2.Mathematicalpreliminaries)consid- ersgeneratingfunctionsonly,hedoesnotusetheterm“recurrencerelation”evenwhen he talks about the Fibonacci numbers. In other cited textbooks RR are used in analy- sisofthetime-complexityofalgorithms(mostlyofthetype“divide-and-conquer”),but their solutions are not derived, they are simply given. During the last 15–20 years we can see a trend to the opposite direction – probably because of the increasing impor- tance of Combinatorics, owing to its links with Computer Science, Statistic and Alge- bra (Cameron, 1994). The newer textbooks on Discrete Mathematics, such as Ander- sonI.(2001),AndersonJ.(2001),Grimaldi(1999),Koshy(2004),Manev(2007),Rosen (1998),etc.considerRRandtheirsolving.Themoderntextbooksonalgorithmsandespe- ciallyforalgorithmsandcomplexityincludethistopic(Cormenetal.,1990;Nakovand 160 V.P.Bakoev Dobrikov,2005;Wilf,1994).Neverthelessthereareenoughcounterexamples(Akimov, 2001;Erusalimski,2001;GarnierandTaylor,2002).Inthelasteditionsofthetextbooks bySedgewick(1998,2002)therecurrences,usedinanalysisoftime-complexitiesofal- gorithmsarenotsolved,theirsolutionsaresimplygivenagain.Maybethisisoneofthe reasonsforsomeprofessorstounderratethetopicofRRandtoomititintheirlectures. Otherreasonsknowntousare: • the politic and the corresponding curriculum in some universities are oriented to practice. Their students obtain mostly practical knowledge and skills (for almost anything that the job market needs), instead of “unnecessary” theoretical knowl- edge. Such politic is attractive for many students, especially when they choose universityorsubjectsinthefirsttermsoftheirstudy; • thecoveragetimeforDiscreteMathematics(DiscreteStructures)courseisinsuffi- cient,ortheprofessorspaymoreattentiontoother,“moreimportant”topics.Often such lecturers do not realize the basic role and the importance of RR for some subsequent courses, the applications of RR in many other subjects, the relations betweenthem,etc. Inthispaperwediscussthereasonswhyitisimportantandnecessaryforthestudents of Informatics to study RR, their solving, applications and usage. In Section 2 we just summarize the basic definitions and methods for solving RR, since this is not the main goalofthepaper–therearemanyexcellenttextbooksforthispurposeandwemention someofthem.InSection3weargueforthenecessityofstudyingRRfromtheInformatics students.Wepointatsomefactsandargumentsinthisdirection.InSection4werepresent somespecificmethodologicalaspectsofthetraininginthisarea. 2. RecurrenceRelations Here we just recall some basic notions and facts about RR and their solving. Gen- erally said, a recurrence relation, or simply recurrence, for the sequence {a } = n a ,a ,...,a ,...isanequation,whichrelatesthenthterma tocertainofthepreced- 0 1 n n ingtermsa , i < n,forallintegersn (cid:2) n ,wheretheintegern > 0.Therecurrence i 0 0 relation is called linear, if it expresses a as a linear function of fixed previous terms, n otherwiseitiscallednonlinear.Moreprecisely: DEFINITION1. A kth order linear recurrence relation with constant coefficients is an equationoftheform an+c1an−1+c2an−2+...+ckan−k =f(n), n(cid:2)k, (1) wherec ,...,c arerealconstants,c (cid:2)=0,andf(n)isafunctionofn.Whenf(n)=0 1 k k for all n, the corresponding recurrence relation is called homogeneous, otherwise it is callednonhomogeneous.Theboundaryvaluesofthefirstktermsofthesequence,usu- allya0,a1,...,ak−1shouldbespecified.Theyarecalledinitialconditionsoftherecur- rence relation and allow to compute a , for each n (cid:2) n = const – so the recurrence n 0 andtheinitialconditionsdeterminethesequence{a }inanuniqueway. n TheRecurrenceRelationsinTeachingStudentsofInformatics 161 Further, talking about RR we have in mind linear recurrence relation with constant coefficients only. The well-known recurrence, given as an example in each textbook is fn =fn−1+fn−2withinitialconditionsf0 =0,f1 =1.ThishomogeneousRRdefines thesequenceofFibonaccinumbers. 2.1. SolvingRecurrenceRelations To solve a recurrence relation of the type (1) means to express a in a closed form n as a function of n and (in case of necessity) the initial conditions. A general method forsolvingRRisdeveloped,buttherearemanycaseswhensomesimplermethodsand techniquescanbeapplied(AndersonJ.,2001;Bogartetal.,2006;Cormenetal.,1990; Grahametal.,1998;Grimaldi,1999;Koshy,2004),forexample: 1) The substitution method. This method requires to guess the form of solution in accordance with the initial conditions. Then the truth of the guess must be proved by induction,because“mathematicalinductionisageneralwaytoprovethatsomestatement about the integer n is true for all n (cid:2) n ” (Graham et al., 1998, pp. 19; Anderson J., 0 2001; Bogart et al., 2006; etc.). Quite knowledge, wit and experience are necessary in applicationofthismethod. EXAMPLE1. Let us solve the RR an = an−1 +n−1 with initial condition a1 = 0. This nonhomogeneousrecurrencerepresents thenumberof comparisonsneededto sort an array of n elements by the method bubble sort (or by straight selection); Grimaldi (1999),K(cid:2)osh(cid:3)y(2004).Thecorrespondingalgorithmcompareseachpairofelemen(cid:2)ts(cid:3)and there are n possibilities to choose such pair. It is natural to assume that a = n = 2 n 2 n.(n−1)/2.Wenotethatthisformulacorrespondstothetrivialcasesforn=1,2,3,4. Itstruthcanbeprovedeasilybyinductiononn.Another,moreconvenientwaytomake the same assumption for a is to start from the initial conditions and to substitute as n follows:a =0,a =a +1=1,a =a +2=1+2,a =a +3=1+2+3,and 1 2 1 3 2 4 3 soon. EXAMPLE2. Letussolvetherecurrencean =2an−1+1withinitialconditiona1 =1. Itexpressesthenumberofmovesofdisks,necessarytosolvetheTowerofHanoipuzzle1 forndisks.Followingtherecurrencewecalculate:a =2.1+1=3,a =2.3+1=7, 2 3 a = 2.7+1 = 15,etc.Soweassumethata = 2n−1.Theproofofthisassumption 4 n byinductiononnistrivial. 2)Theiterationmethod.Thismethodconsistsofiterating(expanding)therecurrence, stepbystep,applyingittoitself.SotheRRconvertstosummation(sometimesproduct) oftermsdependingonlyonnandtheinitialconditions.Afterwardtechniquesforevalu- atingsummations,asthesedemonstratedinCormenetal.(1990),Grahametal.(1998), 1ProposedbytheFrenchmathematicianEdouardLucasin1883for8disks.Itisbasedonanoldlegend abouttheTowerofBrahmawith64goldendisksonthreediamondneedles. 162 V.P.Bakoev Knuth(1969)areusedtoobtainthesolution.Oftensumsoftermsofarithmeticorgeo- metricseriesareobtainedandthecorrespondingformulasshouldbeknown.Whenthis method is applied to some recursive algorithms “a recursion tree is a convenient way to visualize what happens when a recurrence is iterated, and it can help organize the algebraicbookkeepingnecessarytosolvetherecurrence”(Cormenetal.,1990,pp.59); EXAMPLE3. Letussolvetherecurrencean = an−1+nwithinitialconditiona0 =1. It represents the maximum number of regions defined by n lines in the plane2. The re- currence looks appropriate to guess its solution again (as in Example 1), but we shall apply and illustrate the iteration method instead. We expand (“unfold”, “unwind”) this recurrenceasfollows: an = an−1+n=(an−2+n−1)+n=an−2+(n−1)+n = (an−3+n−2)+(n−1)+n=an−3+(n−2)+(n−1)+n = ... =a +1+2+...+(n−1)+n 0 = 1+n(n+1)/2. 3)Themastermethod isspeciallydevelopedforsolvingrecurrenceswhichdescribe thetime-complexityofalgorithms,obeyingtothe“divide-and-conquer”strategy.These RRhavetheformT(n)=aT(n/b)+f(n),wherea(cid:2)1andb>1areintegerconstants, andf(n)isasymptoticallypositivefunction.Becausetheirimportance,thesolutionsof thisrecurrenceandthecaseswhentheyexistareformulatedinspecialtheoremsinBogart et al. (2006), Koshy (2004), Rosen (1998), Rosen et al. (2000), “The master theorem” (Cormenetal.,1990). 4)ThegeneralmethodgivesthesolutionofahomogeneousRRofthetype(1)bythe followingclassicaltheorem(AndersonJ.,2001;Chen,1992;Koshy,2004;Manev,2007; Rosen,1998;etc.). Theorem1. Let an+c1an−1+c2an−2+...+ckan−k =0 (2) be a kth order linear homogeneous recurrence relation with constant coefficients and initialconditionsa0,a1,...,ak−1.Theassociatedwithitcharacteristicequationis xk+c1xk−1+c2xk−2+...+ck−1x+ck =0. (3) Lettheequation(3)hasgenerallysdistinctrootsα ,α ,...,α (complexinthegeneral 1 2 s case),whereα hasmultiplicitym ,i=1,2,...,s,andm +m +...+m =k.Then i i 1 2 s (cid:4)s thesolutionoftherecurrencerelation(2)is:a = P (n).αn,whereP (n)isapoly- n i i i i=1 nomialofn,ofdegree(m −1)andhavingundeterminedcoefficients,fori=1,2,...,s. i 2ThefirstwhosolvedthisproblemistheSwissmathematicianJacobSteinerin1826. TheRecurrenceRelationsinTeachingStudentsofInformatics 163 ThepolynomialsP (n),i = 1,...,s,havek undeterminedcoefficientsgenerally,which i aredeterminedinanuniquewaybytheinitialconditions. ThesolutionsofthenonhomogeneousRR aredeterminedbythefollowingtheorem (Grimaldi,1999;Koshy,2004;Manev,2007;Rosen,1998). Theorem2. Let an+c1an−1+c2an−2+...+ckan−k =f(n) (4) be a kth order linear nonhomogeneous recurrence relation with constant coefficients, initial conditions a0,a1,...,ak−1, and f(n) is not identically zero. Then the general solutionof(4)is: a =a(h)+a(p), n n n wherea(h)isageneralsolutionoftheassociatedhomogeneousRR(givenbyTheorem1), n anda(p)isaparticularsolutionofthenonhomogeneousRR(4). n The form of the particular solution a(p) depends on f(n). A general algorithm for n solvinganarbitraryrecurrenceofthetype(4)doesnotexist(Koshy,2004),butthereare twospecialcases: i)iff(n)=b.αn, bandαareconstants,then a(p) =c.n.(n+1).···.(n+m−1).αn, n where m denotes the multiplicity of α as a root of the characteristic equation and c is a constant. If α is not a root of the characteristic equation, then m = 0 and therefore a(p) =c.αn.Theconstantcisdeterminedbysubstitutiona(p)intothegivenrecurrence; n n ii)iff(n) = Q(n),whereQ(n)isapolynomialofnofdegreed,thena(p) hasthe n forma(p) = nm.P(n).Heremdenotesthemultiplicityoftheinteger1asarootofthe n characteristicequation(m = 0when1isnotaroot),andP(n)isapolynomialofnof degreed,havingundeterminedcoefficient.Theyaredeterminedbysubstitutiona(p)into n thegivenrecurrence. Moregeneralcase,whichunites(likelinearcombinations)theconsideredcases,i.e., f(n) = bnQ (n)+...+bnQ (n), is considered in Manev (2007). Here b are dis- 1 1 m m i tinct constants and Q (n) are polynomials of n of degree (d − 1), i = 1,2,...,m. i i If we denote α = b , i = 1,...,m, and we consider it as a root of multiplicity d k+i i i of the characteristic equation, then the solution of such recurrence gets the form of ho- mogeneousone,giveninTheorem1.Then,exceptingthegiveninitialconditions,more d +...+d initialconditionshavetobecomputedbyusingthegivenrecurrence.Thus 1 m thesolvingofsuchtypenonhomogeneousRRreducestosolvingofhomogeneousone. Another cases for the type of f(n) and the form of a(p), which have to be look for, n aregiveninGrimaldi(1999),Rosen(1998),Rosenetal.(2000). 164 V.P.Bakoev Finallywenotethataftertheparticularsolutionisobtained,weusetheinitialcondi- tionstodeterminetheundeterminedcoefficientsina(h),i.e.,theyaredeterminedinthe n end. Anothermethodsforsolvingrecurrencesarebasedongeneratingfunctions,difference sequences(alsocalledsequencesofdifferences);theannihilatormethod,etc.(Cameron, 1994;Chen,1992;Grahametal.,1998;Koshy,2004;Merris,2003;Rosen,1998;Rosen etal.,2000). EXAMPLE4. Letussolvetherecurrencean =an−1+n2withinitialconditiona1 =1.It representsthenumberofallsquaresinasquaregridofdimensionn.Werewriteitasa − n an−1 =n2.Itscharacteristicequationx−1=0hasarootx=1ofmultiplicity1.Sothe solutionofthehomogeneousrecurrenceisa(h) = d.1n,whered = const.Aswehave n notedinthesecondcase,theparticularsolutionhastheforma(p) =n1.(an2+bn+c). n Bysubstitutionofa(p)intherecurrenceweobtain: an3+bn2+cn−a(n−1)3−b(n−1)2−c(n−1) = n2, an3+bn2+cn−an3+3an2−3an+a−bn2+2bn−b−cn+c = n2, 3an2−3an+a+2bn−b+c = n2. Weequalizethecoefficientsofequaldegreesofninthebothsidesoflastequalityandso weobtain: 3a=1 ⇒ a=1/3, −3a+2b=0 ⇒ −1+2b=0 ⇒b=1/2, a−b+c=0 ⇒ c=b−a=1/6. Hencea(p) =n3/3+n2/2+n/6=(2n3+3n2+n)/6=n(n+1)(2n+1)/6andso n thesolutionofthenonhomogeneousrecurrenceisa =d+n(n+1)(2n+1)/6.Weuse n theinitialcondition:1=a =d+1 ⇒d=0andthereforea =n(n+1)(2n+1)/6. 1 n 3. WhytheStudentsofInformaticsNeedtoStudyRecurrenceRelations Wecangivemanyargumentsaboutthenecessity,importanceandbenefitofstudyingthe recurrence relations and their solving by the Informatics students. The most important amongthemare: 1) The recurrences are very powerful tool (sometimes an unique one) for solving many counting problems, where it is difficult (or impossible) to count the objects by using the known combinatorial techniques. So the RR and their solving are important and useful complement to the knowledge in Combinatorics and thence in Probability theory and Statistics. Not by chance the topic of recurrences and their solving takes an important place in the known books in Combinatorics (for example, Cameron (1994), TheRecurrenceRelationsinTeachingStudentsofInformatics 165 Comtet(1974),Grahametal.(1998),Hall(1967),Merris(2003),Reingoldetal.(1977), Vilenkinetal.(2006),etc.). 2)Therecurrencesareconnecteddirectlywiththerecursion,astheirnamesprompts. Lessormore,theRRareusedinteachingrecursiontostudentsandtheyareconsidered togetherinsometextbooks(Bogartetal.,2006;Koshy,2004;Rosen,1998;Wilf,1994). The recursive computing of n!, the nth Fibonacci number, etc. are classic examples in creatingrecursivefunctionsineachtextbookonprogramming.Thesefunctionsarebuilt on the corresponding recurrences (i.e., recursive definitions) in a most natural way. So theycanbeusedinexplanationtheexecutionofrecursionandalsotheinherentkeysteps, whichit performs: forward steps, reachingthe basic case (bottom) of the recursion and backwardsteps(optionalinsomerecursions).Forexample,therecursivecallsaredeter- mined by the corresponding recurrence and the forward steps correspond to expanding the terms of the recurrence as in the iteration method (but it happens automatically, by pushingstackframes in theprogram stack).The initialconditionsserve as a basiccase oftherecursion.Thebackwardstepscorrespondtocomputinginaninductivemanner– starting from the initial conditions, if all terms up to the (n−1)st are computed, then the nth term will be computed (the topic “recursion and iteration” is important and ex- tensive,soitneedsmoreattention).TheexamplewiththeFibonaccinumbersisaclassic one for ineffective recursion. The most convenient way to illustrate and to explain why thisrecursionisineffectiveisbyusingthecorrespondingrecursiontree(Cormenetal., 1990).Byitfortheefficiencyofsimilarfunctionwecanconclude:“Letarecurrenceof type (1) of order k > 1 and its initial conditions be given. A recursive function, which computesthenthtermofthecorrespondingsequencebyrecursivecallsofitselfforeach termintherecurrenceisineffective”.Hereistheplacetomentiontwoknowntechniques foravoidingtheineffectiverecursion:memoization(whensomevalueiscomputed,itis storedinanarraytobeusedeverytimewhentherecursiontriestocomputeitagain)and replacementofrecursionbyiterationandusingastackincaseofnecessity(i.e.,applying thebottom-upapproach). 3) The recurrences are used in the analysis of complexity of algorithms, mostly re- cursive.Aswementionedabove,therecurrencesandtherecursiontreesareappropriate, powerfulanduniquetoolsforinvestigationthetime-complexityofalgorithms,basedon astrategy“divide-and-conquer”. 4) The recurrences are in the foundations of the “dynamic-programming” strategy andweunderlinetheimportanceofthisfact.Thesecondstepoftheparadigmofthisstrat- egyis“Recursivelydefinethevalueofanoptimalsolution”(Cormenetal.,1990),which meanstoderivethecorrespondingrecurrenceandtoproveitscorrectness.Thethirdstep is “Computing the value of an optimal solution in a bottom-up fashion”, since the key ingredient,whichtheoptimizationproblemshouldhavefordynamicprogrammingtobe applicable is overlapping subproblems. This means ineffective recursion, which should beavoided. 5)Theabilitytosolverecurrencesimpliesmoreeffectivesolutionsofmanyproblems, relatedtoRR.Oftenthesolutionsareformulasinaclosedformandsotheyhavecompu- tationalcomplexitiesofconstanttype–inacontrasttorecursiveoriterativecomputations 166 V.P.Bakoev following formula (1). Often this fact is used in problems, given in competitions (tour- naments, Olympiads) in programming. It also helps to improve the efficiency of some algorithms,basedondynamicprogramming. 6) Knowing the linear RR with constant coefficients is a starting point for studying other recurrences. For example, such recurrences are the recurrence tables (except the knownPascal’sandStirling’striangle,suchtablesappearindynamicprogramming),RR with coefficients, which are not constant (as in the Catalan’s numbers), the numbers of Stirling, Bell, Euler, Bernoulli, etc. Such recurrences and techniques for solving them areconsideredinBakoev(2004),Cameron(1994),Grahametal.(1998),Rosen(1998), Rosenetal.(2000). 7) It is important to point some facts from Computer Science Curriculum 2008: An InterimRevisionofCS2001,ajointtaskoftheACMandIEEEComputerSociety(ACM and IEEE Computer Society, 2008). It is not necessary to comment, we just cite the programin: • Discrete Structures (DS), Basic of counting contains parts: “Arithmetic and ge- ometric progressions”, “Fibonacci numbers”, “Solving recurrence relations” and “TheMastertheorem”.Threeofallfourlearningobjectivesare:“Statethedefini- tion of the Master theorem”, “Solve a variety of basic recurrence equations” and “Analyzeaproblemtocreaterelevantrecurrenceequationsortoidentifyimportant countingquestions”; • Programming Fundamentals (PF), Recursion includes the topics: “The concept of recursion”, “Recursive mathematicalfunctions”,“Simple recursive functions”, “Divide-and-conquerstrategies”and“Recursivebacktracking”.Amongthelearn- ing objectives are: “Identify the base case and the general case of a recursively definedproblem”,“Compareiterativeandrecursivesolutionsforelementaryprob- lemssuchasfactorial”and“Describethedivide-and-conquerapproach”; • AlgorithmsandComplexity(AL),BasicAnalysiscontainsthetopic“Usingrecur- rence relations to analyze recursive algorithms”, and some of the learning objec- tives are: “Deduce recurrence relations that describe the time complexity of re- cursivelydefinedalgorithms”and“Solveelementaryrecurrencerelations”,andso on. SoweconcludethattheRRandtheirsolvingaresignificantnotonlytothemselves, they are also an important link between many subjects in teaching the students of In- formatics–forexampleCombinatorics,ProbabilitytheoryandStatistics,Programming, AlgorithmsandDataStructures,ComplexityofAlgorithms,TrainingforCompetitionsin Programming,NumericalMethods(becauseoftherelationwiththedifferencesequences (Merris,2003;Rosen,1998)),andevenDifferentialEquations(becauseoftheanalogyin solving RR and linear differential equations (Cameron, 1994; Rosen et al., 2000; Wilf, 1994)).ThetheoryofRRandtheirsolvingisnotanunmeaningmathematicalone,with- out real applications. Contrariwise, this theory helps, explains and stays in the base of manysubjectsintheareaofInformatics.Thecoreofthistheoryisnotlarge(aswehave seen above) and it is not too hard for the students. So we consider that studying the re- currences by the students of Informatics is justified and necessary. Hence we can call TheRecurrenceRelationsinTeachingStudentsofInformatics 167 ourattentiontothequestion“Howtoteachrecurrencessothatthestudentsrealizetheir importanceandbecomemotivatedtostudythem?”. 4. HowtoTeachRecurrencestotheInformaticsStudents Here we do not consider the common methodical treatments in teaching Mathematics and Informatics, we focus our attention on the particular and specific formulations in teachingrecurrencestostudentsofInformatics.Wenote,thattheargumentsrepresented intheprevioussectiongivesomeofthepossibleanswerstothequestion.Weshalladdto themthefollowing: 1)Thetopicofrecurrencesshouldbetaughtinrelationtoothersubjects,pointingto thelinksbetweenthemandtotheapplicationsinthem.Ontheotherhand,theprofessors in subjects mentioned above can demonstrate why and how they use recurrences in the contextoftherelationshipbetweenthesubjects; 2) Only suitable textbooks should be used, where the topic of recurrences is well- represented – consequently, systematically, with many and well-chosen examples and problems – as in the textbooks in Discrete Mathematics (Anderson I., 2001; Grimaldi, 1999;Koshy,2004;Rosen,1998),thetextbooksinAlgorithmsandDataStructures(Cor- menetal.,1990;NakovandDobrikov,2005),thetextbooksinCombinatorics(Cameron, 1994;Grahametal.,1998;Merris,2003;Vilenkinetal.,2006),etc.Thereareexamples in the opposite direction – the textbooks, which just touch the topic, where only prob- lemsofthetype“Solvetherecurrence...” aregiven.Theydeveloptechniqueandskills forsolvinghardrecurrencesonly(ofhigherorder,withcomplexroots,etc.),theydonot contain even one problem to draw up a recurrence. So the students can not realize the meaning,applicationsandbenefitoftherecurrences; 3) The problems for development technical skills for solving recurrences should be followed by problems for drawing up a recurrence and thereafter its solving. It is im- portantforthestudentstoknow,that“problemsthatrequireananswerdependingonthe integer n, where the solution to the problem for a given size n can be related to one or morecasesoftheproblemforsmallersizes”shouldbesolvedbyrecurrences(Rosenet al.,2000); 4)Theproblems,whichneedtodrawuparecurrenceandthereaftertosolveitcanbe solvedbythefollowinginductivescheme: • accordingtotheintegerparameternwedenotebya thenumberofobjectswhich n we have to count. For these values of n, which give meaning to the problem we considerthecorrespondingsequence,lookingforarecurrencefora ; n • we compute the initial conditions, i.e., the first terms of the sequence, for which theproblemhasameaning; • inductivesuggestion–weassumethatalltermsofthesequencetoan−1inclusive, areknowntous; • we express the relation between a and the previous terms of the sequence and n prove the derived recurrence. Often we reason as follows: “We have (we have 168 V.P.Bakoev placed,wehavedrawn,etc.)n−1elements.Theyforman−1 objectsofthetype which we look for and, in accordance with the inductive suggestion, we know an−1.Weadd(weplace,wedraw,etc.)thenthelement.Howthenumberofobjects whichwelookforischanged(increases)?”.Oncemorewenotethatourarguments inderivingtherecurrenceshouldhaveaformofproof.Wecheckwhetherthere- currencesatisfiestheinitialconditions; • wesolvetheobtainedrecurrenceandcheckthesolution. Therecurrencesintheconsideredexamplesareobtainedinthisway.Werecommend the students to master these steps and their application in solving such problems. We explicitlynotethattheformationofsuchmannerofthinkingandmasteringthetechnique forsolvingsimilarproblemshelpthestudentsinacrucialdegreeincreatingalgorithms, based on the dynamic-programing strategy. The known to us textbooks do not pay the necessaryattentiontothisimportantfact; 5)Itisrelevanttouseinteachingaclassificationoftheproblems,whichneedtodraw up a recurrence and thereafter to solve it. Many classifications are possible and each of them should help the recognition of the problems in order to solve them easily. We canconsiderasasuccessfuleachclassificationwhichhelpsthestudentsinsolvingsuch problems and in mastering the topic of recurrences, generally. The classification of the problems, which need to draw up a recurrence and thereafter to solve it is a complex topic,ithasmanyaspectsandcanbeasubjectofanotherstudy.Togetanideaofthiswe justmentionsomeofthemanycriteria,whichcanbeusedinclassification: • theorderoftheobtainedrecurrence; • thetypeoftheobtainedrecurrence–linearornonlinear,homogeneousornonho- mogeneous,withconstantcoefficientsornot,etc.; • thearea,whichtheproblemconcerns–forexample,finances(problemsforcom- puting compound interest on deposits and credits), biology (problems for com- putinggrowthofpopulations),geometry(problemsforcountingfigures),number theory(countingpartitionsorcompositionsofintegers),etc.; • whatshouldbedetermined–acertain(nth)termofasequence,orasumofsome (orall)termsofagivensequence,orthenumberofallsequencesofacertaintype; • thetext of the problemcontainscharacteristickeywords, whichrequire a specific mannerofthinking,orpromptforcertainrecurrencesorfundamentalproblems– for example, to have no two consecutive equal elements; or to contain odd/even numberofcertainelements,etc.; • problemsforcountinginrecursively/inductivelydefinedfigures–infractalfigures, orself-similarfigures,etc.,asinKoshy(2004),Rosen(1998); • countingproblems,relatedtopolygonal(figurate)numbers,asinBakoev(2004), Koshy(2004),Rosen(1998),etc. 6) The meaning, which some sequences have is very important aspect in studying recurrences.Thesamesequencecanhavemanyinterpretations.Thisfactandthetopicof recurrenceshelpinahigherdegreetointroducetothestudentsTheOn-LineEncyclopedia ofIntegerSequences(OEIS),Sloane(2009).ThissiteismaintainedbyN.J.A.Sloaneand

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.