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
A box contains six red popsicles, two blue popsicles, and eight orange
Murljashka [212]

Answer:

7/8

Step-by-step explanation:

add all the popsicles together and subtract the number of blue from the total and put that number over the total and simplify

3 0
3 years ago
Read 2 more answers
P
coldgirl [10]

Answer:

...

Step-by-step explanation:

4 0
2 years ago
A plane has a crusing speed of 300 miles per hour when there is no wind. At this speed, the plane flew 600 miles with the wind i
Archy [21]
300t=600
t=2
2y=400
y=400/2
Wind=200

4 0
3 years ago
Helpppppppppppppppppppppppppppppppppppppppppppppp
Aleksandr-060686 [28]
Help with what im so confused
3 0
3 years ago
Find an equation of variation where y varies directly as x and y = 75 when x = 5, find y when x is 1.
Dafna11 [192]
<span>y=375/x, so when x=1, y=375</span>
7 0
3 years ago
Other questions:
  • For (x - 1)(x - 7) to equal 0, either (x - 1) or (x - 7) must equal
    5·1 answer
  • The city garden orders 1,680 tulip bulbs for riverside park .The blubs were shipped in 35. Boxes with an equal number of bulbs i
    6·1 answer
  • Jason has two bags with 6 tiles each. The tiles on each bag are shown below :
    12·1 answer
  • Need help solving these two vector problems.
    11·1 answer
  • WILL MARK BRAINLIEST!!!! Which highlighted word in the passage has connotations that create a calm tone?
    6·2 answers
  • Heyy! i’ll give brainliest please help
    10·2 answers
  • Trey has 75 in his saving account. Each month he deposits 25 into the account. Which expression shows the amount of money that T
    7·1 answer
  • What do rigid motions preserve
    8·1 answer
  • Kelly earns $23.00 for 4 hours of work. At that rate, how long would she have to work to earn $57.50?
    13·2 answers
  • Last month, an airline made 2,905 reservations for flights from Cleveland, Ohio to Newark, New Jersey. After 25 cancellations, t
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!