Write about your observations on timing measurements

Assignment Help Computer Engineering
Reference no: EM132121139

Referring to the slides from text book, Chapter 5, there are two versions of Fibonacci number calculators:

BinaryFib(n) and LinearFibonacci(n).

The first algorithm has exponential time complexity, while the second one is linear. In this programming assignment, you will implement in Java both the versions of Fibonacci calculators and experimentally compare their runtime performances.

For that, with each implemented version you will calculate Fibonnaci (5), Fibonacci (10), etc. in increments of 5 up to Fibonacci (100) (or higher value if required for your timing measurement) and measure the corresponding run times. You need to use Java's built-in time function for this purpose.

You should redirect the output of each program to an out.txt file. You should write about your observations on timing measurements in a separate text or pdf file.

You are required to submit the two fully commented Java source files, the compiled executables, and the text/pdf files. Briefly explain why the first algorithm is of exponential complexity and the second one is linear (more specifically, how the second algorithm resolves some specific bottleneck(s) of the first algorithm).

You can write your answer in a separate file and submit it together with the other submissions. Do any of the previous two algorithms use tail recursion? Why or why not? Explain your answer.

If your answer is "No" then design the pseudo code for a tail recursive version of Fibonacci calculator; implement the corresponding Java program and repeat the same experiments as in part (a) above.

You will need to submit both the pseudo code and the Java program, together with your experimental results. Submit all your answers to written questions in PDF or text formats only.

For the Java programs. you must submit the source files together with the compiled executables. The solutions to all the questions should be zipped together into one .zip file and submitted via EAS (Refer to the course outline for more details on submission guidelines).

Reference no: EM132121139

Questions Cloud

The difference between multivalued and composite attribute : What is the difference between multivalued and composite attribute? Explain with Example.
Explain briefly what is a pixel : Regarding terminology for the quality of a picture, explain briefly What is a pixel? What is color depth?
Summarize the methodologies you used for your system : Summarize your selected software system to provide context for your colleagues. Summarise the methodologies you used for your system.
Difference between virtual memory and a memory map : What is the relation between virtual memory, a memory map, physical memory and swapping to secondary memory?
Write about your observations on timing measurements : You should redirect the output of each program to an out.txt file. You should write about your observations on timing measurements in a separate text or pdf fil
How you are going to control the loading of this register : Register design A CPU register is simply a row of flip-flops (i.e. SR, JK, T, etc) put side by side in an array to make the size of register required.
What are static variables and instance variables : What is constructor? the purpose of default constructor?What are static variables and instance variables?
Identifies the key features of the organization : M5A3 Research Project - Write a short paper that identifies the key features of the organization's performance management system
Identify the primary key for each table : A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a sparc assembly language routine that stores sequence

Write a SPARC assembly language routine that stores the sequence of words 0, 2, 4, 6, 8, 10, 12, 14, 16 into memory, beginning at address 30001-1.

  What is the difference between a station and a node

What is the difference between a station and a node? What are the main characteristics of a circuit switched network? What are its advantages and disadvantages?

  Explain the malware effects on a machine

Describe the best practice to employ to mitigate malware effects on a machine. The response must be typed, single spaced.

  Why information sharing can be positive or detrimental

Assume the role of a particular critical infrastructure company, and write a paper on how or why information sharing can be positive or detrimental.

  Develop a program that used to determine election results

Develop a program that could be used to determine election results for a town. Assume that the town is divided into a number of precincts.

  Why to prepare a powerpoint presentaion

Are there any Websites that details the attributes of an effective PowerPoint presentation. Also what in your opinion would be one or two "best practices".

  Why would attackers scan systems and networks

Why would attackers scan systems and networks? Why would security analysts scan systems and networks?

  Draw a hypothetical game tree with branching factor

CSCI 5430 Artificial Intelligence Assignment - Draw a hypothetical game tree with branching factor at most 3 and at most 4 plies fora fully observable, turn-taking, zero-sum game between two perfectly rational players MAX and MIN.

  What is the value of x instance of object

Why don't we simply store all objects in variables of type Object? Assuming that x is an object reference, what is the value of x instance of Object?

  Briefly explain explanatory and predictive analytics

What is the purpose of the GROUPING SETS subclause and what is its primary use? What is data analytics? Briefly explain explanatory and predictive analytics.

  Questionyou are working on a project to increase an

questionyou are working on a project to increase an intranet and several people are confused about who requests to do

  Questionconsider an adt called squarematrix the matrix can

questionconsider an adt called squarematrix. the matrix can be represented by a two-dimensional array of integers with

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