answer.
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
melomori [17]
2 years ago
13

There are two algorithms called Alg1 and Alg2 for a problem of size n. Alg1 runs in n2 microseconds and Alg2 runs in 100n log n

microseconds. Alg1 can be implemented using 4 hours of programmer time and needs 2 minutes of CPU time. On the other hand, Alg2 requires 15 hours of programmer time and 6 minutes of CPU time.
1. If programmers are paid 20 dollars per hour and CPU time costs 50 dollars per minute, how many times must a problem instance of size 500 be solved using Alg2 in order to justify its development cost?

Computers and Technology
1 answer:
nataly862011 [7]2 years ago
8 0

The answer & explanation for this question is given in the attachment below.

You might be interested in
CHALLENGE ACTIVITY 2.9.1: Coordinate geometry. Determine the distance between points (x1, y1) and point (x2, y2), and assign the
Burka [1]

Answer:

<em>import java.util.Scanner;</em>

<em>public class TestClass {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner input = new Scanner(System.in);</em>

<em>        System.out.println("Enter value for x1, x2, y1, y2");</em>

<em>        double x1 = input.nextDouble();</em>

<em>        double x2 = input.nextDouble();</em>

<em>        double y1 = input.nextDouble();</em>

<em>        double y2 = input.nextDouble();</em>

<em>        double xVal = Math.pow((x2-x1),2);</em>

<em>        double yVal = Math.pow((y2-y1),2);</em>

<em>        double distance = Math.sqrt(xVal+yVal);</em>

<em>        System.out.println(distance);</em>

<em>    }</em>

<em>}</em>

Explanation:

The code is written in Java Programming Language.

This code simply implements the formula for the distance between two points given as

distance =\sqrt{(x2-x1)^{2}+(y2-y1)^{2}  )}

The scanner class is used to prompt and receive all the variables that are declared.

Note that we used two special Java methods (Math.pow and Math.sqrt)

7 0
2 years ago
You live "out in the middle of nowhere" and feel there is no need to protect your internet connection because there is no one th
Anvisha [2.4K]

Potential uploaded viruses, personal information being lost, blackmail, identity theft.

7 0
1 year ago
A file ____ includes the three or four characters that follow the dot in the filename and identify the files type.
vodka [1.7K]
A file extension includes the three or four characters that follow the dot in the file name
6 0
1 year ago
Read 2 more answers
If I execute the expression x &lt;- 4L in R, what is the class of the object `x' as determined by the `class()' function?
FinnZ [79.3K]

Answer:

integer

Explanation:

The expression can be implemented as follows:

x <- 4L

class(x)

Here x is the object. When this expression is executed in R, the class "integer" of object 'x' is determined by the class() function. R objects for example x in this example have a class attribute determines the names of the classes from which the object inherits. The output of the above expression is:

"integer"

Here function class prints the vector of names of class i.e. integer that x inherits from. In order to declare an integer, L suffix is appended to it. Basically integer is a subset of numeric. If L suffix is not appended then x<-4 gives the output "numeric". Integers in R are identified by the suffix L while all other numbers are of class numeric independent of their value.

7 0
1 year ago
Assume that success is a variable of type boolean that has been declared. Assume that processor refers to an object that provide
Iteru [2.4K]
Try {
AutoFactory.shutdown();
} catch (ProductionInProgressException e) {
AutoFactory.reset();
}
6 0
1 year ago
Other questions:
  • U.S. industries like steel, computers, and energy need to be protected from foreign competition to ensure which of the following
    6·2 answers
  • your monthly living expenses are $1500 on an income of $1,650 per month. your goal is to have an emergency fund of 4 times your
    5·1 answer
  • Refer to the exhibit. pc1 issues an arp request because it needs to send a packet to pc3. in this scenario, what will happen nex
    9·1 answer
  • Following are groups of three​ phrases, which group states three ways to improve your​ concentration?
    13·1 answer
  • Software code is tested, debugged, fixed, verified, and then:
    11·1 answer
  • Which of the following commands uses correct syntax for matching the patterns bunk or bank at the end of a line of text?
    5·1 answer
  • Write a program that allows you to create a file of customers for a company. The first part of the program should create an empt
    12·1 answer
  • Susie works for an architectural firm and the partners have always drawn the plans for projects by hand. Though Susie learned ho
    11·1 answer
  • Initialize the list short_names with strings 'Gus', 'Bob', and 'Zoe'. Sample output for the givenprogram:Gus Bob Zoeshort_names
    13·1 answer
  • What is the value of x after each of the following statements is encountered in a computer program, if x=1 before the statement
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!