Transcription

2 Randomized online bipartite matching and the adwords problem. We briefly return to online algorithms and algorithms in the random order model (ROM). Here we have already seen evidence of the power of randomization in the context of the MaxSat problem. Another nice sequence of results begins with a randomized online algorithm for bipartite matching due to Karp, Vazirani and Vazirani [1990]. We quickly overview some results in this area as it represents a topic of current interest. (The recent FOCS 2012 conference had a session of three papers related to this topic.) In the online bipartite matching problem, we have a bipartite graph G with nodes U V. Nodes in U enter online revealing all their edges. A deterministic greedy matching produces a maximal matching and hence a 1 2 approximation. It is easy to see that any deterministic online algorithm cannot be better than a 1 2 approximation even when the degree of every u U is at most (equal) 2 2 / 27

3 The randomized ranking algorithm The Ranking algorithm chooses a random permutation of the nodes in V and then when a node u U appears, it matches u to the highest ranked unmatched v V such that (u, v) is an edge (if such a v exists). Aside: making a random choice for each u is still only a 1 2 approx. Equivalently, this algorithm can be viewed as a deterministic greedy algorithm (i.e. always matching when possible and breaking ties consistently) in the ROM model. That is, let {v 1,..., v n } be any fixed ordering of the vertices and let the nodes in U enter randomly, then match each u to the first unmatched v V according to the fixed order. To argue this, consider fixed orderings of U and V ; the claim is that the matching will be the same whether U or V is entering online. Note: This is a comment about this particular algorithm and not some general equivalence between randomized online algorithms and deterministic algorithms in the ROM model. 3 / 27

4 The KVV result and recent progress KVV Theorem Ranking provides a (1 1/e) approximation. Original analysis is not rigorous. There is an alternative proof (and extension) by Goel and Mehta [2008], and then another proof in Birnbaum and Mathieu [2008]. Recall that this positive result can be stated either as the bound for a particular deterministic algorithm in the stochastic ROM model, or as the randomized Ranking algorithm in the (adversarial) online model. KVV show that the (1 1/e) bound is essentially tight for any randomized online (i.e. adversarial input) algorithm. In the ROM model, Goel and Mehta state inapproximation bounds of 3 4 (for deterministic) and 5 6 (for randomized) algorithms. 4 / 27

5 Some comments on the Birnbaum and Mathieu proof The worst case example for any online algorithm is a (n, n) graph with a perfect matching. In particular, for n = 2, the precise expected competitive (i.e. approximation) ratio is 3 4. The inapproximation can be seen by using the Yao principle for obtaining bounds on randomized algorithms. The main lemma in the analysis Let x t be the probability (over the random permutations of the vertices in V ) that the vertex of rank t is matched. Then 1 x t 1 n t s=1 x s Letting S t = t s=1 x s the lemma can be restated as S t (1 + 1/n) 1 + S t 1 fo all t. Given that the graph has a perfect matching, the expected competitive ratio is S n /n. It is shown that 1 n S n 1 (1 1 n+1 )n 1 1/e. 5 / 27

