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
You have a bag full of apples. There are 8 Jonathan (red), 4 Granny Smith (green), and 5 Golden Delicious (yellow) apples in the
vredina [299]

Answer:

Step-by-step explanation:

There are 8 Jonathan (red), 4 Granny Smith (green), and 5 Golden Delicious (yellow) apples in the bag.

a) Select 3 apples with replacement. Find the probability that all there are green.

  • Given that we are taking all apples with replacement, the probability of getting a green apples remains the same in all 3 trials. Therefore the probability here is computed as:

  • = (Number of green apples/Total apples)
  • = (4/17)^3
  • = 0.0130

Therefore 0.0130 is the required probability here.

b) Select 3 apples with replacement. Find the probability that none are red

Probability that none are red is computed here as:

  • = (Number of non red apples/Total apples)
  • = (9/17)^3
  • = 0.14838

Therefore 0.14838 is the required probability here

c) Select 4 apples with replacement. Find the probability that you get at least 2 red apples

  • Probability that we get at least 2 red apples when 4 apples are drawn is computed here as:
  • = 1 - (Probability that no red apple is taken out when 4 apples are taken out + Probability that 1 red apple is taken out when 4 apples are taken out)
  • = 1 - 8C0 x 9C4 + 8C1 x 9C3 / 17C4
  • = 1 - 0.3353
  • = 0.6647

Therefore 0.6647 is the required probability here

d) Select 2 apples with replacement. Find the probability that the second apple is yellow given that the first apple is red.

  • Given that the first apple is red, we are left with 16 apples out of which 5 are yellow. Therefore the required probability here is computed as:
  • = 5/16
  • = 0.3125

Therefore 0.3125 is the required probability here

3 0
3 years ago
Tell me to write a real workd problem for the equation 4 ×y =60
kodGreya [7K]
Benny had 60 cupcakes but only 4 tray to put them on, how many can go on each tray. Show your work
3 0
4 years ago
Read 2 more answers
Alan, Brady and Matt shared 740 marbles. Alan has 20 fewer marbles than Brady and 120 fewer marbles than Matt. How many marbles
scoundrel [369]

Answer:

200 \ marbles

Step-by-step explanation:

Let\ Alan\ have\ =x\ marbles\\Brady\ have = (x+20)\ marbles\\Matt\ have = . (x+120)\ marbles\\\\Total\ marbles = 740\\x+(x+20)+(x+120)=740\\x+x+20+x+120=740\\3x+140=740\\3x=740-140\\3x=600

Dividing 3 both sides.

\frac{3x}{3}=\frac{600}{3}\\\\x=200

4 0
4 years ago
We expect that students who do well on the midterm exam in a course will usually also do well on the final exam. Gary Smith of P
dybincka [34]

Using the model equation, the predicted mean score on the final given a score of <em>10 points above the class mean</em> in the mid term exam is 50.7

<u>The Least - Square Regression equation which models the relationship between midterm and final exam score is</u> :

  • γ=46.6 + 0.41x

x = 10 points ; <u>substitute the value of x = 10 into the regression equation</u> ;

γ=46.6 + 0.41(10)

γ=46.6 + 4.1

γ = 50.7

The <em>number of points above the mean</em> he'll score in the final exam is predicted to be 50.7

Learn more :brainly.com/question/18405415

7 0
3 years ago
I dont know on this one, its complicated
balandron [24]
A = a^2 = 121
so a = 11

answer
11 inches
7 0
3 years ago
Read 2 more answers
Other questions:
  • Write 2.97 as a fraction, decimal and percent
    11·1 answer
  • Is 0.025 greater than 0.052
    12·1 answer
  • What does This equal pls(n+8)+(n-12)
    13·1 answer
  • What happens to a market in equilibrium when there is an increase in supply?
    8·1 answer
  • Why is it important to line up decimal numbers by their place value when you add or
    13·1 answer
  • According to National Oceanic and Atmospheric Administration, the coastline of Alaska estimates 55 thousand kilometers. This is
    8·1 answer
  • If anils hieght was 150cm and amans height was 100cm then the ratio of their heights would be​
    11·1 answer
  • Make x subject of the formula ax^2+bx+c=0​
    6·1 answer
  • Which of the following is equivalent to 2/9
    5·2 answers
  • Mrs. Rodger got a weekly raise of $145. If she gets paid every other week, write an integer describing how the raise will affect
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!