evaluation of algorithms for the list update problem
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
Evaluation of Algorithms Evaluation of Algorithms for the List Update for the List Update
Problem Problem
Suporn PongnumkulR. Ravi
Kedar Dhamdhere
Online AlgorithmsOnline 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:Example Online Problem:Ski Rental ProblemSki 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 Strategies for Ski Rental ProblemProblem
• 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 AnalysisCompetitive 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.
Competitive RatioCompetitive Ratio
A:Our online algorithm
CA()
OPT:Optimal Offline
algorithm
COPT()
A is c-competitive if aCA() ≤ c COPT() + a
for all request sequences
Back to Ski Rental ProblemBack 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.
List Update ProblemList Update Problem• Self-organizing sequential search
• Unsorted list
• Received a sequence of requests
• Cost of accessing the ith element of the list is i.
y w z x v uL:
List Update Problem (Cont.)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)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)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 AnalysisAverage 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?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 WorkPrevious Work
• Diffuse Adversary – Beyond Competitive Analysis
[Koutsoupias, Papadimitriou, 2000]
• Statistical Adversary– A Statistical Adversary for On-line
Algorithms [Raghavan, 1991]
Hybrid ModelHybrid 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.
),...,,( 21 npppp
01
10
Current DifficultiesCurrent 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 ProblemLead-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 ProblemLead-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 goalsOur goals
• Investigate the OPT for our List Update Hybrid Model.
• Average Case Analysis and Hybrid Model for Lead-time Quotation.
Questions?Questions?
Thank youThank you !!! !!!