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
A _____ software system determines the steps needed to produce components and instructs the machines that do the work.
konstantin123 [22]

Answer:

A computer-aided manufacturing or (cam) software system

Explanation:

Hope I could help :)

8 0
3 years ago
Tuple in Python code help pleaseee!!! And of course I'll make you as Branlist
GuDViN [60]

<u>Question 9:</u>

The correct answer would be either (b) or (d).

<u>Question 10:</u>

<u></u>

The correct answer would be (b).

Hope it helps. :)

7 0
3 years ago
Hey how was your day 50 points
lakkis [162]

Answer:

bad

Explanation:

3 0
2 years ago
Read 2 more answers
Even though the Pizza Hut corporation understood the need to make use of the Web, the franchise owners were skeptical. From an I
Gelneren [198K]

Answer:

Franchise owners are essential stakeholder group whose opinions are directly related to the company's success.

Explanation:

Franchise owners are essential stakeholder groups. A stakeholder is a person, organization, social group. A stakeholder can be internal or external to the business. Stakeholders affected by business and affect the business.

Different type of stakeholder is

  • Customer
  • Employees
  • Investors
  • Suppliers
  • Owners

Pizza Hut corporation owner is a stakeholder whose opinions are related to the company's success.

8 0
3 years ago
Which of the following statements is NOT correct?
Ainat [17]

Answer: B)  Pseudocode should be properly formatted.

Explanation:

 Pseudocode is defined as in the informal description of the given sequence, there is no need that it should be formatted properly. There is no such restriction required in the pseudocode as they are read by the humans not by the computer programs.

Pseudocode should be terminating, executable and unambiguous and it uses structural convention of the programming language rather than using machine reading.

4 0
3 years ago
Other questions:
  • I need help plzzzzzzzz
    10·2 answers
  • The moon has less mass than the earth, so what happens to objects on the moon?
    11·1 answer
  • Thsi is for gacha girl5467
    14·2 answers
  • The user does not need to highlight data within an Excel worksheet in order to remove conditional formatting. True or false
    14·1 answer
  • A seven-octet pattern of alternating 0s and 1s used by the receiver to establish bit synchronization is a _______
    11·1 answer
  • Where does the CPU store its computations?
    14·1 answer
  • Which domain indicates that a website is sponsored by a university or college?
    12·1 answer
  • When you start a new blank document, you begin typing at the
    6·1 answer
  • What’s cloud-based LinkedIn automation?
    14·1 answer
  • What file can you edit on a linux system to configure shared folders using samba?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!