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
Natasha_Volkova [10]
2 years ago
12

) Suppose algorithm A takes 10 seconds to handle a data set of 1000 records. Suppose the algorithm A is of complexity O(n2). Ans

wer the following: (i) Approximately how long will it take to handle a data set of 1500 records? Why? (ii) How long will it take to handle a data set of 5000 records? Can you come up with a reason why this will not be entirely accurate but will just be an approximation?
Computers and Technology
1 answer:
Mice21 [21]2 years ago
8 0

Answer:

i) The time taken for 1500 records = 15 seconds.

ii) The time taken for 1500 records = 50 seconds.

Explanation:

A is an O(n) algorithm.

An algorithm with O(n) efficiency is described as a linearly increasing algorithm, this mean that the rate at which the input increases is linear to the time needed to compute that algorithm with n inputs.

From the question, it is given that for 1000 records, the time required is: 10 seconds.

Algorithm time taken is O(n)

Hence,

1) For 1,500 records

=> 10/1000 = x/1500

=> 10x1500/1000 = x

x = 15 seconds

Thus, the time taken for 1500 records = 15 seconds.

2) For 5,000 records

=> 10/1000 = x/5000

=> 10x5000/1000 = x

x = 50 seconds

Thus, the time taken for 1500 records = 50 seconds.

You might be interested in
The technique that allows you to have multiple logical lans operating on the same physical equipment is known as a.
sergiy2304 [10]

Answer:

As far as i know, it is Virtual Local Area Network (VLAN). You can read more about this here: https://en.wikipedia.org/wiki/VLAN

5 0
2 years ago
Which of the following class definition defines a legal abstract class Group of answer choices public class Rectangle abstract {
valkas [14]
<h2>Question</h2>

Which of the following class definition defines a legal abstract class Group of answer choices

(a)

public class Rectangle abstract {

   public abstract double findArea ( );

   

}

(b)

public abstract class Rectangle {

   public abstract double findArea ( );

   

}

(c)

public class Rectangle {

   public abstract double findArea ( );

   

}

(d)

public class abstract Rectangle {

   public abstract double findArea ( );

   

}

<h2>Answer:</h2>

(b)

public abstract class Rectangle {

   public abstract double findArea ( );

}

<h2>Explanation:</h2>

When a class is declared with the abstract keyword, the class is called an abstract class. Abstract classes cannot be instantiated and may include one or more abstract methods. If a class contains an abstract method, then it (the class) must be declared abstract.

In Java, abstract classes are defined using the following format:

<em>[access_modifier]</em> abstract class <em>[name_of_class]</em>

[access_modifier] specifies the access modifier of the class which could be public, private, e.t.c

abstract is the keyword that specifies that the class is an abstract class.

class is a keyword used for defining classes

name_of_class specifies the name of the class.

The only option that fulfils this format is <em>option b</em> where;

(i) The access modifier is public

(ii) The name of the class is Rectangle

Option a is not correct because the <em>abstract</em> keyword is supposed to come before the <em>class</em> keyword.

Option c is not correct because the keyword <em>abstract</em> is missing. In other words, the class must be declared abstract since it contains abstract method findArea();

Option d is not correct because the <em>abstract</em> keyword is supposed to come before the <em>class</em> keyword.

7 0
2 years ago
Yall rachits and yall eat butt xD
Trava [24]
Please use this for questions.
6 0
2 years ago
Read 2 more answers
Which of the following expressions yields an integer between 0 and 100, inclusive? Question 5 options: (int)(Math.random() * 100
Alex17521 [72]

Answer:

(b) (int)(Math.random() * 101)

Explanation:

Given

min = 0 --- minimum

max =100 --- maximum

Required

Java expression to generate random integer between the above interval

The syntax to do this is:

(int)(Math.random((max - min) + 1) + min)

Substitute the values of max and min

(int)(Math.random((100 - 0) + 1) + 0)

Simplify the expression

(int)(Math.random(100 + 1) + 0)

(int)(Math.random(101) + 0)

(int)(Math.random(101))

Hence, the right option is:

(b) (int)(Math.random() * 101)

3 0
2 years ago
One of the implications of price elasticity of technology products is that:
Stels [109]

Answer:

 The main implication of the price elasticity in the various technology products may lead increase the productivity of the products as customers buy more products due to the cheaper price of the product.

as die to the time lower costs will prompt higher deals volumes, which may compensate for the lower overall revenue. Now and again, raising the cost of your item or administration will prompt higher overall revenues yet will bring down your business volumes.

It also offer many advantages like high reliability, security and the scalability.

8 0
3 years ago
Other questions:
  • About n processes are time-sharing the CPU, each requiring T ms of CPU time to complete. The context switching overhead is S ms.
    12·1 answer
  • When looking to ensure your website is easily accessible by mobile users, what should you focus on doing first
    8·1 answer
  • The number of bits per pixel is called what
    7·1 answer
  • What best describes deflation?
    9·2 answers
  • Find the reciprocal of 7/2 × 3/5<br>​
    6·1 answer
  • How does white balancing affect the images recorded by a camera?
    15·1 answer
  • Assume the availability of a function named oneMore. This function receives an integer and returns one more than its parameter.
    14·1 answer
  • Excel files have a default extension of ?
    12·1 answer
  • There are many commercially made household linens found in the?
    7·1 answer
  • ____ characterized the period now known a Web 1. 0. Augmented reality
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!