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
Tamiku [17]
3 years ago
12

The number of operations executed by algorithms A and B is 40n2 and 2n3, respectively. Determine n0 such that A is better than B

for n ≥ n0.
Computers and Technology
1 answer:
Tom [10]3 years ago
8 0

Answer:

Given that:

A= 40n^2

B = 2n^3

By given scenario:

40n^2=2n^3

dividing both sides by 2

20n^2=n^3

dividing both sides by n^2 we get

20 = n

Now putting n=20 in algorithms A and B:

A=40n^2

= 40 (20)^2

= 40 * (400)

A= 16000

B= 2n^3

= 2 (20)^3

= 2(8000)

B= 16000

Now as A and B got same on n = 20, then as given:

n0 <20 for n =20

Let us take n0 = 19, it will prove A is better than B.

We can also match the respective graphs of algorithms of A and B to see which one leads and which one lags, before they cross at n= 20.

You might be interested in
What are the design concepts and assumptions behind a class, an object and the relationship between them? What are the roles met
Triss [41]

Answer:

Object-oriented programming (OOP) is a procedural language and based on classes associated with an object. Without classes and object relationship OOP is not possible. According to program's design concept classes provide abstraction and encapsulation with the help of object. Object have states and behaviors like cat has states like name, color and  cat has also behaviors like  wagging the tail, eating, jumping etc. A class forms template or blueprints for these states and behaviors because different cats have different behaviors and states.

Methods provide a way for encapsulation and accessing private class members with public methods and static fields are sometimes best alternative for global variable. We can use static field when it same for all and shared by all objects of that class and it can save memory because we do not have to initialize it for each object

8 0
3 years ago
John would like to move from the suburbs into the city, but the rent in the city is very high. John has found an apartment he re
maxonik [38]

A list of multiple choices is given;

<span>a)      </span>Purchase a home in the city center instead.

<span>b)      </span>Rent the apartment anyway.

<span>c)       </span>Rent the apartment with a roommate.

<span>d)      </span>Purchase a home in the suburbs instead.


The answer is (C)


John should look for an apartment and share it with a roommate. This will bring down rent expenses to 50% as both John and the roommate will be cost sharing the rent. If the rent expenses go down by 50%, he’ll be able to save an additional 10% and use it for other expenses.

4 0
3 years ago
In Python, the data structure that stores elements of the same data type is called an array.
Serhud [2]

Answer:

Yes

Explanation:

An array is a homogeneous data structure (elements have same data type) that stores a sequence of consecutively numbered objects--allocated in contiguous memory. Each object of the array can be accessed by using its number (i.e., index). When you declare an array, you set its size.

3 0
3 years ago
Jack has a fear of getting up in front of a group of people and giving a presentation. When he gave his last presentation, he ta
dezoksy [38]

Answer:

Jack has to be very calm and try his best to present himself in an outward way and think about the fact that by the end of the night no one will remember that he messed up, I feel like he'll be okay :)

7 0
2 years ago
Read 2 more answers
A(n) __________ port, also known as a monitoring port, is a specially configured connection on a network device that is capable
drek231 [11]

Answer:

The answer is "SPAN"

Explanation:

The full form of SPAN port is  "Switch Port Analyzer", which is used to designed specifically for the interface on a network device, that would be able to monitor all traffic passing across the entire device.

  • The use of this port will also call the mirror ports, that is a popular way of gathering data traffic for tracking purposes.
  • It is primarily used to access the bus switch and all interfaces, which is usually accessible from data transmission.
7 0
3 years ago
Other questions:
  • What is basic function of an operating system?
    10·2 answers
  • Why is there a need to compare and align one's PECs of a successful entrepreneur?
    5·1 answer
  • Think about the five steps to writing an algorithm. Why is each step necessary? Why is it important to be precise when writing c
    15·1 answer
  • How can a user preview the playback of an audio clip in PowerPoint? Use the drop-down menus to complete the statements.
    14·1 answer
  • What are two variables is figure 1 comparing
    10·1 answer
  • When did the mantle of the earth form
    14·2 answers
  • CHALLENGE ACTIVITY 3.7.2: Type casting: Reading and adding values.
    10·1 answer
  • Write a python program that should determine from the range you choose to enter :
    9·1 answer
  • What is the Cycle of Dependency?
    14·1 answer
  • Which bits of the address would be used in the tag, index and offset in a two-way set associative cache with 1-word blocks and a
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!