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
What standards organization maintains the ethernet standard?.
Fofino [41]

Answer:

Ethernet standards are written and maintained by the IEEE, the Institute of Electrical and Electronic Engineers which has its corporate office in New York City and its operations center in Piscataway, New Jersey.

Explanation:

5 0
2 years ago
Which can be inserted using the insert panel in dreamweaver cc?
timofeeve [1]

Answer: Learn how to use the Insert panel in Dreamweaver to create and insert objects, such as tables, images, OAM files, and Bootstrap components. The Insert panel contains buttons for creating and inserting objects such as tables and images. The buttons are organized into categories.

3 0
3 years ago
To define constructors and member functions outside of a class's original scope, the operator can be used.
Artyom0805 [142]

Answer: Scope resolution operator(::)

Explanation: A member function and the constructor can be called within the function easily but for the execution of the these components outside the class , a special operator is required to call the functions. The scope resolution operator(::) preceding with the name of class is thus used for defining of the function outside class.This operator maintains the cope of the function and constructor outside the class.

8 0
2 years ago
If there has been no change in the data regarding a specific person, place or thing, information about that person, place or thi
babymother [125]
I think it’s b false sorry if I was wrong
6 0
3 years ago
which of the following is not an e-reader you would use as a alternative to carrying around a set of textbooks?
musickatia [10]

I have a kindle paper white that I downloaded all of my avalible textbook onto if that helps I find it much better then carrying around a bunch of textbooks
4 0
3 years ago
Other questions:
  • The TabIndex value assigned to a text box's identifying label must be _______________ for the text box's access key to work corr
    14·1 answer
  • Which of the following is not a negative environmental effect associated with cars? A. Deforestation B. Roadside litter C. Toxic
    14·1 answer
  • 次のうち、ビジネスレターに適したフォントとポイントサイズの選択はどれですか?<br> 私を助けてください!私はあなたを最高にブランコにします!
    12·2 answers
  • Owners of individual domains get to decide what content is published on their websites. Why might this autonomy be important to
    12·1 answer
  • Think of an example in your life where a number could be described as data, information, and knowledge
    14·1 answer
  • Perform algorithm time measurement for all three quadratic sorting algorithms for Best Case (already sorted), Average Case (rand
    14·1 answer
  • What type of technology we need to use in order to make sure that users can freely room from one room to another one without wi-
    14·1 answer
  • Which of the following tasks can you perform using a word processor?
    8·1 answer
  • Pls help help me is good help me helping is very good
    10·1 answer
  • HELP 100 points
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!