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
You have repaired a broken LCD panel in a laptop computer. However, when you disabled the laptop, you bent the hinge on the lid
Alex787 [66]
Yes it would take a second or todo
8 0
3 years ago
Which is not a MARKETING impact of technology?
Artist 52 [7]

Answer:

the answer is environmental

6 0
3 years ago
Which is a connectionless protocol in the transport layer? What are the small chunks of data called?
xeze [42]

Answer:

User Datagram Protocol (UDP) , transport-layer segment.

Explanation:

The User Datagram Protocol is popularly known as UDP. It is defined as the communication protocol which is used across the internet for any time sensitive transmission like the DNS lookup or the video playback.

The UDP provides a unreliable and connectionless service to a invoking application.

The transport layers on sending side converts the application $\text{layer }$ messages which it $\text{receives}$ from the $\text{sending application process}$ into a transport layer segment called as the transport layer segments. This is achieved by breaking down the application messages into a smaller chunks and then adding the transport layer header into each chunk so as to create a transport layer segment.

6 0
3 years ago
Read 2 more answers
explain why it would be preferable to use a DATE data type to store date data insetad of a character data type
Varvara68 [4.7K]

Answer:

We're no strangers to love

You know the rules and so do I

A full commitment's what I'm thinking of

You wouldn't get this from any other guy

I just wanna tell you how I'm feeling

Gotta make you understand

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

We've known each other for so long

Your heart's been aching but you're too shy to say it

Inside we both know what's been going on

We know the game and we're gonna play it

And if you ask me how I'm feeling

Don't tell me you're too blind to see

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

Never gonna give, never gonna give

(Give you up)

(Ooh) Never gonna give, never gonna give

(Give you up)

We've known each other for so long

Your heart's been aching but you're too shy to say it

Inside we both know what's been going on

We know the game and we're gonna play it

I just wanna tell you how I'm feeling

Gotta make you understand

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cry

Never gonna say goodbye

Never gonna tell a lie and hurt you

Never gonna give you up

Never gonna let you down

Never gonna run around and desert you

Never gonna make you cryy

6 0
2 years ago
Using MRTG, Ntop, and SNMPC to collect flow data from your routers and switches to identify traffic/packet anomalies is an examp
laiz [17]

Is an example of reactive, signature based IDS/IPS

Reactive, signature based IDPS technology is one of the many methodologies used to detect attacks. In a signature based IDS, a misuse detection identifies intrusions by watching for patterns of traffic and compare them against observed events or a database of signatures from known threats. Reactive IDS/IPS, on the other hand, will not only detect and alert malicious traffic but also take pre-defined proactive actions. Using MRTG, Ntop, and SNMPC in routers will monitor traffic and help network managers easily see issues like DOS attacks and security problems.


3 0
3 years ago
Read 2 more answers
Other questions:
  • Despite its vivid design, the website for Lolly's Bookstore did not seem to attract customers who lingered. In fact, most websit
    13·1 answer
  • Drag each storage device to its category.
    7·1 answer
  • What does it mean to say that two variables are negatively correlated?
    6·1 answer
  • Let’s say you’re publishing a message with the Hootsuite Composer. The message contains a link to a landing page, and you want t
    9·1 answer
  • Suppose that f is a function with a prototype like this: void f(________ head_ptr); // Precondition: head_ptr is a head pointer
    6·1 answer
  • A 5-stage MIPS pipeline has a register file without forwarding mechanism. How many NOPs (or bubbles) will you need to add to mak
    9·1 answer
  • If you do not specify any criteria in a delete query, Access will delete all the records in the table. Truth or False
    11·1 answer
  • List and describe each of the activities of technology
    11·1 answer
  • Write a boolean expression that is true if s references the string end.
    8·1 answer
  • a central issue in the microsoft antitrust lawsuit involved microsoft's integration of its internet browser into its windows ope
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!