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
If apples cost £1.25 per killogram. How much will 6 kilogram cost?
pochemuha
Your answer will be 7.50. What I did was take 1.25 and times it by 6. 
5 0
3 years ago
If y varies directly as x, and y is 20 when x is 4, what is the constant of variation for this relation?
Ludmilka [50]

Answer:

Step-by-step explanation:

y = k*x                    This is the formula for a direct variation.

  • y = 20
  • x = 4                        Substitute these values into the direct variation

20 = 4 * k                        Divide by 4

20/4 = 4k/4

k = 5

Answer: the constant of variation is 5

7 0
3 years ago
Evaluate this expression. (−36.28) + (−83.73)
sergeinik [125]

Answer:

-120.01

Step-by-step explanation:

I just took the test

3 0
3 years ago
rancho middle school has an average of 23 3/8 students per teacher write this mixed number as a decimal
Reika [66]

let's firstly convert it to an improper fraction.


\bf \stackrel{mixed}{23\frac{3}{8}}\implies \cfrac{23\cdot 8+3}{8}\implies \stackrel{improper}{\cfrac{187}{8}}\implies 187\div 8\implies \stackrel{decimal}{23.375}

6 0
3 years ago
4/7 is the result when 1/2 and x are added.
kipiarov [429]
By solving the equation
1/2 +x =4/7
x = 4/7 -1/2
x= 1/14
5 0
4 years ago
Other questions:
  • How do I subtract nine minus three elevenths it doesn't make sense please help I just don't understand they didn't help us in cl
    8·2 answers
  • HELP ME PLEASE !! Anybody
    10·1 answer
  • A family of 2 adults and 3 children goes to a play. admission costs $8 per adult and $5 perched. what expression would show the
    14·1 answer
  • How to find slope in math ?
    15·2 answers
  • ____________ is the recruitment of new blood vessels from the network neighboring blood vessels, accelerating the growth of a tu
    15·1 answer
  • Samantha drives 4.2 miles each workday. How<br> far will Samantha drive after 18 workdays?
    10·1 answer
  • Answer the question below please
    10·1 answer
  • Kelsey babysat for 4 hours and earned $25.00. How much did Kelsey earn per hour?
    11·2 answers
  • Please helpppppp!! Ill give brianliest!
    8·1 answer
  • Alejandro wants to rent an apartment that costs $795 a month. They want $25 for a
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!