1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dimaraw [331]
3 years ago
6

The running time of Algorithm A is (1/4) n2+ 1300, and the running time of another Algorithm B for solving the same problem is 1

12n − 8. Assuming all other factors equal, at what input size(s) would we prefer one algorithm to the other?
Computers and Technology
1 answer:
Mnenie [13.5K]3 years ago
8 0

Answer:

Answer is explained below

Explanation:

The running time is measured in terms of complexity classes generally expressed in an upper bound notation called the big-Oh ( "O" ) notation. We need to find the upper bound to the running time of both the algorithms and then we may compare the worst case complexities, it is also important to note that the complexity analysis holds true (and valid) for large input sizes, so, for inputs with smaller sizes, an algorithm with higher complexity class may outperform the one with lower complexity class i.e, efficiency of an algorithm may vary in cases where input sizes are smaller & more efficient algorithm might be outperformed by the lesser efficient algorithms in those cases.

That's the reason why we consider inputs of larger sizes when comparing the complexity classes of the respective algorithms under consideration.

Now coming to our question for algorithm A, we have,

let F(n) = 1/4x² + 1300

So, we can tell the upper bound to the function O(F(x)) = g(x) = x2

Also for algorithm B, we have,

let F(x) = 112x - 8

So, we can tell the upper bound to the function O(F(x)) = g(x) = x

Clearly, algorithmic complexity of algorithm A > algorithmic complexity of algorithm B

Hence we can say that for sufficiently large inputs , algorithm B will be a better choice.

Now to find the exact location of the graph in which algorithmic complexity for algorithm B becomes lesser than

algorithm A.

We need to find the intersection point of the given two equations by solving them:

We have the 2 equations as follows:

y = F(x) = 1/4x² + 1300 __(1)

y = F(X) = 112x - 8 __(2)

Let's put the value of from (2) in (1)

=> 112x - 8 = 1/4x² + 1300

=> 112x - 0.25x² = 1308

=> 0.25x² - 112x + 1308 = 0

Solving, we have

=> x = (112 ± 106) / 0.5

=> x = 436, 12

We can obtain the value for y by putting x in any of the equation:

At x=12 , y= 1336

At x = 436 , y = 48824

So we have two intersections at point (12,1336) & (436, 48824)

So before first intersection, the

Function F(x) = 112x - 8 takes lower value before x=12

& F(x) = 1/4x² + 1300 takes lower value between (12, 436)

& F(x) = 112x - 8 again takes lower value after (436,∞)

Hence,

We should choose Algorithm B for input sizes lesser than 12

& Algorithm A for input sizes between (12,436)

& Algorithm B for input sizes greater than (436,∞)

You might be interested in
Which was the first wiki based website
stira [4]
WikiWikiWeb was the first made by <span>Cunningham.</span>
5 0
3 years ago
Read 2 more answers
After clicking the Start button on your computer screen desktop, what option would you then select to examine system components
Gekata [30.6K]
Cacky fart face diareaah and farts= mc2 because  youfhvh h h h hh h h hh h h h h hh h h hh h hh h h snd that is the answer rk rjhd wkesryn
8 0
3 years ago
After troubleshooting a problem,you decide that the wireless card has failed in a laptop. What do u do first before you disassem
san4es73 [151]
Verify the network card configuration, as possible it’s due to misconfiguration and can be fixed by re-configure properly.
3 0
4 years ago
Read 2 more answers
Why communication sattelites are in geosynchronous orbit?
madam [21]

Answer:

Communication satellites are in geosynchronous orbit as, orbits are above the equator directly in the earth where the eccentricity is zero in the orbit and the objects which are geostationary are visible motionless in the sky of the earth. So, that is why, the orbit contain artificial satellite and the satellite distance are varying by the longitude.

4 0
3 years ago
Explain the information processing cycle and give examples
strojnjashka [21]
Information processing cycle - Computer Definition. The sequence of events in processing information, which includes (1) input, (2) processing, (3) storage and (4) output. The input stage can be further broken down into acquisition, data entry and validation.

That's all I got. Hope that helped a little (:
5 0
4 years ago
Other questions:
  • 7. Glaciers have two types of deposition. Define them below:
    6·1 answer
  • When do posts on social media networks disappear? A. After 5 years B. Once you've posted enough where it's too far to scroll bac
    5·2 answers
  • Windows uses a memory-management technique known as ________ to monitor which applications you use most frequently and then prel
    8·1 answer
  • PLEASE help me RIGHT NOW!!!!!!!!! I will give a Brainly to anyone who helps me!
    15·1 answer
  • A school’s administration stores the following data for each student in an online system: name, class, and five electives. Selec
    12·1 answer
  • E-What is the important of Recycle bin?<br>Ans:​
    12·1 answer
  • Why do we need to know the different Networking Devices?​
    10·1 answer
  • What was the name of the first personal computer and what year was it introduced
    7·1 answer
  • Select the correct answer from each drop-down menu.
    13·1 answer
  • Question #4
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!