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
Xelga [282]
3 years ago
13

2) An algorithm that takes in as input an array with n rows and m columns has a run time of O(nlgm). The algorithm takes 173 ms

to run in an input array with 1000 rows and 512 columns. How long will the algorithm take to run on an input array with 1500 rows and 4096 columns? (Note: For ease of calculation, please use a base of 2 for your logarithm.)
Computers and Technology
1 answer:
mr Goodwill [35]3 years ago
8 0

Answer:

The algorithm takes 346 ms to run on an input array with 1500 rows and 4096 columns.

Explanation:

For an input array with 1000 rows and 512 columns, the algorithm takes 173 ms.

We want to find out how long will the algorithm take to run on an input array with 1500 rows and 4096 columns?

Let the algorithm take x ms to run 1500 rows and 4096 columns.

For an input of n rows and m columns, it takes

n \: log_{2} \:m

So,

1000 \: log_{2} \:512 = 173  \\\\1000 \: log_{2} \:2^{9}  = 173 \:\:\: ( 2^{9} = 512)  \\\\1000 \times 9  = 173 \:\:\:\:\: \: \: eg. 1

and

1500 \: log_{2} \:4096 = x  \\\\1500 \: log_{2} \:2^{12}  = x \:\:\: ( 2^{12} = 4096)  \\\\1500 \times 12  = x \:\:\:\:\: \: \: eg. 2

Now divide the eq. 2 by eq. 1 to find the value of x

\frac{1500 \times 12}{1000 \times 9}   = \frac{x}{173}  \\\\\frac{18000 }{9000}   = \frac{x}{173}  \\\\2   = \frac{x}{173}  \\\\x = 2 \times 173 \\\\x = 346 \: ms

Therefore, the algorithm takes 346 ms to run on an input array with 1500 rows and 4096 columns.

You might be interested in
In an attempt to reach an all-time record for its premier, ads for the highly anticipated Avengers: Endgame are run on all the m
cricket20 [7]

Based on the contextual situation, the cable stations across the country from 8:00 p.m. to 10:00 p.m., or during <u>Late-fringe time</u>.

<h3>What is Late-Fringe Time?</h3>

Late Fringe time is a term used in television that describes the television hours that follow the prime time.

Generally, the prime period is usually between 8:00 p.m. to 10:00 p.m., while the Late Fringe time is around 11 p.m. to 1 a.m.

Hence, in this case, it is concluded that the correct answer is "<u>Late-Fringe period."</u>

Learn more about Television hours here: brainly.com/question/1006994

8 0
2 years ago
How would you log in as zach if you did not know his password but knew the root password?
Nuetrik [128]
You can login in root terminal and then type #sudo Zach 
8 0
3 years ago
Question is attached as image, please help :&gt;
harkovskaia [24]

Answer:

Proved

Explanation:

Given

X = (a.\bar b)+(\bar a.b)

(a + b)\ .  \frac{}{a.b}

Required

Find out why they represent the same

To do this, we simplify either (a + b)\ .  \frac{}{a.b} or X = (a.\bar b)+(\bar a.b)

In this question, I will simplify (a + b)\ .  \frac{}{a.b}

Apply de morgan's law

(a + b)\ .  \frac{}{a.b} = (a + b) . (\bar a + \bar b)

Apply distribution property

(a + b)\ .  \frac{}{a.b} = a.\bar a + a.\bar b + \bar a . b + b . \bar b

To simplify, we apply the following rules:

a.\bar a = 0 --- Inverse law

b.\bar b = 0 --- Inverse law

So, the expression becomes

(a + b)\ .  \frac{}{a.b} = 0 + a.\bar b + \bar a.b + 0

(a + b)\ .  \frac{}{a.b}  = a.\bar b + \bar a.b

Rewrite as:

(a + b)\ .  \frac{}{a.b}  = (a.\bar b)+(\bar a.b)

From the given parameters:

X = (a.\bar b)+(\bar a.b)

This implies that:

(a + b)\ .  \frac{}{a.b} when simplified is X or (a.\bar b)+(\bar a.b)

3 0
2 years ago
Interactive sites where users write about personal topics and comment to a threaded discussion is
-BARSIC- [3]
Social media? is that what you were looking for?
6 0
3 years ago
Diffrence betwwen RAM and ROM​
cestrela7 [59]
Answer : RAM is used to store computer programs and data that CPU needs in real time. ROM have prerecorded data and it is used to boot computer.
5 0
2 years ago
Other questions:
  • What type of document is a mobile device's EULA?
    13·1 answer
  • What natural boundary separated british territory from louisiana?
    7·1 answer
  • Pls help asap<br> 40 pts<br><br> How to determine the audience for a storyboard for a movie review?
    14·1 answer
  • Write a program to draw a text-based graph of a mathematical function f(x)
    13·1 answer
  • Search engines enable you to:A. talk to people via the computer.B. locate Web pages related to a specific subject.C. connect to
    14·1 answer
  • Lets computer know what to do when it starts up...
    9·1 answer
  • what term defines inventiveness uncertainty and futuristic ideas typically deals with science and technology
    15·1 answer
  • Which of the following file formats cannot be imported using Get &amp; Transform?
    6·1 answer
  • Write a program that accepts the lengths of three sides of a triangle as an input from the user: A, B, C
    13·1 answer
  • True or false you can add audio from flies on your own pc or record your own audio
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!