What is your opinion on the relative clarity

Assignment Help Computer Engineering
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?

Reference no: EM133548720

Questions Cloud

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

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd