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
Fofino [41]
3 years ago
14

An algorithm takes 0.5 seconds to run on an input of size 100. How long will it take to run on an input of size 1000 if the algo

rithm has a running time that is linear? quadratic? log-linear? cubic?
Mathematics
1 answer:
dexar [7]3 years ago
6 0

Answer:

linear: 5s

quadratic: 50s

log-linear: 0.75 s

cubic: 500s

Step-by-step explanation:

Let t_1,t_2 be the running time associated with the input of sizes s_1,s_2

If the running time is linear

t_2 = t_1\frac{s_2}{s_1} = 0.5*\frac{1000}{100} = 0.5*10 = 5s

If the running time is quadratic

t_2 = t_1\left(\frac{s_2}{s_1}\right)^2 = 0.5*\left(\frac{1000}{100}\right)^2 = 0.5*10^2 = 50s

If the running time is log-linear

t_2 = t_1\frac{log(s_2)}{log(s_1)} = 0.5*\frac{log(1000)}{log(100)} = 0.5*1.5 = 0.75s

If the running time is cubic:

t_2 = t_1\left(\frac{s_2}{s_1}\right)^3 = 0.5*\left(\frac{1000}{100}\right)^3 = 0.5*10^3 = 500s

You might be interested in
HELP ASP THIS IS MY MATH SOMEONE PLEASE HELP
Ksenya-84 [330]

Answer: 2, 3, 5

Step-by-step explanation: 6*6 is 6^2 and 6*6*6 is 6^3 and you can add the exponents, so the last one is 6^5.

7 0
3 years ago
Can Someone help plz
seraphim [82]

i think its 3√3 because that seems like the logical answer to me.

6 0
3 years ago
There are only 7 blue pens, 4 green pens and 6 red pens in a box.
Pepsi [2]

Answer:

7/17

Step-by-step explanation:

7+4+6=17

7/17

Hope this is useful :)

3 0
3 years ago
Read 2 more answers
What is b2*b5*b3 simplified?
Valentin [98]

Answer:

B10

Step-by-step explanation:

8 0
3 years ago
Aria has a points card for a movie theater.
Sloan [31]

Answer:

70+3.5v = 105

v = 10

Step-by-step explanation:

70+3.5v = 105

3.5v = 35

v = 10

7 0
3 years ago
Read 2 more answers
Other questions:
  • Please help me with this....................
    8·2 answers
  • You can buy 7 pillows at jensen's for the same price that you can buy 6 pillows at harrison's. If one pillow costs $21.21 at har
    8·2 answers
  • Mrs. Jurrens bought three shirts and one pair of pants. Each shirt cost $7.99, and the pair of pants cost $12. What was her tota
    7·1 answer
  • What is the exponential growth for <br><br> 3.821 x (0.54)^2-10
    9·1 answer
  • What are the properties of the circles
    13·2 answers
  • Use special right triangles to solve for y.
    13·2 answers
  • Cuanto me da como resultado
    10·1 answer
  • Lf 60% of a number is 90, what is it number? a)30 b)54 c)150 d)180​
    7·1 answer
  • The surface areas of two similar figures are given. The volume of the larger figure is given. Find the volume of the smaller fig
    5·1 answer
  • Help please. 7th grade, area question. ​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!