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

  Creating an hierarchy chart

Regal Brakes Corporation requires to automate its payroll calculation system. To compute payroll, first the gross pay is calculated, which is equal to the item of the number of hours and hourly rates.

  Finding page faults for lru replacement algorithms

How many page faults would happen for the given replacement algorithms, assuming one, two, three, and four frames?

  Algorithm to decide flavor of ice cream

A group of ten people need to decide which one flavor of ice cream they will all order, out of three options. The algorithm can question and re-question the participants, and present the answers to the participants.

  Define wan and provide an example of typical wan setup

Define a WAN and provide an example of a typical WAN setup and describe the components. Provide a picture, chart, or image if possible.

  Find the weight range of normal onion bags

A packaging equipment is used to put onions into five pound bags. In fact the weights vary according to the normal distribution with expected price of average µ = 5.01 lb and standard deviation s = 0.05 lb.

  Creating the flowchart for the decision structure

A telephone corporation service plan charges twenty-five cents for each call made. In addition, it charges five cents a minute for all calls made to a phone number that has a service plan with the corporation.

  Efficient algorithm to achieve goal using few base stations

Certain points along the road, so that every house is within four miles of one of the base stations. Give an efficient algorithm that achieves this goal using as few base stations as possible.

  Create the entity relationship diagram

Create the entity relationship diagram for your project database based on the initial data requirements.

  Divide-and-conquer two-dimensional closest-pair algorithm

consider the version of the divide-and-conquer two-dimensional closest-pair algorithm in which, instead of presorting input set P, we simply sort each of the two sets Pl and Pr in nondecreasing order of their y coordinates on each recursive call

  Possible external-memory map implementation

Another possible external-memory map implementation is to use a skip list, but to collect consecutive groups of  O ( B ) nodes, in individual blocks, on any level in the skip list

  Creating a big inteter calculator program

Create a big-inteter calculator program that permits the user to enter two large integers and the operation to be performed and that calls appropriate function to carry out the designated operation.

  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.

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