Question: Perform the requested steps, and display your work in a clear and comprehensive manner. Provide details in the following order: - Standard title page -

Perform the requested steps, and display your work in a clear and comprehensive manner. Provide details in the following order:
- Standard title page
- Two algorithms (2 marks)
- Two source codes and four outputs for \(\mathrm{n}=7\)(3 marks)
- Two tables for \(\mathrm{n}=1,2,4,6,8\)(1 mark)
- Detailed analysis (3 marks)
- Algorithm or description of the solution with complexity analysis (3 marks)
Background
The following background information is necessary to complete this assignment:
1. A sequence that grows quite rapidly (\( F_{100}\) is a 21-figure number) is the Fibonacci sequence [text/p.26,687], defined on non-negative integers by the following recurrence:
This famous sequence was originated in 1202 by Leonardo Pisano (Leonardo of Pisa) who sometimes is called Leonardo Fibonacci (Filius Bonaccii, son of Bonaccio).
2. A first indication of the intimate connections between \( F_{n}\) and algorithms came to light in 1844 when \( G \). Lam used the Fibonacci sequence to study the efficiency of Euclid's GCD Algorithm to compute the Greatest Common Divisor (GCD) of two positive integers. During the next 50 years, the mathematician E. Lucas obtained very profound results about the Fibonacci numbers, and in particular, he used them to prove that the 39-digit number \(2^{127-1}\) is prime. Lucas gave the name "Fibonacci numbers" to the sequence \( F_{n}\) and that name has been used ever since.
3. A number of recursive algorithms (e.g., Algorithm 1.4 on p.12; Exercise C 1.30 on p.53; Algorithm 2.19 on p.80; Algorithms preorder, postorder, and inorder in Chapter 2; Algorithm BottomUpHeap on p.109; Algorithm BinarySearch on p.143; Algorithm inPlaceQuickSort on p.248; Divide-and-conquer technique on p.219 and p.263; etc.) have been discussed. Recursive algorithms are particularly appropriate when the underlying problem is defined in recursive terms. However, this does not mean that such recursive definitions guarantee that a recursive algorithm is the best way to solve the problem.
4. Consider a recurrence relation like the Fibonacci series:
\(\mathrm{T}_{0}=\mathrm{T}_{1}=2\)
\( T_{n}=2* T_{n-1}* T_{n-2}\), for \( n>1\)
5.\( T_{n}\) can be computed recursively. Requested Steps
1. Write recursive and dynamic programming algorithms to compute \(\mathrm{T}_{\mathrm{n}}\). Call them Algorithm Recur1 and Algorithm Recur2.
2. Convert these algorithms to properly documented, professional quality programs. Call the programs RecurP1 and RecurP2, respectively. In the heading documentation-in addition to your name, student ID number, and course code-clearly state the language, editor, compiler, operating system, and computer used.
3. By executing programs RecurP1 and RecurP2, print Numbers \(\mathrm{T}_{0}\) to \(\mathrm{T}_{7}\) to demonstrate that both programs produce correct results. Generate properly-labelled outputs. Remember that \(\mathrm{T}_{0}=\mathrm{T}_{1}=2\).
4. Try running both programs for \( n=1,2,4,6,8\). You will start to notice something important from the viewpoint of computing science. Keep in mind the largest possible integer that can be represented on a 32-bit and 64-bit computer system. Use the internal clock to record the time to run each case.
5. Tabulate your results-specifically, \( n \) versus result versus time-from the previous step into two tables: one for RecurP1 and the other for RecurP2.
6. Analyze your algorithms and results, making sure to provide a detailed critical evaluation, from the viewpoint of "algorithm design and analysis" based on the above table. Include comments on the accuracy of your results. Use graphs or any other enhancements to support your analysis.
7. Assume an integer array A contains \( n \) positive and negative numbers. Using dynamic programing, write an algorithm for finding a contiguous subset of numbers \( A[i]\ldots A[j](i
Perform the requested steps, and display your

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!