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
Moore's law benefits
ss7ja [257]

Answer:

performance -processor speeds increases because the smaller the transistor, the faster it can operate. Additionally, the transistors become closer to each other which reduces the latency between them.

2.Complexity-for a  given size the number of transistors doubles with the reduction in feature size

Explanation:

3 0
2 years ago
Most network cards contain a port that accepts a(n) ____, which looks similar to a telephone connector but is larger.
Vadim26 [7]
YOUR ANSWER IS -------- It accepts a RJ-45 connector
hope i helped you :).
take care
8 0
3 years ago
A PC is not able to connect to a wired network. Pinging the loopback address is successful, but the gateway cannot be reached. O
tangare [24]
Usually that means a physical connection - so either a loose or faulty ethernet cord.
5 0
2 years ago
List the invoice number and invoice date for each invoice that was created for James Gonzalez but that does not contain an invoi
Ludmilka [50]

Answer:

Derive FROM invoice_transaction, invoice_details, item_details

and JOIN customer_details  ON (invoice_transaction.CUST_ID = customer_details.CUST_ID  AND customer_details.FIRST_NAME = 'James'   AND customer_details.LAST_NAME  = 'Gonzalez')

Explanation:

The following details will be there in the invoice

  1. item_details
  2. rep_details
  3. invoice_details
  4. customer_details
  5. invoice_transaction

 Derive FROM invoice_transaction, invoice_details, item_details

and JOIN customer_details  ON (invoice_transaction.CUST_ID = customer_details.CUST_ID  AND customer_details.FIRST_NAME = 'James'   AND customer_details.LAST_NAME  = 'Gonzalez')

6 0
2 years ago
Generally considered to be the most important information security policies, what item below defines the actions a user may perf
tamaranim1 [39]

Answer:

A. Acceptable use policies

Explanation:

These specific actions that the user may perform are all described in the acceptable use policy. The company usually requires that the user read and sign this policy before being granted a network ID into the system itself. By signing this agreement the individual user agrees to perform ONLY the actions listed in the agreement and nothing else and are restricted from unauthorized areas.

3 0
3 years ago
Other questions:
  • The OSHA Workplace Poster 3165 is optional for workplaces.<br> A) True<br> B) False
    13·2 answers
  • What is the very first thing a user usually must do to gain access to a secure computer?
    7·1 answer
  • What is an example of a governmental influence ?
    9·2 answers
  • In one to two sentences, explain why citizens pay taxes
    8·1 answer
  • Rounding up and down for 389,422
    7·1 answer
  • Of all excavation hazards, _______ poses the greatest risk
    8·1 answer
  • Quality answers will be appriciated! :)​
    15·2 answers
  • The appropriate semaphore in C to give one more turn to writer so it can clean up IPC objects is WRITE_SEM. Is it true or false
    5·1 answer
  • it is good to know and use the npsd framework while solution envisioning as part of the value discovery cycle. What is NPSD?
    10·1 answer
  • Which is a type of artificial neural network (ann) that includes many layers to deal with complex problems that may have very la
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!