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
REY [17]
3 years ago
14

"Suppose that instead of always selecting the first activity to finish, we instead select the last activity to start that is com

patible with all previously selected activities. De- scribe how this approach is a greedy algorithm, and prove that it yields an optimal solution."
Computers and Technology
1 answer:
Pachacha [2.7K]3 years ago
8 0

Answer:

Explanation:

We can say according what we

already know that Greedy algorithm selects the shortest path, and we can also say that the given approach is greedy as it selects the last activity to start as it is the shortest path to take.

Now suppose we are given a set S = {x1, x2,..... , xn} (where x1, x2…. are activities), and xi = [si, fi), and we try to find an optimal solution by selecting the last activity to start that is compatible with all previously selected

activities.

Now create a set S’ = {x’1, x’2, · · · , x’n}, where x’i = [f’i, si). (x’1 = x1 in reverse). We can see that, a subset of {x1, x2, · · · , xn}⊂S is mutually compatible if and only if the corresponding subset {x’1, x’2, · · · , x’n} ⊂ S’ is also mutually compatible. Thus, an optimal solution for S maps directly to an

optimal solution for S’ and vice versa.

The given algorithm when run on S, produces the same result as the greedy algorithm when run on S’. The solution of algorithm for S corresponds to the solution of greedy algorithm for S’, and hence the algorithm is optimal.

You might be interested in
How can i see what websites are visited on my wifi
grigory [225]

Answer:

If you want to view sites visited on a wireless network, you can check the logs stored by the wireless router to see what information is available. You may need to set your logging settings to capture the data you want.

Explanation:

5 0
3 years ago
Enables you to temporarily hide all the open windows except the one you are viewing.
solniwko [45]
Minimizing the other windows or full screen the one your looking at with F11 button
7 0
3 years ago
advance in technology have enabled more and more people to purchase computers that would have once been too expensive. which of
Akimi4 [234]
I believe it is Netbooks
3 0
3 years ago
Over a TCP connection, suppose host A sends two segments to host B, host B sends an acknowledgement for each segment, the first
irinina [24]

Over a TCP connection, suppose host A sends two segments to host B, host B sends an acknowledgement for each segment, the first acknowledgement is lost, but the second acknowledgement arrives before the timer for the first segment expires is True.

True

<u>Explanation:</u>

In network packet loss is considered as connectivity loss. In this scenario host A send two segment to host B and acknowledgement from host B Is awaiting at host A.

Since first acknowledgement is lost it is marked as packet lost. Since in network packet waiting for acknowledgement is keep continues process and waiting or trying to accept acknowledgement for certain period of time, once period limits cross then it is declared as packet loss.

Meanwhile second comes acknowledged is success. For end user assumes second segments comes first before first segment. But any how first segment expires.

3 0
3 years ago
Which option refers to a combination of the three main services in cloud computing? A. SaaS B. XaaS C. IaaS D. MaaS E. PaaS
matrenka [14]

Answer:

XaaS

Explanation:

XaaS combines one or three main services in cloud computing, which are SaaS, IaaS, and PaaS. XaaS is a service not commonly used but is emerging quick and fast. XaaS is often generalized as a term that means the delivery of “anything-as-a-service.” Rather than providing solutions locally within a company, XaaS uses cloud computing technology to offer services. Xaas includes anything from an organization renting computing solutions over the internet through the cloud to a web programmer opening up an editor in his browser without the need to install the editor on his computer. Services ordered over the internet and purchased according to the needs of the consumer is referred to as XaaS.

7 0
3 years ago
Read 2 more answers
Other questions:
  • NEED THIS NOW PLEASE!!!! (I AM NOT JOKING I HAVE TO SUBMIT IN 5 MINUTES)
    13·2 answers
  • The primary key is a field that uniquely and completely identifies a record.
    14·2 answers
  • You are part of a team that is setting up a movie streaming service. The company is planning on initially making available 500 m
    8·1 answer
  • A. Write a program that asks the user to enter an integer, then prints a list of all positive integers that divide that number e
    11·1 answer
  • Which of the selections below is not a benefit of imaging the computers on your network? There are fewer licensing fees because
    11·1 answer
  • Indicate whether the following statements are true or false:
    14·2 answers
  • Dynamic addressing: __________.
    12·2 answers
  • First calculating device​
    12·2 answers
  • Your first submission for the CIS 210 Course Project should include the following functionality: - Requests the user to input hi
    13·1 answer
  • Math and science are the foundation from which drafters work<br><br> True<br> False
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!