![jaydenrenee111902](/avatars/25757.jpg)
jaydenrenee111902
16.06.2021 •
Mathematics
Suppose that you have two different algorithms for solving a problem of size n. The first algorithm uses exactly n(log n) operations and the second algorithm uses exactly n 3/2 operations. As n grows, determine which algorithm uses fewer operations?
Solved
Show answers
More tips
- A Art and Culture The History and Characteristics of Jazz Bands: A Deep Dive...
- F Food and Cooking From Latte to Espresso: Which Coffee Drink is the Most Popular on Earth?...
- C Computers and Internet How to Set Up Internet on iPhone? Detailed Guide with Step-by-Step Instructions...
- P Philosophy 8 привычек, чтобы достичь счастливой жизни...
- F Food and Cooking How Many Grams Are In a Tablespoon?...
- G Goods and services How to Choose the Right Iron: Purchase Tips...
- S Style and Beauty How to Choose the Perfect Hair Straightener?...
- H Health and Medicine How to Choose the Right Glasses?...
- H Health and Medicine What vaccines do children need?...
- H Health and Medicine AKDS Vaccination: Ensure Your Child s Safety...
Answers on questions: Mathematics
- M Mathematics Question: 7,8 and 11 , , , 10 point i don t have more 7.-find the least common multiple of each set of 4, 10, 12 a)12 b)120 c)2 d)60 8.-factor 54a + 24b a) 6(54a = 24b)...
- M Mathematics PLEASE HELP DUE SOON...
- E English Federico Garcia Lorca compares the guitar to a wounded heart. True or False...
- S Social Studies Imagine yourself as the district collector. A major Tsunami has structed your district. What measures you will take to bring life back to normal as the head of the district...
- C Computers and Technology Ideas on project name and proposal on information systems. the sections include project description, objectives, proposed deliverables, assumptions and user acceptance...
Ответ:
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.
Ответ:
what's the question
Step-by-step explanation: