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
zmey [24]
2 years ago
6

Suppose that you have two different algorithms for solving a problem of size n. The first algorithm uses exactly n(log n) operat

ions and the second algorithm uses exactly n 3/2 operations. As n grows, determine which algorithm uses fewer operations?
Mathematics
1 answer:
Mumz [18]2 years ago
5 0

Answer:

Algorithm 1 uses:

n*log(n) operations.

While algorithm 2 uses:

n^(3/2) operations.

We want to see, as n grows, which algorithm uses fewer operations.

So we would want to first solve:

n*log(n) = n^(3/2)

This will give us the exact value of n such that the number of operations is the same in both algorithms.

dividing both sides by n we get:

log(n) = n^(3/2)/n = n^(3/2 - 1) = n^(1/2)

where we can use:

log(n) = ln(n)/ln(10)

ln(n) = ln(10)*n^(1/2)

This equation actually has no solutions.

This happens because the right side is always larger than the left side.

Then, the same thing happens for our two initial equations:

n^(3/2) is always larger than n*log(n), as you can see in the graph below, where n^(3/2)  is represented with the orange graph:

So we can conclude that the fist algorithm uses less operations as n grows.

You might be interested in
Label this graph as “linear” or “nonlinear.”
butalik [34]
That graph would be non-linear
7 0
2 years ago
Read 2 more answers
I NEED THIS ASAP, PLEASE HELP!!!
WINSTONCH [101]

Answer: 22.5 ; 5 ; 14

Step-by-step explanation:

Given the dataset:

{20,22,23,24,26,26,28,29,30}

The lower quartile (Q1) = 1/4(n + 1)th term

Where n = number of observations, n = 9

Q1 = 1/4 (9 + 1)th term

Q1 = 1/4(10) = 2.5

We average the 2nd and 3rd term:

(22 + 23) / 2

45 / 2 = 22.5

B) The interquartile range(IQR) of the dataset :

{62,63,64,65,67,68,68,68,69,74}

IQR = Q3 - Q1

The lower quartile (Q1) = 1/4(n + 1)th term

Where n = number of observations, n = 10

Q1 = 1/4 (10 + 1)th term

Q1 = 1/4(11) = 2.75 term

We take the average of the 2nd and 3rd term:

(63 + 64) / 2

45 / 2 = 63.5

The upper quartile (Q3) = 3/4(n + 1)th term

Where n = number of observations, n = 10

Q3 = 3/4 (10 + 1)th term

Q3 = 3/4(11) = 8.25 term

We take the average of the 8th and 9th term:

(68 + 69) / 2

137 / 2 = 68.5

IQR = Q3 - Q1

IQR = 68.5 - 63.5

IQR = 5

C) give the dataset :

{7,8,8,9,10,12,13,15,16}

The upper quartile (Q3) = 3/4(n + 1)th term

Where n = number of observations, n = 9

Q3 = 3/4 (9 + 1)th term

Q3 = 3/4(10) = 7.5 term

We take the average of the 7th and 8th term:

(13 + 15) / 2

28 / 2 = 14

7 0
3 years ago
What is the equation for the line? enter your answer in the box
Igoryamba
To get the equation of the line, you need two points that belong to this line.
From the given graph, we can choose any two points: (0,-4) and (-2,0)

The general for of the linear straight line is:
y = mx + c where m is the slope and c is the y-intercept

First, we will calculate the slope using the following rule:
slope = (y2-y1) / (x2-x1)
slope (m) = (0--4) / (-2-0) = 4/-2 = -2
The equation of the line now is: y = -2x + c

Then, we will get the value of the c. To do so, we will choose any point and substitute in the equation. I will choose the point (0,-4)
y = -2x + c
-4 = -2(0) + c
c = -4

Based on the above calculations, the equation of the line is:
y = -2x - 4
7 0
3 years ago
Hbdudibeww hr h erwknjnnjnjknjnjbhbbh
vagabundo [1.1K]

Answer:

I left my scooter outside the dairy nek minnit.

6 0
3 years ago
Ticket for the basketball game cost $14 each . If the sale of the tickets brought in 2,212 , how many ticket were sold
adell [148]
158 tickets were sold.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Help pleaseeeeeeeeeee
    8·1 answer
  • In september, seattle's daily high temperature has a mean of 70 °f and a standard deviation of 7 °f. What are the mean, standard
    15·1 answer
  • XZ is a common external tangent to circles W and Y. What is the distance between the two centers of the circles? Round to the ne
    15·2 answers
  • What are the x-coordinates of the solutions to this system of equations?
    15·1 answer
  • All boxes with a square​ base, an open​ top, and a volume of 60 ft cubed have a surface area given by ​S(x)equalsx squared plus
    9·1 answer
  • At a zoo, 7 monkeys ate 35 bananas in one day. At
    5·2 answers
  • Find the circumference
    8·2 answers
  • Find GH 19 9x - 3 5x + 1
    12·2 answers
  • -6+(-2)= <br> plzz help meeeeee
    9·2 answers
  • 4x+y=10 ( ?,-6) <br><br> Find the missing value. Show all work.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!