SlideShare uma empresa Scribd logo
1 de 1
3. Consider the following recursive algorithm for computing the sum of the first n cubes: S ( n )
= 1 3 + 2 3 + + n 3 . Algorithm S ( n ) //Input: A positive integer n //Output: The sum of the first
n cubes if n = 1 return 1 else return S ( n 1 ) + n n n a. Set up and solve a recurrence relation for
the number of times the algorithm's basic operation is executed. b. How does this algorithm
compare with the straightforward nonrecursive algorithm for computing this function? Hints: -
This problem is not asking to calculate the sum S ( n ) (the algorithm does that!). Do not use the
summation formulas for cubes in App. A 1 ! The problem is asking to calculate only the number
of basic operations executed - a much simpler sum. - Take the basic operation to be the
multiplication. Write the recursion. Solve by backsubstitution.

Mais conteúdo relacionado

Semelhante a 3- Consider the following recursive algorithm for computing the sum of.docx

CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsKrishnan MuthuManickam
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyappasami
 
Organizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type ClassesOrganizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type ClassesLawrence Paulson
 
Data_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.pptData_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.pptISHANAMRITSRIVASTAVA
 
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxMATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxandreecapon
 
Chapter 6 Balagurusamy Programming ANSI in c
Chapter 6  Balagurusamy Programming ANSI  in cChapter 6  Balagurusamy Programming ANSI  in c
Chapter 6 Balagurusamy Programming ANSI in cBUBT
 
Problem descriptionThe Jim Thornton Coffee House chain is .docx
Problem descriptionThe Jim Thornton Coffee House chain is .docxProblem descriptionThe Jim Thornton Coffee House chain is .docx
Problem descriptionThe Jim Thornton Coffee House chain is .docxelishaoatway
 
(1) collections algorithms
(1) collections algorithms(1) collections algorithms
(1) collections algorithmsNico Ludwig
 
tw1979 Exercise 1 Report
tw1979 Exercise 1 Reporttw1979 Exercise 1 Report
tw1979 Exercise 1 ReportThomas Wigg
 
Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Pramit Kumar
 
Karatsuba algorithm for fast mltiplication
Karatsuba algorithm for fast mltiplicationKaratsuba algorithm for fast mltiplication
Karatsuba algorithm for fast mltiplicationAtul Singh
 
Recursion | C++ | DSA
Recursion | C++ | DSARecursion | C++ | DSA
Recursion | C++ | DSASumit Pandey
 
dynamic programming Rod cutting class
dynamic programming Rod cutting classdynamic programming Rod cutting class
dynamic programming Rod cutting classgiridaroori
 
Stochastic Processes Homework Help
Stochastic Processes Homework HelpStochastic Processes Homework Help
Stochastic Processes Homework HelpExcel Homework Help
 
DSA Complexity.pptx What is Complexity Analysis? What is the need for Compl...
DSA Complexity.pptx   What is Complexity Analysis? What is the need for Compl...DSA Complexity.pptx   What is Complexity Analysis? What is the need for Compl...
DSA Complexity.pptx What is Complexity Analysis? What is the need for Compl...2022cspaawan12556
 

Semelhante a 3- Consider the following recursive algorithm for computing the sum of.docx (20)

CS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of AlgorithmsCS8451 - Design and Analysis of Algorithms
CS8451 - Design and Analysis of Algorithms
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
 
Organizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type ClassesOrganizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type Classes
 
Data_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.pptData_Structure_and_Algorithms_Lecture_1.ppt
Data_Structure_and_Algorithms_Lecture_1.ppt
 
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxMATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
 
Chapter 6 Balagurusamy Programming ANSI in c
Chapter 6  Balagurusamy Programming ANSI  in cChapter 6  Balagurusamy Programming ANSI  in c
Chapter 6 Balagurusamy Programming ANSI in c
 
Exercise1 java
Exercise1 javaExercise1 java
Exercise1 java
 
Problem descriptionThe Jim Thornton Coffee House chain is .docx
Problem descriptionThe Jim Thornton Coffee House chain is .docxProblem descriptionThe Jim Thornton Coffee House chain is .docx
Problem descriptionThe Jim Thornton Coffee House chain is .docx
 
(1) collections algorithms
(1) collections algorithms(1) collections algorithms
(1) collections algorithms
 
tw1979 Exercise 1 Report
tw1979 Exercise 1 Reporttw1979 Exercise 1 Report
tw1979 Exercise 1 Report
 
Slide2
Slide2Slide2
Slide2
 
Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)Matrix Multiplication(An example of concurrent programming)
Matrix Multiplication(An example of concurrent programming)
 
