Lecture 2: Greedy Algorithms II. Shang-Hua Teng. Optimization Problems. A problem that may have many feasible solutions. Each solution has a value In maximization problem , we wish to find a solution to maximize the value
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
where f(c) is the freq of c, dT(c) is the tree depth of c, which corresponds to the code length of c
Since each swap does not increase the cost, the resulting tree T’’ is also an optimal tree
B(T’’) B(T), but T is optimal,
B(T) B(T’’) B(T’’) = B(T)Therefore T’’ is an optimal tree in which x and y appear as sibling leaves of maximum depth
B(T’) = 45*1+12*3+13*3+(5+9)*3+16*3= B(T) - 5 - 9
B(T) = 45*1+12*3+13*3+5*4+9*4+16*3
The day WILL COME that no university is rejected
Each candidate accepts the last university to whom she/he said “maybe”
Improvement Lemma: If a candidate has an offer, then she/he will always have an offer from now on.Corollary: Each candidate will accept her/his absolute best offer received during the process. [Advantage to candidate?]Corollary: No University can be rejected by all the candidatesCorollary: A matching is achieved by Gale-Shapley
Each candidate will accept her/his absolute best offer received during the process. [Power to reject: Advantage to candidate?]But university has the power to determine when and whom to make an offer to [Power to choose: Advantage to University]
Who is better off in Gale-Shapley Algorithm, the univeristies or the candidates?
Flawed Attempt: “The candidate at the top of USC’s list”
A university’s optimal match is the highest ranked candidate for whom there is some stable pairing in which they are matched
The candidate is the best candidate it can conceivably be matched in a stable world.
Presumably, that candidate might be better than the candidate it gets matched to in the stable pairing output by Gale-Shapley.
A university’s pessimal match is the lowest ranked candidate for whom there is some stable pairing in which the university is matched to.
That candidate is the least ranked candidate the university can conceivably get to be matched to in a stable world.
The Gale-Shapley Algorithm always produces a university-optimal, and candidate-pessimal pairing.
We are assuming that Adleman is UCLA’s optimal match: Adleman likes USC more than UCLA. USC likes Adleman at least as much as its optimal match.