A and b, both of which perform the same function

Assignment Help Data Structure & Algorithms
Reference no: EM13168070

Assume you have two algorithms, A and B, both of which perform the same function,

although their implementations differ. Assume that algorithm A has a running time of O(N3 + 2N2
+ 6N + 3) and algorithm B has a running time of O(6N2 + 4N + 10). Also assume that the value of
N is restricted to the set of Natural numbers, including 0; i.e., {0, 1, 2, 3, ...}. Answer the following
questions:


a. Assuming the test conditions are equal for both algorithms, which algorithm should be most
efficient when N is arbitrarily large (i.e., you can choose N to be as large as you want it to
be)?


b. Assuming the test conditions are equal for both algorithms, which algorithm should be most
efficient when N is arbitrarily small (i.e., you can choose N to be as small as you want it to
be)?


c. Assuming the test conditions are equal for both algorithms, at what value of N might both
algorithms be expected to operate with the same efficiency?

 

 

Reference no: EM13168070

Questions Cloud

Reflect upon the it strategies : Reflect upon the IT strategies that are used to encourage economic development. Select two strategies and discuss how economic factors affect the strategies that a government may use to facilitate economic development.
What provided the added kinetic energy : What provided the added kinetic energy?   None of these is correct. the momentum of the platform the man moving the weights further away from his body the man pulling the weights closer to his body
State bromine can form compounds or ions with any number : Bromine can form compounds or ions with any number of fluorine atoms from one to five. Write the formulas of all five of these species
State what is the equilibrium constant for the reaction : What is the equilibrium constant for the reaction N2(g) + 3 H2(g) ?? 2 NH3(g) at this temperature?
A and b, both of which perform the same function : Assume you have two algorithms, A and B, both of which perform the same function,
Compute the amount of heat energy required to convert : Calculate the amount of heat energy required to convert 55.0 g of water at 62.5 degrees Celsius to steam at 124.0 degrees Celsius
Write a program that reads in a text file and then computes : Write a program that reads in a text file and then computes and prints a table of letter frequencies. For example, if the file is the text of "A Tale of Two Cities", found in the file at data/tales.txt , the program will print
Initialized the array of words by an assignment statement. : modify the following program . The program from Lab 4 initialized the array of words by an assignment statement.
There are four conditions that are necessary : There are four conditions that are necessary for a deadlock to occur. Give an example to show that these conditions are not sufficient for a resource deadlock to occur. When are these conditions sufficient for a resource deadlock to occur? Explain..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Write algorithm which divides n objects of u into k clusters

Suggest the algorithm which divides n objects of U into k clusters, making use of MST of a graph. Give a simple argument of correctness and bound on the running time of the algorithm you are proposing.

  Explain consensus algorithm

"Consensus algorithm": A group of ten people need to decide which one flavor of ice cream they will all order, out of three options.

  Data structures used to organize typical file cabinet

Recognize at least two data structures which are used to organize typical file cabinet. Why do you feel it is essential to emulate these types of data structures in computer program?

  Estimate cost of multi phase multiway merge sort

Find out number of phases needed, and estimate cost of Multi Phase Multiway Merge Sort. Write all BCNF violations. Decompose relations, as essential, into collections of relations whic hare in BCNF.

  The radix sort algorithm

Show what happens to the radix sort algorithm if the counting sort is not a stable sorting algorithm. Bring a counter example

  Creating a random file of the signs

Create a random file of the signs of all angles from zero degrees to ninety degrees. Make every entry accurate to three places. Write a program that will show the sign of any angle typed on the keyboard.

  Documentation and proper design procedures

Determine the main reason that make many developers skip over the documentation and proper design process? As a manager, discuss how do you ensure that the proper database design process are followed by database development teams?

  What is the worst case of avl tree?

the binary tree can look like a linked list in the worst case. What is the worst case of AVL tree? To get an idea, do the following: What is the minimum # of nodes in each of the AVL trees with heights 2, 3, 4, and 5?Explain please.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Draw the recursive process of mergesort and quicksort

Draw the recursive process of Mergesort and Quicksort for sorting the sequence {5, 1, 2, 9, 7}. You will get a recursion tree for Mergesort and Quicksort respectively. What are their depths?

  What are entity-relationship diagrams

What are entity-relationship diagrams, and how are they used? Discuss the ethical issues to consider when planning a database.

  Adopting agile development methodologies

Relative advantages are the degree to which a new technology is perceived to be superior to current technology. An company is more likely to adopt new technology when it perceives greater relative

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