GTR final project
GTR final projectGTR final project
GTR final project
 
Karatsuba algorithm for fast mltiplication
Karatsuba algorithm for fast mltiplicationKaratsuba algorithm for fast mltiplication
Karatsuba algorithm for fast mltiplication
 
Recursion | C++ | DSA
Recursion | C++ | DSARecursion | C++ | DSA
Recursion | C++ | DSA
 
dynamic programming Rod cutting class
dynamic programming Rod cutting classdynamic programming Rod cutting class
dynamic programming Rod cutting class
 
Power Rule
Power RulePower Rule
Power Rule
 
Stochastic Processes Homework Help
Stochastic Processes Homework HelpStochastic Processes Homework Help
Stochastic Processes Homework Help
 
Ch-3 lecture.pdf
Ch-3 lecture.pdfCh-3 lecture.pdf
Ch-3 lecture.pdf
 
DSA Complexity.pptx What is Complexity Analysis? What is the need for Compl...
DSA Complexity.pptx   What is Complexity Analysis? What is the need for Compl...DSA Complexity.pptx   What is Complexity Analysis? What is the need for Compl...
DSA Complexity.pptx What is Complexity Analysis? What is the need for Compl...
 

Mais de geney3

3) What is the w of the onion cell when it reaches equilibrium with th.docx
3) What is the w of the onion cell when it reaches equilibrium with th.docx3) What is the w of the onion cell when it reaches equilibrium with th.docx
3) What is the w of the onion cell when it reaches equilibrium with th.docxgeney3
 
3- At the HRPA Conference- your company has been invited to make a pre.docx
3- At the HRPA Conference- your company has been invited to make a pre.docx3- At the HRPA Conference- your company has been invited to make a pre.docx
3- At the HRPA Conference- your company has been invited to make a pre.docxgeney3
 
3- A metabolic divorder that can be inharited was foumd to rovult from.docx
3- A metabolic divorder that can be inharited was foumd to rovult from.docx3- A metabolic divorder that can be inharited was foumd to rovult from.docx
3- A metabolic divorder that can be inharited was foumd to rovult from.docxgeney3
 
3- A metabolic disorder that can be inharited was foumd to rasult from.docx
3- A metabolic disorder that can be inharited was foumd to rasult from.docx3- A metabolic disorder that can be inharited was foumd to rasult from.docx
3- A metabolic disorder that can be inharited was foumd to rasult from.docxgeney3
 
3- (ES 1-0 3) The averuge nominat incomes earned in Euris and the CPI.docx
3- (ES 1-0 3) The averuge nominat incomes earned in Euris and the CPI.docx3- (ES 1-0 3) The averuge nominat incomes earned in Euris and the CPI.docx
3- (ES 1-0 3) The averuge nominat incomes earned in Euris and the CPI.docxgeney3
 
3) RNA is very important to protein synthesis! Explore the different r.docx
3) RNA is very important to protein synthesis! Explore the different r.docx3) RNA is very important to protein synthesis! Explore the different r.docx
3) RNA is very important to protein synthesis! Explore the different r.docxgeney3
 
24- A data set lists apartments available for students to rent- Inform.docx
24- A data set lists apartments available for students to rent- Inform.docx24- A data set lists apartments available for students to rent- Inform.docx
24- A data set lists apartments available for students to rent- Inform.docxgeney3
 
24) A strange species of plant called the Thingamabob wazoodle exhibit.docx
24) A strange species of plant called the Thingamabob wazoodle exhibit.docx24) A strange species of plant called the Thingamabob wazoodle exhibit.docx
24) A strange species of plant called the Thingamabob wazoodle exhibit.docxgeney3
 
24- We discussed that in HIV strains there is a correlation between vi.docx
24- We discussed that in HIV strains there is a correlation between vi.docx24- We discussed that in HIV strains there is a correlation between vi.docx
24- We discussed that in HIV strains there is a correlation between vi.docxgeney3
 
3 of the following are challenges that may result from Globalization f.docx
3 of the following are challenges that may result from Globalization f.docx3 of the following are challenges that may result from Globalization f.docx
3 of the following are challenges that may result from Globalization f.docxgeney3
 
2x1+x2x3-4x1x3-0x1+x2+x3-1.docx
2x1+x2x3-4x1x3-0x1+x2+x3-1.docx2x1+x2x3-4x1x3-0x1+x2+x3-1.docx
2x1+x2x3-4x1x3-0x1+x2+x3-1.docxgeney3
 
