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

A pot is heated on a stove . Which process causes the metal handle of them pot to also become hot?
How many triangles are formed by the diagonals from one vertex of a regular octagon?
what is the result when 4x^2-17x+36 is subtracted from 2 x^2-5x+25?
simplify the expression. 3 square root 5/64
given the equation of a circle x^2+y^2-10x+4y+13=0. find its center and radius. i am having trouble please help
If 2+xi=(x+1)+i, what is the value of xand can you please show me the breakdown?Thanks!
what is a compound subject
Calculate the discriminant. x2 – x – 2 = 0
what will be the effect on the loudness of sound if the amptitude is doubled and halved?
How far does light travel in 1 millisecond that is, in one hundredth of a scecond?