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]
3 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]3 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
Seiko spent $98.34 on a pair of shoes and 3 pairs of fancy shoestrings. The shoes cost $45.99. How much was EACH pair of shoestr
Marina86 [1]

Answer:

$17.45

Step-by-step explanation:

$17.45*3=52.35

$52.35+$45.99=$98.34

7 0
3 years ago
Suppose that the functions r and s are defined for all real numbers x as follows.
mixas84 [53]
ANSWER

Given

r(x) = x - 1


and

s(x) = 3 {x}^{2}
ANSWER TO QUESTION 1

(r + s)(x) = r(x) + s(x)


(r + s)(x) = x - 1 + 3 {x}^{2}


(r + s)(x) =  3 {x}^{2}  + x - 1



ANSWER TO QUESTION 2



(r \times s)(x) = r(x) \times s(x)


(r \times s)(x) = (x - 1) \times 3 {x}^{2}


(r \times s)(x) = 3 {x}^{3}  - 3 {x}^{2}

ANSWER TO QUESTION 3

( r - s)(x) = r(x) - s(x)



( r - s)(x) = x - 1 - 3 {x}^{2}


( r - s)( - 3) =  (- 3) - 1 - 3 ({ - 3}^{2} )



( r - s)( - 3) =   - 4 - 3  \times 9



( r - s)( - 3) =   - 4 - 27 =  - 31

4 0
3 years ago
What is the average rate of change from x=0 to x=5
zmey [24]
80-40/5-0=40/5=8 through the slope formula
6 0
3 years ago
Read 2 more answers
Using completing the square to solve for x in the equation (x-12)(x+4)=9
Vladimir79 [104]
Hello!

You can multiply (x-12) and (x+4)

x * x = x^2
x * 4 = 4x
-12 * x = -12x
-12 * 4 = -48

Now we have

x^2 - 8x - 48 = 9

Subtract 9 from both sides

x^2 - 8x -57 = 0

Use the quadratic formula

This give use the answer of

x = 4 +\sqrt{72}

Hope this helps!
3 0
3 years ago
Read 2 more answers
What is the distance between (-9, 4) and (-4, 4)?
Lunna [17]

Answer:

5

Step-by-step explanation:

3 0
3 years ago
Other questions:
  • How many defective telephones
    7·1 answer
  • Help me fill out the graph! I'm struggling not his cuz i missed school today cuz I'm sick!
    14·1 answer
  • The midpoint of the segment joining points (a, b) and (j, k) is:
    15·1 answer
  • For what value of x does 3^4x=27^x-3?
    14·2 answers
  • 15 decreased by twice a number
    10·1 answer
  • What is the length of the line?<br> Choose 1 answer:
    6·1 answer
  • ILL BRAINLIEST YOU IF YOU HELP ME PLEASE
    9·1 answer
  • Question 16
    9·1 answer
  • Can you plz help me
    15·1 answer
  • Which do you think is easier to understand and why do you think so, multiplying radicals or multiplying polynomials?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!