Reference no: EM133548720
Question: The Fibonacci sequence of numbers is defined as follows: The first and second numbers are both 1. After that, each number in the sequence is the sum of the two preceding numbers. Thus, the Fibonacci sequence is as follows:
1, 1, 2, 3, 5, 8, 13, 21, ...
If F(n) stands for the nth value in the sequence, then this definition can be expressed as
F(1) = 1
F(2) = 1
F(n) = F(n - 1) + F(n - 2) for n > 2
The value of F at position n is defined using the value of F at two smaller positions. Something that is defined in terms of "smaller versions" of itself is said to be recursive, so the Fibonacci sequence is recursive. Using the definition of the Fibonacci sequence, compute the value of F(20).
A formula for F(n) is
Using the formula (and a calculator), compute the value of F(20).
What is your opinion on the relative clarity, elegance, and efficiency of the two algorithms (using the definition and using the formula) to compute F(20)? Would your answer change if you considered F(100)?
If you have access to a spreadsheet, program it to compute successive values of the Fibonacci sequence. (Hint: Enter 1 in cells A1 and B1, and enter = A1 + B1 in cell C1. Continue along row 1 with a similar formula.) Use this method to compute F(20).
Elsewhere on the same spreadsheet, use one cell to enter the value of n, and another cell to enter the formula from part (b) above. (Hint: you will need the squareroot function and the power function.) Use this method to compute F(20).
On your spreadsheet, use both methods to compute F(50). Which appears to be more efficient?
Explain the controversy of establishing a court system
: Explain the controversy of establishing a court system at the creation of the U.S. Constitution. Your responses must include the major elements
|
How would you include on the erd the need to represent
: How would you include on the ERD the need to represent the date on which a patient is admitted for each time he or she is admitted
|
How would you as the leader ensure that all cultures
: Are leadership visions for organizations inadequate if not shared with constituents? What are the implications associated with sharing, or not sharing
|
How would utilitarian ethics respond, and why
: How would utilitarian ethics respond, and why? How would Kantian ethics respond, and why? which side, if either, has the most rational and well-argued position
|
What is your opinion on the relative clarity
: What is your opinion on the relative clarity, elegance, and efficiency of the two algorithms (using the definition and using the formula) to compute F(20)
|
Discuss the parts of the social ecology theory
: Discuss the parts of the Social Ecology Theory and its relationship with the Broken Windows what it means for improving a neighborhood
|
Design the fsm as a moore fsm
: Design the FSM as a Moore FSM. Use one-hot encoding and a minimum number of states. Show all of your work, including your final schematic
|
What were some of the presumptions in the educational system
: what were some of the presumptions in the educational system that the authors referenced, and how might these sorts of presumptions relate
|
Create er diagrams for the given scenarios
: Create (E) ER diagrams for the following scenarios. (E)ER implies that superclass-subclass relationship may or may not be represented in the model
|