{'fraction_non_alphanumeric': 0.03587427875138874, 'fraction_numerical': 0.012229867756155251, 'mean_word_length': 4.071474009451109, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 31, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On the limitations of deterministic de-randomizations for online bipartite matching and max-sat

The surprising results of Karp, Vazirani and Vazirani and (respectively) Buchbinder et al are examples where rather simple randomizations provide provably better approximations than the corresponding deterministic counterparts for online bipartite matching and (respectively) unconstrained non-monotone submodular maximization. We show that seemingly strong extensions of the deterministic online computation model can at best match the performance of naive randomization. More specifically, for bipartite matching, we show that in the priority model (allowing very general ways to order the input stream), we cannot improve upon the trivial 1/2-approximation achieved by any greedy maximal matching algorithm and likewise cannot improve upon this approximation by any log n/log log n number of online algorithms running in parallel. The latter result yields an improved log log n - log log log n lower bound for the number of advice bits needed. For max-sat, we adapt the recent de-randomization approach of Buchbinder and Feldman applied to the Buchbinbder et al algorithm for max-sat to obtain a deterministic 3/4-approximation algorithm using width 2n parallelism. In order to improve upon this approximation, we show that exponential width parallelism of online algorithms is necessary (in a model that is more general than what is needed for the width 2n algorithm).


Introduction
It is well known that in the domain of online algorithms it is often provably necessary to use randomization in order to achieve reasonable approximation (competitive) ratios. It is interesting to ask when can the use of randomization be replaced by extending the online framework. In a more constructive sense, can we de-randomize certain online algorithms by considering more general one pass algorithms? This question has already been answered in a couple of senses. Böckenhauer et al [10] show that a substantial class of randomized algorithms can be transformed (albeit nonuniformly and inefficiently) to an online algorithm with (small) advice. Buchbinder and Feldman [14] show how to uniformly and efficiently de-randomize the Buchbinder et al [15] algorithm for the unconstrained non-monotone submodular function maximization (USM) problem. The resulting de-randomized algorithm can be viewed as a parallel algorithm in the form of a "tree of online algorithms". We formalize their algorithm as an online restriction of the Alekhnovich et al [2] pBT model.
In this paper we consider two classical optimization problems, namely maximum cardinality bipartite matching and the max-sat problem. As an offline problem, it is well known that graph matching and more specifically bipartite matching (in both the unweighted and weighted cases) can be solved optimally in polynomial time. Given its relation to the adwords problem for online advertising, bipartite matching has also been well-studied as a (one-sided) online problem. Maxsat is not usually thought of as an online problem but many of the combinatorial approximation algorithms for max-sat (e.g. Johnson's algorithm [33], Poloczek and Schnitger [44], and Buchbinder et al [15]) can be viewed as online or more generally one-pass myopic algorithms.
To study these types of problems from an online perspective, several precise models of computation have been defined. With respect to these models, we can begin to understand the power and limitations of deterministic and randomized algorithms that in some sense can be viewed as online or one-pass. Our paper will be organized as follows. We will conclude this section with an informal list of our main results. The necessary definitions will be provided in Section 2. Section 3 contains a review of the most relevant previous results. Section 4 considers online parallel width results for max-sat. In Section 5 we will consider results for bipartite matching with respect to parallel width, the priority model [12], and the random order model (ROM). We conclude with a number of open problems in Section 6.

Our results
• For the max-sat problem, we will show that the Buchbinder and Feldman [14] de-randomization method can be applied to obtain a deterministic parallel width 2n online 3 4 approximation algorithm.
• We will then show (in a model more general than what is needed for the above 3 4 approximation), that exponential width is required to improve upon this ratio even for the exact max-2-sat problem for which Johnson's algorithm already achieves a 3 4 approximation.
• We also offer a plausible width 2 algorithm that might achieve the 3 4 approximation or at least might improve upon the 2 3 approximation achieved by Johnson's deterministic algorithm [33] which in some models is provably the best online (i.e. width 1) algorithm.
• For bipartite matching we show that constant width (or even width log n log log n ) can cannot asymptotically beat the trivial 1 2 approximation acheived by any greedy maximal matching algorithm. This implies that more than log log n − log log log n advice bits are needed to asymptotically improve upon the 1 2 approximation achieved by any greedy maximal matching algorithm.
• We offer a plausible candidate for an efficient polynomial width online algorithm for bipartite matching.
• For bipartite matching, we will also show that the ability to sort the input items as in the priority model cannot compensate for absense of randomization.
• We also make some observations about bipartite matching in the random order model.

Preliminaries: definitions, input and algorithmic Models
We will briefly describe the problems of interest in the paper and then proceed to define the algorithmic models and input models relative to which we will present our results.

The Bipartite Matching and Max-Sat Problems
In the unweighted matching problem, the input is a graph G = (V, E) and the objective is to find the largest subset of edges S ⊆ E that are vertex-disjoint and such that |S| is as large as possible.
Bipartite matching is the special case where V = A ∪ B and E ⊆ A × B.
In the (weighted) max-sat problem, the input is a propositional formula in CNF form. That is, there is a set of clauses C = {C 1 , . . . , C n } where each clause is a set of literals and each literal is a propositional variable or its negation. The objective is to find an assignment to the variables that maximizes the number of clauses in C that are satisfied. In the weighted case, each clause has an associated weight and the objective is to maximize the sum of weights of clauses that are satisfied. The max-sat problem has been generalized to the submodular max-sat problem where there is a normalized monotone submodular function f : 2 C → R and we wish to assign the variables to maximize f (C ) where C ⊆ C is the subset of satisfied clauses.
When a specific problem needs to be solved, there are many possible input instances. An instance is just a specific input for the problem in hand. For example, in bipartite matching, an instance is a bipartite graph. In weighted max-sat, an instance is a set of clauses (including a name, weight, and the literals in each clause). An algorithm will have the goal of obtaining a good solution to the problem for every possible instance (i.e. we are only considering worst case complexity). To establish inapproximation results, we construct an adversarial instance or a family of bad instances for every algorithm (one instance or family of instances per algorithm). We will mainly study deterministic algorithms and their limitations under certain models.
We measure the performance of online algorithms by the competitive (or approximation) ratio 1 . The approximation ratio considers how the algorithm performs in every instance, while the asymptotic approximation ratio considers how the algorithm performs on large instances. Having a small instance where an algorithm performs poorly shows that the algorithm has a low approximation ratio, but says nothing about its asymptotic approximation ratio.

Algorithmic Models
We define the precise one-pass algorithmic models that we consider in this paper. For each, the algorithm may receive some limited amount of information in advance. Other than this, an instance is composed of individual data items. We define the size of an instance as the number of data items it is made of. Data items will be received in a certain order, and how this ordering is chosen depends on the algorithmic model. In addition, when a data item is received, the algorithm must make an irrevocable decision regarding this data item before the next data item is considered. The solution then consists of the decisions that have been made. We do not make any assumptions regarding time or space constraints for our algorithms. In fact, the limitations proven for these algorithmic models are information-theoretic: since the algorithm does not know the whole instance, there are multiple potential instances, and any decision it makes may be bad for some of these. Of course, how each data model is defined will depend on the specific problem (and even for one problem there may be multiple choices for the information contained in data items). Unless otherwise stated, for inapproximations we assume that the algorithm knows the size, and for positive results we assume that it does not know the size.

Online Model
In the online model, the algorithm has no control whatsoever on the order in which the data items are received. That is, data items arrive in any order (in particular, they may arrive in the order decided by an adversary and as each data item arrives, the algorithm has to make its decision. Thus, in this model an adversary chooses an ordering to prevent the algorithm from achieving a good approximation ratio. As long as it remains consistent with previous data items, the data item that an adversary presents to the algorithm may depend on previous data items and the choices that the algorithm has made concerning them. The following presents the structure of an online algorithm. Online Algorithm 1: On an instance I, including an ordering of the data items (d 1 , . . . , d n ): 2: i := 1 3: While there are unprocessed data items 4: The algorithm receives d i and makes an irrevocable decision for d i (based on d i and all previously seen data items and decisions). 5: i := i + 1 6

: EndWhile
In online bipartite matching, it is standard to consider that the algorithm knows in advance the names of the vertices from one of the sides of the graph, which we call the offline side. The other side, which we call the online side, is presented in parts. A data item consists of a single vertex from the online side along with all of its neighbours on the offline side. At each step, an algorithm can match the online vertex to any of its unmatched neighbours, or it can choose to reject the vertex (leave it unmatched). In either case, we say that it processes the vertex. All decisions made by the algorithm are irrevocable. We call this problem online one-sided bipartite matching.
A data item consists of a single variable along with some information about the clauses where this variable appears. We consider four models, in increasing order of the amount of knowledge received: Model 0: The data item is a list with the names and weights of the clauses where the variable appears positively and a list of names and weights of the clauses where the variable appears negatively.
Model 1: Model 0, plus the length of each clause is also included. Model 2: Model 1, plus for each clause we also include the names of the other variables that occur in this clause. The data item does not include the signs of these variables.
Model 3: Model 2, plus for each clause we also include the signs of other variables in the clause. That is, in this model, the data item contains all the information about the clauses in which the variable occurs.
For submodular max-sat, in addition to a description of the model for variables and their clauses, we need to state how the submodular function is presented to the algorithm. Since the submodular function has domain exponential in the size of the ground set (in this case the number of clauses), it is usually assumed that the algorithm does not receive the whole description of this function from the start. Instead, there is an oracle which may answer queries that the algorithm makes. A common oracle model is the value oracle, where the algorithm may query f (S) for any subset S. In our restricted models of computation, this is further restricted so that the set S can include only elements seen so far, including the current element for which the algorithm is making a decision. For submodular max-sat, this means restricting to sets of clauses each containing at least one seen variable. However, for some algorithms this is too restrictive. In the double-sided myopic model from Huang and Borodin [30], the value oracle may also query the complement function f defined by f (S) = f (C \ S) (where C is the ground set).

Width models
We consider a framework which provides a natural way to allow more powerful algorithms, while maintaining in some sense an online setting. The idea is that now, instead of maintaining a single solution, the algorithm keeps multiple possible solutions for the instance. When the whole instance has been processed, the algorithm returns the best among the set of possible solutions that it currently has. The point is to limit the number of possible solutions the algorithm can have at any point in time. The possible solutions can be viewed as a tree with levels. A node in the tree corresponds to a possible solution and an edge means that one solution led to the other one after the algorithm saw the next data item. At the beginning, there is a single empty solution: the algorithm has made no choices yet. This will be the root of the tree and it will be at level 0. Every time a possible solution is split into multiple solutions, the tree branches out. Every time a data item is processed, the level increases by 1. The algorithm may decide to discard some solution. This corresponds to a node with no children and we say that the algorithm cuts the node. The restriction is that the tree can have at most k nodes in each level. Since each level represents a point in time, this means the algorithm can never maintain more than k possible solutions.
There are three different models to consider here. In the max-of-k model, the algorithm branches out at the very beginning and does not branch or cut later on. In particular, this model is the same as having k different algorithms and taking the maximum over all of them in the end. In the width-k model, the algorithm can branch out at any time. However, the algorithm cannot cut any possible solution: every node in the tree that does not correspond to a complete solution (obtained after viewing all data items) must have at least one child. Finally, in the width-cut-k model, the algorithm can branch out and disregard a possible solution at any time (so that, at later levels, this possible solution will not contribute to the width count).
Although we shall not do so, the width models can also be extended to the priority and ROM settings. For example, we can consider width in the priority model as follows: the algorithm can choose an ordering of the data items as in the fixed priority model (in particular, the arrival order has to be the same for all partial solutions), and once an input item arrives the solutions are updated, branch, or cut as desired. This then is the fixed order pBT model of Alekhnovich et al [2]. It is also possible to allow each branch of the pBT to adaptively choose the ordering of the remaining items and this then is the adaptive pBT model.

Relation to advice and semi-streaming models
Most inapproximation results for the online and related models we consider allow the algorithm to know n, the size of the input. One would like to allow these algorithms to also know other easily computed information about the input (e.g. maximum or minimum degree of a node, etc.) In keeping with the information theoretic nature of inapproximation results, one way to state this is to allow these algorithms to use any small (e.g. O(log n)) bits of advice and not require that the advice be efficiently computed. The online with advice model [10,21] that is related to our width models allows the algorithm to access a (say) binary advice string initially given to it by an oracle that knows the whole input and has unlimited computational power. Clearly, the advice string could encode the optimal strategy for the algorithm on the input, so the idea is to understand how the performance of the algorithm changes depending on how many bits of advice it uses. A non-uniform algorithm is a set of algorithms, one for each value of n. In particular, a non-uniform algorithm knows n, the size of the input. The following simple observation shows that the non-uniform advice and max-of-k models are equivalent. Lemma 1. Suppose that an online algorithm knows n, the size of the input. Then there is an algorithm using b(n) advice achieving an approximation ratio of c if and only if there is a max-of-2 b(n) algorithm with approximation ratio c.
Proof. Let A be an online advice algorithm using advice of size t and achieving a c approximation ratio. The following max-of-2 t algorithm achieves this ratio: try all possible advice strings of length t, and take the best option among these. If M is a max-of-2 t algorithm with approximation ratio c, then there is a t bit advice algorithm that, for each input, encodes the best choice among the 2 t that will achieve this approximation ratio. The online advice model and therefore the small width online model also has a weak relation with the graph semi-streaming graph, a model suggested by Muthukrishhan [42] and studied futher in Feigenbaum et al [23]. In that model, edges arrive online for a graph optimization problem (e.g. matching). More directly related to our models, Goel et al [25] consider the model where vertices arrive online. In either case, letting n be the number of vertice, the algorithm is constrained to useÕ(n) = n log O(1) n space which can be substantially less space than the number of edges. The online advice and semi-streaming models are not directly comparable since on the one hand semistreaming algorithms are not forced to make irrevcable decisions, while online algorithms are not space constrained. In order to relate the online model to the semi-streaming model, we need to restrict the online model to those algorithms in which the computation satisifies theÕ(n) semistreaming space bound. In particular, the algorithm cannot store all the information contained in the data items that have been considered in previous iterations.

Priority model
The difference between the priority and online models is that in the priority model the algorithm has some power over the order in which data items arrive. Every time a new data item is about to arrive, an ordering on the universe of potential data items is used to decide which one arrives. This ordering is do not impose any restrictions on how this order is produced (but since it is produced by the algorithm, it cannot depend on data items from the current instance that it has not yet seen). In particular, the ordering need not be computable. In the fixed priority model, the algorithm only provides one ordering at the beginning. For a given instance, the data items are shown to the algorithm according to this ordering (and as before, when one arrives, the algorithm must make a decision regarding the data item).
Fixed Priority Algorithm 1: The algorithm specifies an ordering π : U → R, where U is the universe of all possible data items. 2: On instance I, the data items are ordered d 1 , . . . , d n so that π(d 1 ) ≤ π(d 2 ) ≤ . . . ≤ π(d n ). 3: i := 1 4: While there are unprocessed data items 5: The algorithm receives d i and makes a decision for d i (based on d i and all previously seen data items and decisions).
In the adaptive priority model, the algorithm provides a new ordering every time a data item is about to arrive. Thus, in the fixed order model, the priority of each item is a (say) real valued function of the input item and in the adaptive order model, the priority function can also depend on all previous items and decisions. In the matching problem, an algorithm could for example choose an ordering π so that data items corresponding to low degree vertices are preferred. Or it could choose π to prefer data items corresponding to vertices that are neighbours of some specific vertex. Unless otherwise stated, when we say priority we mean adaptive priority. The following shows the template for adaptive priority algorithms: Adaptive Priority Algorithm 1: On instance I, initialize D as the set of data items corresponding to I and U as the universe of all data items. Let n := |D|. 2: i := 1 3: While there are unprocessed data items 4: The algorithm specifies an ordering π : U → R. 5: Let d i := argmin d∈D (π(d)). Usually, the adversarial argument in this model is as follows: the adversary begins by choosing a subset S from the universe of all data items. This will be the set of potential data items for the problem instance. Now, for every s 1 ∈ S, the algorithm could choose this data item as the first one by using an appropriate ordering π. After the algorithm chooses s 1 and makes its decision for this data item, the adversary further shrinks S, thus obtaining a smaller subset of potential data items. The algorithm then proceeds by choosing a second data item s 2 ∈ S and makes a decision concerning it. After this the adversary further shrinks S, and this goes on until S becomes empty.
In some adversarial instances, some data items may be indistinguishable to the algorithm. If d and d are indistinguishable to the algorithm, the algorithm may produce an ordering π to try to receive d, but the adversary can force d to be received instead. For instance, in the matching problem, in the beginning data items corresponding to vertices with the same degree will be indistinguishable. If the algorithm tries to produce an ordering π to get the data item of a specific vertex, the adversary can rename vertices so that the algorithm receives the data item of some other vertex with the same degree. However, after the first vertex has been seen, the algorithm now does have some limited information about the names of other nodes and can possibly exploit this knowledge as we will see in Section 5.3.2.
In the most common model for general graph matching, a data item consists of a vertex name along with its neighbours. Here, every vertex has an associated data item. This contrasts with the common data item for online bipartite matching, where only the online side vertices have associated data items. We call the former model (restricted to instances that are bipartite) two-sided bipartite matching, and the latter one-sided. We shall restrict attention to the one-sided problem.

The random order model
In the random order model, usually abbreviated by ROM, neither the algorithm nor the adversary chooses the order in which the data items are presented. Instead, given an input set chosen by an adversary, a permutation of the data items is chosen uniformly at random and this permutation dictates the order in which data items are presented. Once the random input permutation has been instantiated, the model is the same as the one-sided online model. Definition 2.2. Let A be an online algorithm for a problem whose set of all possible instances is I. For an instance I of size n and a permutation σ ∈ S n , let I(σ) be I with data items presented in the order dictated by σ. Let v(A, I(σ)) be the value achieved by the algorithm on I(σ), and let v(I) be the optimal value for I. The approximation ratio of A in ROM is: Let I n be the set of instances of size n. Then the asymptotic approximation ratio of A in ROM is:

Related work
The analysis of online algorithms in terms of the competitive ratio was explicitly begun by Sleator and Tarjan [46] although there were some previous papers that implictly were doing competitive analysis (e.g. Yao [49]). The max-of-k online width model was introduced in Halldórsson et al [27] and Iwama and Taketomi [31] where they considered the the maximum independent set and knapsack problems. Buchbinder and Feldman showed a deterministic algorithm with approximation ratio 1/2 for unconstrained submodular maximization which fits the online width model (but not the max-of-k model) [14]. Their initial approach involved solving an LP at each step. They showed how to simplify the algorithm so that it does not require an LP solver, and the width used is linear. Hopcroft and Karp [29] showed that unweighted bipartite matching can be optimally solved offline in time O(m √ n). For sparse graphs, the first improvement in 40 years is theÕ(m 10 7 ) time algorithm due to Madry [37]. With regard to the online setting, the seminal paper of Karp, Vazirani and Vazirani [35] established a number of surprising results for (one-sided) online bipartite matching. After observing that no online deterministic algorithm can do better than a 1 2 approximation, they studied randomized algorithms. In particular they showed that the natural randomized algorithm RANDOM (that matches an online vertex uniformly at random to an available offline vertex) only achieved an asymptotic approximation ratio of 1 2 ; that is, the same approximation as any greedy maximal matching algorithm. They then showed that their randomized RANKING algorithm achieved 2 ratio 1 − 1 e ≈ .632. RANKING initially chooses a permutation of the offline vertices and uses that permutation to determine how to match an online vertex upon arrival. By deterministically fixing any permutation of the offline vertices, the Ranking algorithm can be interpreted as a deterministic algorithm in the ROM model. While Ranking is optimal as an online randomized algorithm, it is not known if its interpretation as a deterministic ROM algorithm is optimal for all online deterministic algorithms. Goel and Mehta [26] show that no deterministic ROM algorithm can achieve an approximation better than 3 4 . The KVV algorithm can also be implemented as a O(n log n) space randomized semi-streaming algorithm whereas Goel el al [25] show that there is a determinstic semi-streaming algorithm using only O(n) space provably establishing the power of the semi-streaming model. In the ROM model, the randomized Ranking algorithm achieves an approximation ratio of at least 0.696 > 1−1/e [34,38] and at most 0.727 [34]. Following the KVV paper there have been a number of extensions of online bipartite matching with more direct application to online advertising (see, for example, [40,26,1,36]), and has also been studied in various stochastic models where the input graph is generated by sampling i.i.d from a known or unknown distribution of online vertices (see [24,7,39,32,34]). Manshadi et al [39] showed that no randomized ROM algorithm can achieve an asymptotic approximation ratio better than 0.823 by establishing that inapproximation for the stochastic unknown i.i.d model.
In the online with advice model for bipartite matching, Dürr et al [20] apply the Böckenhauer et al de-randomization idea to show that for every > 0, there is an (inefficient) O(log n) advice algorithm achieving ratio (1 − )(1 − 1 e ). This is complemented by Mikkleson's [41] recent result showing that no online (even randomized) algorithm using sublinear o(n) advice can asymptotically improve upon the 1 − 1 e ratio achieved by KVV. Furthermore, Dürr et al show that O( 1 5 n) advice is sufficient, and Ω(log( 1 )n advice is necessary to achieve a (1 − ) ratio. They show that for a natural but restricted class of algorithms, Ω(log log log n) advice bits are needed for deterministic algorithms to obtain an approximation ratio asymptotically better than 1/2. Finally, their Category-Advice algorithm is a deterministic two pass online (i.e. adversarial order) 3 5 approximation algorithm where the first pass is used to give priority in the second pass to the offline vertices that were unmatched in the first pass. That is, the first pass is efficiently constructing an n bit advice string for the second pass.
The priority setting was introduced by Borodin et al [12]. It has been studied for problems such as makespan scheduling [3], and also in several graph optimization problems [11,18]. In terms of the maximum matching problem, most results are about general graph matching. Here, a data item consists of a vertex (the vertex that needs to be matched) along with a list of its neighbours. Aronson et al [4] showed that the algorithm which at each step chooses a random vertex and then a random neighbour (to pick an edge to add to the matching) achieves an approximation ratio of 1/2 + c for some c > 0. Besser and Poloczek [8] showed that MinGreedy, the algorithm that at each step picks an edge with a vertex of minimum degree, will not get an approximation ratio better than 1/2 (even in the bipartite case), but for d-regular graphs this approximation ratio improves to d−1 2d−3 . They showed that no deterministic greedy (adaptive) priority algorithm can beat this ratio for graphs of maximum degree d (which implies that these cannot get an approximation ratio greater than 1/2), and they showed no deterministic priority algorithm can get an approximation ratio greater than 2/3 (5/6 for "degree based" randomized algorithms). It should be noted that these inapproximability results for priority algorithms do not hold for the special bipartite case.
Hástad [28] showed that it is NP-hard to achieve an approximation ratio of c for the maximum satisfiability problem for any constant c > 7/8, and the best known efficient algorithm has an approximation ratio of 0.797 and a conjectured approximation ratio of 0.843 [5]. The greedy algorithm that at each step assigns a variable to satisfy the set of clauses with larger weight is an online algorithm achieving an approximation ratio of 1/2. Azar et al [6] observed that this is optimal for deterministic algorithms with input model 0. They showed a randomized greedy algorithm that achieves an approximation ratio of 2/3 for online submodular max-sat, and they showed that this is optimal for input model 0. In this algorithm, when a variable arrives, the variable is set to true with probability w T w T +w F and set to false otherwise, where w T is the weight of clauses satisfied if assigned to true and w F is the weight of clauses satisfied if assigned to false. For submodular max-sat, the weight is replaced by the marginal gain.
Johnson's algorithm [33] is a deterministic greedy algorithm that bases its decisions on the "measure of clauses" satisfied instead of the weights of these clauses. Yanakakis [48] showed that Johnson's algorithm is the de-randomization (by the method of conditional expectations) of the naive randomized algorithm and also showed that no deterministic algorithm can achieve a better approximation ratio even in input model 3. Chen et al [16] showed that Johnson's algorithm achieves this 2/3 approximation ratio. The analysis was later simplified by Engebretsen [22]. Johnson's algorithm can be implemented in input model 1. Costello et al [17] showed that Johnson's algorithm achieves an approximation ratio of 2/3 + c for some c > 0 in ROM. Poloczek and Schnitger gave an online randomized algorithm in input model 1 achieving an approximation ratio of 3/4 [44]. They showed that Johnson's algorithm in ROM gets an approximation ratio of at most 2− √ 15 < 3/4, and they showed that the online randomized version of Johnson's algorithm (which assigns probabilities according to measures, as in the randomized greedy algorithm) achieves an approximation ratio of at most 17/23 < 3/4.
Van Zuylen gave a simpler online randomized algorithm [47] with approximation ratio 3/4. Buchbinder et al [15] gave a randomized algorithm for unconstrained submodular maximization with approximation ratio 1/2 and additionally a related randomized algorithm for submodular max-sat achieving an approximation ratio of 3/4. Poloczek [43] showed that no deterministic adaptive priority for max-sat can achieve an approximation ratio greater than He also showed that, under this input model, no randomized online algorithm can get an approximation ratio better than 3/4, so several algorithms achieving an approximation ratio of 3/4 that fit the framework are optimal (up to lower order terms). Yung [50] showed that no deterministic priority algorithm for max-sat in input model 3 can achieve an approximation ratio better than 5/6. By extending the online framework, Poloczek et al [45] proposed a deterministic algorithm achieving a 3/4 approximation ratio that makes two passes over the input: in one pass, the algorithm computes some probabilities for each variable, and in the second pass, it uses these probabilities and the method of conditional expectations to assign variables.
A model for priority width-and-cut was presented and studied by Alekhnovich et al [2]. In particular, they showed that deterministic fixed priority algorithms require exponential width to achieve an approximation ratio greater than 21/22 for max-sat in input model 3.

Max-sat width results
We will first show that the Buchbinder and Feldman [14] de-randomization approach can be utillizeid to obtain a 3 4 approximation by a parallel online algorithm of width 2n. Then we will show that with respect to what we are calling input model 2, that we would need exponential width to improve upon this approximation. Then we will propose a width 2 algotithm as a plausible candidate to exceed Johnson's online 2 3 approximation.

Derandomizing the Buchbinder et al submodular max-sat algorithm
Buchbinder et al [15] presented a randomized algorithm for submodular max-sat with an approximation ratio of 3/4. They define a loose assignment of a set of variables V as a set A ⊆ V × {0, 1}. Any variable can be assigned one truth value (0 or 1), none, or both. A clause is satisfied by A if A contains at least one of the literals in the clause. For instance, V × {0, 1} will satisfy any clause and ∅ will satisfy no clause. Let F be the normalized monotone submodular function on sets of clauses (this is part of the input to the problem) and let g : where C is the set of clauses satisfied by the loose assignment A. It is easy to check that g is also a monotone submodular function. The algorithm keeps track of a pair of loose assignments (X, Y ), which change every time a new variable is processed. Let (X i , Y i ) be the values right after the ith variable v i is processed. Initially the algorithm begins by setting X 0 = ∅ and Y 0 = V × {0, 1}. When processing v i , X i will be X i−1 plus an assignment b to v i , while Y i will be Y i−1 minus the 1 − b assignment to v i . We say in this case that v i is assigned to b. Thus X i and Y i have the same unique assignment for the first i variables, X i only contains assignments for the first i variables, and Y i contains all possible assignments for the variables after v i . If there are n variables, X n = Y n is a proper assignment, and this is the output of the algorithm.
When processing v i , the algorithm makes a random decision based on the marginal gains of assigning v i to 0 and of assigning v i to 1. The value g( measures how favourable the assignment of v i to 1 is. In the algorithm presented in [15], v i is assigned to 0 with probability f i f i +t i and to 1 with probability t i f i +t i (with some care to avoid negative probabilities).
We now de-randomize this algorithm at the cost of having linear width. The de-randomization idea follows along the same lines as that of Buchbinder and Feldman [14] for a deterministic algorithm for unconstrained submodular maximization with a 1/2 approximation ratio. The authors present the novel idea of keeping a distribution of polynomial support over the states of the randomized algorithm. Normally, a randomized algorithm has a distribution of exponential support, so the idea is to carefully choose the states that are kept with nonzero probability. Elements of the domain (or in our case, variables) are processed one at a time, and at each iteration a linear program is used to determine the changes to the distribution. They then argue that they can get rid of the LP's to obtain an efficient algorithm, since solving them reduces to a fractional knapsack problem. The same LP format used for unconstrained submodular maximization works for submodular maxsat (the only change in the linear program in our algorithm below are the coefficients), so the idea in [14] to get rid of the LP solving also works for our algorithm. Theorem 1. There is a linear-width double-sided online algorithm for submodular max-sat achieving an approximation ratio of 3/4. The algorithm uses input model 1 of max-sat.
Proof. First, we note that an oracle for F suffices for constructing an oracle for g. The algorithm keeps track of a distribution over pairs (X, Y ) of loose assignments of variables. A double-sided algorithm is needed to obtain the values of the g(Y )'s. The idea is to process the variables online, at each step changing the distribution. The pairs (X, Y ) satisfy the same properties as in the Buchbinder et al algorithm. Thus, X corresponds to the assignments made in the partial solution so far, while Y corresponds to this plus the set of potential assignments that the partial solution could still make. When all variables are processed, the support will contain proper assignments of variables, and the algorithm takes the best one. The distribution is constructed by using an LP (without an objective function) to ensure some inequalities hold while not increasing the support by too much. We use the notation (p, X, Y ) ∈ D to say the distribution D assigns (X, Y ) probability As before, f i (X, Y ) is used to determine how profitable it is to assign v i to 0 in this pair, and similarly t i (X, Y ) measures how profitable it is to assign v i to 1 in this pair. In normal max-sat, f i (X, Y ) will be the weights of clauses satisfied by assigning v i to 0 minus the weights of clauses that become unsatisfied by this assignment (a clause becomes unsatisfied when it hasn't been satisfied and all of its variables have been assigned), and t i (X, Y ) is the analogue for the assignment to 1.
Each (X, Y ) ∈ supp(D i−1 ) will potentially be split into two in D i : is the probability of assigning v i to 0, given (X, Y ). Similarly, w(X, Y ) is the probability of assigning v i to 1, given (X, Y ). Since at each step D i could grow twice the size, the LP is used to determine values for z(X, Y ), w(X, Y ) for all (X, Y ) ∈ supp(D i−1 ) such that the resulting distribution still satisfies the properties used to achieve a good assignment in expectation while forcing many of the variables to be 0. In Step 6, the pairs with zero probability are trimmed from D i to keep the distribution size small.
First, note that the distributions are well defined by induction and by inequalities 3 and 4 of the LP. Also, D n contains well-defined assignments (instead of loose assignments), so the algorithm returns a valid assignment. Let |D i | be the size of the support of D i . Excluding inequalities 4 stating the non-negativity of variables, there are |D i−1 | + 2 inequalities in the LP for step i, so an extreme point solution contains at most that many nonzero variables: |D i | ≤ |D i−1 | + 2. Therefore, |D n | ≤ 2n + 1 and the algorithm does have linear width. Now, let us see that . It can be proved by induction that for all 1 ≤ i ≤ n and all (X, Obtain an extreme point solution for:

5:
Construct a new distribution: Delete from D i any pair of loose assignments with zero probability. 7: end for Adding both inequalities, moving all terms to the left side and rearranging, we obtain that We now prove that for every i the LP formed is feasible, which is assumed by the algorithm in order to find an extreme point solution. We give an explicit feasible solution: we take z(X, Y ) = 1 and w(X, Y ) = 0. By definition, equalities 3 and inequalities 4 hold. When t i (X, Y ) = f i (X, Y ) = 0, the corresponding variables will not contribute to either side of inequalities 1 and 2. Assume either t i (X, Y ) = 0 or f i (X, Y ) = 0 and we want to show inequality 1 (since the other one will be analogous).
Then we want to show: where the expectation is over Let OP T be an optimal assignment. For any 1 ≤ i ≤ n and (X, it is an assignment that coincides with X and Y in the first i variables and coincides with OP T in the rest. We will now prove the following: Proof. First suppose that in OPT, v i is assigned 0. In this case: Here, we use z i and w i to emphasize that these are the extreme point solutions obtained at the ith LP. The first equality holds by construction of D i . The second holds because } and by submodularity: Adding these two inequalities, rearranging, and using the fact that Thus, we conclude: Analoguously, when (v i , 1) ∈ OP T we obtain: On the other hand, we have: where the first equality is by how D i is constructed and the last inequality is because of inequalities 1 and 2 from the LP.
To conclude the proof of the theorem, we add the inequalities given by the lemma for 1 ≤ i ≤ n, obtaining: , and for all (X, Y ) ∈ supp(D n ), X = Y = OP T n (X, Y ). Therefore the inequality becomes Therefore, after rearranging we get: The last inequality follows from the fact that F is normalized (so g(∅) = 0) and monotone (so . Calling the algorithm's ouput assignment A, we conclude that We note that the LP format is the same as that in [14]. The only difference with their LP is the coefficients. So their argument that this can be solved by viewing it as a fractional knapsack problem still holds.

Online width inapproximation bounds for max-2-sat
We now present width impossibility results for max-sat with respect to different input models. The best known efficient algorithm for max-sat has an approximation ratio of 0.797 [5]. Recall that Johnson's algorithm for max-sat [33] achieves a 2/3 approximation ratio [16] and only requires the algorithm to know the lengths of the clauses; i.e. input model 1. Even for input model 2, we show in Theorem 2 that exponential width-cut is required to improve upon the 3/4 approximation ratio achieved by Algorithm 1, which is a linear width algorithm in input model 1. In Theorem 3, we show that constant width algorithms cannot achieve an approximation ratio of 2/3 in input model 0. This shows that constant width is unable to make up for the power lost if the algorithm does not know the lengths of clauses or if the algorithm is required to be deterministic; we note that the randomized algorithm using probabilities proportional to weights achieves an approximation ratio of 2/3 [6]. Finally, in Theorem 4 we show that, in input model 3, exponential width is required to achieve an approximation ratio greater than 5/6.
Our impossibility results hold even in some special cases of max-sat. In max-q-sat, the instance is guaranteed to have clauses of length at most q. Exact max-q-sat is the case where all clauses are of length exactly q. In the following theorem, we show that for input model 2, exponential width-cut cannot achieve a better approximation ratio than that achieved in Theorem 1, even for exact max-2-sat. It should be noted that a 3/4 approximation ratio is already achieved by the naive randomized algorithm (that sets a variable to 0 (or 1) with probability 1/2) and by its de-randomization, Johnson's algorithm, for exact max-2-sat.
We say that a max-of-k algorithm assigns (or sets) Theorem 2. For any > 0 there exists δ > 0 such that, for k < e δn , no online width-cut-k algorithm can achieve an asymptotic approximation ratio of 3/4 + for unweighted exact max-2-sat with input model 2.
Proof. First, we will show a concrete example where any width-2 algorithm achieves an approximation ratio of at most 3/4. Then we show a way to extend this to a 3/4+ asymptotic inapproximation with respect to the max-of-k model for k that is exponential in the number of variables. Finally, we briefly argue why this impossibility result will also hold in the more general width-cut-k case.
Suppose k = 2. The adversary begins by showing variable x 1 : it appears positively in one clause and negatively in another clause, both of length 2. The remaining variable in both clauses is y. If the algorithm does not branch or sets the variable x 1 to 0 or to 1 in both assignments, the adversary can force a 3/4 approximation ratio as follows. Suppose without loss of generality that in both assignments x 1 is assigned 1. Then the adversary presents the instance: ( . No assignment where x 1 is set to 1 can satisfy all clauses, but an assignment where x 1 and y are set to 0 satisfies all clauses. Thus, the algorithm achieves an approximation ratio of at most 3/4. Therefore the algorithm must set one assignment to 1 and the other to 0. We assume that the algorithm sets x 1 to (1, 0). Now the adversary presents a variable x 2 , where again there is one clause where it appears positively and one where it appears negatively, both of length 2 and where the remaining variable is y. Then there are four cases depending on the decision of the algorithm on x 2 (in each case, the whole instance consists of four clauses in total): Decision on x 2 (0, 0) In all cases, the algorithm will only be able to satisfy 3 out of the 4 clauses in any of its branches, but the instance is satisfiable, so the inapproximation holds. Now let us show how to extend this idea to max-of-k. Let > 0, take δ = 7 2 , so that k < e δn = e 7 2 n . The adversary will present variables x 1 , . . . , x n , where each x i appears in two clauses of length 2 and where the remaining variable is y: in one x i appears positively and in the other negatively. In fact, the two clauses will either represent an equivalence to y (given by x i ∨ y, x i ∨ y) or an inequivalence to y (given by x i ∨ y, x i ∨ y), but the algorithm does not know which is the case. If an assignment does not satisfy the (in)equivalence correctly, it will get only one of the two clauses (ie 1/2 of the total).
Suppose that the algorithm maintains k assignments, and suppose it makes assignments on x 1 , . . . , x n . Then the algorithm can only maintain at most k of the possible 2 n assignments. For a fixed assignment of x 1 , . . . , x n , by Chernoff bounds, the probability that a uniformly random assignment agrees with the fixed one on at least n/2 + 2 n variables is at most e −8 2 n . Similarly, the probability that it agrees with the fixed assignment on at most n/2 − 2 n variables is at most e −8 2 n . Thus, by union bounds, the probability that any of the two possibilities occurs on any of the k assignments maintained by the algorithm is at most 2ke −8 2 n < e − 2 n+ln2 < 1. So there exists an assignment A that agrees with every assignment maintained by the algorithm on more than n/2 − 2 n but less than n/2 + 2 n of the variables.
The adversary uses this assignment A to determine the signs of y in the clauses, which in turn determines for each i whether x i is equivalent or inequivalent to y. If A assigns x i to 1, then the adversary says x i is equivalent to y. If A assigns x i to 0, then the adversary says that x i is inequivalent to y. Clearly, the set of clauses constructed is satisfiable. Fix one of the k assignments maintained by the algorithm. If to complete this assignment the algorithm sets y to 1, the number of (in)equivalences satisfied by the assignment is equal to the number of variables where A and this assignment agree, which is less than n/2 + 2 n. On the other hand, if to complete the assignment the algorithm sets y to 0, then the number of (in)equivalences satisfied is equal to the number of variables where A and this assignment disagree, which again is less than n/2 + 2 n. Since an assignment that satisfies q (in)equivalences will satisfy a n+q 2n fraction of the clauses, the approximation ratio achieved by the algorithm is less than 3/4 + .
It is easy to see why this result will also hold for width-cut: the only decisions of the adversary that depend on the branching are made when the last variable y is being processed (their signs are determined in each clause by assignment A). So the adversary can use the strategy that corresponds to the assignments of the algorithm right before y is presented. Any branching or cutting made when deciding the assignments for y are irrelevant: since it's the last variable, the algorithm should just assign y to maximize the number of satisfied clauses in each assignment.
Theorem 3. For any constant k, the asymptotic approximation ratio achieved by any online widthk algorithm for unweighted max-sat with input model 0 is strictly less than 2/3.

Proof.
We start by giving a max-of-k inapproximation result, which is then easily extended to width. It should be noted that for this result we need to allow the adversary's final instance to contain repeated equal clauses.
First consider the case k = 2. The adversary presents a variable x 1 . There are two clauses where it appears positively and two where it appears negatively. Without loss of generality, there are two options: both assignments set x 1 to 1 or the first sets x 1 to 1 and the second sets x 1 to 0. In the former case, the adversary proceeds to say that the clauses containing x 1 were of length one but the clauses containing x 1 had an additional variable y, which means both assignments satisfy half of the clauses. In the latter case, the adversary now presents variable y 1 . It appears positively in one of the clauses where x 1 appears and it appears negatively in the other clause where x 1 appears. The value the second assignment gives to this variable is irrelevant since it already satisfied these clauses. Without loss of generality, assume the first assignment sets it to 1. Then the adversary presents a variable z 1 , which occurs only positively in the clause where y 1 appears positively. Thus the values both assignments give to this variable are irrelevant. The first assignment satisfied three of the four clauses while the second only satisfied two of them. There is an optimal solution satisfying all four: set x 1 to 1, y 1 to 0, z 1 to 1. Now, the adversary repeats this process, but reversing the roles of the two assignments so that now the first assignment only gets two out of four clauses and the second gets three. Adding up, both assignments get five out of the eight clauses and the optimal value is 8, so we get a 5/8 inapproximation.
For the general (but constant) k case, we proceed by induction to prove that there is an adversary giving an inapproximation ratio strictly less than 2/3. Recall that online maxsat (k = 1) in this model cannot get an approximation ratio better than 1/2 [6] (it is easy to extend this to an asymptotic inapproximation). Suppose there is an adversarial strategy for i < k. We now present a strategy for max-of-k. The adversary begins by presenting many variables v 1 , v 2 , . . . , v n , each of which will have many clauses where it appears positively and the same number of clauses where it appears negatively. For each 1 ≤ i = j ≤ n, the clauses where v i and v j appear are disjoint. These will be all of the clauses of the instance: the adversary will not present any new clauses later on. It will only present additional variables contained within these clauses.
After decisions are made there will be k assignments, each assigning a value 0 or 1 to each of the variables. For every S ∈ {0, 1} k , the adversary will recursively apply its strategies for max-of-i (for values i < k) to V S , the set of variables from v 1 , v 2 , . . . , v n assigned to S, and to the clauses where variables in V S appear. More precisely, let A j be the adversary for max-of-j. Then A k will simulate A i by ignoring some of the assignments (since now it can only consider i of them). Variables created by A i will be new variables. When A i creates new clauses, A k uses some of the clauses where variables in V S appear instead of creating new ones. If S = (1, . . . , 1), for these variables the adversary says that the clauses where they appear positively have length two and include a new variable y but the clauses where they appear negatively have length one. Thus the algorithm can only satisfy 1/2 of these clauses but the set of clauses is satisfiable. The response is analogous if S = (0, . . . , 0). Now suppose that S = (s 1 , . . . , s k ) contains t 1's and k − t 0's, for some for 0 < t < k. Let S 1 := {1 ≤ j ≤ k|s j = 1} and let S 0 := {1 ≤ j ≤ k|s j = 0}, so |S 1 | = t and |S 2 | = k − t. The adversary will roughly split V S into two parts, one V 1 S of size w|V S | and the other V 2 S of size (1 − w)|V S |, for a w to be determined. In the first part, the adversary will say that the positive clauses (where variables in V 1 S appear positively) were of length one, and it will simulate A t using the negative clauses, so the decisions made on the k − t assignments indexed by S 0 don't matter and the adversary only considers the decisions of the algorithm on the t assignments indexed by S 1 . In the second part, the adversary will say that negative clauses were of length one, and will simulate A k−t using the positive clauses and considering only the k − t assignments indexed by S 0 . See Table 1 for an example. Let r 1 be the inapproximation ratio for max-of-t and let r 2 be the inapproximation ratio for max-of-(k − t). Let a = (1 + r 1 )/2 and b = (1 + r 2 )/2. Then the proportion of clauses satisfied by assignments indexed by S 1 is at most aw + 1/2(1 − w) and the proportion of clauses satisfied by assignments indexed by S 0 is at most 1/2w + b(1 − w). We select w to minimize the maximum between these two amounts, by equating these values: We solve this equation, obtaining a + b − 1 Plugging back in into the equality and considering there is an optimal assignment satisfying all clauses, we obtain an inapproximation ratio of Clause of length 1 Now, recall r 1 , r 2 are inapproximation ratios for max-of-k for k < k, so by the induction hypothesis 1/2 ≤ r 1 , r 2 < 2/3, which implies 3/4 ≤ a, b < 5/6. Given these parameters, it can be shown that the above ratio gets a value strictly less than 2/3. Since all ratios are less than 2/3 regardless of S, the inapproximation obtained overall is less than 2/3. Notice that we assume that we can neglect the gain obtained when |V S | is not large enough to apply the recursive strategy (hence the number of initial variables n has to be large) and in addition we are assuming we can at least approximate w accurately (hence the number of clauses per v i has to be large).
To extend this result to width k, we can begin by assuming that k = 1 where k is the maximum number of assignments the algorithm keeps. We start by applying the adversary for max-of-k . If the adversary finishes before the algorithm does any splitting then we are done. Otherwise the algorithm splits to now maintain k > k assignments and we apply the adversary for max-of-k , but using many more clauses so that we ensure that the clauses used by previous adversaries will be negligible when calculating the approximation ratio.
Theorem 4. For any > 0 there exists δ > 0 such that, for k < e δn , no online width-cut-k algorithm can achieve an asymptotic approximation ratio of 5/6 + for unweighted max-2-sat with input model 3.
Proof. We use an argument similar to the one in Theorem 2, but with a different clause construction. Given > 0, let δ = 144 2 so that k < e δn = e 144 2 n . The instance will contain variables x 1 , . . . , x n/2 and y 1 , . . . , y n/2 . The clauses will be x i ∨ y i , x i ∨ y i , and either y i or y i . The first two clauses are satisfied if and only if x i = y i . The last clause determines whether y i should be assigned to 0 or 1. Any such set of clauses will be satisfiable. The adversary presents the x i 's, and the width-cut algorithm produces at most k assignments of these variables.
For a fixed assignment of the n 2 x i 's, the probability that a uniformly random assignment agrees with the fixed one on more than n/4 + 6 n of the variables is at most e −144 2 n . Therefore, there exists an assignment A that agrees with each of the assignments maintained by the algorithm on at most n/4 + 6 n variables. The adversary now presents the y i 's. It chooses to include clause y i in the instance if x i is set to 0 in assignment A, and it includes y i if x i is set to 1.. Whenever an assignment does not agree with A on x i , it will satisfy at most two of the three clauses where y i appears in. Therefore, no assignment can satisfy more than a 1(1/4+6 )+2/3(1/2−(1/4+6 ))) 1/2 = 5/6 + fraction of the clauses.

Candidate for a width 2 approximation algorithm
Now we present a max-of-2 algorithm for max-sat. We were unable to prove impossibility results saying max-of-k algorithms for constant k cannot achieve an approximation ratio of 3/4 in input model 1 or 2. Thus we suggest trying to use Johnson's algorithm in some way. In a max-of-2 algorithm, when processing a variable, we want to have a preference for the case in which the two assignments set a variable differently, since otherwise the 2/3 inapproximation bound for online algorithms could be applied to the max-of-2 algorithm. In Algorithm 2 we present a formal way to do this, where the parameter p controls how much we value different assignments. The variables are {x 1 , . . . , x n } in online order, and the algorithm constructs two assignments A 1 and A 2 . Recall that, at any point in the algorithm, the measure of a clause C, µ(C), is defined by the product of its weight times 2 −l where l is the number of variables not yet assigned.
We call the algorithm Width-2-Johnson's Algorithm. When deciding the assignment for x i , it calculates, for each of the two assignments, the measures of clauses that become satisfied when assigning x i to 0 or to 1, as in Algorithm ??. For each assignment D ∈ {0, 1} 2 , it adds the measures of satisfied clauses when assigning x i to D. However, instead of double-counting clauses that become satisfied in both assignments, the measures of repeated clauses are multiplied by p instead of added twice for 1 ≤ p ≤ 2.
Width-2-Johnson's algorithm is a candidate to achieve a good approximation ratio for max-sat. The following lemma suggests that p = 1.5 is the right choice. It's unclear whether it could achieve an approximation ratio of 3/4. It would be interesting to show that it achieves an approximation ratio greater than 2/3, which would show that, unlike bipartite matching, max-sat is helped by constant width. Proof. If p > 1.5, let w be such that 1 > w > 1/2 and p > 1 + w. Consider the max-sat instance consisting of clauses x 1 with weight 1, x 1 ∨ x 2 with weight w, and x 2 with weight w. The algorithm will assign x 1 to (1, 1) because p > 1 + w. But then when processing x 2 it cannot satisfy both clauses of weight w in any of the two assignments. Thus the approximation ratio achieved is 1+w 1+2w , which is less than 3/4 because w > 1/2. for D = (d 1 , d 2 ) ∈ {0, 1} 2 do define 5: C 1 : the set of clauses that become satisfied by assigning x i to d 1 in A 1 .

6:
C 2 : the set of clauses that become satisfied by assigning x i to d 2 in A 2 .
If p < 1.5, let w be such that 0 < w < 1/2 and p < 1 + w. Consider the instance: x 1 with weight 1, x 1 with weight w, x 2 with weight 1, x 2 with weight w. The algorithm will assign x 1 to either (1, 0) or (0, 1) because 1 + w > p, so suppose it assigns x 1 to (1, 0). Then similarly suppose it assigns x 2 to (0, 1). Then both assignments satisfy clauses with total weight 1 + w, but the optimum assignment satisfies clauses of weight 2, hence the approximation ratio achieved is 1+w 2 , and this is less than 3/4 because w < 1/2.

Bipartite matching results
We will first consider width inapproximation results showing that width log n log log n online algorithms cannot asymptotically improve upon the 1 2 approximation given by any maximal matching algorithm. We will then consider bipartite matching in the priority and ROM models. Our priority inapproximation shows that the ROM randomization cannot be replaced by a judicious but deterministic ordering of the online vertices.

Width inapproximation
We first fix some notation for max-of-k online bipartite matching. The algorithm keeps k distinct matchings M 1 , . . . , M k . Whenever an online vertex u arrives, it can update each of the M j 's by matching to u one of its neighbours that M j has not yet matched. The size of the matching obtained by the algorithm is the maximum size of the M j 's. We assume that the online vertices are numbered from 1 to n, and the algorithm receives them in that order. The adversary chooses the offline vertices that are the neighbours. We will refer to the time when the algorithm chooses the matchings for the i-th online vertex as step i.
In the usual online bipartite matching problem, we can assume that the algorithm is greedy. This argument clearly still applies when we keep track of multiple matchings at once: we can assume that the algorithm is greedy in each. We begin with a max-of-n k algorithm and inapproximability result that follows from the relationship between advice and max-of-k algorithms: Theorem 5. For every > 0 there exists a max-of-n O(1) algorithm achieving an approximation ratio of 1 − 1/e − . Also, no max-of-2 o(n) algorithm can achieve an approximation ratio better than 1 − 1/e + .
Proof. By Böckenhauer et al [10], as observed in [20], for every > 0 there is a Θ(log n) advice algorithm achieving an approximation ratio of 1 − 1/e − . The algorithm is a de-randomization of the Ranking algorithm. Part of the advice string consists of an encoding of n. Even without this, the advice is still Θ(log n). By Lemma 1 there is a max-of-2 O(log n) = n O(1) algorithm getting the desired approximation ratio. It should be noted that the algorithm uses an information-theoretic approach and is, in fact, extremely inefficient, in addition to requiring heavy pre-processing.
For the other part of the theorem, Mikkelsen [41] showed that, for every , an advice algorithm with approximation ratio 1 − 1/e + requires Ω(n) advice. If there was a max-of-2 o(n) with this ratio, then by Lemma 1 there would be a o(n) advice algorithm achieving that ratio. Note that it can be assumed without loss of generality that any algorithm with Ω(log n) advice knows n.
We now prove some impossibility results concerning algorithms trying to beat the 1/2 barrier that deterministic online algorithms cannot surmount. The adversarial graphs will be bipartite graphs with perfect matchings. The adversary will not only provide the graph but also construct a perfect matching "online". Once an offline vertex has been used in the adversary's perfect match, the adversary will not present it as a neighbour of any of the remaining online vertices. When an online vertex u arrives, the adversary will choose a nonempty subset of offline vertices as its set of neighbours. Then the algorithm (which we assume without loss of generality to be greedy) chooses a match in each of the k matchings. For each matching M i , if there are neighbours of u that have not been used in M i , the algorithm must pick a neighbour v and match u to v in M i . When the algorithm has finished making its choices, the adversary picks one of the neighbours of u and adds the pair of vertices to the perfect matching that it is constructing. The match to online vertex i in this perfect matching is labelled as offline vertex i. We say that this offline vertex becomes unavailable. An offline vertex is available if it is not unavailable. The goal of the adversary is to force the algorithm to make as few matches as possible in the best of its k matchings.
At a specific point in time and for any offline vertex v, we say t(v) is the number of the algorithm's matchings that have used v. Whenever we say that the adversary gets rid of an offline vertex v at a given step we mean that, at this step, the only neighbour of the online vertex u is v, so the best option of the algorithm is to match u to v in any of the matchings where v has not yet been used. Also, v will not be a neighbour of any of the remaining online vertices (the adversary must add (u, v) to its perfect matching). If the adversary only gets rid of a constant number of offline vertices, the matchings made by the algorithm during these steps are negligible: they do not affect the asymptotic approximation ratio.
Lemma 4. Any max-of-2 online bipartite matching algorithm cannot achieve a matching of size greater than n/2 + 3 on every input.
Proof. Since the algorithm has only two matchings, at any point in time and for any offline vertex v, 0 ≤ t(v) ≤ 2. There will be two stages. The first stage consists of steps where, at the beginning of the step, there are more than two available vertices v with t(v) = 0. The adversary chooses as neighbours all available vertices. Thus, we can guarantee that, after the algorithm has chosen matches for the online vertex of this step, there will still be at least one available vertex v with t(v) = 0. The adversary will choose one such offline vertex (i.e. one not chosen in any matching) to be added to its perfect matching. If at the beginning of a step, there are less than 3 available offline vertices with t(v) = 0 (so that we cannot guarantee that there will exist a vertex with t(v) = 0 after the algorithm does its matches), the adversary concludes stage 1 and gets rid of the at most 2 available offline vertices with t(v) = 0 before stage 2.
Let p be the number of steps that occurred during stage 1. Let p 1 and p 2 be the number of offline vertices with t(v) = 1 and t(v) = 2 at the end of stage 1, respectively. During stage 1, at each step, v t(v) is incremented by 2, so 2p = p 1 + 2p 2 . At each step in stage 1 a vertex becomes unavailable, but no vertex with t(v) = 0 becomes unavailable, so n ≥ p+p 1 +p 2 (inequality because the adversary may get rid of vertices). Therefore, p = p 1 2 + p 2 and n 2 ≥ 3 4 p 1 + p 2 . Right before the beginning of stage 2, the size of each matching is at most p + 2: p from stage 1 and 2 from getting rid of vertices.
The second stage consists of steps where at the beginning of the step all the available offline vertices satisfy t(v) ≥ 1, and there are some available vertices with t(v) = 1. At this stage, the p 1 vertices with t(v) = 1 are considered. Since the number of vertices matched in M 1 and M 2 have to be the same during stage one, half of the vertices are used in M 1 and half in M 2 . The steps in this stage will be either M 1 -steps or M 2 -steps (the order in which the adversary does them is irrelevant). An M 1 step is a step where the neighbours of the online vertex are available vertices that have already been matched in M 1 , so the algorithm can only do a match in M 2 . After the algorithm does its match, if there is still an available vertex that has only been matched in M 1 , the adversary adds it to the perfect matching it is constructing, making it unavailable. At the beginning of stage 2, there are p 1 /2 vertices with t(v) = 1 matched in M 1 . Every M 1 -step (except possibly the last, where there may be only one available vertex matched in M 1 with t(v) = 1) makes two vertices unusable: one because it is made unavailable and one because t(v) changes from 1 to 2. So there will be p 1 /4 M 1 -steps. We define M 2 -steps analogously, and there will be p 1 /4 M 2 -steps. After stage 2, all available vertices have t(v) = 2 and are unusable, so no more matchings are made by the algorithm. The adversary can finish the construction of the perfect matching by making the remaining online vertices be neighbours of all offline vertices with t(v) = 2.
The size of the matchings produced by the algorithm is at most p + 2 + p 1 4 , since the algorithm can only increase the size of M 1 during stage 1, while the adversary gets rid of vertices, and during M 2 -steps, and similarly for M 2 . But p + 2 + p 1 4 ≤ p + 3 + p 1 4 = p 1 2 + p 2 + 3 + p 1 4 ≤ n 2 + 3. This in particular implies that the asymptotic approximation ratio achieved by any algorithm is at most Clearly, making the width bigger without making n bigger will eventually allow the algorithm to obtain an optimal matching using brute-force. However, it is natural to wonder whether by allowing n to be large the adversary will be able to trick the algorithm into producing a small matching. This question is answered by the following: Theorem 6. For any constant k, any width-k online bipartite matching algorithm cannot achieve an asymptotic approximation ratio greater than 1 2 .
Proof. We will prove the theorem by first considering max-of-k and then extending the result to width. We prove the following statement by induction on k: for any max-of-k algorithm there exists a constant c k (that only depends on k) such that for every n there is a graph G of size n (n vertices on each of the two sides) where the algorithm obtains matchings of size at most n/2 + c k . For k = 1, the problem is the well studied online bipartite matching problem: there are adversarial graphs where we can take c 1 = 1 (needed for odd values of n). Lemma 4 proves the case for k = 2, taking c 2 = 3. Suppose that the claim is true for max-of-i for all 1 ≤ i ≤ k, and we shall prove it for max-of-(k + 1). As before, the adversary will decide the neighbours of the incoming online vertex as well as the offline vertex that matches it in the perfect matching it constructs (and this offline vertex will not be a neighbour of any of the remaining online vertices). Let M 1 , . . . , M k+1 be the matchings that the algorithm constructs. The adversary will have the same first stage as in the lemma, at each step adding to its perfect matching a vertex with t(v) = 0. When there are less than k + 2 available vertices with t(v) = 0 (so we cannot guarantee that there will be an available vertex with t(v) = 0 after the algorithm does its matchings), stage 1 ends and then the adversary gets rid of all the available vertices with t(v) = 0. Let p be the number of steps in the first stage and let q be the number of available offline vertices right after stage 1, ie the number of offline vertices not in the adversary's perfect matching at that time. Then p + q = n, and after the adversary gets rid of vertices there are at most q available vertices. Now the adversary proceeds to a second stage.
For every S ⊆ {1, . . . , k + 1} with S = ∅ and S = {1, . . . , k + 1}, let V S be the subset of available offline vertices that have been used in M i for all i ∈ S and that have not been used in M i for all i / ∈ S. Let S C = {1, . . . , k + 1} \ S, and notice that 0 < |S C | < k + 1. At this point, only M i 's with i ∈ S C can match vertices in V S . The idea is that we will recursively apply our adversary for max-of-|S C | algorithms on a graph with V S as the set of offline vertices and with |V S | online vertices. The M i 's with i ∈ S are ignored: the algorithm cannot add matches in these when the set of neighbours of the online vertex is a subset of V S . By the induction hypothesis, there is an adversarial strategy for max-of-|S C | such that the size of any of the matchings obtained (on a graph that uses |V S | online vertices and V S as the offline vertices) is at most |V S |/2 + c |S C | . This will be close to 1/2 of the total when |V S | is large, since c |S C | is a constant.
In the second stage, the adversary executes the max-of-|S C | strategies described above. For S 1 = S 2 , the strategies will be independent because the set of offline neighbours is disjoint. Thus, the order in which the strategies are executed is irrelevant: they could even be executed in parallel. For concreteness, suppose the adversary first executes the strategies for subsets S of size k in lexicographic order (here it applies max-of-1 strategies), then for subsets S of size k − 1 in lexicographic order (here it applies max-of-2 strategies), etc. After the strategies for all subsets have been executed, stage 2 is concluded and now we need to show that the adversary's perfect matching is about twice the size as any of the matchings constructed by the algorithm.
For simplicity, ignore the adversary getting rid of vertices and suppose that every V S is large enough. In the end, any fixed matching M i will use p offline vertices because of stage 1. After applying our recursive adversaries, M i will use roughly half of the offline vertices that were not used by M i by the end of stage 1 but were still available at this time. The number of offline vertices that are available by the end of stage 1 is q. Thus, in the end, the size of matching M i is p + q−p 2 = p+q 2 = n/2. Now we make the intuition from the previous paragraph precise. Notice that the size of matching M i is at most p + k + 1 + S:i / ∈S V S 2 + c |S C | : p during stage 1, k + 1 from vertices the adversary gets rid of before stage 2, and the rest during stage 2. The number of available offline vertices that M i has not used at the beginning of stage 2 is S:i / ∈S V S ≤ q − p = n − 2p. By the induction hypothesis, S:i / ∈S c |S C | ≤ 1≤j≤k k j−1 c j , since there are k j−1 ways of choosing S C of size j if we require i ∈ S C . Therefore, the size of any matching obtained by the algorithm is at most n 2 + c k+1 where c k+1 = k + 1 + 1≤j≤k k j−1 c j . This concludes the induction and the proof for max-of-k algorithms.
Now we extend the result to width k. The idea is that we will slightly modify the adversary so that, given the decisions of the algorithm, for a > b, a max-of-a adversary can be viewed as a max-of-b adversary. The width-k adversary will use this fact to change from the max-of-b adversary to the max-of-a adversary, whenever the algorithm branches, without affecting the argument. Let A j be the max-of-j adversary, but where the condition to end stage 1 is that there are less than k + 1 available vertices with t(v) = 0, instead of j + 1. Also, we assume that A j may perform the independent stage 2 simulations in any order we choose. The width-k adversary A does the following: begin by assuming m, the maximum number of matchings maintained by the algorithm, is 1. When A needs to tell the algorithm which are the neighbours of the next online vertex, A does whatever A m would do given the matchings the algorithm has made so far. If the algorithm does not branch, A constructs the perfect match as A m would, and this finishes the processing of the online vertex. On the other hand, the algorithm may branch on the decisions of the online vertex, so that now it maintains m + r matchings. Each new matching M new will branch off of some matching M old , which in the branching tree means that now M new is a leaf of the subtree rooted at M old (or any of its ancestors). In this case, A simply increases m by r. Then it simulates A m (m is the increased value) to obtain the perfect match. And this finishes the processing of the online vertex.
At any point in time, there is a max-of-m algorithm that simulates the width-k algorithm up to this point, if it knows the branching tree created up to this point. For each level of the branching tree (each corresponding to an online vertex), the max-of-m algorithm keeps l copies of each node, where l is the number of leaves in the subtree rooted at that node. We claim that all previous decisions made by A are consistent with A m , in the following sense: the behaviour of A on the width-k algorithm (which so far only has m branches) is equivalent to the behaviour of A m on the max-of-m algorithm just described. By behaviour of an adversary, we mean the offine neighbours it presents and the perfect matchings it constructs at each step.
We can show this by induction. Consider a step where the width-k algorithm branches, and let m i and m f be the values of m at the beginning and at the end of the step, respectively. Suppose that A (on the width-k algorithm) behaves as A m i on the max-of-m i algorithm that simulates the width-k algorithm up until the previous step. We will now show that A behaves as A m f on the max-of-m f algorithm that simulates the width-k algorithm up until this step. On later steps, as long as the algorithm does not branch, this consistency will still hold. We will see A as A m i (on the max-of-m i algorithm) up until the end of the previous step, which is valid by our assumption. If the branching occurs during stage 1, then what we claim is true since A m i and A m f have the same stage 1. Now suppose that the branching occurs during stage 2. We will prove that up until the beginning of the current step we can make the behaviour of A m f on the max-of-m f algorithm be the same as the behaviour of A m i on the max-of-m i algorithm. On a stage 2 step, A m i will be simulating A x on V S for some S ⊆ {1, . . . , m i } and where x = |S C |. Then in A m f we choose to simulate a step of A y on V S , where S ⊆ S ⊆ {1, . . . , m f }, S contains all indices of matchings that branched off from matchings indexed in S, and y = |S C | ≥ |S C | (S C contains indices of matchings that branched off from matchings indexed in S C ). This is because by definition the max-of-m f algorithm only keeps copies of the matchings that will later branch off, so V S = V S : here the left hand side corresponds to the set according to A m i and the right hand side is according to A m f . More generally, there is a mapping f : P({1, . . . , m i }) → P({1, . . . , m f }) that maps a set of indices Q to the set of indices of matchings that branch off from matchings indexed in Q. Because of the behaviour of the algorithms, it holds that V Q according to A m i is equal to V f (Q) according to A m f , and for any R ⊆ {1, . . . , m f } that does not have a preimage under f , V R = ∅. In the step where m changes from m i to m f , A m i simulating A x to select a subset of V S as the set of neighbours is equivalent to A m f simulating A y to select a subset of V S . After the algorithm does its decision and branching, m is updated and A actually simulates A m f , so the behaviour is the same. This concludes the proof of our claim.
Thus, in the end, the behaviour of A on the width-k algorithm is equivalent to the behaviour of A k on the max-of-k algorithm. This means that the size of the matching constructed by the width-k algorithm is at most n/2 + c k . Since we changed stage 1 of the adversaries, the c k 's will be slightly larger, but they still only depend on k.
Corollary 1. Let t(n) = log n log log n . Any max-of-t(n) online bipartite matching algorithm cannot achieve an asymptotic approximation greater than 1 2 .
Proof. For any k, from the proof of Theorem 6 max-of-k algorithms can achieve matchings of size at most n/2 + c k on some hard graphs. First, we note that c k ≤ k k . This is true for k = 1. Assuming this holds for 1 ≤ i < k + 1, then c k+1 ≤ k + 1 + 1≤j≤k k j−1 j j < 0≤j≤k+1 k+1 j k j = (k + 1) k+1 . In the second inequality we use the fact that k + 1 ≤ 1 + k k+1 . Now, notice that t t < (log n) log n log log n = (2 log log n ) log n log log n = n, where in the first inequality we omit dividing by (log log n) log n log log n . This means that t t = o(n). Thus, max-of-t algorithms achieve matchings of size at most n/2 + t t = n/2 + o(n).
The following corrolary follow immediately from the observations in Section 2.3. Dürr et al [20] proved an Ω(log log log n) advice lower bound for achieving an approximation ratio greater than 1/2, and this only applied to a restricted class of online advice algorithms. We improve this result: Corollary 2. Ω(log log n) advice is required for an online algorithm to achieve an asymptotic approximation ratio greater than 1/2 for bipartite matching, even when the algorithm is given n in advance.
Proof. No log log n log log n = log log n − log log log n advice algorithm can achieve an asymptotic approximation ratio better than 1/2, even knowing n. Otherwise Lemma 1 would give a max-of-log n log log n online algorithm achieving this ratio, contradicting the previous corollary.

Candidates for an approximation algorithm with polynomial width
While the bounds for non-uniform max-of-polynomial bipartite matching are tight, we have not provided a simple and efficient constant width algorithm that achieves an approximation ratio better than 1/2. We present two algorithms which could have an approximation ratio better than 1/2. The first candidate is a simple algorithm for max-of-k bipartite matching that attempts to balance the current usage of offline vertices that are still available. The second attempt tries to de-randomize the Ranking algorithm based on the LP approach of Buchbinder and Feldman.
We consider the following simple max-of-k algorithm for bipartite matching, for k ∈ n O(1) . The idea works for max-of-k for any number k, but the interesting question is what approximation ratio can we achieve when k ∈ n O(1) . Let M 1 , . . . , M k be the matchings of the algorithm. Define the load of an offline vertex as the number of matchings in which it has been used. The algorithm does the following: when processing an online vertex, try to balance out the loads of the available offline vertices as much as possible. The intuition behind this is that we want the offline vertex with minimum load to have as high a load as possible, so if the adversary chooses to never show this vertex again, the number of matchings that will not match the vertex is as low as possible. The way of balancing loads can be made more precise or it could be left as an arbitrary choice for the algorithm. Nonetheless, this algorithm is fairly efficient and it would be interesting to see whether an algorithm that maintains polynomially many candidate matchings constructed this way can achieve an approximation ratio greater than 1/2.
We have also considered Algorithm 3 following the LP approach of Buchbinder and Feldman. Obtain an extreme point solution of the following set of inequalities: 4:

5:
Remove from D i the matchings with zero probability. 6: end for 7: return the largest matching from D n .
We can talk about applying Ranking given distribution D i−1 as follows: this will yield a distribution of matchings. It is built by first taking M ∈ D i−1 with the corresponding probability. Then, a random permutation consistent with M is chosen, and Ranking is applied to the rest of the online vertices using this permutation. The intuition of the algorithm is that Inequality 5 ensures that, in D i , the probability of using each offline vertex in the ith step will not exceed the probability of using it when applying Ranking to the distribution D i−1 . Equalities 6 and 7 ensure that we will split P r D i−1 [M ] into the x(u, M )'s so that D i is a probability distribution. The set of inequalities is feasible because we can set x(u, M ) = P i (u, M ) for all M ∈ S i−1 and u ∈ N (M, v i ). The number of inequalities in the LP, without counting inequalities 7 that state variables are non-negative, is at most |D i−1 | + |N (v)|. Thus, an extreme point solution for the ith LP will have at most |D i−1 | + |N (v)| nonzero variables, so |D n | ≤ 1 + i |N (v i )|: this is a (|E| + 1)-width algorithm, where E is the set of edges of the graph.
It should be noted that this algorithm is not efficient. Note that a matching defines a partial ordering on the set of offline vertices in the following way: for every matched online vertex v, the offline match u is greater than all the other neighbours u of v that were available when u is matched. The number of permutations consistent with a matching is equal to the number of linear extensions of this poset: a linear ordering on the set of offline vertices can be viewed as a permutation of this set and vice-versa. Given a poset, it is easy to construct a graph and a matching that corresponds to that poset. Also, P i We have not been able to prove a good guarantee for this algorithm. One reason for this is that the analysis for Ranking usually is inductive but on the offline order (according to the permutation), not the online order, so it is unclear if the inductive invariants used to analyse Ranking will remain true in this LP-based approach. In addition, P i (u, M ) does not seem to be amenable to analysis. Finally, experimental results show that the expected size of matchings in D n may be worse than the expected performance of Ranking on a graph, so trying to somehow argue that the distribution obtained from the LP algorithm outperforms Ranking will not work. For instance, on the hard instance for Random (see Figure 4 and its explanation), when n = 10, the expected ratio for D n (of size of matching over maximum matching size, in this case 10) is 0.7058 while the expected ratio for Ranking on this same graph is 0.7090. On the complete upper triangular matrix (the hard instance for Ranking in [35]), when n = 6, the expected ratio for D n is 0.6709 and the one for Ranking is 0.6761. However it should be noted that the results are fairly close and, for this family of examples, it looks like the asymptotic approximation ratio will be at least 1 − 1/e. We will first consider the bipartite matching problem in the ROM. We will then show that the use of randomization n the algorithm or the randomization of the inout stream cannot be replaced by a judiciious but deterministic ordering of the online vertices nor can it be replaced by a constant (or even O( log n log log n ) width of parallel online algorithms. We will then relate the width inapproximation result to previously known results for the advice and streaming models.

Priority Inapproximation Bound
We now turn to study unweighted bipartite matching in the priority model. All of our results are for adaptive priority. While there are two related models where priority bipartite matching may be studied: one-sided (where there is one data item per vertex in the online side, and the offline side is known in advance) and two-sided (where there is one data item per vertex in the graph), we shall restrict attention to the one sided model.

The inapproximation for deterministic priority algorithms
The following theorem shows that deterministic priority algorithms cannot achieve a non-trivial asymptotic approximation ratio in the one-sided model. Thus, being able to choose the order in which to process the vertices is not sufficient to overcome the lack of randomness. Theorem 7. There does not exist a deterministic priority algorithm that achieves an asymptotic approximation ratio greater than 1/2 for online one-sided bipartite matching, even if the algorithm knows the size of the graph.
Proof. We describe a game between an algorithm and an adversary that, for any odd integer n ≥ 3, yields an inapproximation of (n+1)/2 n , which can be made arbitrarily close to 1/2 by making n sufficiently large. The bipartite graph will have two sides, each with n vertices. Let OF F be the set of offline vertices and let ON be the set of online vertices. We restrict our attention to graphs in which all vertices in ON have degree (n + 1)/2. The idea is that the algorithm does not know, a priori, anything about the degrees of vertices in OF F , so we can adjust the neighbours of vertices in OF F to ensure that the algorithm makes mistakes at each step.
The adversary will keep track of M , U , R, which are pairwise disjoint subsets of OF F (all initially empty). M will be the set of vertices in OF F matched by the algorithm, U will be the set of vertices that the algorithm cannot possibly match because of the matches it has already done, and R will be the set of vertices that the algorithm cannot match because of the rejections it has made. Note that the algorithm won't be able to match vertices in both U and R. The only difference between the sets is the reason for this "unmatchability". As the game between the algorithm and adversary progresses, the adversary announces some information about the graph, so that the set of possible instances may be further restricted.
The adversary will ensure that |M | = |U | whenever the algorithm has to provide an ordering of data items. The set P of potential data items is defined as the set of vertices of degree (n + 1)/2 where the set of neighbours N satisfies M ⊆ N and N ⊆ OF F \ (U ∪ R). In other words, N contains M and is disjoint from U and R. Initially P consists of all data items of vertices of degree (n + 1)/2 with neighbours in OF F , and P shrinks every time M , U , and R are updated. While |U | + |R| < (n − 1)/2, the algorithm receives the data item of the vertex v from P that comes first in some ordering π of data items. Note that the number of neighbours in OF F \ (U ∪ R ∪ M ) is at least 2 because |M | < (n − 1)/2 = (n + 1)/2 − 1. There are two options: the algorithm matches v to a neighbour (in OF F \ (U ∪ R ∪ M ), because vertices in M have already been matched by the algorithm), or it rejects v. We now show how we maintain our invariant (|M | = |U |) in either case.
If the algorithm matches v to some vertex m ∈ OF F \ (U ∪ R ∪ M ), the adversary updates M by adding m. This means that all the vertices in ON that have not been processed yet will be neighbours of m. It picks another neighbour u of v from the set OF F \ (U ∪ R ∪ M ) and updates U by adding u. This implies that none of the vertices in ON that have not been processed yet will be neighbours of u, so it is impossible for the algorithm to match vertex u. If the algorithm rejects v, the adversary updates R by adding a neighbour r of v from OF F \ (U ∪ R ∪ M ). Thus, none of the vertices in ON that have not been processed yet are neighbours of r and r will remain unmatched. Note that, in either case, the condition |M | = |U | is still maintained.
Each time a vertex in ON is examined, exactly one of |U | and |R| is increased by 1. Thus, after (n − 1)/2 vertices in ON have been examined, |U | + |R| = (n − 1)/2. At this point, P consists of vertices whose set of neighbours is OF F \ (U ∪ R). This is necessary to guarantee that the potential data items correspond to vertices of degree (n + 1)/2. The adversary no longer shrinks P while the remaining (n + 1)/2 vertices are examined. The matching obtained by the algorithm is at most n − (|U | + |R|) = (n + 1)/2 because it does not match any vertices in U ∪ R.
However, there exists a perfect matching. We construct it by looking back at the game between the algorithm and adversary. We match the first (n − 1)/2 vertices processed by the algorithm to vertices in U ∪ R. For each step in which the algorithm rejected a vertex v, there was some vertex r added to R: we match v to r. For each step in which the algorithm matched a vertex v, it was matched to a vertex m and there was a u that was added to U . We match v to u. Thus, after (n − 1)/2 vertices, we have matched all of U and R. We are left with vertices in OF F \ (U ∪ R), which can be matched in any way to the (n+1)/2 remaining vertices in ON because that is precisely their set of neighbours.
For an example, take n = 7. Then the degrees have to be 4 and the adversary constructs M , U , and R when the first 3 online vertices are being examined. An example where the algorithm matches the first online vertex, rejects the second, and matches the third is shown in Figure 1. The online vertices examined after an offline vertex is added to M will be neighbours of this vertex. The online vertices examined after an offline vertex is added to U ∪ R will not be neighbours of this vertex. A perfect matching for this example is shown in Figure 2.

Randomized priority algorithms
For randomized priority algorithms, we thus far have only a much weaker 53 54 inapproximation result in Theorem 8. Algorithm Ranking can obviously be implemented in this model, and this already an approximation ratio of 1−1/e, which is optimal for online randomized algorithms. This leaves open the question of whether there is a randomized priority algorithm beating the optimal randomized online Ranking algorithm.
The following argument emphasizes the difficulty in proving inapproximation results for randomized priority algorithms. Using the Yao minimax lemma, it is sufficient to define a distribution on inputs such that every deterministic algorithm will suffer an inapproximation (in expectation) for that distribution. Consider the graph in Figure 3 and consider the following reasoning. Given that all online nodes have degree 2, it would seem that if v is the first node being seen (in the random ordering of the online vertices), then it will fail to choose u as its match with probability 1 2 and hence the probability that the algorithm makes a mistake for the first online vertex it sees is 1 6 > 1 9 . This would yield the weak but improved bound of 17 18 . This reasoning is correct if the algorithm can only make decisions for an online node based on the degree of the node (and any previously seen information). For the first online node, there is no previous information, so that a degree-based algorithm would indeed achieve the improved 17 18 approximation. However, there is a way to order the vertices so that the probability of making a mistake for the first online vertex is less than 1 6 . Let a data item be described by l 1 : (l 2 , l 3 ), meaning that this corresponds to the data item of the online vertex with label l 1 , having the offline vertices labelled with l 2 and l 3 as neighbours. Let the priority ordering given by the algorithm begin as follows: . At least one of the data items must be in the instance, regardless of how the nodes are permuted. Let us assume that upon receiving its first data item, the algorithm matches the online vertex to u 1 .
We now analyse the probability that v is matched, but not to u. If v is not the first online vertex received, it is easy to see that the algorithm can achieve a perfect matching. When u is labelled as u 1 , then v will be the first online vertex received, but the algorithm will match v to u and achieve a perfect match. So the only case when the algorithm can make a mistake is when v's other neighbour, u , is labelled as u 1 . Since u has all online nodes as neighbours, the one labelled v 1 will be received first. To make a mistake, then, u has to be labelled as u 1 and v has to be labelled as v 1 . Thus, the probability that the algorithm makes a mistake is 1 9 , and the algorithm achieves an approximation ratio of 8 9 + 1 9 × 2 3 = 26 27 . This algorithm shows why the above argument is incorrect: it was able to receive v with probability 4/9, and conditioned on v being the first vertex, v is matched to u with probability 1/4. We are able to show that randomized priority algorithms cannot achieve optimality Theorem 8. No randomized priority algorithm can acheive an approximation better than 53 54 .
Proof. Using the names as above, suppose the algorithm first considers v i : (v j , v k ) and without loss of generality suppose the algorithm will match v i to v j . Then with probability 1 3 , v is named v 1 , and with probability 1 6 , (u , u) is named (u j , u k ) where u is the other neighbor of v.

ROM bipartite Matching
Ranking is an online randomized algorithm, but as observed in [35], it also has a well-known interpretation as a ROM algorithm. It is equivalent to the Fixed Ranking algorithm in ROM: performing online Ranking on a graph G = (V 1 , V 2 , E) (where V 1 is the online side and V 2 the offline side) is the same as deterministically matching to the first available neighbour in the graph G = (V 2 , V 1 , E), in the ROM model (now V 2 are the online vertices, and the ordering of V 1 used to decide which vertex is "first" corresponds to the online order in G). This means that deterministic ROM algorithms can achieve an approximation ratio of 1 − 1/e. It is known that algorithm Random does not get an approximation ratio better than 1/2 in the online setting [35]. Figure 4 shows the hard instance used for n = 6. The online vertices are columns, and they arrive from right to left. The offline vertices are rows, and a 0 entry means there is no edge between the corresponding online and offline vertices, while a 1 means that there is. This is generalized in an obvious way to an instance of 2k vertices. The first k online vertices will have degree k + 1. They will have k common neighbours (corresponding to the first k rows in the matrix), plus an additional neighbour that has degree 1 (hence, the correct choice is to match the online vertex to this additional neighbour). The last k online vertices will have degree 1, each being matched to one of the first k rows. Random has trouble with this instance because it does not use information from previous online vertices when it has to "guess" the correct match of a given online vertex. In contrast, by using a random permutation of the offline vertices, Ranking tends to be biased in favor of vertices that have occurred less in the past. Suppose that several online vertices have been matched. In the permutation used by the algorithm, the remaining offline vertices from among the first k must appear after all the offline vertices that have already been matched. On the other hand, we know nothing about the relative order among the first k offline vertices of the offline vertex u of degree 1 that is neighbour of the next online vertex. Thus, there are more permutations consistent with the choices made so far where u comes first among those available, so u is more likely to be matched. In contrast, in Random, at any point in time, all available vertices are equally likely to be matched.
Ranking has been well studied in ROM. It is interesting to note, however, that this is not the case for algorithm Random. Of course, it is very plausible that Random will not beat Ranking in ROM. However, it would be nice to know if it gets an approximation ratio greater than 1/2 in this model. In fact, we do not even know whether Ranking is asymptotically better than Random. It could even be the case that Random is asymptotically better than Ranking. In the analysis of the following theorem we show that the performance of Random in ROM for the instance described above is worse than that of Ranking.
Theorem 9. Algorithm Random achieves an asymptotic approximation ratio of at most 3/4 in ROM.
Proof. Consider the hard graphs of Figure 4. Fix a permutation of online vertices. Ranking will randomly choose a permutation of the offline vertices σ. Notice that Ranking and Random behave the same on online vertices of degree 1: they will match to its neighbour if it is still available. In particular, the behaviour of Ranking on degree 1 vertices reveals nothing about σ. We now see what happens to the vertices of degree k + 1. For the first of these, both algorithms behave the same: the probability of picking any at random is equal to the probability of any being first (among the options) in the ranking. Now, consider any online vertex u of degree k + 1 and fix the choices of matches of previous vertices. We will analyse the behaviour of Ranking and Random under the assumption that these matches were made previously by both algorithms. Let A be the set of offline vertices of degree k + 1 that were previously matched to online vertices of degree k + 1: the mistakes from the past. Let B be the set of offline vertices of degree k + 1 that are still available currently, when choosing the match of u. Notice that all vertices in B must have also been available before. Because Ranking chose matches with vertices in A, then all vertices in A go before all vertices in B in σ. However, consider the unique offline vertex v of degree 1 that is neighbour of u: the correct match of u. This vertex could appear anywhere in σ, since it has never been considered before. This means that the probability of this vertex being first in σ among the available vertices is greater than that of any vertex in B. So the probability that Ranking matches u to v is higher than the probability that it matches u to any vertex in B.
Thus, for any permutation of online vertices and any fixed choices of matching for previous vertices, the probability that Ranking matches the current online vertex of degree k + 1 to its neighbour of degree 1 (its correct match) is greater than or equal to the probability that Random does so. The size of the matching is equal to k plus the number of correct matchings: any incorrect match means there will be an online degree 1 vertex that will be unmatched. It is proved in [34] that the asymptotic approximation ratio of Ranking on these graphs is at most 3/4. Thus, this bound also holds for Random.
We now turn our attention to deterministic ROM algorithms. The following shows that in ROM an inapproximation result using a specific small graph will not yield the same inapproximation for arbitrarily large graphs just by taking the union of disjoint copies of the small graph. Consider the bipartite graph with 2 vertices on each side, where one online vertex has degree 2 and the other has degree 1. By carefully choosing the neighbour of the degree 1 vertex, we get that no deterministic algorithm can get an approximation ratio better than 0.75. Now consider a graph with 4 vertices, with 2 components, each with the form of the graph with 2 online vertices (see Figure 5).
Consider the following algorithm: match greedily at each step (so that if vertex 2 comes before 1 and 4 before 3, a perfect matching is obtained). Now, if the first vertex received (among 1,2,3,4) is vertex 1 or 3, match it to the leftmost neighbour. Otherwise, whenever there is a choice for vertex 1 because it occurred before vertex 2, choose the rightmost neighbour (analogously for vertex 3). We show that this algorithm achieves an approximation ratio of 0.875 on these graphs. If the graph consists of vertex 2 having the leftmost offline vertex as neighbour, the algorithm will get both vertices matched whenever vertex 1 occurs first in the permutation, and this happens with probability 1/4. The probability that vertex 2 comes before 1 is 1/2. Therefore the algorithm matches 1/2 * 2 + 1/4 * 2 + 1/4 * 1 = 1.75 edges in expectation. If the graph consists of vertex 2 being matched to the option on the right, the algorithm will match both when 1 does not occur first, which happens with probability 3/4. Thus in this case the algorithm matches 3/4 * 2+1/4 * 1 = 1.75 edges in expectation. The analysis for the other component can be done in the same way. That is, the performance of the algorithm on any such graph is 2 * 1.75 = 3.5. Thus, the algorithm achieves an approximation ratio of 3.5/4 = 0.875.
To the best of our knowledge, it is not known whether there is any deterministic algorithm that achieves an asymptotic approximation ratio better than 1 − 1/e. While we cannot answer this question, we do provide some experimental results suggesting that there may be some better algorithms. As in the online world, it is easy to see that we can assume without loss of generality that the algorithm is greedy: it matches whenever possible. An arbitrary algorithm ALG can be simulated by a greedy algorithm ALG as follows: if ALG matches online vertex u to v and v is not yet matched in ALG , do that same matching; else match u to any unmatched neighbour in ALG , if there is any. The set of offline vertices matched by ALG will always contain the set of offline vertices matched by ALG, so the approximation ratio of the former is at least as good as that of the latter.
Thus the question is, given a vertex, what offline neighbour is chosen as the match, among those available. We define the ranking of an online vertex v as an ordering of offline vertices which determines which one is matched to v, among the ones that are available. For instance, in Fixed Ranking, the ranking used is the same for every online vertex. We consider some algorithms which differ from this greedy algorithm with a fixed ranking. In the following, we use the convention that online vertices are labelled 0, 1, . . . , n − 1 in order of arrival, and offline vertices are somehow labelled also from 0 to n − 1. We consider the following algorithms: For every algorithm A and every n, we consider every possible bipartite graph with n online vertices and n offline vertices. For each graph, we consider all permutations of the online vertices. This yields a ratio r(A, n): the minimum over all the graphs of the average over all permutations of the performance of the algorithm on the permuted graph, divided by the optimal matching size. Recall that for n = 2, 0.75 is optimal for deterministic algorithms. Because the number of bipartite Let v be the ith online vertex and let d = deg(v) (counting matched offline vertices).

4:
The algorithm matches v using the ranking given by σ (first try f , if not try (f + 1) mod n, etc.). Let v be the ith online vertex and let d = deg(v) (counting matched offline vertices).

4:
The algorithm matches v using the ranking given by σ. Let v be the ith online vertex.

3:
The algorithm matches v to the neighbour that has occurred the least so far (breaking ties arbitrarily). 4: end for graphs grows exponentially and for each graph all permutations are considered, we limit ourselves to n ≤ 6 due to the computational resources needed. Table 2 contains the results. The table shows how Cyclic Ranking and Left-right Ranking seem to be beating Fixed Ranking for all n (except possibly tying for n = 3). Despite having lower performance than Fixed Ranking, we decided to include Least-seen because it seemed like a natural candidate, giving priority to offline vertices that have not been seen much, because most likely they have lower degree and thus less chance of being matched and because this somewhat corresponds to our intuition about what gave Ranking an advantage over Random in the online world. However the results seem to indicate it does not do very well against worst-case input. The most interesting question is whether there is an algorithm with asymptotic approximation ratio greater than 1 − 1/e, but the fact that Fixed Ranking is not optimal for every n gives hopes for a positive answer. For unweighted matching, without loss of generality we can restrict attention to greedy algorithms, that is those that will always make a match whenever it encounters a data item where the vertex has available neighbours.

Conclusion and Open Problems
We considered bipartite matching in the width, priority and ROM models. By observing that non-uniform max-of-k and advice results are equivalent, it follows that polynomially many online matchings are enough to achieve an approximation ratio arbitrarily close to 1 − 1/e while exponentially many online matchings are required to achieve an approximation ratio greater than 1 − 1/e. We turned to the question as to how large k needs to be so that max-of-k or width-k algorithms can obtain an approximation ratio greater than 1/2. We showed that if k is constant then width-k algorithms cannot achieve this. By analysing the proof more closely, we noticed that in fact maxof-log n log log n is not enough. This gave new lower bounds for bipartite matching with advice. However, there is still a gap between our inapproximation bound and the non-uniform max-of-n O(1) algorithm that de-randomizes Ranking (see Theorem 5). This algorithm is unsatisfactory because it requires exponential time pre-calculation. The main open problem then is whether or not a uniform and efficient polynomial width online algorithm is possible for online bipartite matching. We offered some possibilitiees in this regard. The study of width bipartite matching in the PBT model [2] is left as future work.
With regard to the ROM and priority models, we showed that deterministic priority algorithms cannot improve upon the 1 2 approximation achieved by any greedy maximal matching algorithm for matching. The situation for randomized priority algorithms remains quite unclear as to whether or not the KVV randomized online Ranking algorithm 1 − 1 e approximation can be improved upon. We give an example showing why the analysis of such algorithms is subtle. It is also the case that biparttite online matching is not completely understood in the ROM model. In particular, what is the precise approximation for the randomized KVV algorithm in the ROM model and is it an optimal algorithm in this regard? And what is the approximation ratio for the Random algorithm in the ROM model?
Another problem that has been studied extensively and has important theoretical and practical interest is max-sat. We considered this problem in the width models. The problem itself has multiple possible input models, and it has generalizations such as submodular max-sat. In input model 1, where the algorithm knows the weights and lengths of clauses in which the variable being processed appears (both positively and negatively), we gave an efficient linear width algorithm achieving a 3/4 approximation ratio by using very similar techniques to those in the deterministic algorithm with approximation ratio 1/2 for unconstrained submodular maximization [14]. We showed that, to achieve an approximation ratio greater than 3/4, exponential width (in the widthcut model) is required, even with input model 2. In input model 0, where the algorithm only knows the weights of clauses in which the variable being processed appears, we showed that deterministic constant width cannot achieve an approximation ratio of 2/3, so having either the length of clauses or randomization is essential; Johnson's deterministic algorithm and the randomized algorithm that assigns a variable with probabilities proportional to weights both achieve an approximation ratio of 2/3 [33] [6]. In the strongest input model, where the algorithm receives a complete description of the clauses in which the variable appears, we showed an exponential lower bound on the width-cut necessary to get an approximation ratio greater than 5/6. This should be contrasted with the exponential lower bound on the width needed by a pBT algorithm to get an approximation ratio better than 21/22 [2]. For input model 3, there is clearly a large gap between the online polynomial width 3 4 approximation and the proven inapproximation for the pBT width model. The question of limitations of randomized priority algorithms has not been studied to the best of our knowledge. Two (and multiple) pass algorithms provide another interesting extension of online (or priority) algorithms. The determinstic two-pass online algorithms for max-sat ( [45]) and biparitite matching ( [20]) provably improves upon the known bounds for deterministic one pass algorithms against an adevrsarial input.
The ultimate goal is to see to what extent "simple combinatorial algorithms" can achieve approximation ratios close to known hardness results and in doing so can come close to or even improve upon the best known offline algorithms. Part of this agenda is to better understand when and how one can de-randomize online algorithms.