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
HELP!!! Picture included :).
jasenka [17]

Answer:

(A'B'): 3 1/2 IN.

(D'E'): 2 1/2 IN.

(R'S'): 4 IN.

Step-by-step explanation:

Just slice the numbers in half

Also i took the test.

6 0
3 years ago
Consider the series 4+8+16+32+... <br> What is the common ratio?
Amiraneli [1.4K]
The common ratio is 24 x 2 = 88 x 2 = 1616 x 2 =32
Can I get Brainliest?
Thanks

7 0
3 years ago
3(x 2) 11 is greater than 20
Allushta [10]
3(x+2)+11>20
minus 11 both sides
3(x+2)>9
divide both sides by 3
x+2>3
minus 2 both sides
x>1
4 0
3 years ago
You are given the information that P(A) = 0.30 and P(B) = 0.40.
Ad libitum [116K]

Answer:

1.B. No. You need to know the value of P(A and B). 2.C. Yes P(A and B) =0, so P(A or B) = P(A) + P(B).

Step-by-step explanation:

We can solve this question considering the following:

For two mutually exclusive events:

\\ A_{1}\;and\;A_{2}

\\ P(A_{1} or A_{2}) = P(A_{1}) + P(A_{2}) (1)

An extension of the former expression is:

\\ P(A_{1} or A_{2}) = P(A_{1}) + P(A_{2}) - P(A_{1} and A_{2}) (2)

In <em>mutually exclusive events,</em> P(A and B) = 0, that is, the events are <em>independent </em>one of the other, and we know the probability that <em>both events happen</em> <em>at the same time is zero</em> (P(A <em>and</em> B) = 0). There are some other cases in which if event A happens, event B too, so they are not mutually exclusive because P(A <em>and</em> B) is some number different from zero. Notice the difference between <em>OR</em> and <em>AND. The latter implies that both events happen at the same time.</em>

In other words, notice that the formula (2) provides an extension of formula (1) for those events that are not <em>mutually exclusive</em>, that is, there are some cases in which the events share the same probabilities in a way that these probabilities <em>must be subtracted</em> from the total, so those probabilities in common do not "inflate" the actual probability.

For instance, imagine a person going to a gas station and ask for checking both a tire and lube oil of his/her car. The probability for checking a tire is P(A)=0.16, for checking lube oil is P(B)=0.30, and for both P(A and B) = 0.07.

The number 0.07 represents the probability that <em>both events occur at the same time</em>, so the probability that this person ask for checking a tire or the lube oil of his/her car is:

P(A or B) = 0.16 + 0.30 - 0.07 = 0.39.

That is why we cannot simply add some given probabilities <em>without acknowledging if the events are or not mutually exclusive</em>, whereas we can certainly add the probabilities in question when we know that both probabilities are <em>mutually exclusive</em> since P(A and B) = 0.

In conclusion, knowing the events are mutually exclusive <em>does</em> provide <em>extra information</em> and we can proceed to simply add the probabilities of either event; thus, the answers are those in which <em>we need to previously know the value of P(A and B)</em>.  

7 0
3 years ago
Add and Simplify. <br> (2x-y-2z-6)+(-6x+4y+3z+8)
asambeis [7]

Answer:

-4x + 3y + z + 2

Step-by-step explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Plzzzz help asap lost ten u gain it asap
    12·1 answer
  • Find the 102nd term,given the first term and the common difference <br><br> A1=52 and d=12
    6·1 answer
  • Brian bought x apples and some oranges. Brian bought 3 more oranges than apples.
    7·1 answer
  • Leon is helping his baby sister Daphne eat her dinner. There are 121212 peas left in Daphne's bowl and 777 peas squished in her
    12·1 answer
  • A rectangular pyramid has a length of 14 centimeters, a width of 9 centimeters, and a height of 10 centimeters. explain the effe
    10·1 answer
  • A certain forest covers an area of
    15·1 answer
  • Negative sixteen plus the quotient of a number and -4 is -3​
    12·1 answer
  • Which line is a line of symmetry for the triangle?<br><br> A. A<br> B. D<br> C. B<br> D. C
    7·1 answer
  • Given<br> g(x) = 4x2 + 6<br> What is g(-3)
    8·2 answers
  • There are 25 questions on your math test. You have completed 5 questions so far. What fraction of the total questions do you sti
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!