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
Which of the following has likely attended vocational school?
JulsSmile [24]

C- A graphic designer is the awnser

7 0
4 years ago
i see tabs named mowed and Ramsey i tried shredding them and deleting them and ending all the processes but they start duplicati
VikaD [51]

1.Select the data.

2.Go to Data –> Data Tools –> Remove Duplicates.

3.In the Remove Duplicates dialog box: If your data has headers, make sure the 'My data has headers' option is checked. Make sure the column is selected (in this case there is only one column).

4 0
3 years ago
What is the main difference between a literacy society and a digital Society
EleoNora [17]
The accurate answer is

The difference is a Literacy Society is a program for encouraging people to read.
A Digital Society is a program that as to do with technology at work,school, or at home.

Glad to help :) 
7 0
3 years ago
Two machines can finish a job in StartFraction 20 Over 9 EndFraction hours. Working​ alone, one machine would take one hour long
Alborosie

<em><u>Answer</u></em>

5 hours

<em><u>Explanation</u></em>

The two working together can finish a job in

\frac{20}{9}  \: hours

Also, working alone, one machine would take one hour longer than the other to complete the same job.

Let the slower machine working alone take x hours. Then the faster machine takes x-1 hours to complete the same task working alone.

Their combined rate in terms of x is

\frac{1}{x}    +  \frac{1}{x - 1}

This should be equal to 20/9 hours.

\frac{1}{x}  +  \frac{1}{x - 1}  =  \frac{9}{20}

Multiply through by;

20x(x - 1) \times \frac{1}{x}  +20x(x - 1) \times   \frac{1}{x - 1}  =  20x(x - 1) \times \frac{9}{0}

20(x - 1)  +20x = 9x(x - 1)

20x - 20+20x = 9{x}^{2}  - 9x

9{x}^{2}  - 9x - 20x - 20x + 20= 0

9{x}^{2}  - 49x  + 20= 0

Factor to get:

(9x - 4)(x - 5) = 0

x =  \frac{4}{9}  \: or \: x = 5

It is not feasible for the slower machine to complete the work alone in 4/9 hours if the two will finish in 20/9 hours.

Therefore the slower finish in 5 hours.

8 0
3 years ago
Melissa is writing a class called Cell. Which method has she set up to return a double?
Alina [70]

Answer:

C. public double get_mCount()

5 0
3 years ago
Other questions:
  • Prompt the user for an automobile service. Each service type is composed of two strings. Output the user's input. (1 pt) Ex: Ent
    9·1 answer
  • What does prominent hyperintensity mean relating to MRI?
    5·1 answer
  • True / False
    5·1 answer
  • A bank uses a computer program during the night to tell if the alarm should ring. Sensors in the bank set the following Boolean
    5·1 answer
  • To add a new kind of information into the database you need to add a new table<br> true or false?
    7·2 answers
  • What attracts attention and adds spatial depth to a two-dimensional design.
    9·1 answer
  • Which of these lines of code will increment a variable?
    11·1 answer
  • Computer science - algorithms - flowcharts
    11·1 answer
  • You have been asked to advise a group of several universities who want to combine research efforts and store data in the cloud.
    9·1 answer
  • Below you will find the requirements to identify the Account Diversity Grade of a user. Read the requirements carefully and iden
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!