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
I need the answer for question 15 a and b
trasher [3.6K]
A is 14 total 
B is yes because the gained 11 and lost 3 which means they gained 8 after taking away the ones lost and they are still on the positive side so they keep th ball.

7 0
3 years ago
Read 2 more answers
The cake walk fundraiser sold 44 tickets during the first day of sales. this was 22% of the total sales. How many tickets were s
vovangra [49]

Answer:

200 tickets

Step-by-step explanation:

I hope this helps you :)

<em><u>-KeairaDickson</u></em>

4 0
4 years ago
I need help with this question
andreev551 [17]
Quadrilateral, Parallelogram, and a Rhombus
6 0
3 years ago
X+2÷4-5x-2÷12=8-2x÷5
Delicious77 [7]
The answer to your problem is X= -155/54
4 0
3 years ago
Is the number in the following statement an exact quantity or a measured quantity?You are told that a car gets 35 miles per gall
xeze [42]

The problem states that a certain car travels 35 miles per gallon of fuel. This statement has a certain level of uncertainty, because the fuel consumption varies with how the car is manuvered, therefore the correct answer is measured quantity.

7 0
2 years ago
Other questions:
  • How to find the slope of a line with one coordinate and the x intercept
    7·1 answer
  • Can you help with answer this and if there’s work to be shown please let me know. Thank you!
    15·1 answer
  • What is the length of CDE in degrees if the radius of circle 0 is 4? I attached the circle.
    14·1 answer
  • - Write a power function whose graph passes<br> through the points (1, 3) and (6, 10).
    9·1 answer
  • 1. Suma a trei numere este 176. Al doilea numar este cu 28 mai mare decat al treilea, iar primul este egal cu diferenta acesteia
    7·1 answer
  • The rectangular prism below has a height of 2 ft, width of 3 ft, and length of 6 ft.
    13·1 answer
  • 13 more than the product 4 and a number n
    14·1 answer
  • Use the formula to determine the slope of the line containing the two points (-6,6) and (-3,4)
    5·2 answers
  • Please help!! Graph a line with a slope of 1/4 that contains the point (6,3).
    9·1 answer
  • A carpenter is making a table that will be 45 inches wide. He is gluing boards together. Each board is 3 and 3/4 inches wide.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!