Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Greedy

Tiffany
November 01, 2022

 Greedy

Tiffany

November 01, 2022
Tweet

More Decks by Tiffany

Other Decks in Science

Transcript

  1. Activity Selection: Shortest Shortest duration does not work: 47 /

    55
  2. Activity Selection: First Start Earliest start time doesn’t work either:

    48 / 55
  3. Activity Selection: Fewest Overlaps Fewest overlaps doesn’t work either: 49

    / 55
  4. Activity Selection: Shortest Delay Nor shortest delay to next activity:

    50 / 55
  5. Activity Selection: Earliest End Time Earliest end time looks good:

    Note there are equally good alternatives here, but nothing better. But one example does not convince us.. 51 / 55
  6. Refute Maleficent’s Claim Ok Maleficient,... I We want you to

    think about the first activity you picked that we did not. I Can you just swap it out with one of ours that overlaps with it? I If so, just do that (you aren’t getting any extra benefit). I Repeat this swapping until the answer is no... 53 / 55
  7. Refute Maleficent’s Claim So now we have... I But we

    can’t just swap out Maleficent’s activity for ours, so the picture needs to look more like this: Because Maleficent needs some other activity in her choices that conflicts with ours (so she can’t just swap) I But for that to happen, her activity has to end earlier than ours—but we picked greedily based on end time! 54 / 55