6) There are other recursive functions such as the Lucas Sequence, how can you apply what you have learned to it? a) Iteratively computation b) Recursive computation c) Recursive computation with dynamic programming.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

c++

question #6 part A,B,C

 

if you cannot do all, I'd really appreciate it you can prioritize part C. I really need help please and thanks. 

Study the Fibonacci number sequence in the following forms: (1) iterative (sequential), (2) recursive, (3)
and closed form solution.
1) Examine the theoretical measure of time complexity of each.
a) Using theory compare the number of operations and time taken to compute Fibonacci numbers
recursively versus that needed to compute them iteratively.
b) How many prime Fibonacci numbers are there, and how many can you find?
c) Find the smallest Fibonacci number > 1,000,000
d) Find the smallest Fibonacci number > 1,000,000,000
2) Implement each Fibonacci form (1, 2, and 3 see above) in the C++ language (C++ 17).
Write four functions:
a) An iterative function that accepts a non-negative integer n and returns the nth Fibonacci number.
b) A recursive function that inputs a non-negative integer n and returns the nth Fibonacci number.
c) An improved recursive function that employs dynamic programming to improve the efficiency.
d) The closed form of the Fibonacci sequence (be sure to reference the golden ratio)
3) Using your software, compute a set of Fibonacci numbers employing the four techniques (c.f. 2, above);
for example, use n: {10, 15, 40, 41, 42, 50, 60, 100, 500, 600}.
a) Measure the time for each computation-send the results to a file.
* Recommend using the Chrono library from C++
b) Make certain you have "sufficient" data for convincing results.
4) Import your data (from 3) to excel for easy graphing
5) Compare the theoretical curves of Big-O with the empirical results.
a) Try running on machines with [significantly] different speeds.
b) Compare methods to answer the find an answer to question 1.c, above.
6) There are other recursive functions such as the Lucas Sequence, how can you apply what you have
learned to it?
a) Iteratively computation
b) Recursive computation
c) Recursive computation with dynamic programming.
Transcribed Image Text:Study the Fibonacci number sequence in the following forms: (1) iterative (sequential), (2) recursive, (3) and closed form solution. 1) Examine the theoretical measure of time complexity of each. a) Using theory compare the number of operations and time taken to compute Fibonacci numbers recursively versus that needed to compute them iteratively. b) How many prime Fibonacci numbers are there, and how many can you find? c) Find the smallest Fibonacci number > 1,000,000 d) Find the smallest Fibonacci number > 1,000,000,000 2) Implement each Fibonacci form (1, 2, and 3 see above) in the C++ language (C++ 17). Write four functions: a) An iterative function that accepts a non-negative integer n and returns the nth Fibonacci number. b) A recursive function that inputs a non-negative integer n and returns the nth Fibonacci number. c) An improved recursive function that employs dynamic programming to improve the efficiency. d) The closed form of the Fibonacci sequence (be sure to reference the golden ratio) 3) Using your software, compute a set of Fibonacci numbers employing the four techniques (c.f. 2, above); for example, use n: {10, 15, 40, 41, 42, 50, 60, 100, 500, 600}. a) Measure the time for each computation-send the results to a file. * Recommend using the Chrono library from C++ b) Make certain you have "sufficient" data for convincing results. 4) Import your data (from 3) to excel for easy graphing 5) Compare the theoretical curves of Big-O with the empirical results. a) Try running on machines with [significantly] different speeds. b) Compare methods to answer the find an answer to question 1.c, above. 6) There are other recursive functions such as the Lucas Sequence, how can you apply what you have learned to it? a) Iteratively computation b) Recursive computation c) Recursive computation with dynamic programming.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY