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]
2 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]2 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
Colours can be contrasting if<br>​
abruzzese [7]

.....If the colors are from different segments of the color wheel.

3 0
2 years ago
A user is experiencing slow performance with their computer. A technician suspects the computer has a virus and runs antivirus s
IceJOKER [234]

Answer:

The answer is "Option A"

Explanation:

Escalation is the process of manipulating a bug, design failure in software program to obtain elevated access to the resources, which are usually shielded from the user, and wrong choices can be described as follows:

  • In option B, It is wrong because It can't provide any type of problem-solving.
  • In option C, It is wrong because it is a searching module.
  • In option D, It is wrong because it is used to verify the system.
6 0
3 years ago
Operands may be any of the following: (select all that apply) Group of answer choices constant or constant expression register n
attashe74 [19]

Answer:

constant or constant expression

register name

variable name (memory)

Explanation:

Literally, operand means data which an operation can be performed on. The operation could be an arithmetic or logical operation.

From the list of options, several operations can be performed on:

  • constants e.g. \pi = 3.14
  • registers and
  • variables e.g. (a + b)

<em>However, no operation can be performed on keywords and/or reserved words.</em>

3 0
3 years ago
After inserting a video into your slide how can you test it
blagie [28]

Explanation:

How to insert video into PowerPoint

  1. Click on the slide you want, then go to Menu > Insert.
  2. In the top right corner, click Video > Video on My PC.
  3. Find the video you want to add and click “Insert”.
  4. Adjust the settings in the Video Format toolbar to make sure it plays the way you want.
7 0
2 years ago
Sketch f(x) = 5x2 - 20 labelling any intercepts.​
Norma-Jean [14]

Answer:

  • The graph of the function is attached below.
  • The x-intercepts will be: (2, 0), (-2, 0)
  • The y-intercept will be: (-20, 0)

Explanation:

Given the function

f\left(x\right)\:=\:5x^2-\:20

As we know that the x-intercept(s) can be obtained by setting the value y=0

so

y=\:5x^2-\:20

switching sides

5x^2-20=0

Add 20 to both sides

5x^2-20+20=0+20

5x^2=20

Dividing both sides by 5

\frac{5x^2}{5}=\frac{20}{5}

x^2=4

\mathrm{For\:}x^2=f\left(a\right)\mathrm{\:the\:solutions\:are\:}x=\sqrt{f\left(a\right)},\:\:-\sqrt{f\left(a\right)}

x=\sqrt{4},\:x=-\sqrt{4}

x=2,\:x=-2

so the x-intercepts will be: (2, 0), (-2, 0)

we also know that the y-intercept(s) can obtained by setting the value x=0

so

y=\:5(0)^2-\:20

y=0-20

y=-20

so the y-intercept will be: (-20, 0)

From the attached figure, all the intercepts are labeled.

8 0
2 years ago
Other questions:
  • true or false: for most queries, the user location changes our understanding of the query and user intent.
    13·1 answer
  • Written and artistic expressions are protected by
    8·1 answer
  • . Virtualization simplifies the use of resources, isolates users from one another, supports replication and mobility, but exacts
    7·1 answer
  • If you are logged on to Windows Live Messenger, why would you be unable to engage
    6·1 answer
  • Allows a user to control the<br>volume of the computer​
    8·1 answer
  • The Circle and CircleTester have been created, but they have errors. The public and private settings for variables and methods a
    8·1 answer
  • A style sheet consists of CSS ______________________ that specify the layout and format properties to apply to an element. *
    13·1 answer
  • Write a program that defines an array of integers and a pointer to an integer. Make the pointer point to the beginning of the ar
    12·1 answer
  • WAP to find area of circle​
    12·1 answer
  • Type the correct answer in the box
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!