2.2 Interval correctness proof Flashcards
Steps to prove correctness
- Express mathematically (and prove this)
- Using mathematical definition prove correct set
- Using mathematical definition prove maximum set
What is the mathematical definition for the greedy internal algorithm
Input R
How to prove that the mathematical definition for interval scheduling is equal to the psuedo-code
How to prove the mathematical defintion for interval scheduling outputs a compatible set
How to prove the mathematical defintion for interval scheduling outputs a maximum set (greedy stays ahead method)
Steps for greedy stays ahead arguments
What is the premise of greedy stays ahead arguments
This proof works by showing that, according to some measure, the greedy algorithm always is at least as far ahead as the optimal solution during each iteration of the algorithm. Once you have established this, you can then use this fact to show that the greedy algorithm must be optimal.
What is the premise for exchange arguments
They work by showing that you can iteratively transform any optimal solution into the solution produced by the greedy algorithm without changing the cost of the optimal solution, thereby proving that the greedy solution is optimal.
What are the steps for exchange arguments (greedy algorithms)
How does the exchange proof work for interval scheduling