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
Sofia made a scale drawing of a house. The scale she used was 1 millimeter : 6 meters. If the actual length of the garage is 12
romanna [79]

Answer:

2 millimeters.

Step-by-step explanation:

1 millimeter : 6 meters

x millimeters : 12 meters

x = (12÷6) × 1

x = 2×1

x = 2 millimeters

6 0
3 years ago
Manas receives a commission of Rs.5,000 on sales of Rs.65,000.How much commission will he get on sales of Rs.20,000.
tangare [24]

\\
\text{Let Manas receives a commission of Rs. 5000 on sales of Rs. 65000}\\
\\
\text{We need to find how much commision he will get on the sale of Rs.20000}\\
\\
\text{To find the commision, we use the unitary method.}\\
\\
\text{On sales of Rs. 65000, Manas receives a commision of}=5000\\
\\
\text{so on sales of Rs. 1, Manas will receiv a commision of}=\frac{5000}{65000}\\
\\
\text{Hence on sales of Rs. 20000, Manas will receiv a commision of}\\
\\=\frac{5000}{65000}\times 20000\\
\\
=1538.46

Hence, on the sales of Rs. 20000, Manas will receive a commission of: Rs. 1538.46

6 0
3 years ago
Please help.
Ad libitum [116K]

Answer:  

In what article are you most likely to find the sentence “The coma streamed out until it formed a tail of dust and light”?

“Comets in the Sky”

“How to Punctuate Sentences”

“Water Under the Bridge”

“Medical Histories”

Step-by-step explanation:

8 0
2 years ago
Read 2 more answers
3×-7 equivalent expressions A. -21 B. 4 C. -4 D. 21
USPshnik [31]

Answer:

-21

Step-by-step explanation:

3x7=21 and a negative x a positive is always negative

6 0
2 years ago
The slope of the line that passes through the points (6, w) and (10, 4) is 8. What is the value of w?
RoseWind [281]

Answer:

My student the slope paserea the Pointe 6w and 10,4 is8

3 0
3 years ago
Read 2 more answers
Other questions:
  • a pack of eight batterys cost 8.99. Bow much does each battery cost , give your answer to the nearest penny​
    5·2 answers
  • Find the quotient. 8,489÷9
    12·2 answers
  • A construction company wants to hire carpenters for $220 a day and plumbers for $260 a day. The company wants to hire at least 1
    9·1 answer
  • What is the probability that a number selected at random from the set {2, 3, 7, 12, 15, 22, 72, 108} will be divisible by both 2
    15·1 answer
  • A car dealership is expecting a shipment of cars and trucks valued at $460,000. Each car will have a list price of $18,500 and e
    12·1 answer
  • Paul uses the function y = 7x + 30 to model the situation. What score does Paul’s model predict for 3 hours of homework?
    11·1 answer
  • Please help me out :))
    11·1 answer
  • Help me with this please.
    8·2 answers
  • Factor the following equation.<br> -9z-33
    5·2 answers
  • Please help me find the answer to this, the work on it is wrong!!
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!