2UESTION 3 (15 MARKS- 27 MINUTES) Numerous items are missing from each.docx
2UESTION 3 (15 MARKS- 27 MINUTES) Numerous items are missing from each.docx2UESTION 3 (15 MARKS- 27 MINUTES) Numerous items are missing from each.docx
2UESTION 3 (15 MARKS- 27 MINUTES) Numerous items are missing from each.docxgeney3
 
2n-214181.docx
2n-214181.docx2n-214181.docx
2n-214181.docxgeney3
 
2G cellular network supports a- Analog voice b- Digital voice and anal.docx
2G cellular network supports a- Analog voice b- Digital voice and anal.docx2G cellular network supports a- Analog voice b- Digital voice and anal.docx
2G cellular network supports a- Analog voice b- Digital voice and anal.docxgeney3
 
292 Cagpter Tweile The Muscular Syatuw Aaid Mainla (b) Anterointeral v.docx
292 Cagpter Tweile The Muscular Syatuw Aaid Mainla (b) Anterointeral v.docx292 Cagpter Tweile The Muscular Syatuw Aaid Mainla (b) Anterointeral v.docx
292 Cagpter Tweile The Muscular Syatuw Aaid Mainla (b) Anterointeral v.docxgeney3
 
21-20- Which of the following statements about evolution and ecology i.docx
21-20- Which of the following statements about evolution and ecology i.docx21-20- Which of the following statements about evolution and ecology i.docx
21-20- Which of the following statements about evolution and ecology i.docxgeney3
 
22 -When restrictions are imposed by the client that significantly lim.docx
22 -When restrictions are imposed by the client that significantly lim.docx22 -When restrictions are imposed by the client that significantly lim.docx
22 -When restrictions are imposed by the client that significantly lim.docxgeney3
 
21- This type of magma erupts violently A- felsic B- mafic C- gas poor.docx
21- This type of magma erupts violently A- felsic B- mafic C- gas poor.docx21- This type of magma erupts violently A- felsic B- mafic C- gas poor.docx
21- This type of magma erupts violently A- felsic B- mafic C- gas poor.docxgeney3
 
21) The bacteriorhodopsin protein is a single polypeptide with seven a.docx
21) The bacteriorhodopsin protein is a single polypeptide with seven a.docx21) The bacteriorhodopsin protein is a single polypeptide with seven a.docx
21) The bacteriorhodopsin protein is a single polypeptide with seven a.docxgeney3
 
2-5 points Agile intercompany scope refers to a firms ability to achie.docx
2-5 points Agile intercompany scope refers to a firms ability to achie.docx2-5 points Agile intercompany scope refers to a firms ability to achie.docx
2-5 points Agile intercompany scope refers to a firms ability to achie.docxgeney3
 

Mais de geney3 (20)

3) What is the w of the onion cell when it reaches equilibrium with th.docx
3) What is the w of the onion cell when it reaches equilibrium with th.docx3) What is the w of the onion cell when it reaches equilibrium with th.docx
3) What is the w of the onion cell when it reaches equilibrium with th.docx
 
3- At the HRPA Conference- your company has been invited to make a pre.docx
3- At the HRPA Conference- your company has been invited to make a pre.docx3- At the HRPA Conference- your company has been invited to make a pre.docx
3- At the HRPA Conference- your company has been invited to make a pre.docx
 
3- A metabolic divorder that can be inharited was foumd to rovult from.docx
3- A metabolic divorder that can be inharited was foumd to rovult from.docx3- A metabolic divorder that can be inharited was foumd to rovult from.docx
3- A metabolic divorder that can be inharited was foumd to rovult from.docx
 
3- A metabolic disorder that can be inharited was foumd to rasult from.docx
3- A metabolic disorder that can be inharited was foumd to rasult from.docx3- A metabolic disorder that can be inharited was foumd to rasult from.docx
3- A metabolic disorder that can be inharited was foumd to rasult from.docx
 
3- (ES 1-0 3) The averuge nominat incomes earned in Euris and the CPI.docx
3- (ES 1-0 3) The averuge nominat incomes earned in Euris and the CPI.docx3- (ES 1-0 3) The averuge nominat incomes earned in Euris and the CPI.docx
3- (ES 1-0 3) The averuge nominat incomes earned in Euris and the CPI.docx
 
3) RNA is very important to protein synthesis! Explore the different r.docx
3) RNA is very important to protein synthesis! Explore the different r.docx3) RNA is very important to protein synthesis! Explore the different r.docx
3) RNA is very important to protein synthesis! Explore the different r.docx
 
24- A data set lists apartments available for students to rent- Inform.docx
24- A data set lists apartments available for students to rent- Inform.docx24- A data set lists apartments available for students to rent- Inform.docx
24- A data set lists apartments available for students to rent- Inform.docx
 
