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
amid [387]
3 years ago
11

Assume that an O(log2N) algorithm runs for 10 milliseconds when the input size (N) is 32. What input size makes the algorithm ru

n for 14 milliseconds
Computers and Technology
1 answer:
NARA [144]3 years ago
5 0

Answer:

An input size of N = 128 makes the algorithm run for 14 milliseconds

Explanation:

O(log2N)

This means that the running time for an algorithm of length N is given by:

F(N) = c\log_{2}{N}

In which C is a constant.

Runs for 10 milliseconds when the input size (N) is 32.

This means that F(32) = 10

So

F(N) = c\log_{2}{N}

10 = c\log_{2}{32}

Since 2^5 = 32, \log_{2}{32} = 5

Then

5c = 10

c = \frac{10}{5}

c = 2

Thus:

F(N) = 2\log_{2}{N}

What input size makes the algorithm run for 14 milliseconds

N for which F(N) = 14. So

F(N) = 2\log_{2}{N}

14 = 2\log_{2}{N}

\log_{2}{N} = 7

2^{\log_{2}{N}} = 2^7

N = 128

An input size of N = 128 makes the algorithm run for 14 milliseconds

You might be interested in
Intellectual property piracy has gotten a small boost from the increasing availability of counterfeit goods through Internet cha
Aliun [14]

Answer:

The answer is "Option B".

Explanation:

Intellectual property is protected by law in which property, copyright, and trademarks, are uses, that enable you to gain individuals' popularity or personally benefit according to what they create.

  • It is a program that helps to create an environment, in which imagination and technology are used.
  • It will change the growth by striking a balance between innovator rights and wider public interest.
3 0
3 years ago
Why is it a good idea to leave an interview being courteous and polite?
JulsSmile [24]
It Will Show How Humble You Are. It will also show your ability to control emotions.
8 0
3 years ago
Whats the flow in this code, and whats the risk that its creating and what can i do to fix it? (c language)
Advocard [28]

Answer:

The risk is a buffer overflow.

Explanation:

Whatever the user passes as a command line argument, will be copied into the buffer. If the user passes more than 499 characters, the end of the buffer will be overwritten.

To solve it, compare the string length of argv[1] to 500 before copying, or even better, start using the new strcpy_s( ) function.

6 0
3 years ago
In a presentation outline, each slide must represent a main point in the outline.
ivolga24 [154]
This is absolutely true. :D
4 0
3 years ago
Read 2 more answers
You are designing an exciting new adventure game and you want to attempt to explain where items that are carried by the player a
alukav5142 [94]

Answer:

hYou are designing an exciting new adventure game and you want to attempt to explain where items that are carried by the player are being kept. What inventory system should you use to this? O visual grid approach hyperspace arsenal weighted inventory pseudo-realistic​

Explanation:

6 0
3 years ago
Other questions:
  • How can i put this sign in my keybord?<br><br> :::::<br> ^<br> Here is the sign
    8·1 answer
  • 7) The small slots on the front, back, or side of your computer that allow you to connect devices (such as a keyboard, mouse, or
    11·1 answer
  • According to the SANS Institute, a __________ is typically a document that outlines specific requirements or rules that must be
    13·1 answer
  • Hope fixes her mistake and comes up with this list.
    9·2 answers
  • Susan's monthly goal to open five new customer
    10·1 answer
  • Which platform is dedicated to Customer Relationship Management (CRM)?
    7·1 answer
  • What would a programmer use to stop a while-looping sequence and return to the beginning of the statement?
    11·2 answers
  • What is the deck of a suspension bridge called​
    15·1 answer
  • What is the typical drive letter for the hard drive?
    12·1 answer
  • Give the names of two different places you might find a number represented in hexadecimal
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!