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
In the past, workers would usually complete ______. a. A variety of tasks on a daily basis b. The same tasks every day c. Thinki
yKpoI14uk [10]

Answer:

B

Explanation:

did it on edge

5 0
3 years ago
Read 2 more answers
Eric would like to have a callout text box that makes it look as if the character in an image is speaking. Which object should h
jeka57 [31]
Picture or word art.
5 0
2 years ago
Read 2 more answers
A(n) ____ is a web-based repository of information that anyone can access, contribute to, or modify.
IgorLugansk [536]

Wiki exists as a web-based repository of information that anyone can access, contribute to, or alter.

<h3>What is a wiki?</h3>

A wiki exists as a combined tool that authorizes students to donate and change one or more additional pages of course-connected materials. Wikis exist as collaborative in nature and promote community-building within a course. Essentially, a wiki exists as a web page with an open-editing system.

A wiki exists as a website or online resource that can be revised by multiple users. Some wikis, such as Wikipedia, exist publicly accessible. Others exist utilized by associations to manage data in-house, allowing teams to efficiently share knowledge and work together better effectively.

A wiki exists on a Web site that authorizes users to add and update content on the site utilizing their own Web browser. This exists created probable by Wiki software that operates on the Web server. Wikis finish up being driven mainly by a combined effort of the area visitors.

To learn more about wiki refer to:

brainly.com/question/25153373

#SPJ4

5 0
2 years ago
What finger should be on the Y key?
geniusboy [140]

Answer:

Right index

Explanation:

6 0
3 years ago
Read 2 more answers
What do you hope that people see in your digital footprint 5 years from now? ​
nikdorinn [45]

Answer:

I hope they see me playing with my dog (who died a few months ago) Malikeye

Explanation:

none :)

5 0
2 years ago
Other questions:
  • The utilization of a subset of the performance equation as a performance metric is a pitfall. To illustrate this, assume the fol
    13·1 answer
  • Which of the following refers to a feature of wikis that allows the restoring of earlier work in the event of a posting error, i
    9·1 answer
  • Software referd to the physical parts of the computer True or False
    9·2 answers
  • Among the rights you have as a user of computing resources is the right to​ _______.
    12·2 answers
  • When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the accoun
    15·1 answer
  • Grace whistles while tickling Camille with a feather. Eventually, Camille starts to squirm and giggle every time Grace whistles,
    10·1 answer
  • EDVAC stands for? on which theory it is made on?
    15·1 answer
  • Which procedure is used as a physical barrier to secure data against unauthorized access in a cloud storage data center?
    6·1 answer
  • Suppose there are two hosts, S and R. They are communicating over a TCP connection, and R has already received from S al bytes f
    11·1 answer
  • I have to write this in Java, but i've never even learned it before and i'm completely lost
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!