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

Write the equation in point slope form of a line with a slope of -2 that contains the point (-1,6)
Which activity is a risk to one’s health? exercising more than 60 minutes a day using walking as one’s sole aerobic activity being a strict vegetarian
Which macromolecule catalyzes chemical reactions, thus be considered an enzyme?
An example of due process of law as guaranteed by the fifth amendment is A. Trying someone twice for the same crime B. Being given a fair trial before a jury C.
Explain why the rusting of an iron bar decreases the strength of the bar
examples of activities undertaken by political machines
Describe an example of each of Newton's laws of motion that you experience before you get to school in the morning. Include some of the forces involved in each
What is 116,890,179+881,910,888
Which type or greek column was the most decorative and elaborate?
Original price $325.50 ; mark down: 15%