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
I write this question for no reason<br><br>Answer has to be at least 20 words long to get brainliest
Lelu [443]

Answer:

hi i need points and i dont know what to write i hope you have a great day or night :)

Step-by-step explanation:

7 0
3 years ago
Read 2 more answers
The perimeter of a rectangle is 45 feet. If the length is 14 feet find the width
just olya [345]
One side is 8.5 ft and both together are 17 ft
3 0
4 years ago
Read 2 more answers
Write a rule for a geometric sequence that has a 1 as its first term and a common ratio of -4. what is the seventh term of this
ivann1987 [24]

I hope first term is 1.

Hope this is your question, if not I think you will, still be able to

find an answer of your question based on this solution.

The formula for general term of a geometric sequence is,

a_{n} =a_{1} *r^{n-1}

Where, first term: a_{1} =1 and common ratio: r = -4.

So, first step is to plug in the values of a1 and r in the above formula to get the rule of this geometric sequence. Hence,

a_{n} =1 *4^{n-1}

a_{n} =4^{n-1}

So, the rule of the geometric sequence is a_{n} =4^{n-1}.

To find the seventh term, plug in n = 7 in the above rule. Therefore,

a_{7} =4^{7-1}

= 4^6

= 4096

Hope this helps you!.

6 0
3 years ago
a package of marbles contains 20 blue marbles, 38 red marbles, 48 green marbles, and 16 yellow marbles. which color of marbles c
OLEGan [10]

the answer would be 48 green marbles

Step-by-step explanation:

48/6=8

So, each person would get 8 marbles each

7 0
3 years ago
Find the volume of a sphere that has a surface area of 16pi * sq in
julsineya [31]
The answer is 4jdjsie
6 0
3 years ago
Other questions:
  • How long is the edge of a cube whose volume is twice that of the cube below? Round to the nearest tenth.
    5·1 answer
  • I have 500 pennies. If I spend 6 pennies a day until i can no longer do so, at the end of one of these days i will have exactly
    5·1 answer
  • Please help me with this word problem.
    15·1 answer
  • HELP LOL IT MY LIL SIS HELPP
    14·2 answers
  • Heeeeeeeeeeeelp i dont know what dafaq<br><br> this is
    10·1 answer
  • What is the equation on the line on this graph?
    12·1 answer
  • U
    14·1 answer
  • Write an addition equation or a subtraction equation (your choice!) to describe the diagram
    8·1 answer
  • Find the value of x and round to the nearest tenth
    8·1 answer
  • 1. What is the Importance of Finance in a Business?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!