24) A strange species of plant called the Thingamabob wazoodle exhibit.docx
24) A strange species of plant called the Thingamabob wazoodle exhibit.docx24) A strange species of plant called the Thingamabob wazoodle exhibit.docx
24) A strange species of plant called the Thingamabob wazoodle exhibit.docx
 
24- We discussed that in HIV strains there is a correlation between vi.docx
24- We discussed that in HIV strains there is a correlation between vi.docx24- We discussed that in HIV strains there is a correlation between vi.docx
24- We discussed that in HIV strains there is a correlation between vi.docx
 
3 of the following are challenges that may result from Globalization f.docx
3 of the following are challenges that may result from Globalization f.docx3 of the following are challenges that may result from Globalization f.docx
3 of the following are challenges that may result from Globalization f.docx
 
2x1+x2x3-4x1x3-0x1+x2+x3-1.docx
2x1+x2x3-4x1x3-0x1+x2+x3-1.docx2x1+x2x3-4x1x3-0x1+x2+x3-1.docx
2x1+x2x3-4x1x3-0x1+x2+x3-1.docx
 
2UESTION 3 (15 MARKS- 27 MINUTES) Numerous items are missing from each.docx
2UESTION 3 (15 MARKS- 27 MINUTES) Numerous items are missing from each.docx2UESTION 3 (15 MARKS- 27 MINUTES) Numerous items are missing from each.docx
2UESTION 3 (15 MARKS- 27 MINUTES) Numerous items are missing from each.docx
 
2n-214181.docx
2n-214181.docx2n-214181.docx
2n-214181.docx
 
2G cellular network supports a- Analog voice b- Digital voice and anal.docx
2G cellular network supports a- Analog voice b- Digital voice and anal.docx2G cellular network supports a- Analog voice b- Digital voice and anal.docx
2G cellular network supports a- Analog voice b- Digital voice and anal.docx
 
292 Cagpter Tweile The Muscular Syatuw Aaid Mainla (b) Anterointeral v.docx
292 Cagpter Tweile The Muscular Syatuw Aaid Mainla (b) Anterointeral v.docx292 Cagpter Tweile The Muscular Syatuw Aaid Mainla (b) Anterointeral v.docx
292 Cagpter Tweile The Muscular Syatuw Aaid Mainla (b) Anterointeral v.docx
 
21-20- Which of the following statements about evolution and ecology i.docx
21-20- Which of the following statements about evolution and ecology i.docx21-20- Which of the following statements about evolution and ecology i.docx
21-20- Which of the following statements about evolution and ecology i.docx
 
22 -When restrictions are imposed by the client that significantly lim.docx
22 -When restrictions are imposed by the client that significantly lim.docx22 -When restrictions are imposed by the client that significantly lim.docx
22 -When restrictions are imposed by the client that significantly lim.docx
 
21- This type of magma erupts violently A- felsic B- mafic C- gas poor.docx
21- This type of magma erupts violently A- felsic B- mafic C- gas poor.docx21- This type of magma erupts violently A- felsic B- mafic C- gas poor.docx
21- This type of magma erupts violently A- felsic B- mafic C- gas poor.docx
 
21) The bacteriorhodopsin protein is a single polypeptide with seven a.docx
21) The bacteriorhodopsin protein is a single polypeptide with seven a.docx21) The bacteriorhodopsin protein is a single polypeptide with seven a.docx
21) The bacteriorhodopsin protein is a single polypeptide with seven a.docx
 
2-5 points Agile intercompany scope refers to a firms ability to achie.docx
2-5 points Agile intercompany scope refers to a firms ability to achie.docx2-5 points Agile intercompany scope refers to a firms ability to achie.docx
2-5 points Agile intercompany scope refers to a firms ability to achie.docx
 

Último

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 

Último (20)

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 

3- Consider the following recursive algorithm for computing the sum of.docx

  • 1. 3. Consider the following recursive algorithm for computing the sum of the first n cubes: S ( n ) = 1 3 + 2 3 + + n 3 . Algorithm S ( n ) //Input: A positive integer n //Output: The sum of the first n cubes if n = 1 return 1 else return S ( n 1 ) + n n n a. Set up and solve a recurrence relation for the number of times the algorithm's basic operation is executed. b. How does this algorithm compare with the straightforward nonrecursive algorithm for computing this function? Hints: - This problem is not asking to calculate the sum S ( n ) (the algorithm does that!). Do not use the summation formulas for cubes in App. A 1 ! The problem is asking to calculate only the number of basic operations executed - a much simpler sum. - Take the basic operation to be the multiplication. Write the recursion. Solve by backsubstitution.