CSE 5314 – Spring 2004 Homework #1 - Solutions [Soumya Sanyal] Q 1.5: Prove that the algorithm “MTF every-other-access” (i.e. move the item to the front.

Slides:



Advertisements
Similar presentations
Analysis of Algorithms II
Advertisements

Truthful Mechanisms for Combinatorial Auctions with Subadditive Bidders Speaker: Shahar Dobzinski Based on joint works with Noam Nisan & Michael Schapira.
Online Algorithm Huaping Wang Apr.21
CSE 4101/5101 Prof. Andy Mirzaian. Lists Move-to-Front Search Trees Binary Search Trees Multi-Way Search Trees B-trees Splay Trees Trees Red-Black.
Mathematical induction Isaac Fung. Announcement ► Homework 1 released ► Due on 6 Oct 2008 (in class)
Exercise 1.1(Paid Exchanges Necessary) Consider the three-element list with the following initial configuration: (i.e. x1 is at the front). Prove that.
QuickSort Average Case Analysis An Incompressibility Approach Brendan Lucier August 2, 2005.
Theoretical Analysis. Objective Our algorithm use some kind of hashing technique, called random projection. In this slide, we will show that if a user.
The Solution of a Difference Equation for a Compound Interest Account.
(CSC 102) Discrete Structures Lecture 14.
Institute of Computer Science University of Wroclaw Geometric Aspects of Online Packet Buffering An Optimal Randomized Algorithm for Two Buffers Marcin.
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
Dynamic Wavelength Allocation in All-optical Ring Networks Ori Gerstel and Shay Kutten Proceedings of ICC'97.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Chain Rules for Entropy
Infinite Horizon Problems
1 Algorithms for Large Data Sets Ziv Bar-Yossef Lecture 13 June 25, 2006
Evaluation of Algorithms for the List Update Problem Suporn Pongnumkul R. Ravi Kedar Dhamdhere.
CPSC 668Set 5: Synchronous LE in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Self-Organizing Lists1 Self-Organizing Lists Competitive Analysis Lee Wee Sun SoC Modified by Orgad Keller Modified again by.
1 Ecole Polytechnque, Nov 7, 2007 Scheduling Unit Jobs to Maximize Throughput Jobs:  all have processing time (length) = 1  release time r j  deadline.
Online Oblivious Routing Nikhil Bansal, Avrim Blum, Shuchi Chawla & Adam Meyerson Carnegie Mellon University 6/7/2003.
The k-server Problem Study Group: Randomized Algorithm Presented by Ray Lam August 16, 2003.
Packet Scheduling with Bounded Buffers A router can send one packet at a time Arriving packets must be queued in a finite buffer B (though we often ignore.
Competitive Paging Algorithms Amos Fiat, Richard Karp, Michael Luby, Lyle McGeoch, Daniel Sleator, Neal Young presented by Seth Phillips.
Online Function Tracking with Generalized Penalties Marcin Bieńkowski Institute of Computer Science, University of Wrocław, Poland Stefan Schmid Deutsche.
Introduction to AEP In information theory, the asymptotic equipartition property (AEP) is the analog of the law of large numbers. This law states that.
Functions of Random Variables. Methods for determining the distribution of functions of Random Variables 1.Distribution function method 2.Moment generating.
Introduction to Proofs
Yossi Azar Tel Aviv University Joint work with Ilan Cohen Serving in the Dark 1.
PROBABILITY AND STATISTICS FOR ENGINEERING Hossein Sameti Department of Computer Engineering Sharif University of Technology Two Functions of Two Random.
MATH 224 – Discrete Mathematics
Functions of Random Variables. Methods for determining the distribution of functions of Random Variables 1.Distribution function method 2.Moment generating.
Online Paging Algorithm By: Puneet C. Jain Bhaskar C. Chawda Yashu Gupta Supervisor: Dr. Naveen Garg, Dr. Kavitha Telikepalli.
Trust-Aware Optimal Crowdsourcing With Budget Constraint Xiangyang Liu 1, He He 2, and John S. Baras 1 1 Institute for Systems Research and Department.
Chapter 3. Pitfalls Initialization Ambiguity in an iteration
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
Choi What is a Recursion Formula? A recursion formula consists of at least 2 parts. One part gives the value(s) of the first term(s) in the sequence,
1 ECE-517 Reinforcement Learning in Artificial Intelligence Lecture 7: Finite Horizon MDPs, Dynamic Programming Dr. Itamar Arel College of Engineering.
Online Algorithms. Introduction An offline algorithm has a full information in advance so it can compute the optimal strategy to maximize its profit (minimize.
The Selection Problem. 2 Median and Order Statistics In this section, we will study algorithms for finding the i th smallest element in a set of n elements.
Market Design and Analysis Lecture 5 Lecturer: Ning Chen ( 陈宁 )
1 Online algorithms Typically when we solve problems and design algorithms we assume that we know all the data a priori. However in many practical situations.
EE 685 presentation Utility-Optimal Random-Access Control By Jang-Won Lee, Mung Chiang and A. Robert Calderbank.
1 Combinatorial Algorithms Local Search. A local search algorithm starts with an arbitrary feasible solution to the problem, and then check if some small,
CSE 5314 On-line Computation Homework 1 Wook Choi Feb/26/2004.
Alternative Wide Block Encryption For Discussion Only.
Growth of Functions. 2 Analysis of Bubble Sort 3 Time Analysis – Best Case The array is already sorted – no swap operations are required.
Jennifer Campbell November 30,  Problem Statement and Motivation  Analysis of previous work  Simple - competitive strategy  Near optimal deterministic.
Online Social Networks and Media
Charles University FSV UK STAKAN III Institute of Economic Studies Faculty of Social Sciences Institute of Economic Studies Faculty of Social Sciences.
Sorting: Implementation Fundamental Data Structures and Algorithms Klaus Sutner February 24, 2004.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Chapter 3 DeGroot & Schervish. Functions of a Random Variable the distribution of some function of X suppose X is the rate at which customers are served.
Algebra Problems… Solutions Algebra Problems… Solutions © 2007 Herbert I. Gross Set 17 part 2 By Herbert I. Gross and Richard A. Medeiros next.
A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉.
Asymptotics and Recurrence Equations Prepared by John Reif, Ph.D. Analysis of Algorithms.
Improved Competitive Ratios for Submodular Secretary Problems ? Moran Feldman Roy SchwartzJoseph (Seffi) Naor Technion – Israel Institute of Technology.
Functions (Mappings). Definitions A function (or mapping)  from a set A to a set B is a rule that assigns to each element a of A exactly one element.
Discrete-time Random Signals
Non-Preemptive Buffer Management for Latency Sensitive Packets Moran Feldman Technion Seffi Naor Technion.
International Graduate School of Dynamic Intelligent Systems, University of Paderborn Fighting Against Two Adversaries: Page Migration in Dynamic Networks.
Approximation Algorithms based on linear programming.
Modified Bessel Equations 홍성민. General Bessel Equation of order n: (1) The general solution of Eq.(1) Let’s consider the solutions of the 4.
Exercise Exercise Proof that
Some Rules for Expectation
CS 583 Analysis of Algorithms
The Curve Merger (Dvir & Widgerson, 2008)
Exercise 2.3 Use Theorem 2.1 to prove that R(BIT)
The Selection Problem.
Presentation transcript:

CSE 5314 – Spring 2004 Homework #1 - Solutions [Soumya Sanyal] Q 1.5: Prove that the algorithm “MTF every-other-access” (i.e. move the item to the front on every even request for that item) is strictly 2-competitive. A: To prove this bound, we adopt the original model for proving the competitiveness of the MTF algorithm i.e. by the usual notations we represent the two lists as MTF’ (every-other-access) and OPT. First, the rule is adapted into a ‘marking-like’ algorithm where we MTF when the element is unmarked and then mark it, or simply unmark it if it was originally marked and make no changes. Second, redefine the potential function as follows: Φ(x)= φ A (x) + φ B (x), where is ‘x’ is an element in MTF’ and OPT. x є {x o,x 1 } … ( x o = unmarked, x 1 = marked ) where, φ A (x 0 ) = # of inversions between MTF’ and OPT. φ A (x 1 ) = 0 φ B (x 1 ) = # of inversions between MTF’ and OPT. φ B (x 0 ) = 0 University of Texas at Arlington

It naturally follows that, ΔΦ(x) = Δφ A (x) + Δφ B (x) We use the same notations used in the handouts, i.e. k, j, |W| and |WE| all have their usual meanings. An access to any element ‘x’ will result in either of following two actions:  x = x 0 (unmarked), move the element to the head of the list and mark it. – after MTF and before marking, Δφ A (x) = -|WE| lost inversions ; Δφ B (x) = 0. Δφ A (x) = -|WE| lost inversions ; Δφ B (x) = 0. – after marking, Δ φ B (x) = |W| new inversions. ; Δ φ A (x) = 0. Δ φ B (x) = |W| new inversions. ; Δ φ A (x) = 0.  x = x 1 (marked), unmark it, do nothing. –Δφ A (x) = |W| new inversions ; Δφ B (x) = - |W| lost inversions Hence, ΔΦ(x) = Δφ A (x) + Δφ B (x) ≤ |W| - |WE| … (since the second case contributes nothing) ≤ |W| - |WE| … (since the second case contributes nothing) Hence, COST k(MTF’) = k + ΔΦ(x) --- (1) Now recall the identity, k - |WE| ≤ j ---- (2) From (1) and (2) and the previous results, COST k(MTF’) ≤ 2j – 1.

University of Texas at Arlington Adjusting the cost for the changes made to OPT’s list, COST k(MTF’) ≤ 2j – 1 - f + p. It follows from previous proof styles that, COST MTF’ (σ) ≤ 2 COST OPT (σ) – n Hence, as α = - n, the competitive ratio of 2 is strict …. (Q.E.D) Q 1.10: Show that the above derivation holds without strict competitiveness i.e. if in equation 1.6 [i.e. ALG * xy (σ) ≤ c.OPT * xy (σ) ] there is some additive constant α, then ALG is c- competitive up to an additive constant of {αl(l-1)}/2. A: Given, ALG * (σ xy ) ≤ c.OPT * (σ xy ) + α … (1) By the pairwise property we have, ALG * (σ xy ) = ALG * xy (σ) OPT * (σ xy ) = OPT * xy (σ) … (2) Equation 1.4 gives us, ALG * (σ) = Σ {x,y} ⊆ L,x≠y ALG * xy (σ) (a) OPT * (σ) = Σ {x,y} ⊆ L,x≠y OPT * xy (σ) (b)… (3) Using (1) we have, ALG * (σ) ≤ Σ {x,y} ⊆ L,x≠y {c.OPT * (σ xy ) + α}

University of Texas at Arlington Or,ALG * (σ) ≤ c. Σ {x,y} ⊆ L,x≠y OPT * (σ xy ) + α.Σ {x,y} ⊆ L,x≠y 1 By (2) and subsequently (3), we have ALG * (σ) ≤ c. OPT * (σ) + α. l C 2 Or, ALG * (σ) ≤ c. OPT * (σ) + α.l.(l-1)/2 … (Q.E.D.) Q 2.1: Consider the following modification to the BIT algorithm. Instead of always complementing b(x) on every access of the element x, complement b(x) only if it is not in the front of the list. Show that this BIT algorithm is not 7/4 competitive. A: We make an observation about the altered BIT algorithm before we proceed with the proof. It in action is very similar to the randomized MTF (RMTF) algorithm where an element ‘x’ is moved to the front with probability of ½ every time it is accessed. Since we assume an initial uniform random distribution in {0,1}, our modified BIT algorithm essentially follows RMTF behavior. To complete the proof, we will try and construct an input sequence that is going to prove that the competitiveness of 7/4 does not hold. A good starting point is a nemesis request sequence similar to the one constructed for RMTF. Let, σ = [(x l ) 2 (x l-1 ) 2 (x l-2 ) 2 … (x 1 ) 2 ] k, k>1; x 1 is at the front, x l is at the end. It is easy to observe that after the first round with (k=1), all the bits will be

University of Texas at Arlington set to 1, and the algorithm thereafter will assume a deterministic behavior. Hence, each x i, i є {1,2,…,l} will be moved to the front on every second request deterministically. Therefore, other than the aberrant first round, where the expected cost is 3/2 [½.1 + ½.2] (because it is a random distribution), the cost to serve the sequence for k>1 is at least 2l 2 + 4l – 2l [2l(l+1)] … (from the RMTF derivation). The cost for MTF on this sequence would be l(l+1). Hence the competitiveness is no larger than 2 times the optimal offline for a sufficiently large value of l. Hence it is not 7/4 competitive… (Q.E.D.)