The number of data items being manipulated

Assignment Help Operating System
Reference no: EM13166157

Each of the following are formulas for the number of operations in some algorithm. Express each formula in big-O notation.

  • n2 + 5n
  • 3n2 + 5n
  • (n + 7 )(n - 2)
  • 100n + 5
  • 5n + 3n2
  • The number of digits in 2n?
  • The number of times that n can be divided by 10 before dropping below 1.0?

2. Determine which of the following formulas is O(n):

  • 16n3
  • n2 + n +2
  • Ln2/2
  • 10n + 25

3. List the following formulas in order of running time analysis, from greatest to least time requirements, assuming that n is very large:

n2 + 1; 50 log n; 1,000,000; 10n + 10,000

4. Do a big O analysis for those statements inside each of the following nested loop constructs.

a. for ( k = 0; k < n; ++k)

for ( j = 6; j < n; ++j)

{

...

}

b. for ( k = 0; k < n; ++k)

{

j = n;

while ( j > 0)

{

...

j / = 2; // integer division

}

}

c. k =1;

do

{

j = 1;

do

{

   ...

j * = 2;

}

while ( j < n );

++k;

}

while ( k < n );

5. Suppose that each of the following expressions represents the number of logical operations in an algorithm as

a function of n, the number of data items being manipulated. For each expression, determine the dominant term and then classify the algorithm in big-O terms.

  • n3 + n2 log2 n + n3log2n
  • n + 4n2+ 4n
  • 48n4 + 16n2 + log8 n +2n

6. Consider the following nested loop construct. Categorize its efficiency in terms of the variable n using big-O

notation. Suppose the statements represented by the ellipsis require four main memory accesses (each

requiring one microsecond) and two disk file accesses (each requiring one microsecond). Express in

milliseconds the amount of time this construct would require to execute if n were 1000.

x = 1;

do

{

y = n;

while ( y > 0 )

{

....

--y;

}

x * = 2;

}

while ( x < n * n );

Reference no: EM13166157

Questions Cloud

Converts the temperature f in farenheit to c in celsius : Write a program that converts the temperature F in Farenheit to C in Celsius using C = (F-32)*5/9. For ease of programming you can display the result in fractions.
Hemispheric specialization than a paralegal : An office worker's personal differences may specialization in right and left hemispheres and are related to occupational success? For example, might a designer who relies on spatial skills have a different pattern of hemispheric specialization than a..
Propose stepwise sythesis starting from benzene : Propose stepwise sythesis of 2-cholor-4-nitrobenzoic acid starting from benzene
What is overloading and what is overriding : What is overloading and what is overriding? Wrtie JAVA code code to explain it.
The number of data items being manipulated : A function of n, the number of data items being manipulated. For each expression, determine the dominant term and then classify the algorithm in big-O terms.
State what is the molar solubility of caco3 : If the pH is buffered at 8.2 (as is historically typical for the ocean), what is the molar solubility of CaCO3? F) If the pH is buffered at 7.5, what is the molar solubility of CaCO3?
Environmental elite : In the early 1970s, the environment became the focus of enormous media attention. At least some of the problems were real, if often exaggerated. Untreated sewage was being discharged into coastal estuaries. Toxic runoff from farms and factories was k..
Create a computer class : Create a computer class and assume computers have the following fields: String manufacture, double price, int year
Compute the molar solubility of caco3 : Calculate the molar solubility of CaCO3 ( Ksp = 4.5*10-9) neglecting the acid-base character

Reviews

Write a Review

Operating System Questions & Answers

  Testing a motherboard

Assume you wish to test a motherboard used in an installation before you proceed too far into the installation. From the devices listed below, choose the minimum devices

  Protecting the company data

Suppose you work for a small, one office loan business. Your data is critical, and a fire or other disaster could destroy all of your computer documents.

  Multiplexor and demultiplexor?

statistical time division multiplexing with 24 stations inputting data at 9600 bps, and assuming that only 60 percent of those stations transmit at one time, what is the minimal speed necessary for the high speed link connecting multiplexor and demul..

  Define cache and its purpose

Describe what a cache is and what its purpose is. Also explain what data gets placed into the cache, and when it is put there.

  Question about processing packets

A CPU in a router can procedure two million packets/sec. The load offered to it is 1.5 million packets per sec. If the route from source to destination contains ten routers

  Database statistics

In an RDBMS, how are the three phases parsing, execution, and fetching carried out? In general, in which phase would you tune a database? Determine database statistics and why are they important.

  Header fields in the ipv4 and ipv6 protocols

Compare the header fields in the IPv4 and IPv6 protocols. Explain strategies for converting IPv4 packets to IPv6 packets in a hybrid IP network.

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Explain the concepts of consumable and reusable resources

Explain the concepts of consumable and reusable resources

  Identify various hardware components and network topologies

VaryNet Corporation wishes to create 4-individual offices across the globe. They wish to be able to connect these offices over the internet, and they want to make sure that each network is available to each other,

  Question about software and staff training

As was stated before, the corporation X is going to expand its data system. To do this, it is going to choose and buy new hardware and software and retrain workers.

  Find the sizes of the tag, block and word fields

Assume that a computer using direct mapped cache has 2^24 words of main memory and a cache of sixty-four blocks, where each cache block contains sixteen words.

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