Which algorithm should be most efficient

Assignment Help Data Structure & Algorithms
Reference no: EM13696576

Question: 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 suppose that the value of N is restricted to the set of Natural numbers, including 0; i.e., {0, 1, 2, 3, ...}.

Answer the subsequent questions:

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

Part 2: 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)?

Part 3: 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?

Solve these parts in details and provide examples to support your rationale.

Reference no: EM13696576

Questions Cloud

Should the cio or cto report to the company president : Contact at least three people at your school or a nearby company who use information systems. List the systems, the position titles of the users, and the business functions that the systems support.
Sum of all odd numbers between a and b : The sum of all odd numbers between a and b (inclusive). Where a and b are read in by the user - Can you find the error in this code.
Represent 99 and -99 in 2s complement format : what are the largest(positive) and smallest (negative) integers a word can represent - Represent 99 and -99 in 2's complement format.
Determine the precise big-oh values : Determine the precise Big-Oh values for each of the following code samples, based on the number of statement executions - Remember to consider each statement in compound statements separately.
Which algorithm should be most efficient : the test conditions are equal for both algorithms, which algorithm should be most efficient when N is arbitrarily large (i.e., you can select N to be as large as you want it to be)?
Prepare an app that calculates the product of a series : Prepare an app that calculates the product of a series of integers that are passed to method   product using a variable-length argument list.
Translate the given code into mips64 assembly language : you can use the instructions 'blt' (branch on less than), 'ble' (branch on less or equal), 'bgt' (branch on greater than) and 'bge' (branch on greater or equal) - Translate the given code into MIPS64 assembly language.
Write a statement that prints the message recall : Clunker Motors Inc. is recalling all vehicles from model years 1995-1998 and 2004-2006. Given a variable modelYear - Write a statement that prints the message "Recall" to standard output if the value of modelYear falls within those two ranges.
Learn as much as possible about that ip address : Using tools that are freely available in the Web, learn as much as possible about that IP address (Domain name, owner, physical location, address, etc.)

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Write down a pseudocode version of the smart bubble sort

question a write a pseudocode version of the smart bubble sort algorithm.question b perform a smart bubble sort on the

  Find the price of the pizza per square inch

Given the radius, in inches, and price of a pizza, design an algorithm to find the price of the pizza per square inch.

  Algorithm to categorize problem using big-theta notation

Find a simple algorithm for solving following problem and categorize it using big-theta notation: Divide the group of people into two disjoint subgroups (of arbitrary size) such that difference in total ages.

  Describe the use of a binary tree when searching for keys

question 1 discuss the use of a binary tree when searching for keys in an array. question 2 discuss the use of a binary

  How long would it take to fill the available storage space

How many cells can be in a computer's main memory if each cell's address can be represented by two hexadecimal digits? What if four hexadecimal digits are used? Explain your answer.

  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

  Find cost of sorting the relation in seconds

Suppose you need to sort a relation of 40 gigabytes, with 4 kilobyte blocks, using a memory size of 40 megabytes. Find the cost of sorting the relation, in seconds, with bb = 1 and with bb = 100.

  Create a program that reads product number and prices

The Rinky Dooflingy Corporation produces different kinds of doofingies, each identified b a product number. Create a program that reads product number and rates and stores these values in two arrays,

  Terminate the linked list properly

Define a struct which has exactly 5 variables that, for one person, will hold the last name, the "other" names. the-year-took-office. the-yew-left-office, and a pointer. The pointer will be used to point to the next set of data. for the next perso..

  Create a program using c++

Create a program using C++ or Java that will automatically generate x numbers between a range provided by the user? For purposes of this project, the range can be 1-20 and store them in an array.

  Explain compression algorithms are often used in forensics

"Compression algorithms are often used in forensics. Suppose you are involved in a case and have been asked by the lawyer to explain, in general terms.

  Yaou will now look at stacks and queues using linked lists

you will now look at stacks and queues using linked lists. complete the following for this assignment1 create a

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