{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

cse101_11_18_11

cse101_11_18_11 - Greedy Algortihms 1 Interval Scheduling a...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Greedy Algortihms 1. Interval Scheduling a. Given intervals [s i , e i ], I = 1…n, find the largest set of them that do not overlap b. Greedy Strategy: Repeat Pick the interval with earliest ending ime that doesn’t conflict with intervals already chosen. c. Why is this optimal? Let e* be some optimal solution. E* = [s 1 *, e 1 *], [s 2 *, e 2 *], … in order Quality of solution is e*. let e be our algorithm’s solution. E = [s 1 , e 1 ], [s 2 , e 2 ], in order Want to show e = e* Claim: for all k, e <= e* Proof: our alg chooses c 1 to be the earliest ending time. Therefore, e 1 <= e 1 *. When choosing the second interval, [s 2 *, e 2 *] is a possibility. We pick the earliest ending time, so e 2 <= e 2 *. And so on. 2. Minimum spanning tree a. A network-building problem You want to network a set of computers. You have a set of potential links between pairs of computers. Each link has a maintenance cost. Find the cheapest network. Make a graph Node <-> computer Edge <-> potential link Edge weight <-> maintenance cost b.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern