CamronSmith7731 CamronSmith7731
  • 25-03-2020
  • Computers and Technology
contestada

For an O(Nk ) algorithm, where k is a positive integer, an instance of size M takes 32 seconds to run. Suppose you run an instance of size 2M and find that it takes 512 seconds to run. What is the value of k?

Respuesta :

SerenaBochenek SerenaBochenek
  • 30-03-2020

Answer:

The correct answer to the following question will be "k = 4".

Explanation:

Thus increasing the scale from M - 2 M, and in other words, multiplying the scale increases the time by

[tex]=\frac{512}{32}\\\\=16 \ times[/tex]

Thus, K price is equivalent to 4, which indicates it rises according to a factor of (2)⁴.

Therefore, the complexity of the computation or algorithm is O(N⁴), which indicates that time improves by (2)⁴ times when twice the scale.

Answer Link

Otras preguntas

Rita is ordering 4 bags of cat food from canada. each bag has a mass of 2.5kg . to determine the shipping costs, rita needs to know the total weight in pounds.
An employee stealing company data could be an example of which kind of threat actor?.
Describe some of the differences between a developed and a developing country.
What type of theorist is most likely to assess people's personalities
Geometry, please help!
Two objects of the same mass move towards each other at the same constant speed. What can be said of the momentum of each object?
pls help i need this asap
Agreements made at the yalta and potsdam conferences near the end of world war ii resulted in the
One way president kennedy responded to the soviet action referred to in the telegram was to support
how did the opium war affect china? NEED ANSWER SOON AS POSSIBLE