6 Getting past the (1 1/e) bound The ROM model can be considered as an example of what is called stochastic optimization in the OR literature. There are other stochastic optimization models that are perhaps more natural, namely i.i.d sampling from known and unknown distributions. Feldman et al [2009] study the known distribution case and show a randomized algorithm that first computes an optimal offline solution (in terms of expectation) and uses that to guide an online allocation. They achieve a.67 approximation (improved to.699 Bahmani and Kapralov [2010] and also show that no online algorithm can achieve better than 26/27.99 (improved to.902 ). Karande, Mehta, Tripathi [2011] show that an approximation in the ROM model implies the same approximation in the unknown distribution model. They show that the KVV Ranking algorithm achieves approximation.653 in the ROM model and is no better than / 27

7 The adwords problem: an extension of bipartite matching In the (single slot) adwords problem, the nodes in U are queries and the nodes in V are advertisers. For each query q and advertiser i, there is a bid b q,i representing the value of this query to the advertiser. Each advertiser also usually has a hard budget B i which cannot be exceeded. The goal is to match the nodes in U to V so as to maximize the sum of the accepted bids without exceeding any budgets. Without budgets and when each advertiser will pay for at most one query, the problem then is edge weighted bipartite matching. In the online case, when a query arrives, all the relevant bids are revealed. 7 / 27

8 Some results for the adwords problem Here we are just considering the combinatorial problem and ignoring game theoretic aspects of the problem. The problem has been studied for the special (but well motivated case) that all bids are small relative to the budgets. As such this problem is incomparable to the matching problem where all bids are in {0,1} and all budgets are 1. For this small bids case, Mehta et al [2005) provide a deterministic online algorithm achieving the 1 1/e bound and show that this is optimal for all randomized online algorithms (i.e. adversarial input). 8 / 27

9 Greedy for a class of adwords problems Goel and Mehta [2008] define a class of adwords problems which include the case of small budgets, bipartite matching and b-matching (i.e. when all budgets are equal to some b and all bids are equal to 1). For this class of problems, they show that a deterministic greedy algorithm achieves the familiar 1 1/e bound in the ROM model. Namely, the algorithm assigns each query (i.e. node in U) to the advertiser who values it most (truncating bids to keep them within budget and consistently breaking ties). Recall that Ranking can be viewed as greedy (with consistent tie breaking) in the ROM model. 9 / 27

10 Vertex weighted bipartite matching Aggarwal et al [2011] consider a vertex weighted version of the online bipartite matching problem. Namely, the vertices v V all have a known weight w v and the goal is now to maximize the weighted sum of matched vertices in V when again vertices in U arrive online. This problem can be shown to subsume the adwords problem when all bids b q,i = b i from an advertiser are the same. It is easy to see that Ranking can be arbitrarily bad when there are arbitrary differences in the weight. Greedy (taking the maximum weight match) can be good in such cases. Can two such algorithms be somehow combined? Aggarwal et al are able to achieve the same 1-1/e bound for this class of vertex weighted bipartite matching. 10 / 27

12 Some open problems in the ROM model There are many open problems in the ROM model. In general any online problem can be studied with respect to this model. For example, relevant to what we have just discussed: The adwords problem without any restriction. Beating 1 1/e for the vertex weighted or b-matching problems. Perhaps, the first prominent use of this model is for the secretary problem; namely selecting the maximum element (or best k elements) in a randomly ordered sequence. Here again 1 1/e is the best approximation. This has been generalized to the matroid secretary problem by Babaioff, Immorlica, R. Kleinberg [2007]. For arbitrary matroids, the approximation ratio remains an open problem. 12 / 27

13 Sublinear time and sublinear space algorithms We continue to consider contexts in which randomization is provably necessary. In particular, we will study sublinear time algorithms and then the (small space) streaming model. An algorithm is sublinear time if its running time is o(n), where n is the length of the input. As such an algorithm must provide an answer without reading the entire input. Thus to achieve non-trivial tasks, we almost always have to use randomness in sublinear time algorithms to sample parts of the inputs. The subject of sublinear time algorithms is a big topic and we will only present a very small selection of hopefully representative results. The general flavour of results will be a tradeoff between the accuracy of the solution and the time bound. This topic will take us beyond search and optimization problems. 13 / 27

14 A deterministic exception: estimating the diameter in a finite metric space We first conisder an exception of a sublinear time algorithm that does not use randomization. (Comment: sublinear in a weak sense.) Suppose we are given a finite metric space M (with say n points x i ) where the input is given as n 2 distance values d(x i, x j ). The problem is to compute the diameter D of the metric space, that is, the maximum distance between any two points. For this maximum diameter problem, there is a simple O(n) time (and hence sublinear) algorithm; namely, choose an arbitrary point x M and compute D = max j d(x, x j ). By the triangle inequality, D is a 2-approximation of the diameter. I say sublinear time in a weak sense because in an explicitly presented space (such as d dimensional Euclidean space), the points could be explicitly given as inputs and then the input size is n and not n / 27

15 Sampling the inputs: some examples The goal in this area is to minimize execution time while still being able to produce a reasonable answer with sufficiently high probability. We will consider the following examples: 1 Finding an element in an (anchored) sorted list [Chazelle,Liu,Magen] 2 Estimating the average degree in a graph [Feige 2006] 3 Estimating the size of some maximal (and maximum) matching [Nguyen and Onak 2008] in bounded degree graphs. 4 Examples of property testing, a major topic within the area of sublinear time algorithms. See Dana Ron s DBLP for many results and surveys. 15 / 27

16 Finding an element in an (anchored) sorted list Suppose we have an array A[i] for 1 i n where each A[i] is a pair (x i, p i ) with x 1 = min{x i } and p i being a pointer to the next smallest value in the linked list. That is, x pi = min{x j x j > x i }. (For simplicity we are assuming all x j are distinct.) We would like to determine if a given value x occurs in the linked list and if so, output the index j such that x = x j. A n algorithm for searching in anchored sorted linked list Let R = {j i } be n randomly chosen indices plus the index 1. Access these {A[j i ]} to determine k such that x k is the largest of the accessed array elements less than or equal to x. Search forward 2 n steps in the linked list to see if and where x exists Claim: This is a one-sided error algorithm that (when x {A[i]}) will fail to return j such that x = A[j] with probability at most 1/2. 16 / 27

17 Estimating average degree in a graph Given a graph G = (V, E) with V = n, we want to estimate the average degree d of the vertices. We want to construct an algorithm that approximates the average degree within a factor less than (2 + ɛ) with probability at least 3/4 in time O( n poly(ɛ) ). We will assume that we can access the degree d i of any vertex v i in one step. Like a number of results in this area, the algorithm is simple but the analysis requires some care. The Feige algorithm Sample 8/ɛ random subsets S i of V each of size (say) Compute the average degree a i of nodes in each S i. The output is the minimum of these {a i }. n ɛ 3 17 / 27

18 The analysis of the approximation Since we are sampling subsets to estimate the average degree, we might have estimates that are too low of too high. But we will show that with high probability these estimates will not be too bad. More precisely, we need: 1 Lemma 1: Prob[a i < 1 2 (1 ɛ) d] ɛ 64 2 Lemma 2: Prob[a i > (1 + ɛ) d] 1 ɛ 2 The probability bound in Lemma 2 is amplified as usual by repeated trials. For Lemma 1, we fall outside the desired bound if any of the repeated trials gives a very small estimate of the average degree but by the union bound this is no worse than the sum of the probabilities for each trial. 18 / 27

19 Understanding the input query model As we initially noted, sublinear time algorithms almost invariably sample (i.e. query) the input in some way. The nature of these queries will clearly influence what kinds of results can be obtained. Feige s algorithm for estimating the average degree uses only degree queries ; that is, what is the degree of a vertex v. Feige shows that in this degree query model, that any algorithm that acheives a (2 ɛ) approximation (for any ɛ > 0) requires time Ω(n). In contrast, Goldreich and Ron [2008] consider the same average degree problem in the neighbour query model; that is, upon a query (v, j), the query oracle returns the j th neighbour of v or a special symbol indicating that v has degree less than j. A degree query can be simulated by log n neighbour queries. Goldreich and Ron show that in the neighbour query model, that the average degree d can be (1 + ɛ) approximated (with one sided error probability 2/3) in time O( (n/ d)poly(log n, 1 ɛ ) They also show that this (n) time bound is essentially optimal. 19 / 27

20 Approximating the size of a maximum matching in a bounded degree graph We recall that the size of any maximal matching is within a factor of 2 of the size of a maximum matching. Our goal is to compute with high probability a maximal matching in time depending only on the maximium degree D. Nguyen and Onak Algorithm Choose a random permutation p of the edges {e j } % Note: this will be done on the fly as needed The permutation determines a maximal matching M as given by the greedy algorithm that adds an edge whenever possible. Choose r = O(d/ɛ 2 ) nodes {v i } at random Using an oracle let X i be the indicator random variable for whether or not vertex v i is in the maximal matching. Output m = i=1...r X i 20 / 27

22 Property Testing Perhaps the most prevalent and useful aspect of sublinear time algorithms is for the concept of property testing. This is its own area of research with many results. Here is the concept: Given an object G (e.g. a function, a graph), test whether or not G has some property P (e.g. G is bipartite). The tester determines with sufficiently high probability (say 2/3) if G has the property or is ɛ-far from having the property. The tester can answer either way if G does not have the property but is ɛ-close to having the property. We will usually have a 1-sided error in that we will always answer YES if G has the property. We will see what it means to be ɛ-far (or close) from a property by some examples. 22 / 27

23 Tester for linearity of a function Let f : Z n > Z n ; f is linear if x, y f (x + y) = f (x) + f (y). Note: this will really be a test for group homomorphism f is said to be ɛ-close to linear if its values can be changed in at most a fraction ɛ of the function domain arguments (i.e. at most ɛn elements of Z n ) so as to make it a linear function. Otherwise f is said to be ɛ-far from linear. The tester Repeat 4/ɛ times Choose x, y Z n at random If f (x) + f (y) f (x + y) then Output f is not linear End Repeat If all these 4/ɛ tests succeed then Output linear Clearly if f is linear, the tester says linear. If f is ɛ-far from being linear then the probability of detecting this is at least 2/3. 23 / 27

24 Testing a list for monotonicity Given a list A[i] = x i, i = 1... n of distinct elements, determine if A is a monotone list (i.e. i < j A[i] < A[j]) or is ɛ-far from being monotone in the sense that more than ɛ n list values need to be changed in order for A to be monotone. The algorithm randomly chooses 2/ɛ random indices i and performs binary search on x i to determine if x i in the list. The algorithm reports that the list is monotone if and only if all binary searches succeed. Clearly the time bound is O(log n/ɛ) and clearly if A is monotone then the tester reports monotone. If A is ɛ-far from monotone, then the probability that a random binary search will succeed is at most (1 ɛ) and hence the probability of the algorithm failing to detect non-monotonicity is at most (1 ɛ) 2 ɛ 1 e 2 24 / 27

25 Graph Property testing Graph property testing is an area by itself. There are several models for testing graph properties. Let G = (V, E) with n = V and m = E. Dense model: Graphs represented by adjacency matrix. Say that graph is ɛ-far from having a property P if more than ɛn 2 matrix entries have to be changed so that graph has property P. Sparse model, bounded degree model: Graphs represented by vertex adjacency lists. Graph is ɛ-far from property P is at least ɛm edges have to be changed. In general there are substantially different results for these two graph models. 25 / 27

26 The property of being bipartite In the dense model, there is a constant time one-sided error tester. The tester is (once again) conceptually what one might expect but the analysis is not at all immediate. Goldreich, Goldwasser,Ron bipartite tester Pick a random subset S of vertices of size r = Θ( log( 1 ɛ ) ɛ 2 ) Output bipartite iff the induced subgraph is bipartite Clearly if G is bipartite then the algorithm will always say that it is bipartite. The claim is that if G is ɛ-far from being bipartite then the algorithm will say that it is not bipartite with probability at least 2/3. The algorithm runs in time quadratic in the size of the induced subgraph (i.e. the time needed to create the induced subgraph). 26 / 27

27 Testing bipartiteness in the bounded degree model Even for degree 3 graphs, Ω( n) queries are required to test for being bipartite or ɛ-far from being being bipartite. Goldreich and Ron [1997] There is a nearly matching algorithm that uses O( npoly(log n/ɛ)) queries. The algorithm is based on random walks in a graph and utilizes the fact that a graph is bipartite iff it has no odd length cycles. Goldreich and Ron [1999] bounded degree algorithm Repeat O(1/ɛ) times Randomly select a vertex s V If algorithm OddCycle(s) returns cylce found then REJECT End Repeat If case the algorithm did not already reject, then ACCEPT OddCycle performs poly(log n/ɛ) random walks from s each of length poly(log n/ɛ). If some vertex v is reached by both an even length and an odd length prefix of a walk then report cycle found; else report odd cycle not found 27 / 27

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

Large induced subgraphs with all degrees odd A.D. Scott Department of Pure Mathematics and Mathematical Statistics, University of Cambridge, England Abstract: We prove that every connected graph of order

CSE341T 08/31/2015 Lecture 3 Cost Model: Work, Span and Parallelism In this lecture, we will look at how one analyze a parallel program written using Cilk Plus. When we analyze the cost of an algorithm

Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH ZACHARY ABEL 1. Introduction In this survey we discuss properties of the Higman-Sims graph, which has 100 vertices, 1100 edges, and is 22 regular. In fact

Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to

Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

CSE 291: Geometric algorithms Spring 2013 Lecture 4 Online and streaming algorithms for clustering 4.1 On-line k-clustering To the extent that clustering takes place in the brain, it happens in an on-line

Finding and counting given length cycles Noga Alon Raphael Yuster Uri Zwick Abstract We present an assortment of methods for finding and counting simple cycles of a given length in directed and undirected

Distributed Computing over Communication Networks: Maximal Independent Set What is a MIS? MIS An independent set (IS) of an undirected graph is a subset U of nodes such that no two nodes in U are adjacent.

The Search Problem 1 Suppose we have a collection of records, say R 1, R 2,, R N, each of which contains a unique key value, say k i. Given a particular key value, K, the search problem is to locate the

Lecture 11 The Lovász ϑ Function 11.1 Perfect graphs We begin with some background on perfect graphs. graphs. First, we define some quantities on Definition 11.1. Given a graph G on n vertices, we define

CSE 291: Unsupervised learning Spring 2008 Lecture 6 Online and streaming algorithms for clustering 6.1 On-line k-clustering To the extent that clustering takes place in the brain, it happens in an on-line

Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

n colleges in a set C, m applicants in a set A, where m is much larger than n. each college c i C has a capacity q i - the maximum number of students it will admit each college c i has a strict order i

AdWords and Generalized On-line Matching Aranya Mehta Amin Saberi Umesh Vazirani Vijay Vazirani Abstract How does a search engine company decide what ads to display with each query so as to maximize its

Asymptotically Optimal Algorithm for Stochastic Adwords Nikhil R. Devanur, Microsoft Research alasubramanian Sivan, University of Wisconsin-Madison Yossi Azar, Tel-Aviv University In this paper we consider

Well-Separated Pair Decomposition for the Unit-disk Graph Metric and its Applications Jie Gao Department of Computer Science Stanford University Joint work with Li Zhang Systems Research Center Hewlett-Packard

CS 05: Algorithms (Grad) Feb 2-24, 2005 Approximating Set Cover. Definition An Instance (X, F ) of the set-covering problem consists of a finite set X and a family F of subset of X, such that every elemennt

AdWords and Generalized On-line Matching Aranya Mehta Amin Saberi Umesh Vazirani Vijay Vazirani Abstract How does a search engine company decide what ads to display with each query so as to maximize its

Competitive Analysis of On line Randomized Call Control in Cellular Networks Ioannis Caragiannis Christos Kaklamanis Evi Papaioannou Abstract In this paper we address an important communication issue arising

Randomized algorithms March 10, 2005 1 What are randomized algorithms? Algorithms which use random numbers to make decisions during the executions of the algorithm. Why would we want to do this?? Deterministic

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints

Mean Ramsey-Turán numbers Raphael Yuster Department of Mathematics University of Haifa at Oranim Tivon 36006, Israel Abstract A ρ-mean coloring of a graph is a coloring of the edges such that the average

On the independence number of graphs with maximum degree 3 Iyad A. Kanj Fenghui Zhang Abstract Let G be an undirected graph with maximum degree at most 3 such that G does not contain any of the three graphs

Cycles and clique-minors in expanders Benny Sudakov UCLA and Princeton University Expanders Definition: The vertex boundary of a subset X of a graph G: X = { all vertices in G\X with at least one neighbor

Week 5 Integral Polyhedra We have seen some examples 1 of linear programming formulation that are integral, meaning that every basic feasible solution is an integral vector. This week we develop a theory

Online Degree-Bounded Steiner Network Design The problem of satisfying connectivity demands on a graph while respecting given constraints has been a pillar of the area of network design since the early

Divide-and-Conquer Three main steps : 1. divide; 2. conquer; 3. merge. 1 Let I denote the (sub)problem instance and S be its solution. The divide-and-conquer strategy can be described as follows. Procedure

Mechanisms for Fair Attribution Eric Balkanski Yaron Singer Abstract We propose a new framework for optimization under fairness constraints. The problems we consider model procurement where the goal is

Chapter 8 Advertising on the Web One of the big surprises of the 21st century has been the ability of all sorts of interesting Web applications to support themselves through advertising, rather than subscription.

Massachusetts Institute of Technology Handout 6 18.433: Combinatorial Optimization February 20th, 2009 Michel X. Goemans 3. Linear Programming and Polyhedral Combinatorics Summary of what was seen in the

136 TER 4. INDUCTION, GRHS ND TREES 4.3 Graphs In this chapter we introduce a fundamental structural idea of discrete mathematics, that of a graph. Many situations in the applications of discrete mathematics