220 likes | 433 Views
Evaluation of Algorithms for the List Update Problem. Suporn Pongnumkul R. Ravi Kedar Dhamdhere. Online Algorithms. Definition: An algorithm that must process each input in turn, without detailed knowledge of future inputs. Examples: Ski Rental, List Update.
E N D
Evaluation of Algorithms for the List Update Problem Suporn Pongnumkul R. Ravi Kedar Dhamdhere
Online Algorithms • Definition: An algorithm that must process each input in turn, without detailed knowledge of future inputs. • Examples: Ski Rental, List Update
Example Online Problem:Ski Rental Problem Scenario • I am a skier. • Each day, I have to either rent a pair of skis for $1 per day, or buy them for $T. • BUT I don’t know when the ski season will end. • What should I do?????
Strategies for Ski Rental Problem • First Strategy: I will buy the skis on the first day. • Second Strategy: I will keep renting the skis. What should I do??????
Wait! • Why did I talk about paying a number of times more than I should have? • Why not some amount of dollars more than I should have?
Competitive Analysis • Definition: An analysis in which the performance of an online algorithm is compared to the best that could have been achieved if all the inputs had been known in advance.
A: Our online algorithm CA() OPT: Optimal Offline algorithm COPT() A is c-competitive if a CA() ≤ c COPT() + a for all request sequences Competitive Ratio
Back to Ski Rental Problem • Consider this algorithm: I’ll rent the skis for T days, and buy them on the T+1st day. • Claim: The competitive ratio of this algorithm is 2.
L: y w z x v u List Update Problem • Self-organizing sequential search • Unsorted list • Received a sequence of requests • Cost of accessing the ith element of the list is i.
List Update Problem (Cont.) • Must access the requested item. • We can reorganize the list. • We can move the requested element to any position closer to the front of the list for FREE. • Any other transposition costs 1.
Move-to-Front (MTF) • When an element is accessed, move it to the front of the list. • Theorem: [Sleator, Tarjan, 1985] MTF has competitive ratio 2 against optimal offline algorithm.
FREQUENCY-COUNT (FC) • Maintain a frequency counter for each item, and keep the list in nonincreasing order of their frequencies. • FC has a bad competitive ratio = Ω(n), where n is the length of the list. • FC does well in typical cases.
Average Case Analysis • Assume each request comes from a fixed probability distribution, independent of previous requests. Suppose the ith item has probability pi. Design algorithms to minimize the expected cost. • Optimal strategy is to keep the list sorted in nonincresing order of pi. • Fact: FC converges to optimal solution.
Need a new model? • Most real-world settings don't behave either like a discrete distribution, or like a worst-case one. • Can we design an algorithm that does well in both typical and worst-case? • How could we analyze such algorithms?
Previous Work • Diffuse Adversary • Beyond Competitive Analysis [Koutsoupias, Papadimitriou, 2000] • Statistical Adversary • A Statistical Adversary for On-line Algorithms [Raghavan, 1991]
Hybrid Model • Assume a fixed probability distribution, • For each request, with probability , let the adversary change the request. • Average Case Analysis • Competitive Analysis • Known probability distribution with uncertainty.
Current Difficulties • Cannot settle on a proper OPT to evaluate performance under this model. • Finite vs. infinite horizon. • Competitive ratio with optimal offline adversary: reduces to online case • Comparison with static list is inappropriate
Lead-Time Quotation Problem Scheduling Problem • Each job takes 1 day to process. • Everyday, I get some number of jobs. • For each job j, I have to accept with a deadline (dj), or reject it right away. • Profit = l – dj. • Goal: Maximize the total profit
Lead-Time Quotation Problem • Competitive Ratio of Q-FRAC algorithm = 1.618 [Keskinocak, Ravi, Tayur, 2001] • We are working on • Average Case Analysis • Hybrid Model
Our goals • Investigate the OPT for our List Update Hybrid Model. • Average Case Analysis and Hybrid Model for Lead-time Quotation.