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
Are 6/10 and 6/30 multiples of 3/20
ella [17]

Answer:

yes well kinda im pretty sure

Step-by-step explanation:

5 0
3 years ago
Read 2 more answers
I don't get what I'm spose to put on it also how do you work this app I'm new
stiks02 [169]
I'm new too, but I'm pretty sure if you have a question then you ask it, attach a picture if needed, and people might see it and answer.
4 0
3 years ago
Paul needs 2 and 1/4 yards of fabric to make a tablecloth. How many tablecloths can he make from 18 and a half yards of fabric?
Taya2010 [7]
18.5/2.25 = 8.2222222.. So The Answer Is 8.
4 0
3 years ago
Read 2 more answers
I need help with letter D
Ivahew [28]
To find 1. all you have to do is 165/30 and you get $5.50. To find 2. you have to add 165+45 you get 210. then divide 210/40 and you get 5.25
4 0
3 years ago
Aspect RALIUS
Naddika [18.5K]

Answer:

Step-by-step explanation:

6 0
3 years ago
Other questions:
  • How how do you how do you estimate 4.23-2.51
    11·2 answers
  • F(x)=-3x+1 , find:
    7·2 answers
  • Can someone help me please :(
    14·1 answer
  • What is the volume of each cube? <br> a) 10 cm<br> b) 8.5 cm
    11·1 answer
  • HELP ASAP
    14·1 answer
  • What linear inequality best describes the following graph
    8·2 answers
  • Plsssss help if u can 6th-grade math plss
    7·1 answer
  • The school bus travels at an average speed of 30 miles an hour in the morning because of the traffic. Diego's Home is 3 miles aw
    11·1 answer
  • URGENT!!!! A ship sails due east from point A for 30 miles. It then
    13·1 answer
  • Using the quadratic formula to solve 5x = 6x-<br> 3, what are the values of x?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!